Holds the data for the StakingPool Account and provides de/serialization functionality for that data

Hierarchy

  • StakingPool

Implements

Properties

allowedMints: boolean
bump: number
collections: Uint8Array
cooldownDuration: COption<bignum>
creators: Uint8Array
currency: PublicKey
endTime: COption<bignum>
key: PublicKey
lockType: LockType
maxRewardsDuration: COption<bignum>
minStakeDuration: COption<bignum>
name: string
project: PublicKey
resetStakeDuration: boolean
rewardsDuration: bignum
rewardsPerDuration: bignum
startTime: COption<bignum>
tempPlaceHolder1: number
tempPlaceHolder2: PublicKey
totalStaked: bignum

Methods

  • Returns a readable version of StakingPool properties and can be used to convert to JSON and/or logging

    Returns {
        allowedMints: boolean;
        bump: number;
        collections: Uint8Array;
        cooldownDuration: bignum;
        creators: Uint8Array;
        currency: string;
        endTime: bignum;
        key: string;
        lockType: string;
        maxRewardsDuration: bignum;
        minStakeDuration: bignum;
        name: string;
        project: string;
        resetStakeDuration: boolean;
        rewardsDuration: number | {
            toNumber: (() => number);
        };
        rewardsPerDuration: number | {
            toNumber: (() => number);
        };
        startTime: bignum;
        tempPlaceHolder1: number;
        tempPlaceHolder2: string;
        totalStaked: number | {
            toNumber: (() => number);
        };
    }

    • allowedMints: boolean
    • bump: number
    • collections: Uint8Array
    • cooldownDuration: bignum
    • creators: Uint8Array
    • currency: string
    • endTime: bignum
    • key: string
    • lockType: string
    • maxRewardsDuration: bignum
    • minStakeDuration: bignum
    • name: string
    • project: string
    • resetStakeDuration: boolean
    • rewardsDuration: number | {
          toNumber: (() => number);
      }
    • rewardsPerDuration: number | {
          toNumber: (() => number);
      }
    • startTime: bignum
    • tempPlaceHolder1: number
    • tempPlaceHolder2: string
    • totalStaked: number | {
          toNumber: (() => number);
      }
  • Serializes the StakingPool into a Buffer.

    Returns [Buffer, number]

    a tuple of the created Buffer and the offset up to which the buffer was written to store it.

  • Returns the byteSize of a Buffer holding the serialized data of StakingPool for the provided args.

    Parameters

    • args: StakingPoolArgs

      need to be provided since the byte size for this account depends on them

    Returns number

  • Deserializes the StakingPool from the provided data Buffer.

    Parameters

    • buf: Buffer
    • Optional offset: number

    Returns [StakingPool, number]

    a tuple of the account data and the offset up to which the buffer was read to obtain it.

  • Retrieves the account info from the provided address and deserializes the StakingPool from its data.

    Parameters

    • connection: Connection
    • address: PublicKey
    • Optional commitmentOrConfig: Commitment | GetAccountInfoConfig

    Returns Promise<StakingPool>

    Throws

    Error if no account info is found at the address or if deserialization fails

  • Deserializes the StakingPool from the data of the provided web3.AccountInfo.

    Parameters

    • accountInfo: AccountInfo<Buffer>
    • Optional offset: number

    Returns [StakingPool, number]

    a tuple of the account data and the offset up to which the buffer was read to obtain it.

  • Fetches the minimum balance needed to exempt an account holding StakingPool data from rent

    Parameters

    • args: StakingPoolArgs

      need to be provided since the byte size for this account depends on them

    • connection: Connection

      used to retrieve the rent exemption information

    • Optional commitment: Commitment

    Returns Promise<number>

  • Provides a web3.Connection.getProgramAccounts config builder, to fetch accounts matching filters that can be specified via that builder.

    Parameters

    • Optional programId: PublicKey

      the program that owns the accounts we are filtering

    Returns GpaBuilder<StakingPoolArgs & {
        accountDiscriminator: number[];
    }>

Generated using TypeDoc