@ignitionfi/spl-stake-pool 1.1.23 → 1.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.cjs.js +6 -9
- package/dist/index.browser.cjs.js.map +1 -1
- package/dist/index.browser.esm.js +6 -9
- package/dist/index.browser.esm.js.map +1 -1
- package/dist/index.cjs.js +6 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.js +6 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +6 -9
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/instructions.d.ts +2 -3
- package/package.json +1 -1
- package/src/index.ts +5 -9
- package/src/instructions.ts +2 -5
package/dist/index.iife.js
CHANGED
|
@@ -22755,9 +22755,9 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
22755
22755
|
}
|
|
22756
22756
|
/**
|
|
22757
22757
|
* Creates a transaction instruction to withdraw WSOL from a stake pool using a session.
|
|
22758
|
+
* Rent for ATA creation (if needed) is paid from the withdrawal amount.
|
|
22758
22759
|
*/
|
|
22759
22760
|
static withdrawWsolWithSession(params) {
|
|
22760
|
-
var _a;
|
|
22761
22761
|
const type = STAKE_POOL_INSTRUCTION_LAYOUTS.WithdrawWsolWithSession;
|
|
22762
22762
|
const data = encodeData(type, {
|
|
22763
22763
|
poolTokensIn: params.poolTokensIn,
|
|
@@ -22778,7 +22778,6 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
22778
22778
|
{ pubkey: params.tokenProgramId, isSigner: false, isWritable: false },
|
|
22779
22779
|
{ pubkey: params.wsolMint, isSigner: false, isWritable: false },
|
|
22780
22780
|
{ pubkey: params.programSigner, isSigner: false, isWritable: true },
|
|
22781
|
-
{ pubkey: (_a = params.payer) !== null && _a !== void 0 ? _a : params.userTransferAuthority, isSigner: true, isWritable: true },
|
|
22782
22781
|
{ pubkey: params.userWallet, isSigner: false, isWritable: false },
|
|
22783
22782
|
{ pubkey: SystemProgram.programId, isSigner: false, isWritable: false },
|
|
22784
22783
|
];
|
|
@@ -22799,6 +22798,7 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
22799
22798
|
}
|
|
22800
22799
|
/**
|
|
22801
22800
|
* Creates a transaction instruction to withdraw stake from a stake pool using a Fogo session.
|
|
22801
|
+
* The stake account is created as a PDA and rent is paid from the withdrawal amount.
|
|
22802
22802
|
*/
|
|
22803
22803
|
static withdrawStakeWithSession(params) {
|
|
22804
22804
|
const type = STAKE_POOL_INSTRUCTION_LAYOUTS.WithdrawStakeWithSession;
|
|
@@ -22822,7 +22822,6 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
22822
22822
|
{ pubkey: params.tokenProgramId, isSigner: false, isWritable: false },
|
|
22823
22823
|
{ pubkey: StakeProgram.programId, isSigner: false, isWritable: false },
|
|
22824
22824
|
{ pubkey: params.programSigner, isSigner: false, isWritable: false },
|
|
22825
|
-
{ pubkey: params.payer, isSigner: true, isWritable: true },
|
|
22826
22825
|
{ pubkey: SystemProgram.programId, isSigner: false, isWritable: false },
|
|
22827
22826
|
];
|
|
22828
22827
|
return new TransactionInstruction({
|
|
@@ -23397,8 +23396,9 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
23397
23396
|
}
|
|
23398
23397
|
/**
|
|
23399
23398
|
* Creates instructions required to withdraw wSOL from a stake pool.
|
|
23399
|
+
* Rent for ATA creation (if needed) is paid from the withdrawal amount.
|
|
23400
23400
|
*/
|
|
23401
|
-
async function withdrawWsolWithSession(connection, stakePoolAddress, signerOrSession, userPubkey, amount, minimumLamportsOut = 0, solWithdrawAuthority
|
|
23401
|
+
async function withdrawWsolWithSession(connection, stakePoolAddress, signerOrSession, userPubkey, amount, minimumLamportsOut = 0, solWithdrawAuthority) {
|
|
23402
23402
|
const stakePoolAccount = await getStakePoolAccount(connection, stakePoolAddress);
|
|
23403
23403
|
const stakePoolProgramId = getStakePoolProgramId(connection.rpcEndpoint);
|
|
23404
23404
|
const stakePool = stakePoolAccount.account.data;
|
|
@@ -23431,7 +23431,6 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
23431
23431
|
wsolMint: NATIVE_MINT,
|
|
23432
23432
|
programSigner,
|
|
23433
23433
|
userWallet: userPubkey,
|
|
23434
|
-
payer,
|
|
23435
23434
|
poolTokensIn: poolTokens,
|
|
23436
23435
|
minimumLamportsOut,
|
|
23437
23436
|
}));
|
|
@@ -23466,13 +23465,12 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
23466
23465
|
* Withdraws stake from a stake pool using a Fogo session.
|
|
23467
23466
|
*
|
|
23468
23467
|
* The on-chain program creates stake account PDAs, so no pre-creation step is needed.
|
|
23469
|
-
*
|
|
23468
|
+
* Rent for the stake account PDAs is paid from the withdrawal amount.
|
|
23470
23469
|
*
|
|
23471
23470
|
* @param connection - Solana connection
|
|
23472
23471
|
* @param stakePoolAddress - The stake pool to withdraw from
|
|
23473
23472
|
* @param signerOrSession - The session signer public key
|
|
23474
23473
|
* @param userPubkey - User's wallet (used for PDA derivation and token ownership)
|
|
23475
|
-
* @param payer - Payer for stake account rent (paymaster payer in session context)
|
|
23476
23474
|
* @param amount - Amount of pool tokens to withdraw
|
|
23477
23475
|
* @param userStakeSeedStart - Starting seed for user stake PDA derivation (default: 0)
|
|
23478
23476
|
* @param useReserve - Whether to withdraw from reserve (default: false)
|
|
@@ -23480,7 +23478,7 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
23480
23478
|
* @param minimumLamportsOut - Minimum lamports to receive (slippage protection)
|
|
23481
23479
|
* @param validatorComparator - Optional comparator for validator selection
|
|
23482
23480
|
*/
|
|
23483
|
-
async function withdrawStakeWithSession(connection, stakePoolAddress, signerOrSession, userPubkey,
|
|
23481
|
+
async function withdrawStakeWithSession(connection, stakePoolAddress, signerOrSession, userPubkey, amount, userStakeSeedStart = 0, useReserve = false, voteAccountAddress, minimumLamportsOut = 0, validatorComparator) {
|
|
23484
23482
|
const stakePoolAccount = await getStakePoolAccount(connection, stakePoolAddress);
|
|
23485
23483
|
const stakePoolProgramId = getStakePoolProgramId(connection.rpcEndpoint);
|
|
23486
23484
|
const stakePool = stakePoolAccount.account.data;
|
|
@@ -23558,7 +23556,6 @@ var solanaStakePool = (function (exports, node_buffer) {
|
|
|
23558
23556
|
poolMint: stakePool.poolMint,
|
|
23559
23557
|
tokenProgramId: stakePool.tokenProgramId,
|
|
23560
23558
|
programSigner,
|
|
23561
|
-
payer,
|
|
23562
23559
|
poolTokensIn: withdrawAccount.poolAmount.toNumber(),
|
|
23563
23560
|
minimumLamportsOut,
|
|
23564
23561
|
userStakeSeed,
|