UNPKG

@kamino-finance/klend-sdk

Version:

Typescript SDK for interacting with the Kamino Lending (klend) protocol

76 lines 3.97 kB
import { ValidatorList } from '@solana/spl-stake-pool'; import { StakePool } from '@solana/spl-stake-pool'; import BN from 'bn.js'; import { Address, GetAccountInfoApi, GetBalanceApi, GetMultipleAccountsApi, GetProgramAccountsApi, AccountMeta, AccountSignerMeta, KeyPairSigner, Rpc } from '@solana/kit'; export declare const TRANSIENT_STAKE_SEED_PREFIX: Buffer<ArrayBuffer>; export declare const STAKE_ACCOUNT_RENT_EXEMPTION: BN; export declare const STAKE_POOL_PROGRAM_ID: Address; export declare function getStandardPoolState(rpc: Rpc<GetAccountInfoApi>, address: Address): Promise<StakePool>; export declare function getValidatorList(rpc: Rpc<GetAccountInfoApi>, address: Address): Promise<ValidatorList>; export declare function maybeGetStakedPoolByMint(rpc: Rpc<GetProgramAccountsApi>, mint: Address): Promise<[StakePool, Address] | undefined>; export declare function getStandardPoolMintRemainingAccounts(rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetBalanceApi>, stakedSolPool: StakePool, stakedSolPoolPk: Address, stakedSolToDeposit: BN): Promise<[Array<AccountMeta | AccountSignerMeta>, Array<KeyPairSigner>]>; export declare function getWithdrawCandidates(rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetBalanceApi>, stakedSolPool: StakePool, stakedSolPoolPk: Address, stakedSolToDeposit: BN): Promise<Array<Address>>; /** * Generates the withdraw authority program address for the stake pool */ export declare function findWithdrawAuthorityProgramAddress(programId: Address, stakePoolAddress: Address): Promise<Address<string>>; export declare function findStakeProgramAddress(programId: Address, voteAccountAddress: Address, stakedSolPoolPk: Address, seed: number): Promise<Address>; export declare function findTransientStakeProgramAddress(programId: Address, voteAccountAddress: Address, stakePoolAddress: Address, seed: BN): Promise<Address<string>>; export declare function calcLamportsWithdrawAmount(stakePool: StakePool, poolTokens: BN): BN; export declare class StakeMeta { readonly rentExemptReserve: BN; readonly authorizedStaker: Address; readonly authorizedWithdrawer: Address; readonly lockupUnixTimestamp: BN; readonly lockupEpoch: BN; readonly lockupCustodian: Address; static layout(property?: string): import("buffer-layout").Layout<StakeMeta>; constructor(fields: { rentExemptReserve: BN; authorizedStaker: Address; authorizedWithdrawer: Address; lockupUnixTimestamp: BN; lockupEpoch: BN; lockupCustodian: Address; }); static decode(data: Buffer): StakeMeta; } export declare class StakeInfo { readonly delegationVoter: Address; readonly delegationStake: BN; readonly delegationActivationEpoch: BN; readonly delegationDeactivationEpoch: BN; readonly delegationWarmupCooldownRate: number; readonly creditsObserved: BN; static layout(property?: string): import("buffer-layout").Layout<StakeInfo>; constructor(fields: { delegationVoter: Address; delegationStake: BN; delegationActivationEpoch: BN; delegationDeactivationEpoch: BN; delegationWarmupCooldownRate: number; creditsObserved: BN; }); static decode(data: Buffer): StakeInfo; } export declare class SmallStakeAccountInfo { readonly meta: StakeMeta; readonly stake: StakeInfo; static layout(property?: string): import("buffer-layout").Layout<SmallStakeAccountInfo>; constructor(fields: { meta: StakeMeta; stake: StakeInfo; }); static decode(data: Buffer): SmallStakeAccountInfo; } export declare class StakeAccount { readonly type: number; readonly info: SmallStakeAccountInfo; static readonly layout: import("buffer-layout").Layout<StakeAccount>; constructor(fields: { type: number; info: SmallStakeAccountInfo; }); static decode(data: Buffer): StakeAccount; } //# sourceMappingURL=standardStakePool.d.ts.map