Methods
Static addStake
- addStake(provider: AnchorProvider, stakePool: StakePool, owner: PublicKey, collateralTokenAccount: PublicKey, amount: BN): Promise<string>
Parameters
provider: AnchorProvider
owner: PublicKey
collateralTokenAccount: PublicKey
amount: BN
Returns Promise<string>
Static create
- create(stakeProgram: Program<StakeIdl>, stakePool: PublicKey, owner: PublicKey, payer: PublicKey): Promise<string>
Parameters
stakeProgram: Program<StakeIdl>
stakePool: PublicKey
owner: PublicKey
payer: PublicKey
Returns Promise<string>
Static deriveAccounts
Parameters
stakeProgram: Program<StakeIdl>
stakePool: PublicKey
owner: PublicKey
Static exists
- exists(stakeProgram: Program<StakeIdl>, stakePool: PublicKey, owner: PublicKey): Promise<boolean>
Parameters
stakeProgram: Program<StakeIdl>
stakePool: PublicKey
owner: PublicKey
Returns Promise<boolean>
Static load
- load(stakeProgram: Program<StakeIdl>, stakePool: PublicKey, owner: PublicKey): Promise<StakeAccount>
Parameters
stakeProgram: Program<StakeIdl>
stakePool: PublicKey
owner: PublicKey
Static use
Parameters
stakeProgram: undefined | Program<StakeIdl>
stakePool: undefined | StakePool
wallet: undefined | PublicKey
Static withAddStake
- withAddStake(instructions: TransactionInstruction[], stakePool: StakePool, owner: PublicKey, payer: PublicKey, tokenAccount: PublicKey, amount?: null | BN): Promise<void>
Parameters
instructions: TransactionInstruction[]
owner: PublicKey
payer: PublicKey
tokenAccount: PublicKey
amount: null | BN = null
Returns Promise<void>
Static withCreate
- withCreate(instructions: TransactionInstruction[], stakeProgram: Program<StakeIdl>, stakePool: PublicKey, owner: PublicKey, payer: PublicKey): Promise<void>
Parameters
instructions: TransactionInstruction[]
stakeProgram: Program<StakeIdl>
stakePool: PublicKey
owner: PublicKey
payer: PublicKey
Returns Promise<void>
TODO:
StakeAccount