@ignitionfi/spl-stake-pool 1.1.17 → 1.1.19

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.
@@ -1,4 +1,4 @@
1
- import { TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, createAssociatedTokenAccountIdempotentInstruction, NATIVE_MINT, getAccount, createApproveInstruction } from '@solana/spl-token';
1
+ import { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, createAssociatedTokenAccountIdempotentInstruction, NATIVE_MINT, getAccount, createApproveInstruction } from '@solana/spl-token';
2
2
  import { PublicKey, LAMPORTS_PER_SOL, StakeProgram, Keypair, SystemProgram, SYSVAR_RENT_PUBKEY, SYSVAR_CLOCK_PUBKEY, SYSVAR_STAKE_HISTORY_PUBKEY, STAKE_CONFIG_ID, TransactionInstruction, StakeAuthorizationLayout } from '@solana/web3.js';
3
3
  import BN from 'bn.js';
4
4
  import { Buffer as Buffer$1 } from 'node:buffer';
@@ -1456,6 +1456,8 @@ class StakePoolInstruction {
1456
1456
  isWritable: false,
1457
1457
  });
1458
1458
  }
1459
+ // Associated Token Program must be last - only needed in transaction for CPI routing
1460
+ keys.push({ pubkey: ASSOCIATED_TOKEN_PROGRAM_ID, isSigner: false, isWritable: false });
1459
1461
  return new TransactionInstruction({
1460
1462
  programId: params.programId,
1461
1463
  keys,