Represents the Nectar Staking module in the Honeycomb Protocol. Allows users to interact with staking pools, claim rewards, and manage staked NFTs.

Hierarchy

  • Module
    • NectarStaking

Constructors

  • Create a new instance of NectarStaking based on the provided address.

    Parameters

    • poolAddress: PublicKey

      The address of the staking pool.

    • _pool: StakingPool

    Returns NectarStaking

Properties

_honeycomb: Honeycomb
poolAddress: PublicKey
programId: PublicKey

Accessors

  • get address(): PublicKey
  • Get the address of the staking pool.

    Returns PublicKey

    The address of the staking pool.

  • get allowedMints(): boolean
  • Get the allowed mints for the staking pool.

    Returns boolean

  • get collections(): Uint8Array
  • Get the collections associated with the staking pool.

    Returns Uint8Array

  • get cooldownDuration(): bignum
  • Get the cooldown duration for the staking pool.

    Returns bignum

  • get creators(): Uint8Array
  • Get the creators associated with the staking pool.

    Returns Uint8Array

  • get endTime(): bignum
  • Get the end time of the staking pool.

    Returns bignum

  • get lockType(): LockType
  • Get the lock type of the staking pool.

    Returns LockType

  • get maxRewardsDuration(): bignum
  • Get the maximum rewards duration for the staking pool.

    Returns bignum

  • get minStakeDuration(): bignum
  • Get the minimum stake duration for the staking pool.

    Returns bignum

  • get name(): string
  • Get the name of the staking pool.

    Returns string

  • get resetStakeDuration(): boolean
  • Get the reset stake duration for the staking pool.

    Returns boolean

  • get rewardsDuration(): bignum
  • Get the rewards duration for the staking pool.

    Returns bignum

  • get rewardsPerDuration(): bignum
  • Get the rewards per duration for the staking pool.

    Returns bignum

  • get startTime(): bignum
  • Get the start time of the staking pool.

    Returns bignum

  • get totalStaked(): bignum
  • Get the total staked amount in the staking pool.

    Returns bignum

Methods

  • Add a new multiplier to the staking pool.

    Parameters

    • args: AddMultiplierArgs

      The arguments for adding the multiplier.

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<ConfirmedContext>

    A promise that resolves when the transaction is confirmed.

  • Fetch the available NFTs for staking in the staking pool.

    Parameters

    • Optional reFetch: boolean

      If true, re-fetch the data from the blockchain.

    Returns Promise<AvailableNft[]>

    A Promise that resolves with the available NFTs data.

  • Claim rewards for staked NFTs.

    Parameters

    • nfts: StakedNft[]

      The staked NFTs to claim rewards for.

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<ConfirmedContext[]>

    A promise that resolves with an array of responses for the transactions.

  • Get the HplCurrency associated with this staking pool.

    Returns HplCurrency

    The HplCurrency instance.

  • Get the NectarStakingFetch instance to fetch data related to staking pools and NFTs.

    Returns NectarStakingFetch

    The NectarStakingFetch instance.

  • Get the Honeycomb instance associated with this NectarStaking.

    Returns Honeycomb

    The Honeycomb instance.

  • Initialize an NFT for the staking pool.

    Parameters

    • mint: PublicKey

      The address of the NFT mint.

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<ConfirmedContext>

    A promise that resolves when the transaction is confirmed.

  • Initialize the staker account for the staking pool.

    Parameters

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<ConfirmedContext>

    A promise that resolves when the transaction is confirmed.

  • Install the NectarStaking module into the Honeycomb instance.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance to install the module into.

    Returns Honeycomb

    The updated Honeycomb instance with the NectarStaking module installed.

  • Get the multipliers associated with the staking pool.

    Parameters

    • Optional reFetch: boolean

      If true, re-fetch the data from the blockchain.

    Returns Promise<StakingMultipliers>

    A Promise that resolves with the multipliers data.

  • Get the staking pool details.

    Returns StakingPool

    The staking pool details.

  • Get the HoneycombProject associated with this staking pool.

    Returns HoneycombProject

    The HoneycombProject instance.

  • Reload the data associated with the staking pool, including multipliers, stakers, available NFTs, and staked NFTs.

    Returns Promise<[void | StakingMultipliers, void | Staker, void | AvailableNft[], void | StakedNft[]]>

    A Promise that resolves when all data is reloaded.

  • Stake NFTs in the staking pool.

    Parameters

    • nfts: AvailableNft[]

      The NFTs to stake.

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<ConfirmedContext[]>

    A promise that resolves with an array of responses for the transactions.

  • Fetch the staked NFTs in the staking pool.

    Parameters

    • Optional reFetch: boolean

      If true, re-fetch the data from the blockchain.

    Returns Promise<StakedNft[]>

    A Promise that resolves with the staked NFTs data.

  • Get the staker associated with the staking pool.

    Parameters

    • Optional args: {
          wallet: PublicKey;
      } | {
          address: PublicKey;
      }

      Optional object containing either wallet address or staker address.

    • Optional reFetch: boolean

      If true, re-fetch the data from the blockchain.

    Returns Promise<Staker>

    A Promise that resolves with the Staker instance.

  • Unstake NFTs from the staking pool.

    Parameters

    • nfts: StakedNft[]

      The staked NFTs to unstake.

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<ConfirmedContext[]>

    A promise that resolves with an array of responses for the transactions.

  • Update the staking pool with new parameters.

    Parameters

    • args: UpdatePoolArgs

      The arguments for updating the staking pool.

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<ConfirmedContext>

    A Promise that resolves with the context of the transaction.

  • Get the vault of the staking pool currency.

    Returns Promise<HplHolderAccount>

    The vault account address.

  • Withdraw rewards from the staking pool.

    Parameters

    • amount: number

      The amount of rewards to withdraw.

    • Optional receiverWallet: PublicKey

      Optional receiver wallet address, defaults to the identity wallet address.

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<ConfirmedContext>

    A promise that resolves when the transaction is confirmed.

  • Create a new instance of NectarStaking based on the provided address.

    Parameters

    • connection: Connection

      The Solana connection object.

    • poolAddress: PublicKey

      The address of the staking pool.

    • Optional commitmentOrConfig: Commitment | GetAccountInfoConfig

      Optional parameter for the commitment or account info config.

    Returns Promise<NectarStaking>

    A new NectarStaking instance.

  • Create a new NectarStaking instance with the provided arguments.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance.

    • args: NewStakingPoolArgs

      The arguments for creating a new staking pool.

    • Optional confirmOptions: ConfirmOptions

      Optional transaction confirmation options.

    Returns Promise<NectarStaking>

    A new NectarStaking instance representing the created staking pool.

Generated using TypeDoc