PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-coin-sol/dist/src/lib
Просмотр файла: jitoStakePoolOperations.d.ts
/**
* @file Implementation of the depositSol instruction. On upgrade of
* '@solana/spl-token', this module may no longer be necessary.
*/
import { DepositSolParams, WithdrawStakeParams } from '@solana/spl-stake-pool';
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
/**
* Replicates the fields in @solana/spl-stake-pool Fee.
*
* @see {Fee}
*/
export interface Fee {
denominator: string;
numerator: string;
}
/**
* Replicates the fields in @solana/spl-stake-pool StakePoolLayout.
*
* @see {StakePoolLayout}
*/
export interface StakePoolData {
accountType: number;
manager: string;
staker: string;
stakeDepositAuthority: string;
stakeWithdrawBumpSeed: number;
validatorListAccount: string;
reserveStake: string;
poolMint: string;
managerFeeAccount: string;
tokenProgramId: string;
totalLamports: string;
poolTokenSupply: string;
lastUpdateEpoch: string;
lockup: {
unixTimestamp: string;
epoch: string;
custodian: string;
};
epochFee: Fee;
nextEpochFee?: Fee | undefined;
preferredDepositValidatorVoteAddress?: string | undefined;
preferredWithdrawValidatorVoteAddress?: string | undefined;
stakeDepositFee: Fee;
stakeWithdrawalFee: Fee;
nextStakeWithdrawalFee?: Fee | undefined;
stakeReferralFee: number;
solDepositAuthority?: string | undefined;
solDepositFee: Fee;
solReferralFee: number;
solWithdrawAuthority?: string | undefined;
solWithdrawalFee: Fee;
nextSolWithdrawalFee?: Fee | undefined;
lastEpochPoolTokenSupply: string;
lastEpochTotalLamports: string;
}
export declare const DEPOSIT_SOL_LAYOUT_CODE = 14;
export declare const WITHDRAW_STAKE_LAYOUT_CODE = 10;
/**
* Generates the withdraw authority program address for the stake pool.
* Like findWithdrawAuthorityProgramAddress in @solana/spl-stake-pool,
* but synchronous.
*
* @see {findWithdrawAuthorityProgramAddress}
*/
export declare function findWithdrawAuthorityProgramAddressSync(programId: PublicKey, stakePoolAddress: PublicKey): PublicKey;
export interface DepositSolInstructionsParams {
stakePoolAddress: PublicKey;
from: PublicKey;
lamports: bigint;
}
export type DepositSolStakePoolData = Pick<StakePoolData, 'poolMint' | 'reserveStake' | 'managerFeeAccount'>;
/**
* Construct Solana depositSol stake pool instruction from parameters.
*
* @param {DepositSolInstructionsParams} params - parameters for staking to stake pool
* @param poolMint - pool mint derived from getStakePoolAccount
* @param reserveStake - reserve account derived from getStakePoolAccount
* @param managerFeeAccount - manager fee account derived from getStakePoolAccount
* @returns {TransactionInstruction}
*/
export declare function depositSolInstructions(params: DepositSolInstructionsParams, stakePool: DepositSolStakePoolData): TransactionInstruction[];
/**
* Construct Solana depositSol stake pool parameters from instruction.
*
* @param {TransactionInstruction} instruction
* @returns {DepositSolParams}
*/
export declare function decodeDepositSol(instruction: TransactionInstruction): DepositSolParams;
export interface WithdrawStakeInstructionsParams {
stakePoolAddress: PublicKey;
tokenOwner: PublicKey;
destinationStakeAccount: PublicKey;
validatorAddress: PublicKey;
transferAuthority: PublicKey;
poolAmount: string;
}
export type WithdrawStakeStakePoolData = Pick<StakePoolData, 'poolMint' | 'validatorListAccount' | 'managerFeeAccount'>;
/**
* Construct Solana depositSol stake pool instruction from parameters.
*
* @param {DepositSolInstructionsParams} params - parameters for staking to stake pool
* @param poolMint - pool mint derived from getStakePoolAccount
* @param reserveStake - reserve account derived from getStakePoolAccount
* @param managerFeeAccount - manager fee account derived from getStakePoolAccount
* @returns {TransactionInstruction}
*/
export declare function withdrawStakeInstructions(params: WithdrawStakeInstructionsParams, stakePool: WithdrawStakeStakePoolData): TransactionInstruction[];
/**
* Construct Solana withdrawStake stake pool parameters from instruction.
*
* @param {TransactionInstruction} instruction
* @returns {DepositSolParams}
*/
export declare function decodeWithdrawStake(instruction: TransactionInstruction): WithdrawStakeParams;
//# sourceMappingURL=jitoStakePoolOperations.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!