diff --git a/clients/js-legacy/package.json b/clients/js-legacy/package.json index 8744429b..aab801a7 100644 --- a/clients/js-legacy/package.json +++ b/clients/js-legacy/package.json @@ -45,6 +45,8 @@ "@solana/web3.js": "^1.98.4", "@solana/addresses": "6.5.0", "@solana/prettier-config-solana": "^0.0.6", + "@solana/rpc-api": "6.5.0", + "@solana/rpc-spec": "6.5.0", "@solana/spl-single-pool": "workspace:*", "eslint-config-prettier": "^10.1.8", "eslint-plugin-prettier": "^5.5.5", diff --git a/clients/js-legacy/src/internal.ts b/clients/js-legacy/src/internal.ts index e1628ee7..40f59c59 100644 --- a/clients/js-legacy/src/internal.ts +++ b/clients/js-legacy/src/internal.ts @@ -1,9 +1,18 @@ +import { Address } from '@solana/addresses'; +import { + GetAccountInfoApi, + GetMinimumBalanceForRentExemptionApi, + GetStakeMinimumDelegationApi, +} from '@solana/rpc-api'; +import { Rpc } from '@solana/rpc-spec'; import { Connection, Transaction, TransactionInstruction, PublicKey } from '@solana/web3.js'; import { Buffer } from 'buffer'; -export function rpc(connection: Connection) { +export function rpc( + connection: Connection, +): Rpc { return { - getAccountInfo(address: string) { + getAccountInfo(address: Address): any { return { async send() { const pubkey = new PublicKey(address); @@ -11,14 +20,14 @@ export function rpc(connection: Connection) { }, }; }, - getMinimumBalanceForRentExemption(size: bigint) { + getMinimumBalanceForRentExemption(size: bigint): any { return { async send() { return BigInt(await connection.getMinimumBalanceForRentExemption(Number(size))); }, }; }, - getStakeMinimumDelegation() { + getStakeMinimumDelegation(): any { return { async send() { const minimumDelegation = await connection.getStakeMinimumDelegation(); diff --git a/clients/js/package.json b/clients/js/package.json index 0dfccee8..e8f7763d 100644 --- a/clients/js/package.json +++ b/clients/js/package.json @@ -36,7 +36,11 @@ }, "dependencies": { "@solana/addresses": "6.5.0", - "@solana/instructions": "2.3.0", - "@solana/transaction-messages": "2.2.1" + "@solana/functional": "6.5.0", + "@solana/instructions": "6.5.0", + "@solana/instruction-plans": "6.5.0", + "@solana/rpc-api": "6.5.0", + "@solana/rpc-spec": "6.5.0", + "@solana/transaction-messages": "6.5.0" } } diff --git a/clients/js/src/instructions.ts b/clients/js/src/instructions.ts index 38a29c7f..aa74f1ad 100644 --- a/clients/js/src/instructions.ts +++ b/clients/js/src/instructions.ts @@ -2,11 +2,11 @@ import { getAddressCodec, Address } from '@solana/addresses'; import { ReadonlySignerAccount, ReadonlyAccount, - IInstructionWithAccounts, - IInstructionWithData, + InstructionWithAccounts, + InstructionWithData, WritableAccount, WritableSignerAccount, - IInstruction, + Instruction, AccountRole, } from '@solana/instructions'; @@ -42,8 +42,8 @@ import { u64, } from './quarantine.js'; -type InitializePoolInstruction = IInstruction & - IInstructionWithAccounts< +type InitializePoolInstruction = Instruction & + InstructionWithAccounts< [ ReadonlyAccount, WritableAccount, @@ -60,10 +60,10 @@ type InitializePoolInstruction = IInstruction & ReadonlyAccount, ] > & - IInstructionWithData; + InstructionWithData; -type ReplenishPoolInstruction = IInstruction & - IInstructionWithAccounts< +type ReplenishPoolInstruction = Instruction & + InstructionWithAccounts< [ ReadonlyAccount, ReadonlyAccount, @@ -76,10 +76,10 @@ type ReplenishPoolInstruction = IInstruction & ReadonlyAccount, ] > & - IInstructionWithData; + InstructionWithData; -type DepositStakeInstruction = IInstruction & - IInstructionWithAccounts< +type DepositStakeInstruction = Instruction & + InstructionWithAccounts< [ ReadonlyAccount, WritableAccount, @@ -96,10 +96,10 @@ type DepositStakeInstruction = IInstruction & ReadonlyAccount, ] > & - IInstructionWithData; + InstructionWithData; -type WithdrawStakeInstruction = IInstruction & - IInstructionWithAccounts< +type WithdrawStakeInstruction = Instruction & + InstructionWithAccounts< [ ReadonlyAccount, WritableAccount, @@ -114,10 +114,10 @@ type WithdrawStakeInstruction = IInstruction & ReadonlyAccount, ] > & - IInstructionWithData; + InstructionWithData; -type CreateTokenMetadataInstruction = IInstruction & - IInstructionWithAccounts< +type CreateTokenMetadataInstruction = Instruction & + InstructionWithAccounts< [ ReadonlyAccount, ReadonlyAccount, @@ -129,10 +129,10 @@ type CreateTokenMetadataInstruction = IInstruction, ] > & - IInstructionWithData; + InstructionWithData; -type UpdateTokenMetadataInstruction = IInstruction & - IInstructionWithAccounts< +type UpdateTokenMetadataInstruction = Instruction & + InstructionWithAccounts< [ ReadonlyAccount, ReadonlyAccount, @@ -142,10 +142,10 @@ type UpdateTokenMetadataInstruction = IInstruction, ] > & - IInstructionWithData; + InstructionWithData; -type InitializeOnRampInstruction = IInstruction & - IInstructionWithAccounts< +type InitializeOnRampInstruction = Instruction & + InstructionWithAccounts< [ ReadonlyAccount, WritableAccount, @@ -155,7 +155,7 @@ type InitializeOnRampInstruction = IInstruction & ReadonlyAccount, ] > & - IInstructionWithData; + InstructionWithData; const enum SinglePoolInstructionType { InitializePool = 0, diff --git a/clients/js/src/transactions.ts b/clients/js/src/transactions.ts index 69d846fd..6177698b 100644 --- a/clients/js/src/transactions.ts +++ b/clients/js/src/transactions.ts @@ -1,7 +1,22 @@ import { Address } from '@solana/addresses'; +import { pipe } from '@solana/functional'; +import { + InstructionPlan, + assertIsSingleTransactionPlan, + createTransactionPlanner, + parallelInstructionPlan, + sequentialInstructionPlan, +} from '@solana/instruction-plans'; +import { + GetAccountInfoApi, + GetMinimumBalanceForRentExemptionApi, + GetStakeMinimumDelegationApi, +} from '@solana/rpc-api'; +import { Rpc } from '@solana/rpc-spec'; import { appendTransactionMessageInstruction, createTransactionMessage, + setTransactionMessageFeePayer, TransactionVersion, TransactionMessage, } from '@solana/transaction-messages'; @@ -40,7 +55,7 @@ import { } from './quarantine.js'; interface DepositParams { - rpc: any; // XXX Rpc + rpc: Rpc; pool: PoolAddress; userWallet: Address; userStakeAccount?: Address; @@ -52,7 +67,7 @@ interface DepositParams { } interface WithdrawParams { - rpc: any; // XXX Rpc + rpc: Rpc; pool: PoolAddress; userWallet: Address; userStakeAccount: Address; @@ -78,83 +93,72 @@ export const SinglePoolProgram = { createAndDelegateUserStake: createAndDelegateUserStakeTransaction, }; -export async function initializeTransaction( - rpc: any, // XXX not exported: Rpc, +async function getInitializeInstructionPlan( + rpc: Rpc, voteAccount: VoteAccountAddress, payer: Address, skipMetadata = false, -): Promise { - let transaction = createTransactionMessage({ version: 0 }); - +): Promise { const pool = await findPoolAddress(SINGLE_POOL_PROGRAM_ID, voteAccount); - const [stake, mint, onramp, poolRent, stakeRent, mintRent, minimumDelegationObj] = - await Promise.all([ - findPoolStakeAddress(SINGLE_POOL_PROGRAM_ID, pool), - findPoolMintAddress(SINGLE_POOL_PROGRAM_ID, pool), - findPoolOnRampAddress(SINGLE_POOL_PROGRAM_ID, pool), - rpc.getMinimumBalanceForRentExemption(SINGLE_POOL_ACCOUNT_SIZE).send(), - rpc.getMinimumBalanceForRentExemption(STAKE_ACCOUNT_SIZE).send(), - rpc.getMinimumBalanceForRentExemption(MINT_SIZE).send(), - rpc.getStakeMinimumDelegation().send(), - ]); + const [ + stake, + mint, + onramp, + poolRent, + stakeRent, + mintRent, + minimumDelegationObj, + initializePool, + initializeOnRamp, + ] = await Promise.all([ + findPoolStakeAddress(SINGLE_POOL_PROGRAM_ID, pool), + findPoolMintAddress(SINGLE_POOL_PROGRAM_ID, pool), + findPoolOnRampAddress(SINGLE_POOL_PROGRAM_ID, pool), + rpc.getMinimumBalanceForRentExemption(SINGLE_POOL_ACCOUNT_SIZE).send(), + rpc.getMinimumBalanceForRentExemption(STAKE_ACCOUNT_SIZE).send(), + rpc.getMinimumBalanceForRentExemption(MINT_SIZE).send(), + rpc.getStakeMinimumDelegation().send(), + initializePoolInstruction(voteAccount), + initializeOnRampInstruction(pool), + ]); const lamportsPerSol = 1_000_000_000n; const minimumPoolBalance = minimumDelegationObj.value > lamportsPerSol ? minimumDelegationObj.value : lamportsPerSol; - transaction = appendTransactionMessageInstruction( - SystemInstruction.transfer({ - from: payer, - to: pool, - lamports: poolRent, - }), - transaction, - ); - - transaction = appendTransactionMessageInstruction( - SystemInstruction.transfer({ - from: payer, - to: stake, - lamports: stakeRent + minimumPoolBalance, - }), - transaction, - ); - - transaction = appendTransactionMessageInstruction( - SystemInstruction.transfer({ - from: payer, - to: onramp, - lamports: stakeRent, - }), - transaction, - ); - - transaction = appendTransactionMessageInstruction( - SystemInstruction.transfer({ - from: payer, - to: mint, - lamports: mintRent, - }), - transaction, - ); - - transaction = appendTransactionMessageInstruction( - await initializePoolInstruction(voteAccount), - transaction, - ); - - transaction = appendTransactionMessageInstruction( - await initializeOnRampInstruction(pool), - transaction, - ); - - if (!skipMetadata) { - transaction = appendTransactionMessageInstruction( - await createTokenMetadataInstruction(pool, payer), - transaction, - ); - } + return sequentialInstructionPlan([ + parallelInstructionPlan([ + SystemInstruction.transfer({ from: payer, to: pool, lamports: poolRent }), + SystemInstruction.transfer({ + from: payer, + to: stake, + lamports: stakeRent + minimumPoolBalance, + }), + SystemInstruction.transfer({ from: payer, to: onramp, lamports: stakeRent }), + SystemInstruction.transfer({ from: payer, to: mint, lamports: mintRent }), + ]), + initializePool, + initializeOnRamp, + ...(skipMetadata ? [] : [await createTokenMetadataInstruction(pool, payer)]), + ]); +} - return transaction; +export async function initializeTransaction( + rpc: Rpc, + voteAccount: VoteAccountAddress, + payer: Address, + skipMetadata = false, +): Promise { + const transactionPlanner = createTransactionPlanner({ + createTransactionMessage: () => + pipe(createTransactionMessage({ version: 0 }), (m) => + setTransactionMessageFeePayer(payer, m), + ), + }); + + const instructionPlan = await getInitializeInstructionPlan(rpc, voteAccount, payer, skipMetadata); + const transactionPlan = await transactionPlanner(instructionPlan); + assertIsSingleTransactionPlan(transactionPlan); + return transactionPlan.message; } export async function replenishPoolTransaction( @@ -321,7 +325,7 @@ export async function updateTokenMetadataTransaction( } export async function initializeOnRampTransaction( - rpc: any, // XXX not exported: Rpc, + rpc: Rpc, pool: PoolAddress, payer: Address, ): Promise { @@ -351,7 +355,7 @@ export async function initializeOnRampTransaction( /** @deprecated */ export async function createAndDelegateUserStakeTransaction( - rpc: any, // XXX not exported: Rpc, + rpc: Rpc, voteAccount: VoteAccountAddress, userWallet: Address, stakeAmount: bigint, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 74457610..0194d081 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,12 +13,24 @@ importers: '@solana/addresses': specifier: 6.5.0 version: 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/functional': + specifier: 6.5.0 + version: 6.5.0(typescript@5.9.3) + '@solana/instruction-plans': + specifier: 6.5.0 + version: 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) '@solana/instructions': - specifier: 2.3.0 - version: 2.3.0(typescript@5.9.3) + specifier: 6.5.0 + version: 6.5.0(typescript@5.9.3) + '@solana/rpc-api': + specifier: 6.5.0 + version: 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-spec': + specifier: 6.5.0 + version: 6.5.0(typescript@5.9.3) '@solana/transaction-messages': - specifier: 2.2.1 - version: 2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + specifier: 6.5.0 + version: 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) devDependencies: '@solana/prettier-config-solana': specifier: ^0.0.6 @@ -53,6 +65,12 @@ importers: '@solana/prettier-config-solana': specifier: ^0.0.6 version: 0.0.6(prettier@3.8.1) + '@solana/rpc-api': + specifier: 6.5.0 + version: 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-spec': + specifier: 6.5.0 + version: 6.5.0(typescript@5.9.3) '@solana/spl-single-pool': specifier: workspace:* version: link:../js @@ -625,12 +643,6 @@ packages: resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} - '@solana/addresses@2.2.1': - resolution: {integrity: sha512-PpaGtoghW2z1YJ2yyHm9OPKxmEVnLHuZWRxV/iKgslsMigy3ZuTV8HbmrzVP3idPzVjvcl/pmOQqpwq8Wm8Dkw==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/addresses@6.5.0': resolution: {integrity: sha512-iD4/u3CWchQcPofbwzteaE9RnFJSoi654Rnhru5fOu6U2XOte3+7t50d6OxdxQ109ho2LqZyVtyCo2Wb7u1aJQ==} engines: {node: '>=20.18.0'} @@ -640,12 +652,6 @@ packages: typescript: optional: true - '@solana/assertions@2.2.1': - resolution: {integrity: sha512-yJ3o/fva0iBbqEsmiXh0WsmNACyJpupT8VOf7TTXwqwDF40fMJE0aU+szVcpuLxf9MTmGZuFIZF1F/NWdAvZ5A==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/assertions@6.5.0': resolution: {integrity: sha512-rEAf40TtC9r6EtJFLe39WID4xnTNT6hdOVRfD1xDzmIQdVOyGgIbJGt2FAuB/uQDKLWneWMnvGDBim+K61Bljw==} engines: {node: '>=20.18.0'} @@ -659,12 +665,6 @@ packages: resolution: {integrity: sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==} engines: {node: '>=5.10'} - '@solana/codecs-core@2.2.1': - resolution: {integrity: sha512-ZW1kTmvqhQhk/jMDo7wZgApn1Lf+d3AecHF6bcWPVSr+KlGLtWZL0wcP+0tnsncPhvG28pZxRR57f4TUylSA7Q==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/codecs-core@2.3.0': resolution: {integrity: sha512-oG+VZzN6YhBHIoSKgS5ESM9VIGzhWjEHEGNPSibiDTxFhsFWxNaz8LbMDPjBUE69r9wmdGLkrQ+wVPbnJcZPvw==} engines: {node: '>=20.18.0'} @@ -680,17 +680,14 @@ packages: typescript: optional: true - '@solana/codecs-data-structures@2.2.1': - resolution: {integrity: sha512-HsvFs+yZ5+tceBPgHpUvgFuAJHa/yjXhsxFMeVJDuK6PzA/CrNZw49xooarHFr52QjsNMdLCY4Vb0DfC+IRKrA==} + '@solana/codecs-data-structures@6.5.0': + resolution: {integrity: sha512-Rxi5zVJ1YA+E6FoSQ7RHP+3DF4U7ski0mJ3H5CsYQP24QLRlBqWB3X6m2n9GHT5O3s49UR0sqeF4oyq0lF8bKw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' - - '@solana/codecs-numbers@2.2.1': - resolution: {integrity: sha512-qlJHWZFGzhMa7R6EZXNM/ycINGrR4lzBQjwFMs2pXnCxqKTI3Vru0f4kSh0qqf6U1bjNLaYXTMniqETX6ANpzg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true '@solana/codecs-numbers@2.3.0': resolution: {integrity: sha512-jFvvwKJKffvG7Iz9dmN51OGB7JBcy2CJ6Xf3NqD/VP90xak66m/Lg48T01u5IQ/hc15mChVHiBm+HHuOFDUrQg==} @@ -707,13 +704,6 @@ packages: typescript: optional: true - '@solana/codecs-strings@2.2.1': - resolution: {integrity: sha512-iC/j//whtHg8+fXkwEJcIx+9uc6amGl7QwP2j9mt+bn2OLZimjzzoOXFtahspRPLDyiDb0g3UKyWGHnRKxRtjQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - fastestsmallesttextencoderdecoder: ^1.0.22 - typescript: '>=5.3.3' - '@solana/codecs-strings@6.5.0': resolution: {integrity: sha512-9TuQQxumA9gWJeJzbv1GUg0+o0nZp204EijX3efR+lgBOKbkU7W0UWp33ygAZ+RvWE+kTs48ePoYoJ7UHpyxkQ==} engines: {node: '>=20.18.0'} @@ -726,13 +716,6 @@ packages: typescript: optional: true - '@solana/errors@2.2.1': - resolution: {integrity: sha512-BiCivvqhNsg5BiWTshsRwGC/866ycfAxj/KMV+uH9pKohXyEENXedgj6U3fAIJiJLdSFya61CLl2EnDygnUPBg==} - engines: {node: '>=20.18.0'} - hasBin: true - peerDependencies: - typescript: '>=5.3.3' - '@solana/errors@2.3.0': resolution: {integrity: sha512-66RI9MAbwYV0UtP7kGcTBVLxJgUxoZGm8Fbc0ah+lGiAw17Gugco6+9GrJCV83VyF2mDWyYnYM9qdI3yjgpnaQ==} engines: {node: '>=20.18.0'} @@ -750,29 +733,41 @@ packages: typescript: optional: true - '@solana/functional@2.2.1': - resolution: {integrity: sha512-GafhYZMx/6oWSkNxzLYTVAElbkx3quX3hERvp4Gxic/RjInVWt0H7jlFevNqnB6aa/vh6Q26Y4n6gAmizN8f5A==} + '@solana/functional@6.5.0': + resolution: {integrity: sha512-/KYgY7ZpBJfkN8+qlIvxuBpxv32U9jHXIOOJh3U5xk8Ncsa9Ex5VwbU9NkOf43MJjoIamsP0vARCHjcqJwe5JQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/instructions@2.2.1': - resolution: {integrity: sha512-Zy6+mqr76kTUHMemMoyiHh35k8PNLo7XqWIpmUFXWwB742g8pwR198/3mMz5H55/wp1SuFU3MpmWe6A7YozRaQ==} + '@solana/instruction-plans@6.5.0': + resolution: {integrity: sha512-zp2asevpyMwvhajHYM1aruYpO+xf3LSwHEI2FK6E2hddYZaEhuBy+bz+NZ1ixCyfx3iXcq7MamlFQc2ySHDyUQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/instructions@2.3.0': - resolution: {integrity: sha512-PLMsmaIKu7hEAzyElrk2T7JJx4D+9eRwebhFZpy2PXziNSmFF929eRHKUsKqBFM3cYR1Yy3m6roBZfA+bGE/oQ==} + '@solana/instructions@6.5.0': + resolution: {integrity: sha512-2mQP/1qqr5PCfaVMzs9KofBjpyS7J1sBV6PidGoX9Dg5/4UgwJJ+7yfCVQPn37l1nKCShm4I+pQAy5vbmrxJmA==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/nominal-types@2.2.1': - resolution: {integrity: sha512-/9HTEbFjp2Ty3dPaboONIiRUr2fkVtAI2iAIfoVzkUZvkDwRvJK7fqQfOQOpS8Q8491o5rqu867guDJrXy60AA==} + '@solana/keys@6.5.0': + resolution: {integrity: sha512-CN5jmodX9j5CZKrWLM5XGaRlrLl/Ebl4vgqDXrnwC2NiSfUslLsthuORMuVUTDqkzBX/jd/tgVXFRH2NYNzREQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true '@solana/nominal-types@6.5.0': resolution: {integrity: sha512-HngIM2nlaDPXk0EDX0PklFqpjGDKuOFnlEKS0bfr2F9CorFwiNhNjhb9lPH+FdgsogD1wJ8wgLMMk1LZWn5kgQ==} @@ -788,17 +783,86 @@ packages: peerDependencies: prettier: ^3.7.4 - '@solana/rpc-types@2.2.1': - resolution: {integrity: sha512-JUpSJV5ffWaEMdz7a3Pm8ctNxNHV1tpOu7qz+X3N9wJMAp82zUg4wxHZ0iQjda4sQK2ahRHw7z8PPnsRQsBM/A==} + '@solana/promises@6.5.0': + resolution: {integrity: sha512-n5rsA3YwOO2nUst6ghuVw6RSnuZQYqevqBKqVYbw11Z4XezsoQ6hb78opW3J9YNYapw9wLWy6tEfUsJjY+xtGw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/transaction-messages@2.2.1': - resolution: {integrity: sha512-C96w1AHxuckYuoNYkLlEn4q6QN/wUlp62v7+W44lge8cbD3PhiM/rbIPJmIyUnCM14/+EXhSMs27434vFyv+CA==} + '@solana/rpc-api@6.5.0': + resolution: {integrity: sha512-b+kftroO8vZFzLHj7Nk/uATS3HOlBUsUqdGg3eTQrW1pFgkyq5yIoEYHeFF7ApUN/SJLTK86U8ofCaXabd2SXA==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + + '@solana/rpc-parsed-types@6.5.0': + resolution: {integrity: sha512-129c8meL6CxRg56/HfhkFOpwYteQH9Rt0wyXOXZQx3a3FNpcJLd4JdPvxDsLBE3EupEkXLGVku/1bGKz+F2J+g==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + + '@solana/rpc-spec-types@6.5.0': + resolution: {integrity: sha512-XasJp+sOW6PLfNoalzoLnm+j3LEZF8XOQmSrOqv9AGrGxQckkuOf6iXZucWTqeNKdstsOpU28BN2B6qOavfRzQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + + '@solana/rpc-spec@6.5.0': + resolution: {integrity: sha512-k4O7Kg0QfVyjUqQovL+WZJ1iuPzq0jiUDcWYgvzFjYVxQDVOIZmAol7yTvLEL4maVmf0tNFDsrDaB6t75MKRZA==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + + '@solana/rpc-transformers@6.5.0': + resolution: {integrity: sha512-kS0d+LuuSLfsod2cm2xp0mNj65PL1aomwu6VKtubmsdESwPXHIaI9XrpkPCBuhNSz1SwVp4OkfK5O/VOOHYHSw==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + + '@solana/rpc-types@6.5.0': + resolution: {integrity: sha512-hxts27+Z2VNv4IjXGcXkqbj/MgrN9Xtw/4iE1qZk68T2OAb5vA4b8LHchsOHmHvrzZfo8XDvB9mModCdM3JPsQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + + '@solana/transaction-messages@6.5.0': + resolution: {integrity: sha512-ueXkm5xaRlqYBFAlABhaCKK/DuzIYSot0FybwSDeOQCDy2hvU9Zda16Iwa1n56M0fG+XUvFJz2woG3u9DhQh1g==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + + '@solana/transactions@6.5.0': + resolution: {integrity: sha512-b3eJrrGmwpk64VLHjOrmXKAahPpba42WX/FqSUn4WRXPoQjga7Mb57yp+EaRVeQfjszKCkF+13yu+ni6iv2NFQ==} + engines: {node: '>=20.18.0'} + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true '@solana/web3.js@1.98.4': resolution: {integrity: sha512-vv9lfnvjUsRiq//+j5pBdXig0IQdtzA0BRZ3bXEP4KaIyF1CcaydWqgyzQgfZMNIsWNWmG+AUHwPy4AHOD6gpw==} @@ -1120,10 +1184,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - commander@13.1.0: - resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} - engines: {node: '>=18'} - commander@14.0.0: resolution: {integrity: sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==} engines: {node: '>=20'} @@ -2596,17 +2656,6 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} - '@solana/addresses@2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/assertions': 2.2.1(typescript@5.9.3) - '@solana/codecs-core': 2.2.1(typescript@5.9.3) - '@solana/codecs-strings': 2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 2.2.1(typescript@5.9.3) - '@solana/nominal-types': 2.2.1(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/addresses@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: '@solana/assertions': 6.5.0(typescript@5.9.3) @@ -2619,11 +2668,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/assertions@2.2.1(typescript@5.9.3)': - dependencies: - '@solana/errors': 2.2.1(typescript@5.9.3) - typescript: 5.9.3 - '@solana/assertions@6.5.0(typescript@5.9.3)': dependencies: '@solana/errors': 6.5.0(typescript@5.9.3) @@ -2634,11 +2678,6 @@ snapshots: dependencies: buffer: 6.0.3 - '@solana/codecs-core@2.2.1(typescript@5.9.3)': - dependencies: - '@solana/errors': 2.2.1(typescript@5.9.3) - typescript: 5.9.3 - '@solana/codecs-core@2.3.0(typescript@5.9.3)': dependencies: '@solana/errors': 2.3.0(typescript@5.9.3) @@ -2650,17 +2689,12 @@ snapshots: optionalDependencies: typescript: 5.9.3 - '@solana/codecs-data-structures@2.2.1(typescript@5.9.3)': + '@solana/codecs-data-structures@6.5.0(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 2.2.1(typescript@5.9.3) - '@solana/codecs-numbers': 2.2.1(typescript@5.9.3) - '@solana/errors': 2.2.1(typescript@5.9.3) - typescript: 5.9.3 - - '@solana/codecs-numbers@2.2.1(typescript@5.9.3)': - dependencies: - '@solana/codecs-core': 2.2.1(typescript@5.9.3) - '@solana/errors': 2.2.1(typescript@5.9.3) + '@solana/codecs-core': 6.5.0(typescript@5.9.3) + '@solana/codecs-numbers': 6.5.0(typescript@5.9.3) + '@solana/errors': 6.5.0(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 '@solana/codecs-numbers@2.3.0(typescript@5.9.3)': @@ -2676,14 +2710,6 @@ snapshots: optionalDependencies: typescript: 5.9.3 - '@solana/codecs-strings@2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/codecs-core': 2.2.1(typescript@5.9.3) - '@solana/codecs-numbers': 2.2.1(typescript@5.9.3) - '@solana/errors': 2.2.1(typescript@5.9.3) - fastestsmallesttextencoderdecoder: 1.0.22 - typescript: 5.9.3 - '@solana/codecs-strings@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: '@solana/codecs-core': 6.5.0(typescript@5.9.3) @@ -2693,12 +2719,6 @@ snapshots: fastestsmallesttextencoderdecoder: 1.0.22 typescript: 5.9.3 - '@solana/errors@2.2.1(typescript@5.9.3)': - dependencies: - chalk: 5.4.1 - commander: 13.1.0 - typescript: 5.9.3 - '@solana/errors@2.3.0(typescript@5.9.3)': dependencies: chalk: 5.4.1 @@ -2712,25 +2732,41 @@ snapshots: optionalDependencies: typescript: 5.9.3 - '@solana/functional@2.2.1(typescript@5.9.3)': - dependencies: + '@solana/functional@6.5.0(typescript@5.9.3)': + optionalDependencies: typescript: 5.9.3 - '@solana/instructions@2.2.1(typescript@5.9.3)': + '@solana/instruction-plans@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 2.2.1(typescript@5.9.3) - '@solana/errors': 2.2.1(typescript@5.9.3) + '@solana/errors': 6.5.0(typescript@5.9.3) + '@solana/instructions': 6.5.0(typescript@5.9.3) + '@solana/keys': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/promises': 6.5.0(typescript@5.9.3) + '@solana/transaction-messages': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder - '@solana/instructions@2.3.0(typescript@5.9.3)': + '@solana/instructions@6.5.0(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 2.3.0(typescript@5.9.3) - '@solana/errors': 2.3.0(typescript@5.9.3) + '@solana/codecs-core': 6.5.0(typescript@5.9.3) + '@solana/errors': 6.5.0(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - '@solana/nominal-types@2.2.1(typescript@5.9.3)': + '@solana/keys@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: + '@solana/assertions': 6.5.0(typescript@5.9.3) + '@solana/codecs-core': 6.5.0(typescript@5.9.3) + '@solana/codecs-strings': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.5.0(typescript@5.9.3) + '@solana/nominal-types': 6.5.0(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder '@solana/nominal-types@6.5.0(typescript@5.9.3)': optionalDependencies: @@ -2740,29 +2776,99 @@ snapshots: dependencies: prettier: 3.8.1 - '@solana/rpc-types@2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/promises@6.5.0(typescript@5.9.3)': + optionalDependencies: + typescript: 5.9.3 + + '@solana/rpc-api@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + dependencies: + '@solana/addresses': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.5.0(typescript@5.9.3) + '@solana/codecs-strings': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.5.0(typescript@5.9.3) + '@solana/keys': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-parsed-types': 6.5.0(typescript@5.9.3) + '@solana/rpc-spec': 6.5.0(typescript@5.9.3) + '@solana/rpc-transformers': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-types': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-messages': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-parsed-types@6.5.0(typescript@5.9.3)': + optionalDependencies: + typescript: 5.9.3 + + '@solana/rpc-spec-types@6.5.0(typescript@5.9.3)': + optionalDependencies: + typescript: 5.9.3 + + '@solana/rpc-spec@6.5.0(typescript@5.9.3)': + dependencies: + '@solana/errors': 6.5.0(typescript@5.9.3) + '@solana/rpc-spec-types': 6.5.0(typescript@5.9.3) + optionalDependencies: + typescript: 5.9.3 + + '@solana/rpc-transformers@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + dependencies: + '@solana/errors': 6.5.0(typescript@5.9.3) + '@solana/functional': 6.5.0(typescript@5.9.3) + '@solana/nominal-types': 6.5.0(typescript@5.9.3) + '@solana/rpc-spec-types': 6.5.0(typescript@5.9.3) + '@solana/rpc-types': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/rpc-types@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + dependencies: + '@solana/addresses': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.5.0(typescript@5.9.3) + '@solana/codecs-numbers': 6.5.0(typescript@5.9.3) + '@solana/codecs-strings': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.5.0(typescript@5.9.3) + '@solana/nominal-types': 6.5.0(typescript@5.9.3) + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/transaction-messages@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/addresses': 2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 2.2.1(typescript@5.9.3) - '@solana/codecs-numbers': 2.2.1(typescript@5.9.3) - '@solana/codecs-strings': 2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 2.2.1(typescript@5.9.3) - '@solana/nominal-types': 2.2.1(typescript@5.9.3) + '@solana/addresses': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.5.0(typescript@5.9.3) + '@solana/codecs-data-structures': 6.5.0(typescript@5.9.3) + '@solana/codecs-numbers': 6.5.0(typescript@5.9.3) + '@solana/errors': 6.5.0(typescript@5.9.3) + '@solana/functional': 6.5.0(typescript@5.9.3) + '@solana/instructions': 6.5.0(typescript@5.9.3) + '@solana/nominal-types': 6.5.0(typescript@5.9.3) + '@solana/rpc-types': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/transaction-messages@2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/addresses': 2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 2.2.1(typescript@5.9.3) - '@solana/codecs-data-structures': 2.2.1(typescript@5.9.3) - '@solana/codecs-numbers': 2.2.1(typescript@5.9.3) - '@solana/errors': 2.2.1(typescript@5.9.3) - '@solana/functional': 2.2.1(typescript@5.9.3) - '@solana/instructions': 2.2.1(typescript@5.9.3) - '@solana/nominal-types': 2.2.1(typescript@5.9.3) - '@solana/rpc-types': 2.2.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions@6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + dependencies: + '@solana/addresses': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.5.0(typescript@5.9.3) + '@solana/codecs-data-structures': 6.5.0(typescript@5.9.3) + '@solana/codecs-numbers': 6.5.0(typescript@5.9.3) + '@solana/codecs-strings': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.5.0(typescript@5.9.3) + '@solana/functional': 6.5.0(typescript@5.9.3) + '@solana/instructions': 6.5.0(typescript@5.9.3) + '@solana/keys': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/nominal-types': 6.5.0(typescript@5.9.3) + '@solana/rpc-types': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-messages': 6.5.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder @@ -3171,8 +3277,6 @@ snapshots: color-name@1.1.4: {} - commander@13.1.0: {} - commander@14.0.0: {} commander@14.0.3: {} @@ -3441,7 +3545,8 @@ snapshots: fast-stable-stringify@1.0.0: {} - fastestsmallesttextencoderdecoder@1.0.22: {} + fastestsmallesttextencoderdecoder@1.0.22: + optional: true fastq@1.17.1: dependencies: