From 12bd01f73fef023fbaba29ec7879f3dad6b038e9 Mon Sep 17 00:00:00 2001 From: mPaella <93682696+mPaella@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:08:25 -0500 Subject: [PATCH] plugin: spl token (#32) * plugin: spl token * lint * get_solana_token_balance_by_mint_address * better --- .../packages/plugins/solana-nfts/package.json | 4 +- .../packages/plugins/spl-token/package.json | 33 ++++ .../packages/plugins/spl-token/src/index.ts | 2 + .../plugins/spl-token/src/methods/balance.ts | 8 + .../plugins/spl-token/src/methods/transfer.ts | 58 ++++++ .../plugins/spl-token/src/parameters.ts | 17 ++ .../packages/plugins/spl-token/src/plugin.ts | 17 ++ .../packages/plugins/spl-token/src/tokens.ts | 30 +++ .../spl-token/src/utils/doesAccountExist.ts | 6 + .../src/utils/getTokenByMintAddress.ts | 8 + .../src/utils/getTokenMintAddressBySymbol.ts | 8 + .../src/utils/getTokensForNetwork.ts | 20 ++ .../plugins/spl-token/src/utils/getTools.ts | 50 +++++ .../packages/plugins/spl-token/tsconfig.json | 6 + .../packages/plugins/spl-token/tsup.config.ts | 6 + typescript/pnpm-lock.yaml | 177 +++++++++++++++++- 16 files changed, 445 insertions(+), 5 deletions(-) create mode 100644 typescript/packages/plugins/spl-token/package.json create mode 100644 typescript/packages/plugins/spl-token/src/index.ts create mode 100644 typescript/packages/plugins/spl-token/src/methods/balance.ts create mode 100644 typescript/packages/plugins/spl-token/src/methods/transfer.ts create mode 100644 typescript/packages/plugins/spl-token/src/parameters.ts create mode 100644 typescript/packages/plugins/spl-token/src/plugin.ts create mode 100644 typescript/packages/plugins/spl-token/src/tokens.ts create mode 100644 typescript/packages/plugins/spl-token/src/utils/doesAccountExist.ts create mode 100644 typescript/packages/plugins/spl-token/src/utils/getTokenByMintAddress.ts create mode 100644 typescript/packages/plugins/spl-token/src/utils/getTokenMintAddressBySymbol.ts create mode 100644 typescript/packages/plugins/spl-token/src/utils/getTokensForNetwork.ts create mode 100644 typescript/packages/plugins/spl-token/src/utils/getTools.ts create mode 100644 typescript/packages/plugins/spl-token/tsconfig.json create mode 100644 typescript/packages/plugins/spl-token/tsup.config.ts diff --git a/typescript/packages/plugins/solana-nfts/package.json b/typescript/packages/plugins/solana-nfts/package.json index 6364c388f..c3910352f 100644 --- a/typescript/packages/plugins/solana-nfts/package.json +++ b/typescript/packages/plugins/solana-nfts/package.json @@ -19,12 +19,10 @@ "@metaplex-foundation/umi-bundle-defaults": "0.9.2", "@metaplex-foundation/umi-web3js-adapters": "0.8.10", "@solana/web3.js": "catalog:", - "viem": "catalog:", "zod": "catalog:" }, "peerDependencies": { - "@goat-sdk/core": "workspace:*", - "viem": "catalog:" + "@goat-sdk/core": "workspace:*" }, "homepage": "https://ohmygoat.dev", "repository": { diff --git a/typescript/packages/plugins/spl-token/package.json b/typescript/packages/plugins/spl-token/package.json new file mode 100644 index 000000000..4c395b6d8 --- /dev/null +++ b/typescript/packages/plugins/spl-token/package.json @@ -0,0 +1,33 @@ +{ + "name": "@goat-sdk/plugin-spl-token", + "version": "0.0.1", + "files": ["dist/**/*", "README.md", "package.json"], + "scripts": { + "build": "tsup", + "clean": "rm -rf dist", + "test": "vitest run --passWithNoTests" + }, + "sideEffects": false, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "dependencies": { + "@goat-sdk/core": "workspace:*", + "@solana/web3.js": "catalog:", + "@solana/spl-token": "0.4.9", + "zod": "catalog:" + }, + "peerDependencies": { + "@goat-sdk/core": "workspace:*" + }, + "homepage": "https://ohmygoat.dev", + "repository": { + "type": "git", + "url": "git+https://github.com/goat-sdk/goat.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/goat-sdk/goat/issues" + }, + "keywords": ["ai", "agents", "web3"] +} diff --git a/typescript/packages/plugins/spl-token/src/index.ts b/typescript/packages/plugins/spl-token/src/index.ts new file mode 100644 index 000000000..2015f73be --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/index.ts @@ -0,0 +1,2 @@ +export * from "./plugin"; +export * from "./tokens"; diff --git a/typescript/packages/plugins/spl-token/src/methods/balance.ts b/typescript/packages/plugins/spl-token/src/methods/balance.ts new file mode 100644 index 000000000..5a9157b54 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/methods/balance.ts @@ -0,0 +1,8 @@ +import { getAssociatedTokenAddressSync } from "@solana/spl-token"; +import { type Connection, PublicKey } from "@solana/web3.js"; + +export async function balanceOf(connection: Connection, walletAddress: string, tokenAddress: string) { + const tokenAccount = getAssociatedTokenAddressSync(new PublicKey(tokenAddress), new PublicKey(walletAddress)); + const balance = await connection.getTokenAccountBalance(tokenAccount); + return balance; +} diff --git a/typescript/packages/plugins/spl-token/src/methods/transfer.ts b/typescript/packages/plugins/spl-token/src/methods/transfer.ts new file mode 100644 index 000000000..ec4705457 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/methods/transfer.ts @@ -0,0 +1,58 @@ +import type { SolanaWalletClient } from "@goat-sdk/core"; +import { + createAssociatedTokenAccountInstruction, + createTransferCheckedInstruction, + getAssociatedTokenAddressSync, +} from "@solana/spl-token"; +import { type Connection, PublicKey, type TransactionInstruction } from "@solana/web3.js"; +import type { SolanaNetwork } from "../tokens"; +import { doesAccountExist } from "../utils/doesAccountExist"; +import { getTokenByMintAddress } from "../utils/getTokenByMintAddress"; + +export async function transfer( + connection: Connection, + network: SolanaNetwork, + walletClient: SolanaWalletClient, + to: string, + tokenMintAddress: string, + amount: string, +) { + const token = getTokenByMintAddress(tokenMintAddress, network); + if (!token) { + throw new Error(`Token with mint address ${tokenMintAddress} not found`); + } + + const tokenMintPublicKey = new PublicKey(tokenMintAddress); + const fromPublicKey = new PublicKey(walletClient.getAddress()); + const toPublicKey = new PublicKey(to); + + const fromTokenAccount = getAssociatedTokenAddressSync(tokenMintPublicKey, fromPublicKey); + const toTokenAccount = getAssociatedTokenAddressSync(tokenMintPublicKey, toPublicKey); + + const fromAccountExists = await doesAccountExist(connection, fromTokenAccount); + const toAccountExists = await doesAccountExist(connection, toTokenAccount); + + if (!fromAccountExists) { + throw new Error(`From account ${fromTokenAccount.toBase58()} does not exist`); + } + + const instructions: TransactionInstruction[] = []; + + if (!toAccountExists) { + instructions.push( + createAssociatedTokenAccountInstruction(fromPublicKey, toTokenAccount, toPublicKey, tokenMintPublicKey), + ); + } + instructions.push( + createTransferCheckedInstruction( + fromTokenAccount, + tokenMintPublicKey, + toTokenAccount, + fromPublicKey, + BigInt(amount) * BigInt(10) ** BigInt(token.decimals), + token.decimals, + ), + ); + + return await walletClient.sendTransaction({ instructions }); +} diff --git a/typescript/packages/plugins/spl-token/src/parameters.ts b/typescript/packages/plugins/spl-token/src/parameters.ts new file mode 100644 index 000000000..23c2495d5 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/parameters.ts @@ -0,0 +1,17 @@ +import { z } from "zod"; +import { splTokenSymbolSchema } from "./tokens"; + +export const getTokenMintAddressBySymbolParametersSchema = z.object({ + symbol: splTokenSymbolSchema.describe("The symbol of the token to get the mint address of"), +}); + +export const getTokenBalanceByMintAddressParametersSchema = z.object({ + walletAddress: z.string().describe("The address to get the balance of"), + mintAddress: z.string().describe("The mint address of the token to get the balance of"), +}); + +export const transferTokenByMintAddressParametersSchema = z.object({ + mintAddress: z.string().describe("The mint address of the token to transfer"), + to: z.string().describe("The address to transfer the token to"), + amount: z.string().describe("The amount of tokens to transfer"), +}); diff --git a/typescript/packages/plugins/spl-token/src/plugin.ts b/typescript/packages/plugins/spl-token/src/plugin.ts new file mode 100644 index 000000000..4bcd67568 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/plugin.ts @@ -0,0 +1,17 @@ +import type { Plugin, SolanaWalletClient } from "@goat-sdk/core"; +import type { Connection } from "@solana/web3.js"; +import type { SolanaNetwork, Token } from "./tokens"; +import { getTokensForNetwork } from "./utils/getTokensForNetwork"; +import { getTools } from "./utils/getTools"; + +export function splToken({ + connection, + network, +}: { connection: Connection; network: SolanaNetwork }): Plugin { + return { + name: "splToken", + supportsSmartWallets: () => false, + supportsChain: (chain) => chain.type === "solana", + getTools: async () => getTools(connection, network), + }; +} diff --git a/typescript/packages/plugins/spl-token/src/tokens.ts b/typescript/packages/plugins/spl-token/src/tokens.ts new file mode 100644 index 000000000..f92de5fb1 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/tokens.ts @@ -0,0 +1,30 @@ +import { z } from "zod"; + +export type SolanaNetwork = "devnet" | "mainnet"; + +export const splTokenSymbolSchema = z.enum(["USDC"]); +export type SplTokenSymbol = z.infer; + +export type Token = { + decimals: number; + symbol: SplTokenSymbol; + name: string; + mintAddresses: Record; +}; + +export type NetworkSpecificToken = Omit & { + network: SolanaNetwork; + mintAddress: string; +}; + +export const USDC: Token = { + decimals: 6, + symbol: splTokenSymbolSchema.Enum.USDC, + name: "USDC", + mintAddresses: { + devnet: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", + mainnet: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", + }, +}; + +export const SPL_TOKENS: Token[] = [USDC]; diff --git a/typescript/packages/plugins/spl-token/src/utils/doesAccountExist.ts b/typescript/packages/plugins/spl-token/src/utils/doesAccountExist.ts new file mode 100644 index 000000000..31caf09ad --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/utils/doesAccountExist.ts @@ -0,0 +1,6 @@ +import type { Connection, PublicKey } from "@solana/web3.js"; + +export async function doesAccountExist(connection: Connection, address: PublicKey) { + const account = await connection.getAccountInfo(address); + return account != null; +} diff --git a/typescript/packages/plugins/spl-token/src/utils/getTokenByMintAddress.ts b/typescript/packages/plugins/spl-token/src/utils/getTokenByMintAddress.ts new file mode 100644 index 000000000..e68e1aa51 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/utils/getTokenByMintAddress.ts @@ -0,0 +1,8 @@ +import { SPL_TOKENS, type SolanaNetwork } from "../tokens"; +import { getTokensForNetwork } from "./getTokensForNetwork"; + +export function getTokenByMintAddress(mintAddress: string, network: SolanaNetwork) { + const tokensForNetwork = getTokensForNetwork(network, SPL_TOKENS); + const token = tokensForNetwork.find((token) => token.mintAddress === mintAddress); + return token || null; +} diff --git a/typescript/packages/plugins/spl-token/src/utils/getTokenMintAddressBySymbol.ts b/typescript/packages/plugins/spl-token/src/utils/getTokenMintAddressBySymbol.ts new file mode 100644 index 000000000..2b9a1bb73 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/utils/getTokenMintAddressBySymbol.ts @@ -0,0 +1,8 @@ +import { SPL_TOKENS, type SolanaNetwork, type SplTokenSymbol } from "../tokens"; +import { getTokensForNetwork } from "./getTokensForNetwork"; + +export function getTokenMintAddressBySymbol(symbol: SplTokenSymbol, network: SolanaNetwork) { + const tokensForNetwork = getTokensForNetwork(network, SPL_TOKENS); + const token = tokensForNetwork.find((token) => [token.symbol, token.symbol.toLowerCase()].includes(symbol)); + return token?.mintAddress || null; +} diff --git a/typescript/packages/plugins/spl-token/src/utils/getTokensForNetwork.ts b/typescript/packages/plugins/spl-token/src/utils/getTokensForNetwork.ts new file mode 100644 index 000000000..65d009061 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/utils/getTokensForNetwork.ts @@ -0,0 +1,20 @@ +import type { NetworkSpecificToken, SolanaNetwork, Token } from "../tokens"; + +export function getTokensForNetwork(network: SolanaNetwork, tokens: Token[]) { + const result: NetworkSpecificToken[] = []; + + for (const token of tokens) { + const mintAddress = token.mintAddresses[network]; + if (mintAddress) { + result.push({ + decimals: token.decimals, + symbol: token.symbol, + name: token.name, + network, + mintAddress, + }); + } + } + + return result; +} diff --git a/typescript/packages/plugins/spl-token/src/utils/getTools.ts b/typescript/packages/plugins/spl-token/src/utils/getTools.ts new file mode 100644 index 000000000..4fbe85ae1 --- /dev/null +++ b/typescript/packages/plugins/spl-token/src/utils/getTools.ts @@ -0,0 +1,50 @@ +import type { DeferredTool, SolanaWalletClient } from "@goat-sdk/core"; +import type { Connection } from "@solana/web3.js"; +import type { z } from "zod"; +import { balanceOf } from "../methods/balance"; +import { transfer } from "../methods/transfer"; +import { + getTokenBalanceByMintAddressParametersSchema, + getTokenMintAddressBySymbolParametersSchema, + transferTokenByMintAddressParametersSchema, +} from "../parameters"; +import type { SolanaNetwork } from "../tokens"; +import { getTokenMintAddressBySymbol } from "./getTokenMintAddressBySymbol"; + +export function getTools(connection: Connection, network: SolanaNetwork): DeferredTool[] { + const tools: DeferredTool[] = []; + + tools.push({ + name: "get_token_mint_address_by_symbol", + description: "This {{tool}} gets the mint address of an SPL token by its symbol", + parameters: getTokenMintAddressBySymbolParametersSchema, + method: async ( + walletClient: SolanaWalletClient, + parameters: z.infer, + ) => getTokenMintAddressBySymbol(parameters.symbol, network), + }); + + tools.push({ + name: "get_token_balance_by_mint_address", + description: + "This {{tool}} gets the balance of an SPL token by its mint address. Use get_token_mint_address_by_symbol to get the mint address first.", + parameters: getTokenBalanceByMintAddressParametersSchema, + method: async ( + walletClient: SolanaWalletClient, + parameters: z.infer, + ) => balanceOf(connection, parameters.walletAddress, parameters.mintAddress), + }); + + tools.push({ + name: "transfer_token_by_mint_address", + description: + "This {{tool}} transfers an SPL token by its mint address. Use get_token_mint_address_by_symbol to get the mint address first.", + parameters: transferTokenByMintAddressParametersSchema, + method: async ( + walletClient: SolanaWalletClient, + parameters: z.infer, + ) => transfer(connection, network, walletClient, parameters.to, parameters.mintAddress, parameters.amount), + }); + + return tools; +} diff --git a/typescript/packages/plugins/spl-token/tsconfig.json b/typescript/packages/plugins/spl-token/tsconfig.json new file mode 100644 index 000000000..b4ae67c1f --- /dev/null +++ b/typescript/packages/plugins/spl-token/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "../../../tsconfig.base.json", + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/typescript/packages/plugins/spl-token/tsup.config.ts b/typescript/packages/plugins/spl-token/tsup.config.ts new file mode 100644 index 000000000..2d38789ad --- /dev/null +++ b/typescript/packages/plugins/spl-token/tsup.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from "tsup"; +import { treeShakableConfig } from "../../../tsup.config.base"; + +export default defineConfig({ + ...treeShakableConfig, +}); diff --git a/typescript/pnpm-lock.yaml b/typescript/pnpm-lock.yaml index 5c95550f3..43841167e 100644 --- a/typescript/pnpm-lock.yaml +++ b/typescript/pnpm-lock.yaml @@ -462,9 +462,21 @@ importers: '@solana/web3.js': specifier: 'catalog:' version: 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) - viem: + zod: specifier: 'catalog:' - version: 2.21.49(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) + version: 3.23.8 + + packages/plugins/spl-token: + dependencies: + '@goat-sdk/core': + specifier: workspace:* + version: link:../../core + '@solana/spl-token': + specifier: 0.4.9 + version: 0.4.9(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)(utf-8-validate@5.0.10) + '@solana/web3.js': + specifier: 'catalog:' + version: 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) zod: specifier: 'catalog:' version: 3.23.8 @@ -1929,10 +1941,69 @@ packages: '@socket.io/component-emitter@3.1.2': resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} + '@solana/buffer-layout-utils@0.2.0': + resolution: {integrity: sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g==} + engines: {node: '>= 10'} + '@solana/buffer-layout@4.0.1': resolution: {integrity: sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==} engines: {node: '>=5.10'} + '@solana/codecs-core@2.0.0-rc.1': + resolution: {integrity: sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ==} + peerDependencies: + typescript: '>=5' + + '@solana/codecs-data-structures@2.0.0-rc.1': + resolution: {integrity: sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog==} + peerDependencies: + typescript: '>=5' + + '@solana/codecs-numbers@2.0.0-rc.1': + resolution: {integrity: sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ==} + peerDependencies: + typescript: '>=5' + + '@solana/codecs-strings@2.0.0-rc.1': + resolution: {integrity: sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g==} + peerDependencies: + fastestsmallesttextencoderdecoder: ^1.0.22 + typescript: '>=5' + + '@solana/codecs@2.0.0-rc.1': + resolution: {integrity: sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ==} + peerDependencies: + typescript: '>=5' + + '@solana/errors@2.0.0-rc.1': + resolution: {integrity: sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ==} + hasBin: true + peerDependencies: + typescript: '>=5' + + '@solana/options@2.0.0-rc.1': + resolution: {integrity: sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA==} + peerDependencies: + typescript: '>=5' + + '@solana/spl-token-group@0.0.7': + resolution: {integrity: sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.95.3 + + '@solana/spl-token-metadata@0.1.6': + resolution: {integrity: sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.95.3 + + '@solana/spl-token@0.4.9': + resolution: {integrity: sha512-g3wbj4F4gq82YQlwqhPB0gHFXfgsC6UmyGMxtSLf/BozT/oKd59465DbnlUK8L8EcimKMavxsVAMoLcEdeCicg==} + engines: {node: '>=16'} + peerDependencies: + '@solana/web3.js': ^1.95.3 + '@solana/web3.js@1.95.8': resolution: {integrity: sha512-sBHzNh7dHMrmNS5xPD1d0Xa2QffW/RXaxu/OysRXBfwTp+LYqGGmMtCYYwrHPrN5rjAmJCsQRNAwv4FM0t3B6g==} @@ -2629,6 +2700,10 @@ packages: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -6741,10 +6816,106 @@ snapshots: '@socket.io/component-emitter@3.1.2': {} + '@solana/buffer-layout-utils@0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@solana/buffer-layout': 4.0.1 + '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + bigint-buffer: 1.1.5 + bignumber.js: 9.1.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + '@solana/buffer-layout@4.0.1': dependencies: buffer: 6.0.3 + '@solana/codecs-core@2.0.0-rc.1(typescript@5.6.3)': + dependencies: + '@solana/errors': 2.0.0-rc.1(typescript@5.6.3) + typescript: 5.6.3 + + '@solana/codecs-data-structures@2.0.0-rc.1(typescript@5.6.3)': + dependencies: + '@solana/codecs-core': 2.0.0-rc.1(typescript@5.6.3) + '@solana/codecs-numbers': 2.0.0-rc.1(typescript@5.6.3) + '@solana/errors': 2.0.0-rc.1(typescript@5.6.3) + typescript: 5.6.3 + + '@solana/codecs-numbers@2.0.0-rc.1(typescript@5.6.3)': + dependencies: + '@solana/codecs-core': 2.0.0-rc.1(typescript@5.6.3) + '@solana/errors': 2.0.0-rc.1(typescript@5.6.3) + typescript: 5.6.3 + + '@solana/codecs-strings@2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)': + dependencies: + '@solana/codecs-core': 2.0.0-rc.1(typescript@5.6.3) + '@solana/codecs-numbers': 2.0.0-rc.1(typescript@5.6.3) + '@solana/errors': 2.0.0-rc.1(typescript@5.6.3) + fastestsmallesttextencoderdecoder: 1.0.22 + typescript: 5.6.3 + + '@solana/codecs@2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)': + dependencies: + '@solana/codecs-core': 2.0.0-rc.1(typescript@5.6.3) + '@solana/codecs-data-structures': 2.0.0-rc.1(typescript@5.6.3) + '@solana/codecs-numbers': 2.0.0-rc.1(typescript@5.6.3) + '@solana/codecs-strings': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + '@solana/options': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + typescript: 5.6.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/errors@2.0.0-rc.1(typescript@5.6.3)': + dependencies: + chalk: 5.3.0 + commander: 12.1.0 + typescript: 5.6.3 + + '@solana/options@2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)': + dependencies: + '@solana/codecs-core': 2.0.0-rc.1(typescript@5.6.3) + '@solana/codecs-data-structures': 2.0.0-rc.1(typescript@5.6.3) + '@solana/codecs-numbers': 2.0.0-rc.1(typescript@5.6.3) + '@solana/codecs-strings': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + '@solana/errors': 2.0.0-rc.1(typescript@5.6.3) + typescript: 5.6.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + + '@solana/spl-token-group@0.0.7(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)': + dependencies: + '@solana/codecs': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - typescript + + '@solana/spl-token-metadata@0.1.6(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)': + dependencies: + '@solana/codecs': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder + - typescript + + '@solana/spl-token@0.4.9(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)(utf-8-validate@5.0.10)': + dependencies: + '@solana/buffer-layout': 4.0.1 + '@solana/buffer-layout-utils': 0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/spl-token-group': 0.0.7(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + '@solana/spl-token-metadata': 0.1.6(@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3) + '@solana/web3.js': 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + buffer: 6.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - fastestsmallesttextencoderdecoder + - typescript + - utf-8-validate + '@solana/web3.js@1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 @@ -7791,6 +7962,8 @@ snapshots: commander@10.0.1: {} + commander@12.1.0: {} + commander@2.20.3: {} commander@4.1.1: {}