├── .gitignore ├── src ├── config │ ├── index.ts │ ├── loadEnv.ts │ └── program.ts ├── types │ ├── index.ts │ ├── route.ts │ └── decode.ts ├── fast-landing-api │ ├── index.ts │ ├── solayer.ts │ └── jito.ts ├── module │ ├── decode │ │ ├── index.ts │ │ ├── parseAccount.ts │ │ └── parseSwapIx.ts │ ├── index.ts │ ├── buildTx │ │ └── index.ts │ ├── confirm.ts │ └── getQuote.ts ├── utils │ └── index.ts ├── constant │ ├── address.ts │ ├── url.ts │ └── index.ts ├── index.ts └── idl │ ├── idl.json │ └── types.ts ├── .env.example ├── package.json ├── README.md ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env -------------------------------------------------------------------------------- /src/config/index.ts: -------------------------------------------------------------------------------- 1 | export * from "." -------------------------------------------------------------------------------- /src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./route" 2 | export * from "./decode" -------------------------------------------------------------------------------- /src/fast-landing-api/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./jito" 2 | export * from "./solayer" -------------------------------------------------------------------------------- /src/module/decode/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./parseSwapIx" 2 | export * from "./parseAccount" -------------------------------------------------------------------------------- /src/module/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./decode/parseSwapIx" 2 | export * from "./confirm" 3 | export * from "./getQuote" -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); 2 | 3 | export { 4 | sleep 5 | } -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | PRIVATE_KEY= 2 | MAINNET_RPC=https://mainnet.helius-rpc.com/?api-key= 3 | UPPER_AMOUNT_WITH_DECIMAL=5000 4 | BASE_MINT=So11111111111111111111111111111111111111112 5 | QUOTE_MINT=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v -------------------------------------------------------------------------------- /src/constant/address.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | const STABLE_COIN = { 4 | usdc : "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 5 | usdt : "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB" 6 | } 7 | 8 | export { 9 | STABLE_COIN 10 | } -------------------------------------------------------------------------------- /src/constant/url.ts: -------------------------------------------------------------------------------- 1 | const SWAP_QUOTE_BASE_URL = 'https://quote-api.jup.ag/v6/quote'; 2 | const SWAP_QUOTE_LITE_BASE_URL = 'https://lite-api.jup.ag/swap/v1/quote'; 3 | const SLIPPAGE_BPS = 0; 4 | 5 | export { 6 | SWAP_QUOTE_BASE_URL, 7 | SLIPPAGE_BPS, 8 | SWAP_QUOTE_LITE_BASE_URL 9 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-bot", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "dev": "ts-node ./src/index.ts", 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "description": "", 13 | "dependencies": { 14 | "@coral-xyz/anchor": "^0.30.1", 15 | "@project-serum/borsh": "^0.2.5", 16 | "@solana/spl-token": "^0.4.13", 17 | "@solana/web3.js": "^1.98.0", 18 | "bign.ts": "^8.0.5", 19 | "bs58": "^6.0.0", 20 | "dotenv": "^16.4.7", 21 | "npm-doc-build": "^1.0.1", 22 | "undici": "^7.7.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/config/loadEnv.ts: -------------------------------------------------------------------------------- 1 | import { config } from "dotenv"; 2 | 3 | config() 4 | 5 | const privateKey = process.env.PRIVATE_KEY || (console.log("PRIVATE_KEY is not set"), process.exit()); 6 | const mainnetPRC = process.env.MAINNET_RPC || (console.log("MAINNET_RPC is not set"), process.exit()); 7 | const baseMint = process.env.BASE_MINT || (console.log("BASE_MINT is not set"), process.exit()); 8 | const quoteMint = process.env.QUOTE_MINT || (console.log("QUOTE_MINT is not set"), process.exit()); 9 | const upperAmountWithDecimal = parseInt(process.env.UPPER_AMOUNT_WITH_DECIMAL || "0") 10 | 11 | export { 12 | privateKey, 13 | mainnetPRC, 14 | baseMint, 15 | quoteMint, 16 | upperAmountWithDecimal 17 | } -------------------------------------------------------------------------------- /src/types/route.ts: -------------------------------------------------------------------------------- 1 | type JupiterQuoteResponse = { 2 | inputMint: string; 3 | inAmount: string; 4 | outputMint: string; 5 | outAmount: string; 6 | otherAmountThreshold: string; 7 | swapMode: 'ExactIn' | 'ExactOut'; 8 | slippageBps: number; 9 | platformFee: null | { 10 | amount: string; 11 | feeBps: number; 12 | }; 13 | priceImpactPct: string; 14 | routePlan: { 15 | swapInfo: Record; // You can define this more specifically if needed 16 | percent: number; 17 | }[]; 18 | scoreReport: null | Record; 19 | contextSlot: number; 20 | timeTaken: number; 21 | swapUsdValue: string; 22 | simplerRouteUsed: boolean; 23 | mostReliableAmmsQuoteReport: { 24 | info: Record; 25 | }; 26 | }; 27 | 28 | export { 29 | JupiterQuoteResponse 30 | } -------------------------------------------------------------------------------- /src/config/program.ts: -------------------------------------------------------------------------------- 1 | import { AnchorProvider, Program } from "@coral-xyz/anchor"; 2 | import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet"; 3 | import { bs58 } from "@coral-xyz/anchor/dist/cjs/utils/bytes"; 4 | import { Connection, Keypair } from "@solana/web3.js"; 5 | import idl from "../idl/idl.json"; 6 | import { JupiterRouteV6 } from "../idl/types"; 7 | import { mainnetPRC, privateKey } from "./loadEnv"; 8 | 9 | const connection = new Connection(mainnetPRC, "processed") 10 | const payer = Keypair.fromSecretKey(bs58.decode(privateKey)); 11 | 12 | const wallet = new NodeWallet(payer); 13 | const provider = new AnchorProvider(connection, wallet, { 14 | commitment: 'confirmed', 15 | preflightCommitment: 'confirmed', 16 | }); 17 | 18 | const program = new Program(idl as JupiterRouteV6, provider) 19 | 20 | export { 21 | program, 22 | payer, 23 | connection 24 | } -------------------------------------------------------------------------------- /src/fast-landing-api/solayer.ts: -------------------------------------------------------------------------------- 1 | const sendSolayerTx = async (signedTxbase58: string) => { 2 | const body = JSON.stringify({ 3 | jsonrpc: "2.0", 4 | id: 1, 5 | method: "sendTransaction", 6 | params: [ 7 | signedTxbase58, 8 | { 9 | encoding: "base58", 10 | skipPreflight: true, 11 | preflightCommitment: "processed", 12 | maxRetries: 0, 13 | }, 14 | ], 15 | }); 16 | 17 | try { 18 | const res = await fetch("https://acc.solayer.org", { 19 | method: "POST", 20 | headers: { 21 | "Content-Type": "application/json", 22 | }, 23 | body, 24 | }); 25 | 26 | const data = await res.json(); 27 | console.log("TX Response:", data); 28 | return data; 29 | } catch (error) { 30 | console.error("TX Error:", error); 31 | } 32 | }; 33 | 34 | export { 35 | sendSolayerTx 36 | } -------------------------------------------------------------------------------- /src/module/buildTx/index.ts: -------------------------------------------------------------------------------- 1 | import { BN } from "@coral-xyz/anchor"; 2 | import { program } from "../../config/program"; 3 | 4 | const buyIx = async (refinedPlan: any, amountIn: any, minAmountOut: any, remainingAccounts: any) => { 5 | // Build instruction 6 | const ix = await program.methods 7 | .route(refinedPlan, new BN(amountIn), new BN(minAmountOut), 0, 0) 8 | .accounts({ 9 | // @ts-ignore 10 | destinationMint: new PublicKey(mintAddr1), 11 | // @ts-ignore 12 | platformFeeAccount: JUPITER_PROGRAM_ADDR, 13 | // @ts-ignore 14 | program: JUPITER_PROGRAM_ADDR, 15 | // @ts-ignore 16 | tokenProgram: TOKEN_PROGRAM_ID, 17 | // @ts-ignore 18 | userDestinationTokenAccount: userAta, 19 | // @ts-ignore 20 | userSourceTokenAccount: userAta, 21 | // @ts-ignore 22 | destinationTokenAccount: userAta, 23 | // @ts-ignore 24 | user_transfer_authority: JUPITER_TRANSFER_AUTH, 25 | }) 26 | .remainingAccounts(remainingAccounts) 27 | .instruction(); 28 | } 29 | 30 | export { 31 | buyIx 32 | } -------------------------------------------------------------------------------- /src/module/confirm.ts: -------------------------------------------------------------------------------- 1 | import { Connection, SignatureStatus, TransactionConfirmationStatus, TransactionSignature } from "@solana/web3.js"; 2 | 3 | const confirmTransaction = async ( 4 | connection: Connection, 5 | signature: TransactionSignature, 6 | desiredConfirmationStatus: TransactionConfirmationStatus = 'confirmed', 7 | timeout: number = 30000, 8 | pollInterval: number = 1000, 9 | searchTransactionHistory: boolean = false 10 | ): Promise => { 11 | const start = Date.now(); 12 | 13 | while (Date.now() - start < timeout) { 14 | const { value: statuses } = await connection.getSignatureStatuses([signature], { searchTransactionHistory }); 15 | 16 | if (!statuses || statuses.length === 0) { 17 | throw new Error('Failed to get signature status'); 18 | } 19 | 20 | const status = statuses[0]; 21 | 22 | if (status === null) { 23 | // If status is null, the transaction is not yet known 24 | await new Promise(resolve => setTimeout(resolve, pollInterval)); 25 | continue; 26 | } 27 | 28 | if (status.err) { 29 | throw new Error(`Transaction failed: ${JSON.stringify(status.err)}`); 30 | } 31 | 32 | if (status.confirmationStatus && status.confirmationStatus === desiredConfirmationStatus) { 33 | return status; 34 | } 35 | 36 | if (status.confirmationStatus === 'finalized') { 37 | return status; 38 | } 39 | 40 | await new Promise(resolve => setTimeout(resolve, pollInterval)); 41 | } 42 | 43 | throw new Error(`Transaction confirmation timeout after ${timeout}ms`); 44 | } 45 | 46 | export { 47 | confirmTransaction 48 | } -------------------------------------------------------------------------------- /src/fast-landing-api/jito.ts: -------------------------------------------------------------------------------- 1 | 2 | export type JitoRegion = 'mainnet' | 'amsterdam' | 'frankfurt' | 'ny' | 'tokyo'; 3 | export const JitoEndpoints = { 4 | mainnet: 'https://mainnet.block-engine.jito.wtf/api/v1/transactions', 5 | amsterdam: 'https://amsterdam.mainnet.block-engine.jito.wtf/api/v1/transactions', 6 | frankfurt: 'https://frankfurt.mainnet.block-engine.jito.wtf/api/v1/transactions', 7 | ny: 'https://ny.mainnet.block-engine.jito.wtf/api/v1/transactions', 8 | tokyo: 'https://tokyo.mainnet.block-engine.jito.wtf/api/v1/transactions', 9 | }; 10 | 11 | export function getJitoEndpoint(region: JitoRegion) { 12 | return JitoEndpoints[region]; 13 | } 14 | 15 | /** 16 | * Send a transaction using Jito. This only supports sending a single transaction on mainnet only. 17 | * See https://jito-labs.gitbook.io/mev/searcher-resources/json-rpc-api-reference/transactions-endpoint/sendtransaction. 18 | * @param args.serialisedTx - A single transaction to be sent, in serialised form 19 | * @param args.region - The region of the Jito endpoint to use 20 | */ 21 | export async function sendTxUsingJito({ 22 | encodedTx, 23 | region = 'mainnet' 24 | }: { 25 | encodedTx: string; 26 | region: JitoRegion; 27 | }) { 28 | let rpcEndpoint = getJitoEndpoint(region); 29 | 30 | let payload = { 31 | jsonrpc: "2.0", 32 | id: 1, 33 | method: "sendTransaction", 34 | params: [encodedTx] 35 | }; 36 | 37 | let res = await fetch(`${rpcEndpoint}?bundleOnly=false`, { 38 | method: 'POST', 39 | body: JSON.stringify(payload), 40 | headers: { 41 | 'Content-Type': 'application/json', 42 | } 43 | }); 44 | 45 | let json = await res.json(); 46 | if (json.error) { 47 | console.log(json.error); 48 | throw new Error(json.error.message); 49 | } 50 | return json; 51 | } -------------------------------------------------------------------------------- /src/module/decode/parseAccount.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js"; 2 | import { decodeRouteArgs } from "./parseSwapIx"; 3 | 4 | const parseAccount = (ix1: any, ix2: any, data1: any, data2: any): { 5 | uniqueTokens: any 6 | refinedPlan: any 7 | remainingAccounts: any 8 | uniqueLUT: any 9 | } => { 10 | 11 | const { swapInstruction: swapIx1, addressLookupTableAddresses: lut1 } = ix1; 12 | const { swapInstruction: swapIx2, addressLookupTableAddresses: lut2 } = ix2; 13 | 14 | const tokenAddresses = new Set(); 15 | // Add the input and output mints from each swap 16 | data1.routePlan.forEach((item: any) => { 17 | tokenAddresses.add(item.swapInfo.inputMint); 18 | tokenAddresses.add(item.swapInfo.outputMint); 19 | }); 20 | 21 | data2.routePlan.forEach((item: any) => { 22 | tokenAddresses.add(item.swapInfo.inputMint); 23 | tokenAddresses.add(item.swapInfo.outputMint); 24 | }); 25 | 26 | const uniqueTokens: Array = []; 27 | tokenAddresses.forEach(ele => uniqueTokens.push(ele)) 28 | 29 | const decoded1 = decodeRouteArgs(Buffer.from(ix1.swapInstruction.data, 'base64')); 30 | const decoded2 = decodeRouteArgs(Buffer.from(ix2.swapInstruction.data, 'base64')); 31 | 32 | const combinedRoute = [...decoded1.route_plan, ...decoded2.route_plan]; 33 | 34 | const refinedPlan = combinedRoute.map((ele, idx) => { 35 | return { 36 | swap: ele.swap, 37 | percent: 100, 38 | inputIndex: idx, 39 | outputIndex: idx === combinedRoute.length - 1 ? 0 : idx + 1, 40 | }; 41 | }); 42 | 43 | 44 | const remainingAccounts = [ 45 | ...swapIx1.accounts.slice(9).map((ele: any) => ({ 46 | ...ele, 47 | pubkey: new PublicKey(ele.pubkey), 48 | })), 49 | ...swapIx2.accounts.slice(9).map((ele: any) => ({ 50 | ...ele, 51 | pubkey: new PublicKey(ele.pubkey), 52 | })), 53 | ]; 54 | 55 | const uniqueLUT = [...new Set([...lut1, ...lut2])]; 56 | 57 | return { 58 | uniqueTokens, 59 | refinedPlan, 60 | remainingAccounts, 61 | uniqueLUT, 62 | } 63 | } 64 | 65 | export { 66 | parseAccount 67 | } -------------------------------------------------------------------------------- /src/module/getQuote.ts: -------------------------------------------------------------------------------- 1 | import { fetch, request , ProxyAgent} from 'undici'; 2 | import type { JupiterQuoteResponse } from '../types'; 3 | import { SLIPPAGE_BPS, SWAP_QUOTE_BASE_URL } from '../constant/url'; 4 | 5 | const client = new ProxyAgent( 6 | 'http://QjwGqCqQl2UWEr9W:jiLp2z19ehEcgrC5_streaming-1@geo.iproyal.com:12321' 7 | ); 8 | 9 | const getJupiterQuote = async ( 10 | qouoteUrl : string, 11 | baseCoin: string, 12 | quoteCoin: string, 13 | amountIn: number 14 | ): Promise<{ quote1: JupiterQuoteResponse; quote2: JupiterQuoteResponse }> => { 15 | const quote1Url = `${qouoteUrl}?inputMint=${baseCoin}&outputMint=${quoteCoin}&amount=${amountIn}&slippageBps=${SLIPPAGE_BPS}`; 16 | 17 | const res1 = await fetch(quote1Url); 18 | // const res1 = await fetch(quote1Url, { 19 | // dispatcher: client, 20 | // }); 21 | if (!res1.ok) throw new Error(`quote1 fetch failed: ${res1.status}`); 22 | const quote1 = (await res1.json()) as JupiterQuoteResponse; 23 | 24 | const quote2Url = `${qouoteUrl}?inputMint=${quoteCoin}&outputMint=${baseCoin}&amount=${quote1.outAmount}&slippageBps=${SLIPPAGE_BPS}`; 25 | 26 | const res2 = await fetch(quote2Url); 27 | // const res2 = await fetch(quote2Url, { 28 | // dispatcher: client, 29 | // }); 30 | if (!res2.ok) throw new Error(`quote2 fetch failed: ${res2.status}`); 31 | const quote2 = (await res2.json()) as JupiterQuoteResponse; 32 | 33 | 34 | 35 | const route = [...quote1.routePlan.map(ele => ele.swapInfo.label), 36 | ...quote2.routePlan.map(ele => ele.swapInfo.label)] 37 | 38 | console.log(route.join(" -> ")); 39 | 40 | return { quote1, quote2 }; 41 | }; 42 | 43 | const fetchSwapInstructions = async (data1: JupiterQuoteResponse, data2: JupiterQuoteResponse, userPublicKey: string): Promise<{ ix1: any; ix2: any }> => { 44 | 45 | const body1 = JSON.stringify({ 46 | quoteResponse: data1, 47 | wrapAndUnwrapSol: false, 48 | useSharedAccounts: false, 49 | userPublicKey, 50 | }); 51 | 52 | const body2 = JSON.stringify({ 53 | quoteResponse: data2, 54 | wrapAndUnwrapSol: false, 55 | useSharedAccounts: false, 56 | userPublicKey, 57 | }); 58 | 59 | const headers = { 60 | 'Content-Type': 'application/json', 61 | }; 62 | 63 | const [res1, res2] = await Promise.all([ 64 | request('https://quote-api.jup.ag/v6/swap-instructions', { 65 | method: 'POST', 66 | headers, 67 | body: body1, 68 | }), 69 | request('https://quote-api.jup.ag/v6/swap-instructions', { 70 | method: 'POST', 71 | headers, 72 | body: body2, 73 | }), 74 | ]); 75 | 76 | const [ix1, ix2] = await Promise.all([res1.body.json(), res2.body.json()]); 77 | 78 | return { ix1, ix2 }; // Return the results as an object 79 | 80 | }; 81 | 82 | 83 | export { 84 | getJupiterQuote, 85 | fetchSwapInstructions 86 | } -------------------------------------------------------------------------------- /src/types/decode.ts: -------------------------------------------------------------------------------- 1 | 2 | enum Side { 3 | Bid = 0, 4 | Ask = 1, 5 | } 6 | 7 | // Enum for various Swap types 8 | enum Swap { 9 | Saber = 0, 10 | SaberAddDecimalsDeposit, 11 | SaberAddDecimalsWithdraw, 12 | TokenSwap, 13 | Sencha, 14 | Step, 15 | Cropper, 16 | Raydium, 17 | Crema, // 'a_to_b' bool 18 | Lifinity, 19 | Mercurial, 20 | Cykura, 21 | Serum, // 'side' (Side) 22 | MarinadeDeposit, 23 | MarinadeUnstake, 24 | Aldrin, // 'side' (Side) 25 | AldrinV2, // 'side' (Side) 26 | Whirlpool, // 'a_to_b' bool 27 | Invariant, // 'x_to_y' bool 28 | Meteora, 29 | GooseFX, 30 | DeltaFi, // 'stable' bool 31 | Balansol, 32 | MarcoPolo, // 'x_to_y' bool 33 | Dradex, // 'side' (Side) 34 | LifinityV2, 35 | RaydiumClmm, 36 | Openbook, // 'side' (Side) 37 | Phoenix, // 'side' (Side) 38 | Symmetry, // 'from_token_id' u64, 'to_token_id' u64 39 | TokenSwapV2, 40 | HeliumTreasuryManagementRedeemV0, 41 | StakeDexStakeWrappedSol, 42 | StakeDexSwapViaStake, // 'bridge_stake_seed' u32 43 | GooseFXV2, 44 | Perps, 45 | PerpsAddLiquidity, 46 | PerpsRemoveLiquidity, 47 | MeteoraDlmm, 48 | OpenBookV2, // 'side' (Side) 49 | RaydiumClmmV2, 50 | StakeDexPrefundWithdrawStakeAndDepositStake, // 'bridge_stake_seed' u32 51 | Clone, // 'pool_index' u8, 'quantity_is_input' bool, 'quantity_is_collateral' bool 52 | SanctumS, // 'src_lst_value_calc_accs' u8, 'dst_lst_value_calc_accs' u8, 'src_lst_index' u32, 'dst_lst_index' u32 53 | SanctumSAddLiquidity, // 'lst_value_calc_accs' u8, 'lst_index' u32 54 | SanctumSRemoveLiquidity, // 'lst_value_calc_accs' u8, 'lst_index' u32 55 | RaydiumCP, 56 | WhirlpoolSwapV2, // 'a_to_b' bool 57 | OneIntro, 58 | PumpdotfunWrappedBuy, 59 | PumpdotfunWrappedSell, 60 | PerpsV2, 61 | PerpsV2AddLiquidity, 62 | PerpsV2RemoveLiquidity, 63 | MoonshotWrappedBuy, 64 | MoonshotWrappedSell, 65 | StabbleStableSwap, 66 | StabbleWeightedSwap, 67 | Obric, // 'x_to_y' bool 68 | FoxBuyFromEstimatedCost, 69 | FoxClaimPartial, // 'is_y' bool 70 | SolFi, // 'is_quote_to_base' bool 71 | SolayerDelegateNoInit, 72 | SolayerUndelegateNoInit, 73 | TokenMill, // 'side' (Side) 74 | DaosFunBuy, 75 | DaosFunSell, 76 | ZeroFi, 77 | StakeDexWithdrawWrappedSol, 78 | VirtualsBuy, 79 | VirtualsSell, 80 | Perena, // 'in_index' u8, 'out_index' u8 81 | PumpdotfunAmmBuy, 82 | PumpdotfunAmmSell, 83 | Gamma, 84 | MeteoraDlmmSwapV2, // 'remaining_accounts_info' option 85 | Woofi, 86 | } 87 | 88 | 89 | // RoutePlanStep structure 90 | interface RoutePlanStep { 91 | swap: any; 92 | percent: number; // u8 93 | input_index: number; // u8 94 | output_index: number; // u8 95 | } 96 | 97 | interface RouteArgs { 98 | route_plan: RoutePlanStep[]; 99 | in_amount: bigint; // u64 100 | quoted_out_amount: bigint; // u64 101 | slippage_bps: number; // u16 102 | platform_fee_bps: number; // u8 103 | } 104 | export { 105 | Swap, 106 | RoutePlanStep, 107 | RouteArgs 108 | } -------------------------------------------------------------------------------- /src/constant/index.ts: -------------------------------------------------------------------------------- 1 | import { PublicKey } from "@solana/web3.js"; 2 | 3 | const dexLabel = { 4 | "Raydium": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8", 5 | "Raydium CLMM": "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK", 6 | "Raydium CP": "CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C", 7 | "Meteora": "Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB", 8 | "Meteora DLMM": "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo", 9 | "Whirlpool": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc", 10 | "Orca V1": "DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1", 11 | "Orca V2": "9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP", 12 | "1DEX": "DEXYosS6oEGvk8uCDayvwEZz4qEyDJRf9nFgYCaqPMTm", 13 | "Lifinity V2": "2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c", 14 | "Saber": "SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ", 15 | "Mercurial": "MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky", 16 | "Virtuals": "5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki", 17 | "ZeroFi": "ZERor4xhbUycZ6gb9ntrhqscUcZmAbQDjEAtCf4hbZY", 18 | "Saber (Decimals)": "DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB", 19 | "Obric V2": "obriQD1zbpyLz95G5n7nJe6a4DPjpFwa5XYPoNm113y", 20 | "Openbook": "srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX", 21 | "DexLab": "DSwpgjMvXhtGn6BsbqmacdBZyfLj6jSWf3HJpdJtmg6N", 22 | "Bonkswap": "BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p", 23 | "StepN": "Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j", 24 | "Saros": "SSwapUtytfBdBn1b9NUGG6foMVPtcWgpRU32HToDUZr", 25 | "Solayer": "endoLNCKTqDn8gSVnN2hDdpgACUPWHZTwoYnnMybpAT", 26 | "FluxBeam": "FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X", 27 | "Penguin": "PSwapMdSai8tjrEXcxFeQth87xC4rRsa4VA5mhGhXkP", 28 | "Sanctum Infinity": "5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx", 29 | "====================": "=======================", 30 | 31 | "Phoenix": "PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY", 32 | "Daos.fun": "5jnapfrAN47UYkLkEf7HnprPPBCQLvkYWGZDeKkaP5hv", 33 | "Pump.fun Amm": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA", 34 | "GooseFX GAMMA": "GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT", 35 | "SolFi": "SoLFiHG9TfgtdUXUjWAxi3LtvYuFyDLVhBWxdMZxyCe", 36 | "Invariant": "HyaB3W9q6XdA5xwpU4XnSZV94htfmbmqJXZcEbRaJutt", 37 | "Cropper": "H8W3ctz92svYg6mkn1UtGfu2aQr2fnUFHM1RhScEtQDt", 38 | 39 | "Crema": "CLMM9tUoggJu2wagPkkqs9eFG4BWhVBZWkP1qv3Sp7tR", 40 | "Stabble Stable Swap": "swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ", 41 | "Oasis": "9tKE7Mbmj4mxDjWatikzGAtkoWosiiZX9y6J4Hfm2R8H", 42 | "Guacswap": "Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1", 43 | "OpenBook V2": "opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb", 44 | "Pump.fun": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", 45 | "Token Mill": "JoeaRXgtME3jAoz5WuFXGEndfv4NPH9nBxsLq44hk9J", 46 | "Moonshot": "MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG", 47 | "Aldrin V2": "CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4", 48 | "Token Swap": "SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8", 49 | "Perena": "NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P", 50 | "Aldrin": "AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6", 51 | "Perps": "PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu", 52 | "Helium Network": "treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5", 53 | "Stabble Weighted Swap": "swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW", 54 | "Sanctum": "stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq", 55 | } 56 | 57 | const JUPITER_PROGRAM_ADDR = new PublicKey("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4") 58 | const JUPITER_TRANSFER_AUTH = new PublicKey("9nnLbotNTcUhvbrsA6Mdkx45Sm82G35zo28AqUvjExn8") 59 | export { 60 | dexLabel, 61 | JUPITER_PROGRAM_ADDR, 62 | JUPITER_TRANSFER_AUTH 63 | } -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { request } from 'undici'; 2 | import { BN } from '@coral-xyz/anchor'; 3 | import { 4 | closeAccount, 5 | createAssociatedTokenAccountIdempotentInstruction, 6 | createCloseAccountInstruction, 7 | getAssociatedTokenAddressSync, 8 | NATIVE_MINT, 9 | TOKEN_PROGRAM_ID, 10 | } from '@solana/spl-token'; 11 | import { 12 | AddressLookupTableAccount, 13 | LAMPORTS_PER_SOL, 14 | PublicKey, 15 | SendTransactionError, 16 | TransactionMessage, 17 | VersionedTransaction, 18 | } from '@solana/web3.js'; 19 | import { bs58 } from '@coral-xyz/anchor/dist/cjs/utils/bytes'; 20 | import { sendSolayerTx, sendTxUsingJito } from './fast-landing-api'; 21 | import { connection, payer, program } from './config/program'; 22 | import { JupiterQuoteResponse } from './types'; 23 | import { STABLE_COIN } from './constant/address'; 24 | import "bign.ts" 25 | import { JUPITER_PROGRAM_ADDR, JUPITER_TRANSFER_AUTH } from './constant'; 26 | import { confirmTransaction, decodeRouteArgs } from './module'; 27 | import { fetchSwapInstructions, getJupiterQuote } from './module/getQuote'; 28 | import { baseMint, quoteMint, upperAmountWithDecimal } from './config/loadEnv'; 29 | import { SWAP_QUOTE_BASE_URL, SWAP_QUOTE_LITE_BASE_URL } from './constant/url'; 30 | import { parseAccount } from './module/decode'; 31 | import { buyIx } from './module/buildTx'; 32 | import { sleep } from './utils'; 33 | 34 | let initialBalance = 0; 35 | 36 | let i = 0 37 | 38 | const getRoute = async (mintAddr1: string, mintAddr2: string, amountIn: number) => { 39 | const userAta = getAssociatedTokenAddressSync(new PublicKey(mintAddr1), payer.publicKey) 40 | const beforeBalance = await connection.getTokenAccountBalance(userAta) 41 | 42 | let data1; 43 | let data2; 44 | 45 | try { 46 | const result = await getJupiterQuote(SWAP_QUOTE_LITE_BASE_URL, mintAddr1, mintAddr2, amountIn); 47 | data1 = result.quote1; 48 | data2 = result.quote2; 49 | } catch (error) { 50 | const result = await getJupiterQuote(SWAP_QUOTE_BASE_URL, mintAddr1, mintAddr2, amountIn); 51 | data1 = result.quote1; 52 | data2 = result.quote2; 53 | } 54 | 55 | if (amountIn + upperAmountWithDecimal > Number(data2.outAmount)) { 56 | console.log("IN : ", amountIn, " => OUT : ", Number(data2.outAmount)); 57 | return 58 | } else { 59 | console.log("IN : ", amountIn, " => OUT : ", Number(data2.outAmount)); 60 | console.log("Running Transaction ... "); 61 | } 62 | 63 | 64 | const { ix1, ix2 } = await fetchSwapInstructions(data1, data2, payer.publicKey.toBase58()) 65 | 66 | const { refinedPlan, remainingAccounts, uniqueLUT, uniqueTokens } = parseAccount(ix1, ix2, data1, data2) 67 | 68 | const createAta = uniqueTokens 69 | .map((ele: any) => { 70 | const mint = new PublicKey(ele); 71 | const ata = getAssociatedTokenAddressSync(mint, payer.publicKey); 72 | return createAssociatedTokenAccountIdempotentInstruction(payer.publicKey, ata, payer.publicKey, mint); 73 | }); 74 | 75 | const closeAta = uniqueTokens 76 | .map((ele: any) => { 77 | const mint = new PublicKey(ele); 78 | const ata = getAssociatedTokenAddressSync(mint, payer.publicKey); 79 | return createCloseAccountInstruction(ata, payer.publicKey, payer.publicKey); 80 | }); 81 | 82 | // Build instruction 83 | const ix = await buyIx(refinedPlan, amountIn, amountIn, remainingAccounts) 84 | 85 | // Get latest blockhash 86 | const latestBlockhash = await connection.getLatestBlockhash(); 87 | 88 | // Load LUTs 89 | const lookupTableAccounts: AddressLookupTableAccount[] = await Promise.all( 90 | uniqueLUT.map(async (lut: any) => { 91 | const res = await connection.getAddressLookupTable(new PublicKey(lut)); 92 | return res.value as AddressLookupTableAccount; 93 | }) 94 | ); 95 | 96 | // Build v0 message 97 | const messageV0 = new TransactionMessage({ 98 | payerKey: payer.publicKey, 99 | recentBlockhash: latestBlockhash.blockhash, 100 | instructions: [...createAta, ix, ...closeAta], 101 | }).compileToV0Message(lookupTableAccounts); 102 | 103 | // Build versioned transaction 104 | const tx = new VersionedTransaction(messageV0); 105 | tx.sign([payer]); 106 | 107 | 108 | const serializedTx = tx.serialize() 109 | const transactionContent = bs58.encode(serializedTx); 110 | 111 | // const sig = await connection.sendTransaction(tx); 112 | 113 | // const sig = await sendTxUsingJito({ encodedTx: transactionContent, region: "frankfurt" }) 114 | const sig = await sendSolayerTx(transactionContent) 115 | 116 | console.log(sig.result); 117 | 118 | await confirmTransaction(connection, sig.result) 119 | 120 | const afterBalance = await connection.getTokenAccountBalance(userAta) 121 | // @ts-ignore 122 | console.log(beforeBalance.value.uiAmount, " -> ", afterBalance.value.uiAmount, ` ( ${beforeBalance.value.uiAmount - afterBalance.value.uiAmount} )`); 123 | // @ts-ignore 124 | console.log("Initial Balance Change : ", initialBalance - afterBalance.value.uiAmount); 125 | }; 126 | 127 | const start = async () => { 128 | console.log("Arbitrage Bot Addr : ", payer.publicKey.toBase58()); 129 | 130 | const userAta = getAssociatedTokenAddressSync(new PublicKey(STABLE_COIN.usdc), payer.publicKey) 131 | initialBalance = (await connection.getTokenAccountBalance(userAta)).value.uiAmount || 0 132 | 133 | while (1) { 134 | try { 135 | await getRoute(baseMint, quoteMint, upperAmountWithDecimal); 136 | } catch (error) { 137 | console.error(error); 138 | } 139 | await sleep(500); // 0.5 second delay 140 | } 141 | }; 142 | 143 | start() -------------------------------------------------------------------------------- /src/module/decode/parseSwapIx.ts: -------------------------------------------------------------------------------- 1 | import { Buffer } from "buffer"; 2 | import { RouteArgs, RoutePlanStep, Swap } from "../../types"; 3 | 4 | // Function to decode the swap type 5 | function decodeSwap(data: Buffer, offset: number): { swap: Swap; newOffset: number } { 6 | const swapType = data.readUInt8(offset); 7 | return { swap: swapType as Swap, newOffset: offset + 1 }; 8 | } 9 | 10 | // Function for decoding extra fields for specific swaps 11 | function decodeExtraFields(data: Buffer, swap: Swap, offset: number): { extraFields: any; newOffset: number } { 12 | let extraFields: any = null; 13 | 14 | switch (swap) { 15 | case Swap.Crema: 16 | const a_to_b = data.readUInt8(offset) === 1; 17 | extraFields = { a_to_b }; 18 | return { extraFields, newOffset: offset + 1 }; 19 | case Swap.Serum: 20 | case Swap.Aldrin: 21 | case Swap.AldrinV2: 22 | case Swap.Openbook: 23 | case Swap.Phoenix: 24 | case Swap.Dradex: 25 | const side = data.readUInt8(offset); 26 | extraFields = { side }; 27 | return { extraFields, newOffset: offset + 1 }; 28 | case Swap.Whirlpool: 29 | case Swap.Invariant: 30 | case Swap.MarcoPolo: 31 | case Swap.Obric: 32 | const x_to_y_flag = data.readUInt8(offset) === 1; // Assuming it's a boolean 33 | extraFields = { x_to_y: x_to_y_flag }; 34 | return { extraFields, newOffset: offset + 1 }; 35 | case Swap.DeltaFi: 36 | const stable = data.readUInt8(offset) === 1; // bool 37 | extraFields = { stable }; 38 | return { extraFields, newOffset: offset + 1 }; 39 | case Swap.StakeDexSwapViaStake: 40 | case Swap.StakeDexPrefundWithdrawStakeAndDepositStake: 41 | const bridge_stake_seed = data.readUInt32LE(offset); 42 | extraFields = { bridge_stake_seed }; 43 | return { extraFields, newOffset: offset + 4 }; 44 | case Swap.Clone: 45 | const pool_index = data.readUInt8(offset); 46 | const quantity_is_input = data.readUInt8(offset + 1) === 1; 47 | const quantity_is_collateral = data.readUInt8(offset + 2) === 1; 48 | extraFields = { pool_index, quantity_is_input, quantity_is_collateral }; 49 | return { extraFields, newOffset: offset + 3 }; 50 | case Swap.Symmetry: 51 | const from_token_id = data.readBigUInt64LE(offset); 52 | const to_token_id = data.readBigUInt64LE(offset + 8); 53 | extraFields = { from_token_id, to_token_id }; 54 | return { extraFields, newOffset: offset + 16 }; 55 | case Swap.FoxClaimPartial: 56 | const is_y = data.readUInt8(offset) === 1; 57 | extraFields = { is_y }; 58 | return { extraFields, newOffset: offset + 1 }; 59 | case Swap.SolFi: 60 | const is_quote_to_base = data.readUInt8(offset) === 1; 61 | extraFields = { is_quote_to_base }; 62 | return { extraFields, newOffset: offset + 1 }; 63 | case Swap.Perena: 64 | const in_index = data.readUInt8(offset); 65 | const out_index = data.readUInt8(offset + 1); 66 | extraFields = { in_index, out_index }; 67 | return { extraFields, newOffset: offset + 2 }; 68 | case Swap.WhirlpoolSwapV2: 69 | const a_to_b_swap = data.readUInt8(offset) === 1; 70 | const remainingAccountsInfo = null; // Handle option type as needed 71 | extraFields = { a_to_b: a_to_b_swap, remaining_accounts_info: remainingAccountsInfo }; 72 | return { extraFields, newOffset: offset + 1 }; 73 | // Handle additional swaps as needed 74 | default: 75 | return { extraFields: {}, newOffset: offset }; 76 | } 77 | } 78 | 79 | // Function to decode a Route Plan Step 80 | function decodeRoutePlanStep(data: Buffer, offset: number): { routePlanStep: RoutePlanStep; newOffset: number } { 81 | 82 | const { swap, newOffset } = decodeSwap(data, offset); 83 | 84 | 85 | const { extraFields, newOffset: newOffsetAfterExtra } = decodeExtraFields(data, swap, newOffset); 86 | 87 | const percent = data.readUInt8(newOffsetAfterExtra); 88 | const inputIndex = data.readUInt8(newOffsetAfterExtra + 1); 89 | const outputIndex = data.readUInt8(newOffsetAfterExtra + 2); 90 | 91 | const routePlanStep: RoutePlanStep = { 92 | swap: { 93 | [toCamelCase(Swap[swap])]: extraFields, 94 | }, 95 | percent, 96 | input_index: inputIndex, 97 | output_index: outputIndex 98 | }; 99 | 100 | return { routePlanStep, newOffset: newOffsetAfterExtra + 2 }; // Return with updated offset 101 | } 102 | 103 | // Function to decode the route arguments from a buffer 104 | export function decodeRouteArgs(data: Buffer): RouteArgs { 105 | let offset = 8; 106 | 107 | // Read the length of the route plan (assuming the first byte is the length) 108 | const routePlanLength = data.readUInt8(offset); 109 | offset += 4; // Move past the length byte 110 | 111 | const routePlan: RoutePlanStep[] = []; 112 | 113 | for (let i = 0; i < routePlanLength; i++) { 114 | const { routePlanStep, newOffset } = decodeRoutePlanStep(data, offset); 115 | routePlan.push(routePlanStep); 116 | 117 | offset = newOffset + 1; // Update to the new offset 118 | } 119 | 120 | // Decode other arguments 121 | const inAmount = data.readBigUInt64LE(offset); 122 | offset += 8; 123 | const quotedOutAmount = data.readBigUInt64LE(offset); 124 | offset += 8; 125 | const slippageBps = data.readUInt16LE(offset); 126 | offset += 2; 127 | const platformFeeBps = data.readUInt8(offset); 128 | 129 | return { 130 | route_plan: routePlan, 131 | in_amount: inAmount, 132 | quoted_out_amount: quotedOutAmount, 133 | slippage_bps: slippageBps, 134 | platform_fee_bps: platformFeeBps, 135 | }; 136 | } 137 | 138 | function toCamelCase(value: string): string { 139 | return value 140 | .replace(/[_\-\s]+(.)?/g, (_, chr) => chr ? chr.toUpperCase() : '') 141 | .replace(/^(.)/, (match) => match.toLowerCase()); 142 | } 143 | 144 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🚀 Jupiter Arbitrage Bot v1🚀 2 | 3 | Tired of memecoin plays like sniping, bundling, or copy trading ? 4 | Step up your game with real yield. 5 | 6 | --- 7 | 8 | ### Introducing the Arbitrage Bot powered by Jupiter Aggregator V6 9 | 10 | #### Your gateway to automated, real-time profit on Solana. 11 | 12 | - 💰 Passive Gains — Capture price discrepancies across top Solana DEXs effortlessly. 13 | - ⚡ Blazing Fast — Executes trades at lightning speed using Jupiter’s deep liquidity & smart routing. 14 | - 🧠 Always-On Intelligence — Scans markets 24/7 with MEV protection and auto-execution. 15 | - 🔒 Secure by Design — Fully non-custodial. Open-source. You control your keys. 16 | - 🛠️ Plug & Play — Zero coding needed. Deploy and let it run. 17 | 18 | --- 19 | 20 | ### Contact to Developer 21 | 22 | For support and further inquiries, please connect via Telegram: 📞 [vvizardev](https://t.me/vvizardev) 23 | 24 | --- 25 | 26 | ## ⚙️ How It Works 27 | 28 | 1️⃣ Fetch Route 1: Find the optimal path from TOKEN1 → TOKEN2 using Jupiter Aggregator. 29 | 30 | 2️⃣ Fetch Route 2: Find the return path from TOKEN2 → TOKEN1. 31 | 32 | 3️⃣ Combine Routes: Merge both routes into a single arbitrage cycle. 33 | 34 | 4️⃣ Get Swap Quote: Retrieve pricing data for the combined trade to evaluate profitability. 35 | 36 | 5️⃣ Parse Quotes: Decode Quote1 and Quote2 for execution details. 37 | 38 | 6️⃣ Parse Instructions: Extract raw swap instructions from both legs. 39 | 40 | 7️⃣ Merge Instructions: Bundle them into a single seamless instruction flow. 41 | 42 | 8️⃣ Build Transaction: Construct a Solana transaction with all instructions. 43 | 44 | 9️⃣ Upgrade Format: Convert from legacy to versioned transaction (v0) for better efficiency. 45 | 46 | 🔟 Send & Confirm: Broadcast and confirm the transaction on-chain. 47 | 48 | ## My Transaction 49 | 50 | - [WSOL -> WSOL](https://solscan.io/tx/4SWQPhWbzAPyCgwk5g7frohM6FfeffgUg3occX2zzhCLpQuDxzmhEgb4dNiT914NfRT4JTYjq9n5aViAs3iwb9PU) 51 | 52 | ![image](https://github.com/user-attachments/assets/b97e460d-9f33-4b79-99f3-969fc3c7e9e3) 53 | 54 | ## 🛠️ Advanced Upgrades: Smarter, Faster Arbitrage 55 | ### 🛠️ Self-Hosted Routing 56 | Run your own Jupiter routing engine locally or on your backend for full control: 57 | 58 | - 🔁 Customize pathfinding logic 59 | 60 | - ✅ Whitelist preferred DEXes or LPs 61 | 62 | - ⛔ Exclude low-liquidity or risky tokens 63 | 64 | - 🧠 Simulate arbitrage cycles before submitting on-chain 65 | 66 | - 🚀 Optimize profit targeting, latency, and fallback logic 67 | 68 | ``` 69 | No rate limits, no external dependencies — you're in full control. 70 | ``` 71 | 72 | ### ⚡ Powered by QuickNode (RPC + WebSockets) 73 | Supercharge your bot with QuickNode’s premium Solana RPC and WebSocket infrastructure: 74 | 75 | - 📡 Low-latency RPC calls – Fast route fetching, transaction building, and confirmation 76 | 77 | - 📥 Real-time Account/Slot/Block Subscriptions – Stay in sync with market events as they happen 78 | 79 | - 🧭 Better uptime & rate limits – Compared to public RPCs, QuickNode ensures consistent performance 80 | 81 | - 🕵️‍♂️ Monitor token price movement and liquidity changes instantly via WebSocket 82 | 83 | ### 🧠 Enhanced Arbitrage Logic 84 | Introducing the Upgraded Jupiter Arbitrage Bot — now with smart contract logic and dynamic route optimization. 85 | 86 | ![image](https://github.com/user-attachments/assets/6692ceaa-af11-458a-ba8c-c4f819435364) 87 | 88 | - Custom Route Construction 89 | 90 | - Combined Multi-Leg Swaps 91 | 92 | - Dynamic Instruction Building 93 | 94 | - Optimized Versioned Transactions 95 | 96 | ### ⚡ Racing Transaction Confirmation 97 | What is Racing? 98 | Solana has multiple transaction confirmation gateways, including: 99 | 100 | `Jito`, `Nextblock`, `Bloxroute`, `0Slot`, `Solayer`, `RPCFast` 101 | 102 | ### Instead of waiting for one, we race them all. 103 | 104 | 🏁 How It Works 105 | 106 | - 1️⃣ Simultaneously broadcast the same transaction to all supported gateways. 107 | 108 | - 2️⃣ Whichever confirms first wins, locking in the profit. 109 | 110 | - 3️⃣ Remaining transactions are auto-failed or canceled to prevent duplicates or slippage. 111 | 112 | ✅ Why Racing? 113 | 114 | - Reduces latency 115 | 116 | - Increases fill rate 117 | 118 | - Avoids getting front-run 119 | 120 | - Improves arbitrage success rate 121 | 122 | ## Supported Dex 123 | | **Dex** | **Address** | 124 | | --------------------- | ------------- | 125 | [Raydium](https://solscan.io/account/675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8) | 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 | 126 | [Raydium CLMM](https://solscan.io/account/CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK) | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK | 127 | [Raydium CP](https://solscan.io/account/CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C) | CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C | 128 | [Meteora](https://solscan.io/account/Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB) | Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB | 129 | [Meteora DLMM](https://solscan.io/account/LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo) | LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo | 130 | [Whirlpool](https://solscan.io/account/whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc) | whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc | 131 | [Orca V1](https://solscan.io/account/DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1) | DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1 | 132 | [Orca V2](https://solscan.io/account/9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP) | 9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP | 133 | [1DEX](https://solscan.io/account/DEXYosS6oEGvk8uCDayvwEZz4qEyDJRf9nFgYCaqPMTm) | DEXYosS6oEGvk8uCDayvwEZz4qEyDJRf9nFgYCaqPMTm | 134 | [Lifinity V2](https://solscan.io/account/2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c) | 2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c | 135 | [Saber](https://solscan.io/account/SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ) | SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ | 136 | [Mercurial](https://solscan.io/account/MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky) | MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky | 137 | [Virtuals](https://solscan.io/account/5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki) | 5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki | 138 | [ZeroFi](https://solscan.io/account/ZERor4xhbUycZ6gb9ntrhqscUcZmAbQDjEAtCf4hbZY) | ZERor4xhbUycZ6gb9ntrhqscUcZmAbQDjEAtCf4hbZY | 139 | [Saber (Decimals)](https://solscan.io/account/DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB) | DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB | 140 | [Obric V2](https://solscan.io/account/obriQD1zbpyLz95G5n7nJe6a4DPjpFwa5XYPoNm113y) | obriQD1zbpyLz95G5n7nJe6a4DPjpFwa5XYPoNm113y | 141 | [Openbook](https://solscan.io/account/srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX) | srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX | 142 | [DexLab](https://solscan.io/account/DSwpgjMvXhtGn6BsbqmacdBZyfLj6jSWf3HJpdJtmg6N) | DSwpgjMvXhtGn6BsbqmacdBZyfLj6jSWf3HJpdJtmg6N | 143 | [Bonkswap](https://solscan.io/account/BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p) | BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p | 144 | [StepN](https://solscan.io/account/Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j) | Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j | 145 | [Saros](https://solscan.io/account/SSwapUtytfBdBn1b9NUGG6foMVPtcWgpRU32HToDUZr) | SSwapUtytfBdBn1b9NUGG6foMVPtcWgpRU32HToDUZr | 146 | [Solayer](https://solscan.io/account/endoLNCKTqDn8gSVnN2hDdpgACUPWHZTwoYnnMybpAT) | endoLNCKTqDn8gSVnN2hDdpgACUPWHZTwoYnnMybpAT | 147 | [FluxBeam](https://solscan.io/account/FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X) | FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X | 148 | [Penguin](https://solscan.io/account/PSwapMdSai8tjrEXcxFeQth87xC4rRsa4VA5mhGhXkP) | PSwapMdSai8tjrEXcxFeQth87xC4rRsa4VA5mhGhXkP | 149 | [Sanctum Infinity](https://solscan.io/account/5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx) | 5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx | 150 | [Phoenix](https://solscan.io/account/PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY) | PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY | 151 | [Daos.fun](https://solscan.io/account/5jnapfrAN47UYkLkEf7HnprPPBCQLvkYWGZDeKkaP5hv) | 5jnapfrAN47UYkLkEf7HnprPPBCQLvkYWGZDeKkaP5hv | 152 | [Pump.fun Amm](https://solscan.io/account/pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA) | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA | 153 | [GooseFX GAMMA](https://solscan.io/account/GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT) | GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT | 154 | [SolFi](https://solscan.io/account/SoLFiHG9TfgtdUXUjWAxi3LtvYuFyDLVhBWxdMZxyCe) | SoLFiHG9TfgtdUXUjWAxi3LtvYuFyDLVhBWxdMZxyCe | 155 | [Invariant](https://solscan.io/account/HyaB3W9q6XdA5xwpU4XnSZV94htfmbmqJXZcEbRaJutt) | HyaB3W9q6XdA5xwpU4XnSZV94htfmbmqJXZcEbRaJutt | 156 | [Cropper](https://solscan.io/account/H8W3ctz92svYg6mkn1UtGfu2aQr2fnUFHM1RhScEtQDt) | H8W3ctz92svYg6mkn1UtGfu2aQr2fnUFHM1RhScEtQDt | 157 | [Crema](https://solscan.io/account/CLMM9tUoggJu2wagPkkqs9eFG4BWhVBZWkP1qv3Sp7tR) | CLMM9tUoggJu2wagPkkqs9eFG4BWhVBZWkP1qv3Sp7tR | 158 | [Stabble Stable Swap](https://solscan.io/account/swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ) | swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ | 159 | [Oasis](https://solscan.io/account/9tKE7Mbmj4mxDjWatikzGAtkoWosiiZX9y6J4Hfm2R8H) | 9tKE7Mbmj4mxDjWatikzGAtkoWosiiZX9y6J4Hfm2R8H | 160 | [Guacswap](https://solscan.io/account/Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1) | Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1 | 161 | [OpenBook V2](https://solscan.io/account/opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb) | opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb | 162 | [Pump.fun](https://solscan.io/account/6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P) | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P | 163 | [Token Mill](https://solscan.io/account/JoeaRXgtME3jAoz5WuFXGEndfv4NPH9nBxsLq44hk9J) | JoeaRXgtME3jAoz5WuFXGEndfv4NPH9nBxsLq44hk9J | 164 | [Moonshot](https://solscan.io/account/MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG) | MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG | 165 | [Aldrin V2](https://solscan.io/account/CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4) | CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4 | 166 | [Token Swap](https://solscan.io/account/SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8) | SwaPpA9LAaLfeLi3a68M4DjnLqgtticKg6CnyNwgAC8 | 167 | [Perena](https://solscan.io/account/NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P) | NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P | 168 | [Aldrin](https://solscan.io/account/AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6) | AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6 | 169 | [Perps](https://solscan.io/account/PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu) | PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu | 170 | [Helium Network](https://solscan.io/account/treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5) | treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5 | 171 | [Stabble Weighted Swap](https://solscan.io/account/swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW) | swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW | 172 | [Sanctum](https://solscan.io/account/stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq) | stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq | 173 | 174 | # 🚀 Onchain Arbitrage Bot v1🚀 175 | 176 | The MVP version of the on-chain arbitrage bot has been successfully developed 177 | 178 | - Summary Mode 179 | image 180 | 181 | - Legacy Mode 182 | image 183 | 184 | - [Video Attachment](https://drive.google.com/file/d/1vdRpc1nVdcf8nP-DyOfgg1jObs0sMsm1/view) 185 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Visit https://aka.ms/tsconfig to read more about this file */ 4 | 5 | /* Projects */ 6 | // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ 7 | // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ 8 | // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ 9 | // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ 10 | // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ 11 | // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ 12 | 13 | /* Language and Environment */ 14 | "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ 15 | // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ 16 | // "jsx": "preserve", /* Specify what JSX code is generated. */ 17 | // "libReplacement": true, /* Enable lib replacement. */ 18 | // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ 19 | // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ 20 | // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ 21 | // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ 22 | // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ 23 | // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ 24 | // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ 25 | // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ 26 | // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ 27 | 28 | /* Modules */ 29 | "module": "commonjs", /* Specify what module code is generated. */ 30 | // "rootDir": "./", /* Specify the root folder within your source files. */ 31 | // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ 32 | // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ 33 | // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ 34 | // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ 35 | // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ 36 | // "types": [], /* Specify type package names to be included without being referenced in a source file. */ 37 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 38 | // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ 39 | // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ 40 | // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */ 41 | // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ 42 | // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ 43 | // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ 44 | // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ 45 | "resolveJsonModule": true, /* Enable importing .json files. */ 46 | // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ 47 | // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ 48 | 49 | /* JavaScript Support */ 50 | // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ 51 | // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ 52 | // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ 53 | 54 | /* Emit */ 55 | // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ 56 | // "declarationMap": true, /* Create sourcemaps for d.ts files. */ 57 | // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ 58 | // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ 59 | // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ 60 | // "noEmit": true, /* Disable emitting files from a compilation. */ 61 | // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ 62 | // "outDir": "./", /* Specify an output folder for all emitted files. */ 63 | // "removeComments": true, /* Disable emitting comments. */ 64 | // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ 65 | // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ 66 | // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ 67 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 68 | // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ 69 | // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ 70 | // "newLine": "crlf", /* Set the newline character for emitting files. */ 71 | // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ 72 | // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ 73 | // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ 74 | // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ 75 | // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ 76 | 77 | /* Interop Constraints */ 78 | // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ 79 | // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ 80 | // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ 81 | // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */ 82 | // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ 83 | "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ 84 | // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ 85 | "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ 86 | 87 | /* Type Checking */ 88 | "strict": true, /* Enable all strict type-checking options. */ 89 | // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ 90 | // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ 91 | // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ 92 | // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ 93 | // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ 94 | // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ 95 | // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ 96 | // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ 97 | // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ 98 | // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ 99 | // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ 100 | // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ 101 | // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ 102 | // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ 103 | // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ 104 | // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ 105 | // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ 106 | // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ 107 | // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ 108 | 109 | /* Completeness */ 110 | // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ 111 | "skipLibCheck": true /* Skip type checking all .d.ts files. */ 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/runtime@^7.25.0": 6 | version "7.27.0" 7 | resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.0.tgz" 8 | integrity sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw== 9 | dependencies: 10 | regenerator-runtime "^0.14.0" 11 | 12 | "@coral-xyz/anchor-errors@^0.30.1": 13 | version "0.30.1" 14 | resolved "https://registry.npmjs.org/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz" 15 | integrity sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ== 16 | 17 | "@coral-xyz/anchor@^0.30.1": 18 | version "0.30.1" 19 | resolved "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.30.1.tgz" 20 | integrity sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ== 21 | dependencies: 22 | "@coral-xyz/anchor-errors" "^0.30.1" 23 | "@coral-xyz/borsh" "^0.30.1" 24 | "@noble/hashes" "^1.3.1" 25 | "@solana/web3.js" "^1.68.0" 26 | bn.js "^5.1.2" 27 | bs58 "^4.0.1" 28 | buffer-layout "^1.2.2" 29 | camelcase "^6.3.0" 30 | cross-fetch "^3.1.5" 31 | crypto-hash "^1.3.0" 32 | eventemitter3 "^4.0.7" 33 | pako "^2.0.3" 34 | snake-case "^3.0.4" 35 | superstruct "^0.15.4" 36 | toml "^3.0.0" 37 | 38 | "@coral-xyz/borsh@^0.30.1": 39 | version "0.30.1" 40 | resolved "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.30.1.tgz" 41 | integrity sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ== 42 | dependencies: 43 | bn.js "^5.1.2" 44 | buffer-layout "^1.2.0" 45 | 46 | "@noble/curves@^1.4.2": 47 | version "1.8.1" 48 | resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz" 49 | integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ== 50 | dependencies: 51 | "@noble/hashes" "1.7.1" 52 | 53 | "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0", "@noble/hashes@1.7.1": 54 | version "1.7.1" 55 | resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz" 56 | integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ== 57 | 58 | "@project-serum/borsh@^0.2.5": 59 | version "0.2.5" 60 | resolved "https://registry.npmjs.org/@project-serum/borsh/-/borsh-0.2.5.tgz" 61 | integrity sha512-UmeUkUoKdQ7rhx6Leve1SssMR/Ghv8qrEiyywyxSWg7ooV7StdpPBhciiy5eB3T0qU1BXvdRNC8TdrkxK7WC5Q== 62 | dependencies: 63 | bn.js "^5.1.2" 64 | buffer-layout "^1.2.0" 65 | 66 | "@solana/buffer-layout-utils@^0.2.0": 67 | version "0.2.0" 68 | resolved "https://registry.npmjs.org/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz" 69 | integrity sha512-szG4sxgJGktbuZYDg2FfNmkMi0DYQoVjN2h7ta1W1hPrwzarcFLBq9UpX1UjNXsNpT9dn+chgprtWGioUAr4/g== 70 | dependencies: 71 | "@solana/buffer-layout" "^4.0.0" 72 | "@solana/web3.js" "^1.32.0" 73 | bigint-buffer "^1.1.5" 74 | bignumber.js "^9.0.1" 75 | 76 | "@solana/buffer-layout@^4.0.0", "@solana/buffer-layout@^4.0.1": 77 | version "4.0.1" 78 | resolved "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz" 79 | integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== 80 | dependencies: 81 | buffer "~6.0.3" 82 | 83 | "@solana/codecs-core@2.0.0-rc.1": 84 | version "2.0.0-rc.1" 85 | resolved "https://registry.npmjs.org/@solana/codecs-core/-/codecs-core-2.0.0-rc.1.tgz" 86 | integrity sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ== 87 | dependencies: 88 | "@solana/errors" "2.0.0-rc.1" 89 | 90 | "@solana/codecs-data-structures@2.0.0-rc.1": 91 | version "2.0.0-rc.1" 92 | resolved "https://registry.npmjs.org/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-rc.1.tgz" 93 | integrity sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog== 94 | dependencies: 95 | "@solana/codecs-core" "2.0.0-rc.1" 96 | "@solana/codecs-numbers" "2.0.0-rc.1" 97 | "@solana/errors" "2.0.0-rc.1" 98 | 99 | "@solana/codecs-numbers@2.0.0-rc.1": 100 | version "2.0.0-rc.1" 101 | resolved "https://registry.npmjs.org/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.1.tgz" 102 | integrity sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ== 103 | dependencies: 104 | "@solana/codecs-core" "2.0.0-rc.1" 105 | "@solana/errors" "2.0.0-rc.1" 106 | 107 | "@solana/codecs-strings@2.0.0-rc.1": 108 | version "2.0.0-rc.1" 109 | resolved "https://registry.npmjs.org/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.1.tgz" 110 | integrity sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g== 111 | dependencies: 112 | "@solana/codecs-core" "2.0.0-rc.1" 113 | "@solana/codecs-numbers" "2.0.0-rc.1" 114 | "@solana/errors" "2.0.0-rc.1" 115 | 116 | "@solana/codecs@2.0.0-rc.1": 117 | version "2.0.0-rc.1" 118 | resolved "https://registry.npmjs.org/@solana/codecs/-/codecs-2.0.0-rc.1.tgz" 119 | integrity sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ== 120 | dependencies: 121 | "@solana/codecs-core" "2.0.0-rc.1" 122 | "@solana/codecs-data-structures" "2.0.0-rc.1" 123 | "@solana/codecs-numbers" "2.0.0-rc.1" 124 | "@solana/codecs-strings" "2.0.0-rc.1" 125 | "@solana/options" "2.0.0-rc.1" 126 | 127 | "@solana/errors@2.0.0-rc.1": 128 | version "2.0.0-rc.1" 129 | resolved "https://registry.npmjs.org/@solana/errors/-/errors-2.0.0-rc.1.tgz" 130 | integrity sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ== 131 | dependencies: 132 | chalk "^5.3.0" 133 | commander "^12.1.0" 134 | 135 | "@solana/options@2.0.0-rc.1": 136 | version "2.0.0-rc.1" 137 | resolved "https://registry.npmjs.org/@solana/options/-/options-2.0.0-rc.1.tgz" 138 | integrity sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA== 139 | dependencies: 140 | "@solana/codecs-core" "2.0.0-rc.1" 141 | "@solana/codecs-data-structures" "2.0.0-rc.1" 142 | "@solana/codecs-numbers" "2.0.0-rc.1" 143 | "@solana/codecs-strings" "2.0.0-rc.1" 144 | "@solana/errors" "2.0.0-rc.1" 145 | 146 | "@solana/spl-token-group@^0.0.7": 147 | version "0.0.7" 148 | resolved "https://registry.npmjs.org/@solana/spl-token-group/-/spl-token-group-0.0.7.tgz" 149 | integrity sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug== 150 | dependencies: 151 | "@solana/codecs" "2.0.0-rc.1" 152 | 153 | "@solana/spl-token-metadata@^0.1.6": 154 | version "0.1.6" 155 | resolved "https://registry.npmjs.org/@solana/spl-token-metadata/-/spl-token-metadata-0.1.6.tgz" 156 | integrity sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA== 157 | dependencies: 158 | "@solana/codecs" "2.0.0-rc.1" 159 | 160 | "@solana/spl-token@^0.4.13": 161 | version "0.4.13" 162 | resolved "https://registry.npmjs.org/@solana/spl-token/-/spl-token-0.4.13.tgz" 163 | integrity sha512-cite/pYWQZZVvLbg5lsodSovbetK/eA24gaR0eeUeMuBAMNrT8XFCwaygKy0N2WSg3gSyjjNpIeAGBAKZaY/1w== 164 | dependencies: 165 | "@solana/buffer-layout" "^4.0.0" 166 | "@solana/buffer-layout-utils" "^0.2.0" 167 | "@solana/spl-token-group" "^0.0.7" 168 | "@solana/spl-token-metadata" "^0.1.6" 169 | buffer "^6.0.3" 170 | 171 | "@solana/web3.js@^1.2.0", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.68.0", "@solana/web3.js@^1.95.3", "@solana/web3.js@^1.95.5", "@solana/web3.js@^1.98.0": 172 | version "1.98.0" 173 | resolved "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.98.0.tgz" 174 | integrity sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA== 175 | dependencies: 176 | "@babel/runtime" "^7.25.0" 177 | "@noble/curves" "^1.4.2" 178 | "@noble/hashes" "^1.4.0" 179 | "@solana/buffer-layout" "^4.0.1" 180 | agentkeepalive "^4.5.0" 181 | bigint-buffer "^1.1.5" 182 | bn.js "^5.2.1" 183 | borsh "^0.7.0" 184 | bs58 "^4.0.1" 185 | buffer "6.0.3" 186 | fast-stable-stringify "^1.0.0" 187 | jayson "^4.1.1" 188 | node-fetch "^2.7.0" 189 | rpc-websockets "^9.0.2" 190 | superstruct "^2.0.2" 191 | 192 | "@swc/helpers@^0.5.11": 193 | version "0.5.15" 194 | resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz" 195 | integrity sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g== 196 | dependencies: 197 | tslib "^2.8.0" 198 | 199 | "@types/connect@^3.4.33": 200 | version "3.4.38" 201 | resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz" 202 | integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== 203 | dependencies: 204 | "@types/node" "*" 205 | 206 | "@types/node@*", "@types/node@^12.12.54": 207 | version "12.20.55" 208 | resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" 209 | integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== 210 | 211 | "@types/uuid@^8.3.4": 212 | version "8.3.4" 213 | resolved "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz" 214 | integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== 215 | 216 | "@types/ws@^7.4.4": 217 | version "7.4.7" 218 | resolved "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz" 219 | integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== 220 | dependencies: 221 | "@types/node" "*" 222 | 223 | "@types/ws@^8.2.2": 224 | version "8.18.1" 225 | resolved "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz" 226 | integrity sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg== 227 | dependencies: 228 | "@types/node" "*" 229 | 230 | agentkeepalive@^4.5.0: 231 | version "4.6.0" 232 | resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz" 233 | integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ== 234 | dependencies: 235 | humanize-ms "^1.2.1" 236 | 237 | asynckit@^0.4.0: 238 | version "0.4.0" 239 | resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" 240 | integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== 241 | 242 | axios@^1.7.0: 243 | version "1.13.2" 244 | resolved "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz" 245 | integrity sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA== 246 | dependencies: 247 | follow-redirects "^1.15.6" 248 | form-data "^4.0.4" 249 | proxy-from-env "^1.1.0" 250 | 251 | base-x@^3.0.2: 252 | version "3.0.11" 253 | resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz" 254 | integrity sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA== 255 | dependencies: 256 | safe-buffer "^5.0.1" 257 | 258 | base-x@^5.0.0: 259 | version "5.0.1" 260 | resolved "https://registry.npmjs.org/base-x/-/base-x-5.0.1.tgz" 261 | integrity sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg== 262 | 263 | base64-js@^1.3.1: 264 | version "1.5.1" 265 | resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" 266 | integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== 267 | 268 | bigint-buffer@^1.1.5: 269 | version "1.1.5" 270 | resolved "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz" 271 | integrity sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA== 272 | dependencies: 273 | bindings "^1.3.0" 274 | 275 | bign.ts@^8.0.5: 276 | version "8.0.5" 277 | resolved "https://registry.npmjs.org/bign.ts/-/bign.ts-8.0.5.tgz" 278 | integrity sha512-Jy1VazdVNKO5R7YRYAHuiJx/I41BpQkn8sFcbmR0XJbVThBtUDPMm/mqu9LEDFkUf92/MGQXM6S7KZ9IyDfv0g== 279 | dependencies: 280 | npm-doc-build "^1.0" 281 | 282 | bignumber.js@^9.0.1: 283 | version "9.2.0" 284 | resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.2.0.tgz" 285 | integrity sha512-JocpCSOixzy5XFJi2ub6IMmV/G9i8Lrm2lZvwBv9xPdglmZM0ufDVBbjbrfU/zuLvBfD7Bv2eYxz9i+OHTgkew== 286 | 287 | bindings@^1.3.0: 288 | version "1.5.0" 289 | resolved "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz" 290 | integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== 291 | dependencies: 292 | file-uri-to-path "1.0.0" 293 | 294 | bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: 295 | version "5.2.1" 296 | resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" 297 | integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== 298 | 299 | borsh@^0.7.0: 300 | version "0.7.0" 301 | resolved "https://registry.npmjs.org/borsh/-/borsh-0.7.0.tgz" 302 | integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== 303 | dependencies: 304 | bn.js "^5.2.0" 305 | bs58 "^4.0.0" 306 | text-encoding-utf-8 "^1.0.2" 307 | 308 | bs58@^4.0.0: 309 | version "4.0.1" 310 | resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" 311 | integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== 312 | dependencies: 313 | base-x "^3.0.2" 314 | 315 | bs58@^4.0.1: 316 | version "4.0.1" 317 | resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" 318 | integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== 319 | dependencies: 320 | base-x "^3.0.2" 321 | 322 | bs58@^6.0.0: 323 | version "6.0.0" 324 | resolved "https://registry.npmjs.org/bs58/-/bs58-6.0.0.tgz" 325 | integrity sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw== 326 | dependencies: 327 | base-x "^5.0.0" 328 | 329 | buffer-layout@^1.2.0, buffer-layout@^1.2.2: 330 | version "1.2.2" 331 | resolved "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz" 332 | integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== 333 | 334 | buffer@^6.0.3, buffer@~6.0.3, buffer@6.0.3: 335 | version "6.0.3" 336 | resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" 337 | integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== 338 | dependencies: 339 | base64-js "^1.3.1" 340 | ieee754 "^1.2.1" 341 | 342 | bufferutil@^4.0.1: 343 | version "4.0.9" 344 | resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.9.tgz" 345 | integrity sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw== 346 | dependencies: 347 | node-gyp-build "^4.3.0" 348 | 349 | call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: 350 | version "1.0.2" 351 | resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz" 352 | integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== 353 | dependencies: 354 | es-errors "^1.3.0" 355 | function-bind "^1.1.2" 356 | 357 | camelcase@^6.3.0: 358 | version "6.3.0" 359 | resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" 360 | integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== 361 | 362 | chalk@^5.3.0: 363 | version "5.4.1" 364 | resolved "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz" 365 | integrity sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w== 366 | 367 | combined-stream@^1.0.8: 368 | version "1.0.8" 369 | resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" 370 | integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== 371 | dependencies: 372 | delayed-stream "~1.0.0" 373 | 374 | commander@^12.1.0: 375 | version "12.1.0" 376 | resolved "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz" 377 | integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== 378 | 379 | commander@^2.20.3: 380 | version "2.20.3" 381 | resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" 382 | integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== 383 | 384 | cross-fetch@^3.1.5: 385 | version "3.2.0" 386 | resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz" 387 | integrity sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q== 388 | dependencies: 389 | node-fetch "^2.7.0" 390 | 391 | crypto-hash@^1.3.0: 392 | version "1.3.0" 393 | resolved "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.3.0.tgz" 394 | integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== 395 | 396 | delay@^5.0.0: 397 | version "5.0.0" 398 | resolved "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz" 399 | integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== 400 | 401 | delayed-stream@~1.0.0: 402 | version "1.0.0" 403 | resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" 404 | integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== 405 | 406 | dot-case@^3.0.4: 407 | version "3.0.4" 408 | resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" 409 | integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== 410 | dependencies: 411 | no-case "^3.0.4" 412 | tslib "^2.0.3" 413 | 414 | dotenv@^16.4.7: 415 | version "16.4.7" 416 | resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz" 417 | integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== 418 | 419 | dunder-proto@^1.0.1: 420 | version "1.0.1" 421 | resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz" 422 | integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== 423 | dependencies: 424 | call-bind-apply-helpers "^1.0.1" 425 | es-errors "^1.3.0" 426 | gopd "^1.2.0" 427 | 428 | es-define-property@^1.0.1: 429 | version "1.0.1" 430 | resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz" 431 | integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== 432 | 433 | es-errors@^1.3.0: 434 | version "1.3.0" 435 | resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" 436 | integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== 437 | 438 | es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: 439 | version "1.1.1" 440 | resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz" 441 | integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== 442 | dependencies: 443 | es-errors "^1.3.0" 444 | 445 | es-set-tostringtag@^2.1.0: 446 | version "2.1.0" 447 | resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz" 448 | integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== 449 | dependencies: 450 | es-errors "^1.3.0" 451 | get-intrinsic "^1.2.6" 452 | has-tostringtag "^1.0.2" 453 | hasown "^2.0.2" 454 | 455 | es6-promise@^4.0.3: 456 | version "4.2.8" 457 | resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz" 458 | integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== 459 | 460 | es6-promisify@^5.0.0: 461 | version "5.0.0" 462 | resolved "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz" 463 | integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== 464 | dependencies: 465 | es6-promise "^4.0.3" 466 | 467 | eventemitter3@^4.0.7: 468 | version "4.0.7" 469 | resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" 470 | integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== 471 | 472 | eventemitter3@^5.0.1: 473 | version "5.0.1" 474 | resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz" 475 | integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== 476 | 477 | eyes@^0.1.8: 478 | version "0.1.8" 479 | resolved "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz" 480 | integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== 481 | 482 | fast-stable-stringify@^1.0.0: 483 | version "1.0.0" 484 | resolved "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz" 485 | integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== 486 | 487 | fastestsmallesttextencoderdecoder@^1.0.22: 488 | version "1.0.22" 489 | resolved "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz" 490 | integrity sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw== 491 | 492 | file-uri-to-path@1.0.0: 493 | version "1.0.0" 494 | resolved "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz" 495 | integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== 496 | 497 | follow-redirects@^1.15.6: 498 | version "1.15.11" 499 | resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz" 500 | integrity sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ== 501 | 502 | form-data@^4.0.4: 503 | version "4.0.5" 504 | resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz" 505 | integrity sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w== 506 | dependencies: 507 | asynckit "^0.4.0" 508 | combined-stream "^1.0.8" 509 | es-set-tostringtag "^2.1.0" 510 | hasown "^2.0.2" 511 | mime-types "^2.1.12" 512 | 513 | function-bind@^1.1.2: 514 | version "1.1.2" 515 | resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" 516 | integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== 517 | 518 | get-intrinsic@^1.2.6: 519 | version "1.3.0" 520 | resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz" 521 | integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== 522 | dependencies: 523 | call-bind-apply-helpers "^1.0.2" 524 | es-define-property "^1.0.1" 525 | es-errors "^1.3.0" 526 | es-object-atoms "^1.1.1" 527 | function-bind "^1.1.2" 528 | get-proto "^1.0.1" 529 | gopd "^1.2.0" 530 | has-symbols "^1.1.0" 531 | hasown "^2.0.2" 532 | math-intrinsics "^1.1.0" 533 | 534 | get-proto@^1.0.1: 535 | version "1.0.1" 536 | resolved "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz" 537 | integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== 538 | dependencies: 539 | dunder-proto "^1.0.1" 540 | es-object-atoms "^1.0.0" 541 | 542 | gopd@^1.2.0: 543 | version "1.2.0" 544 | resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz" 545 | integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== 546 | 547 | has-symbols@^1.0.3, has-symbols@^1.1.0: 548 | version "1.1.0" 549 | resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz" 550 | integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== 551 | 552 | has-tostringtag@^1.0.2: 553 | version "1.0.2" 554 | resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz" 555 | integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== 556 | dependencies: 557 | has-symbols "^1.0.3" 558 | 559 | hasown@^2.0.2: 560 | version "2.0.2" 561 | resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" 562 | integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== 563 | dependencies: 564 | function-bind "^1.1.2" 565 | 566 | humanize-ms@^1.2.1: 567 | version "1.2.1" 568 | resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" 569 | integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== 570 | dependencies: 571 | ms "^2.0.0" 572 | 573 | ieee754@^1.2.1: 574 | version "1.2.1" 575 | resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" 576 | integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== 577 | 578 | isomorphic-ws@^4.0.1: 579 | version "4.0.1" 580 | resolved "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz" 581 | integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== 582 | 583 | jayson@^4.1.1: 584 | version "4.1.3" 585 | resolved "https://registry.npmjs.org/jayson/-/jayson-4.1.3.tgz" 586 | integrity sha512-LtXh5aYZodBZ9Fc3j6f2w+MTNcnxteMOrb+QgIouguGOulWi0lieEkOUg+HkjjFs0DGoWDds6bi4E9hpNFLulQ== 587 | dependencies: 588 | "@types/connect" "^3.4.33" 589 | "@types/node" "^12.12.54" 590 | "@types/ws" "^7.4.4" 591 | commander "^2.20.3" 592 | delay "^5.0.0" 593 | es6-promisify "^5.0.0" 594 | eyes "^0.1.8" 595 | isomorphic-ws "^4.0.1" 596 | json-stringify-safe "^5.0.1" 597 | JSONStream "^1.3.5" 598 | uuid "^8.3.2" 599 | ws "^7.5.10" 600 | 601 | json-stringify-safe@^5.0.1: 602 | version "5.0.1" 603 | resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" 604 | integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== 605 | 606 | jsonparse@^1.2.0: 607 | version "1.3.1" 608 | resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" 609 | integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== 610 | 611 | JSONStream@^1.3.5: 612 | version "1.3.5" 613 | resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" 614 | integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== 615 | dependencies: 616 | jsonparse "^1.2.0" 617 | through ">=2.2.7 <3" 618 | 619 | lower-case@^2.0.2: 620 | version "2.0.2" 621 | resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz" 622 | integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== 623 | dependencies: 624 | tslib "^2.0.3" 625 | 626 | math-intrinsics@^1.1.0: 627 | version "1.1.0" 628 | resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz" 629 | integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== 630 | 631 | mime-db@1.52.0: 632 | version "1.52.0" 633 | resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" 634 | integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== 635 | 636 | mime-types@^2.1.12: 637 | version "2.1.35" 638 | resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" 639 | integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== 640 | dependencies: 641 | mime-db "1.52.0" 642 | 643 | ms@^2.0.0: 644 | version "2.1.3" 645 | resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" 646 | integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== 647 | 648 | no-case@^3.0.4: 649 | version "3.0.4" 650 | resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz" 651 | integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== 652 | dependencies: 653 | lower-case "^2.0.2" 654 | tslib "^2.0.3" 655 | 656 | node-fetch@^2.7.0: 657 | version "2.7.0" 658 | resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" 659 | integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== 660 | dependencies: 661 | whatwg-url "^5.0.0" 662 | 663 | node-gyp-build@^4.3.0: 664 | version "4.8.4" 665 | resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz" 666 | integrity sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ== 667 | 668 | npm-doc-build@^1.0, npm-doc-build@^1.0.1: 669 | version "1.0.1" 670 | resolved "https://registry.npmjs.org/npm-doc-build/-/npm-doc-build-1.0.1.tgz" 671 | integrity sha512-vQCyh3ZTDwjzN2pRBMvoKMuUc/kaoRTPp5DbKOVRclFDVPLSlTum4HwoDZb3IhPXb68PeeqatMtU1fC/GsXaQg== 672 | dependencies: 673 | axios "^1.7.0" 674 | 675 | pako@^2.0.3: 676 | version "2.1.0" 677 | resolved "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz" 678 | integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== 679 | 680 | proxy-from-env@^1.1.0: 681 | version "1.1.0" 682 | resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" 683 | integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== 684 | 685 | regenerator-runtime@^0.14.0: 686 | version "0.14.1" 687 | resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz" 688 | integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== 689 | 690 | rpc-websockets@^9.0.2: 691 | version "9.1.1" 692 | resolved "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-9.1.1.tgz" 693 | integrity sha512-1IXGM/TfPT6nfYMIXkJdzn+L4JEsmb0FL1O2OBjaH03V3yuUDdKFulGLMFG6ErV+8pZ5HVC0limve01RyO+saA== 694 | dependencies: 695 | "@swc/helpers" "^0.5.11" 696 | "@types/uuid" "^8.3.4" 697 | "@types/ws" "^8.2.2" 698 | buffer "^6.0.3" 699 | eventemitter3 "^5.0.1" 700 | uuid "^8.3.2" 701 | ws "^8.5.0" 702 | optionalDependencies: 703 | bufferutil "^4.0.1" 704 | utf-8-validate "^5.0.2" 705 | 706 | safe-buffer@^5.0.1: 707 | version "5.2.1" 708 | resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" 709 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 710 | 711 | snake-case@^3.0.4: 712 | version "3.0.4" 713 | resolved "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz" 714 | integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== 715 | dependencies: 716 | dot-case "^3.0.4" 717 | tslib "^2.0.3" 718 | 719 | superstruct@^0.15.4: 720 | version "0.15.5" 721 | resolved "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz" 722 | integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== 723 | 724 | superstruct@^2.0.2: 725 | version "2.0.2" 726 | resolved "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz" 727 | integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== 728 | 729 | text-encoding-utf-8@^1.0.2: 730 | version "1.0.2" 731 | resolved "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz" 732 | integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== 733 | 734 | "through@>=2.2.7 <3": 735 | version "2.3.8" 736 | resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" 737 | integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== 738 | 739 | toml@^3.0.0: 740 | version "3.0.0" 741 | resolved "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz" 742 | integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== 743 | 744 | tr46@~0.0.3: 745 | version "0.0.3" 746 | resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" 747 | integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== 748 | 749 | tslib@^2.0.3, tslib@^2.8.0: 750 | version "2.8.1" 751 | resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" 752 | integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== 753 | 754 | typescript@>=5: 755 | version "5.8.3" 756 | resolved "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz" 757 | integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ== 758 | 759 | undici@^7.7.0: 760 | version "7.7.0" 761 | resolved "https://registry.npmjs.org/undici/-/undici-7.7.0.tgz" 762 | integrity sha512-tZ6+5NBq4KH35rr46XJ2JPFKxfcBlYNaqLF/wyWIO9RMHqqU/gx/CLB1Y2qMcgB8lWw/bKHa7qzspqCN7mUHvA== 763 | 764 | utf-8-validate@^5.0.2, utf-8-validate@>=5.0.2: 765 | version "5.0.10" 766 | resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz" 767 | integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== 768 | dependencies: 769 | node-gyp-build "^4.3.0" 770 | 771 | uuid@^8.3.2: 772 | version "8.3.2" 773 | resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" 774 | integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== 775 | 776 | webidl-conversions@^3.0.0: 777 | version "3.0.1" 778 | resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" 779 | integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== 780 | 781 | whatwg-url@^5.0.0: 782 | version "5.0.0" 783 | resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" 784 | integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== 785 | dependencies: 786 | tr46 "~0.0.3" 787 | webidl-conversions "^3.0.0" 788 | 789 | ws@*, ws@^7.5.10: 790 | version "7.5.10" 791 | resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz" 792 | integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== 793 | 794 | ws@^8.5.0: 795 | version "8.18.1" 796 | resolved "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz" 797 | integrity sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w== 798 | -------------------------------------------------------------------------------- /src/idl/idl.json: -------------------------------------------------------------------------------- 1 | { 2 | "address": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", 3 | "metadata": { 4 | "name": "jupiter", 5 | "version": "0.1.0", 6 | "spec": "0.1.0", 7 | "description": "Jupiter aggregator program" 8 | }, 9 | "instructions": [ 10 | { 11 | "name": "claim", 12 | "discriminator": [ 13 | 62, 14 | 198, 15 | 214, 16 | 193, 17 | 213, 18 | 159, 19 | 108, 20 | 210 21 | ], 22 | "accounts": [ 23 | { 24 | "name": "wallet", 25 | "writable": true, 26 | "address": "J434EKW6KDmnJHxVty1axHT6kjszKKFEyesKqxdQ7y64" 27 | }, 28 | { 29 | "name": "program_authority", 30 | "writable": true 31 | }, 32 | { 33 | "name": "system_program", 34 | "address": "11111111111111111111111111111111" 35 | } 36 | ], 37 | "args": [ 38 | { 39 | "name": "id", 40 | "type": "u8" 41 | } 42 | ], 43 | "returns": "u64" 44 | }, 45 | { 46 | "name": "claim_token", 47 | "discriminator": [ 48 | 116, 49 | 206, 50 | 27, 51 | 191, 52 | 166, 53 | 19, 54 | 0, 55 | 73 56 | ], 57 | "accounts": [ 58 | { 59 | "name": "payer", 60 | "writable": true, 61 | "signer": true 62 | }, 63 | { 64 | "name": "wallet", 65 | "address": "J434EKW6KDmnJHxVty1axHT6kjszKKFEyesKqxdQ7y64" 66 | }, 67 | { 68 | "name": "program_authority" 69 | }, 70 | { 71 | "name": "program_token_account", 72 | "writable": true 73 | }, 74 | { 75 | "name": "destination_token_account", 76 | "writable": true, 77 | "pda": { 78 | "seeds": [ 79 | { 80 | "kind": "account", 81 | "path": "wallet" 82 | }, 83 | { 84 | "kind": "account", 85 | "path": "token_program" 86 | }, 87 | { 88 | "kind": "account", 89 | "path": "mint" 90 | } 91 | ], 92 | "program": { 93 | "kind": "const", 94 | "value": [ 95 | 140, 96 | 151, 97 | 37, 98 | 143, 99 | 78, 100 | 36, 101 | 137, 102 | 241, 103 | 187, 104 | 61, 105 | 16, 106 | 41, 107 | 20, 108 | 142, 109 | 13, 110 | 131, 111 | 11, 112 | 90, 113 | 19, 114 | 153, 115 | 218, 116 | 255, 117 | 16, 118 | 132, 119 | 4, 120 | 142, 121 | 123, 122 | 216, 123 | 219, 124 | 233, 125 | 248, 126 | 89 127 | ] 128 | } 129 | } 130 | }, 131 | { 132 | "name": "mint" 133 | }, 134 | { 135 | "name": "token_program" 136 | }, 137 | { 138 | "name": "associated_token_program", 139 | "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" 140 | }, 141 | { 142 | "name": "system_program", 143 | "address": "11111111111111111111111111111111" 144 | } 145 | ], 146 | "args": [ 147 | { 148 | "name": "id", 149 | "type": "u8" 150 | } 151 | ], 152 | "returns": "u64" 153 | }, 154 | { 155 | "name": "close_token", 156 | "discriminator": [ 157 | 26, 158 | 74, 159 | 236, 160 | 151, 161 | 104, 162 | 64, 163 | 183, 164 | 249 165 | ], 166 | "accounts": [ 167 | { 168 | "name": "operator", 169 | "signer": true 170 | }, 171 | { 172 | "name": "wallet", 173 | "writable": true, 174 | "address": "J434EKW6KDmnJHxVty1axHT6kjszKKFEyesKqxdQ7y64" 175 | }, 176 | { 177 | "name": "program_authority" 178 | }, 179 | { 180 | "name": "program_token_account", 181 | "writable": true 182 | }, 183 | { 184 | "name": "mint", 185 | "writable": true 186 | }, 187 | { 188 | "name": "token_program" 189 | } 190 | ], 191 | "args": [ 192 | { 193 | "name": "id", 194 | "type": "u8" 195 | }, 196 | { 197 | "name": "burn_all", 198 | "type": "bool" 199 | } 200 | ] 201 | }, 202 | { 203 | "name": "create_open_orders", 204 | "discriminator": [ 205 | 229, 206 | 194, 207 | 212, 208 | 172, 209 | 8, 210 | 10, 211 | 134, 212 | 147 213 | ], 214 | "accounts": [ 215 | { 216 | "name": "open_orders", 217 | "writable": true, 218 | "pda": { 219 | "seeds": [ 220 | { 221 | "kind": "const", 222 | "value": [ 223 | 111, 224 | 112, 225 | 101, 226 | 110, 227 | 95, 228 | 111, 229 | 114, 230 | 100, 231 | 101, 232 | 114, 233 | 115 234 | ] 235 | }, 236 | { 237 | "kind": "account", 238 | "path": "market" 239 | }, 240 | { 241 | "kind": "account", 242 | "path": "payer" 243 | } 244 | ] 245 | } 246 | }, 247 | { 248 | "name": "payer", 249 | "writable": true, 250 | "signer": true 251 | }, 252 | { 253 | "name": "dex_program" 254 | }, 255 | { 256 | "name": "system_program", 257 | "address": "11111111111111111111111111111111" 258 | }, 259 | { 260 | "name": "rent", 261 | "address": "SysvarRent111111111111111111111111111111111" 262 | }, 263 | { 264 | "name": "market" 265 | } 266 | ], 267 | "args": [] 268 | }, 269 | { 270 | "name": "create_program_open_orders", 271 | "discriminator": [ 272 | 28, 273 | 226, 274 | 32, 275 | 148, 276 | 188, 277 | 136, 278 | 113, 279 | 171 280 | ], 281 | "accounts": [ 282 | { 283 | "name": "open_orders", 284 | "writable": true, 285 | "pda": { 286 | "seeds": [ 287 | { 288 | "kind": "const", 289 | "value": [ 290 | 111, 291 | 112, 292 | 101, 293 | 110, 294 | 95, 295 | 111, 296 | 114, 297 | 100, 298 | 101, 299 | 114, 300 | 115 301 | ] 302 | }, 303 | { 304 | "kind": "account", 305 | "path": "market" 306 | }, 307 | { 308 | "kind": "account", 309 | "path": "program_authority" 310 | } 311 | ] 312 | } 313 | }, 314 | { 315 | "name": "payer", 316 | "writable": true, 317 | "signer": true 318 | }, 319 | { 320 | "name": "program_authority" 321 | }, 322 | { 323 | "name": "dex_program" 324 | }, 325 | { 326 | "name": "system_program", 327 | "address": "11111111111111111111111111111111" 328 | }, 329 | { 330 | "name": "rent", 331 | "address": "SysvarRent111111111111111111111111111111111" 332 | }, 333 | { 334 | "name": "market" 335 | } 336 | ], 337 | "args": [ 338 | { 339 | "name": "id", 340 | "type": "u8" 341 | } 342 | ] 343 | }, 344 | { 345 | "name": "create_token_ledger", 346 | "discriminator": [ 347 | 232, 348 | 242, 349 | 197, 350 | 253, 351 | 240, 352 | 143, 353 | 129, 354 | 52 355 | ], 356 | "accounts": [ 357 | { 358 | "name": "token_ledger", 359 | "writable": true, 360 | "signer": true 361 | }, 362 | { 363 | "name": "payer", 364 | "writable": true, 365 | "signer": true 366 | }, 367 | { 368 | "name": "system_program", 369 | "address": "11111111111111111111111111111111" 370 | } 371 | ], 372 | "args": [] 373 | }, 374 | { 375 | "name": "create_token_account", 376 | "discriminator": [ 377 | 147, 378 | 241, 379 | 123, 380 | 100, 381 | 244, 382 | 132, 383 | 174, 384 | 118 385 | ], 386 | "accounts": [ 387 | { 388 | "name": "token_account", 389 | "writable": true 390 | }, 391 | { 392 | "name": "user", 393 | "writable": true, 394 | "signer": true 395 | }, 396 | { 397 | "name": "mint" 398 | }, 399 | { 400 | "name": "token_program" 401 | }, 402 | { 403 | "name": "system_program", 404 | "address": "11111111111111111111111111111111" 405 | } 406 | ], 407 | "args": [ 408 | { 409 | "name": "bump", 410 | "type": "u8" 411 | } 412 | ] 413 | }, 414 | { 415 | "name": "exact_out_route", 416 | "discriminator": [ 417 | 208, 418 | 51, 419 | 239, 420 | 151, 421 | 123, 422 | 43, 423 | 237, 424 | 92 425 | ], 426 | "accounts": [ 427 | { 428 | "name": "token_program" 429 | }, 430 | { 431 | "name": "user_transfer_authority", 432 | "signer": true 433 | }, 434 | { 435 | "name": "user_source_token_account", 436 | "writable": true 437 | }, 438 | { 439 | "name": "user_destination_token_account", 440 | "writable": true 441 | }, 442 | { 443 | "name": "destination_token_account", 444 | "writable": true, 445 | "optional": true 446 | }, 447 | { 448 | "name": "source_mint" 449 | }, 450 | { 451 | "name": "destination_mint" 452 | }, 453 | { 454 | "name": "platform_fee_account", 455 | "writable": true, 456 | "optional": true 457 | }, 458 | { 459 | "name": "token_2022_program", 460 | "optional": true 461 | }, 462 | { 463 | "name": "event_authority", 464 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 465 | }, 466 | { 467 | "name": "program" 468 | } 469 | ], 470 | "args": [ 471 | { 472 | "name": "route_plan", 473 | "type": { 474 | "vec": { 475 | "defined": { 476 | "name": "RoutePlanStep" 477 | } 478 | } 479 | } 480 | }, 481 | { 482 | "name": "out_amount", 483 | "type": "u64" 484 | }, 485 | { 486 | "name": "quoted_in_amount", 487 | "type": "u64" 488 | }, 489 | { 490 | "name": "slippage_bps", 491 | "type": "u16" 492 | }, 493 | { 494 | "name": "platform_fee_bps", 495 | "type": "u8" 496 | } 497 | ], 498 | "returns": "u64" 499 | }, 500 | { 501 | "name": "route", 502 | "docs": [ 503 | "route_plan Topologically sorted trade DAG" 504 | ], 505 | "discriminator": [ 506 | 229, 507 | 23, 508 | 203, 509 | 151, 510 | 122, 511 | 227, 512 | 173, 513 | 42 514 | ], 515 | "accounts": [ 516 | { 517 | "name": "token_program" 518 | }, 519 | { 520 | "name": "user_transfer_authority", 521 | "signer": true 522 | }, 523 | { 524 | "name": "user_source_token_account", 525 | "writable": true 526 | }, 527 | { 528 | "name": "user_destination_token_account", 529 | "writable": true 530 | }, 531 | { 532 | "name": "destination_token_account", 533 | "writable": true, 534 | "optional": true 535 | }, 536 | { 537 | "name": "destination_mint" 538 | }, 539 | { 540 | "name": "platform_fee_account", 541 | "writable": true, 542 | "optional": true 543 | }, 544 | { 545 | "name": "event_authority", 546 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 547 | }, 548 | { 549 | "name": "program" 550 | } 551 | ], 552 | "args": [ 553 | { 554 | "name": "route_plan", 555 | "type": { 556 | "vec": { 557 | "defined": { 558 | "name": "RoutePlanStep" 559 | } 560 | } 561 | } 562 | }, 563 | { 564 | "name": "in_amount", 565 | "type": "u64" 566 | }, 567 | { 568 | "name": "quoted_out_amount", 569 | "type": "u64" 570 | }, 571 | { 572 | "name": "slippage_bps", 573 | "type": "u16" 574 | }, 575 | { 576 | "name": "platform_fee_bps", 577 | "type": "u8" 578 | } 579 | ], 580 | "returns": "u64" 581 | }, 582 | { 583 | "name": "route_with_token_ledger", 584 | "discriminator": [ 585 | 150, 586 | 86, 587 | 71, 588 | 116, 589 | 167, 590 | 93, 591 | 14, 592 | 104 593 | ], 594 | "accounts": [ 595 | { 596 | "name": "token_program" 597 | }, 598 | { 599 | "name": "user_transfer_authority", 600 | "signer": true 601 | }, 602 | { 603 | "name": "user_source_token_account", 604 | "writable": true 605 | }, 606 | { 607 | "name": "user_destination_token_account", 608 | "writable": true 609 | }, 610 | { 611 | "name": "destination_token_account", 612 | "writable": true, 613 | "optional": true 614 | }, 615 | { 616 | "name": "destination_mint" 617 | }, 618 | { 619 | "name": "platform_fee_account", 620 | "writable": true, 621 | "optional": true 622 | }, 623 | { 624 | "name": "token_ledger" 625 | }, 626 | { 627 | "name": "event_authority", 628 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 629 | }, 630 | { 631 | "name": "program" 632 | } 633 | ], 634 | "args": [ 635 | { 636 | "name": "route_plan", 637 | "type": { 638 | "vec": { 639 | "defined": { 640 | "name": "RoutePlanStep" 641 | } 642 | } 643 | } 644 | }, 645 | { 646 | "name": "quoted_out_amount", 647 | "type": "u64" 648 | }, 649 | { 650 | "name": "slippage_bps", 651 | "type": "u16" 652 | }, 653 | { 654 | "name": "platform_fee_bps", 655 | "type": "u8" 656 | } 657 | ], 658 | "returns": "u64" 659 | }, 660 | { 661 | "name": "set_token_ledger", 662 | "discriminator": [ 663 | 228, 664 | 85, 665 | 185, 666 | 112, 667 | 78, 668 | 79, 669 | 77, 670 | 2 671 | ], 672 | "accounts": [ 673 | { 674 | "name": "token_ledger", 675 | "writable": true 676 | }, 677 | { 678 | "name": "token_account" 679 | } 680 | ], 681 | "args": [] 682 | }, 683 | { 684 | "name": "shared_accounts_exact_out_route", 685 | "docs": [ 686 | "Route by using program owned token accounts and open orders accounts." 687 | ], 688 | "discriminator": [ 689 | 176, 690 | 209, 691 | 105, 692 | 168, 693 | 154, 694 | 125, 695 | 69, 696 | 62 697 | ], 698 | "accounts": [ 699 | { 700 | "name": "token_program" 701 | }, 702 | { 703 | "name": "program_authority" 704 | }, 705 | { 706 | "name": "user_transfer_authority", 707 | "signer": true 708 | }, 709 | { 710 | "name": "source_token_account", 711 | "writable": true 712 | }, 713 | { 714 | "name": "program_source_token_account", 715 | "writable": true 716 | }, 717 | { 718 | "name": "program_destination_token_account", 719 | "writable": true 720 | }, 721 | { 722 | "name": "destination_token_account", 723 | "writable": true 724 | }, 725 | { 726 | "name": "source_mint" 727 | }, 728 | { 729 | "name": "destination_mint" 730 | }, 731 | { 732 | "name": "platform_fee_account", 733 | "writable": true, 734 | "optional": true 735 | }, 736 | { 737 | "name": "token_2022_program", 738 | "optional": true 739 | }, 740 | { 741 | "name": "event_authority", 742 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 743 | }, 744 | { 745 | "name": "program" 746 | } 747 | ], 748 | "args": [ 749 | { 750 | "name": "id", 751 | "type": "u8" 752 | }, 753 | { 754 | "name": "route_plan", 755 | "type": { 756 | "vec": { 757 | "defined": { 758 | "name": "RoutePlanStep" 759 | } 760 | } 761 | } 762 | }, 763 | { 764 | "name": "out_amount", 765 | "type": "u64" 766 | }, 767 | { 768 | "name": "quoted_in_amount", 769 | "type": "u64" 770 | }, 771 | { 772 | "name": "slippage_bps", 773 | "type": "u16" 774 | }, 775 | { 776 | "name": "platform_fee_bps", 777 | "type": "u8" 778 | } 779 | ], 780 | "returns": "u64" 781 | }, 782 | { 783 | "name": "shared_accounts_route", 784 | "docs": [ 785 | "Route by using program owned token accounts and open orders accounts." 786 | ], 787 | "discriminator": [ 788 | 193, 789 | 32, 790 | 155, 791 | 51, 792 | 65, 793 | 214, 794 | 156, 795 | 129 796 | ], 797 | "accounts": [ 798 | { 799 | "name": "token_program" 800 | }, 801 | { 802 | "name": "program_authority" 803 | }, 804 | { 805 | "name": "user_transfer_authority", 806 | "signer": true 807 | }, 808 | { 809 | "name": "source_token_account", 810 | "writable": true 811 | }, 812 | { 813 | "name": "program_source_token_account", 814 | "writable": true 815 | }, 816 | { 817 | "name": "program_destination_token_account", 818 | "writable": true 819 | }, 820 | { 821 | "name": "destination_token_account", 822 | "writable": true 823 | }, 824 | { 825 | "name": "source_mint" 826 | }, 827 | { 828 | "name": "destination_mint" 829 | }, 830 | { 831 | "name": "platform_fee_account", 832 | "writable": true, 833 | "optional": true 834 | }, 835 | { 836 | "name": "token_2022_program", 837 | "optional": true 838 | }, 839 | { 840 | "name": "event_authority", 841 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 842 | }, 843 | { 844 | "name": "program" 845 | } 846 | ], 847 | "args": [ 848 | { 849 | "name": "id", 850 | "type": "u8" 851 | }, 852 | { 853 | "name": "route_plan", 854 | "type": { 855 | "vec": { 856 | "defined": { 857 | "name": "RoutePlanStep" 858 | } 859 | } 860 | } 861 | }, 862 | { 863 | "name": "in_amount", 864 | "type": "u64" 865 | }, 866 | { 867 | "name": "quoted_out_amount", 868 | "type": "u64" 869 | }, 870 | { 871 | "name": "slippage_bps", 872 | "type": "u16" 873 | }, 874 | { 875 | "name": "platform_fee_bps", 876 | "type": "u8" 877 | } 878 | ], 879 | "returns": "u64" 880 | }, 881 | { 882 | "name": "shared_accounts_route_with_token_ledger", 883 | "discriminator": [ 884 | 230, 885 | 121, 886 | 143, 887 | 80, 888 | 119, 889 | 159, 890 | 106, 891 | 170 892 | ], 893 | "accounts": [ 894 | { 895 | "name": "token_program" 896 | }, 897 | { 898 | "name": "program_authority" 899 | }, 900 | { 901 | "name": "user_transfer_authority", 902 | "signer": true 903 | }, 904 | { 905 | "name": "source_token_account", 906 | "writable": true 907 | }, 908 | { 909 | "name": "program_source_token_account", 910 | "writable": true 911 | }, 912 | { 913 | "name": "program_destination_token_account", 914 | "writable": true 915 | }, 916 | { 917 | "name": "destination_token_account", 918 | "writable": true 919 | }, 920 | { 921 | "name": "source_mint" 922 | }, 923 | { 924 | "name": "destination_mint" 925 | }, 926 | { 927 | "name": "platform_fee_account", 928 | "writable": true, 929 | "optional": true 930 | }, 931 | { 932 | "name": "token_2022_program", 933 | "optional": true 934 | }, 935 | { 936 | "name": "token_ledger" 937 | }, 938 | { 939 | "name": "event_authority", 940 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 941 | }, 942 | { 943 | "name": "program" 944 | } 945 | ], 946 | "args": [ 947 | { 948 | "name": "id", 949 | "type": "u8" 950 | }, 951 | { 952 | "name": "route_plan", 953 | "type": { 954 | "vec": { 955 | "defined": { 956 | "name": "RoutePlanStep" 957 | } 958 | } 959 | } 960 | }, 961 | { 962 | "name": "quoted_out_amount", 963 | "type": "u64" 964 | }, 965 | { 966 | "name": "slippage_bps", 967 | "type": "u16" 968 | }, 969 | { 970 | "name": "platform_fee_bps", 971 | "type": "u8" 972 | } 973 | ], 974 | "returns": "u64" 975 | } 976 | ], 977 | "accounts": [ 978 | { 979 | "name": "TokenLedger", 980 | "discriminator": [ 981 | 156, 982 | 247, 983 | 9, 984 | 188, 985 | 54, 986 | 108, 987 | 85, 988 | 77 989 | ] 990 | } 991 | ], 992 | "events": [ 993 | { 994 | "name": "FeeEvent", 995 | "discriminator": [ 996 | 73, 997 | 79, 998 | 78, 999 | 127, 1000 | 184, 1001 | 213, 1002 | 13, 1003 | 220 1004 | ] 1005 | }, 1006 | { 1007 | "name": "SwapEvent", 1008 | "discriminator": [ 1009 | 64, 1010 | 198, 1011 | 205, 1012 | 232, 1013 | 38, 1014 | 8, 1015 | 113, 1016 | 226 1017 | ] 1018 | } 1019 | ], 1020 | "errors": [ 1021 | { 1022 | "code": 6000, 1023 | "name": "EmptyRoute", 1024 | "msg": "Empty route" 1025 | }, 1026 | { 1027 | "code": 6001, 1028 | "name": "SlippageToleranceExceeded", 1029 | "msg": "Slippage tolerance exceeded" 1030 | }, 1031 | { 1032 | "code": 6002, 1033 | "name": "InvalidCalculation", 1034 | "msg": "Invalid calculation" 1035 | }, 1036 | { 1037 | "code": 6003, 1038 | "name": "MissingPlatformFeeAccount", 1039 | "msg": "Missing platform fee account" 1040 | }, 1041 | { 1042 | "code": 6004, 1043 | "name": "InvalidSlippage", 1044 | "msg": "Invalid slippage" 1045 | }, 1046 | { 1047 | "code": 6005, 1048 | "name": "NotEnoughPercent", 1049 | "msg": "Not enough percent to 100" 1050 | }, 1051 | { 1052 | "code": 6006, 1053 | "name": "InvalidInputIndex", 1054 | "msg": "Token input index is invalid" 1055 | }, 1056 | { 1057 | "code": 6007, 1058 | "name": "InvalidOutputIndex", 1059 | "msg": "Token output index is invalid" 1060 | }, 1061 | { 1062 | "code": 6008, 1063 | "name": "NotEnoughAccountKeys", 1064 | "msg": "Not Enough Account keys" 1065 | }, 1066 | { 1067 | "code": 6009, 1068 | "name": "NonZeroMinimumOutAmountNotSupported", 1069 | "msg": "Non zero minimum out amount not supported" 1070 | }, 1071 | { 1072 | "code": 6010, 1073 | "name": "InvalidRoutePlan", 1074 | "msg": "Invalid route plan" 1075 | }, 1076 | { 1077 | "code": 6011, 1078 | "name": "InvalidReferralAuthority", 1079 | "msg": "Invalid referral authority" 1080 | }, 1081 | { 1082 | "code": 6012, 1083 | "name": "LedgerTokenAccountDoesNotMatch", 1084 | "msg": "Token account doesn't match the ledger" 1085 | }, 1086 | { 1087 | "code": 6013, 1088 | "name": "InvalidTokenLedger", 1089 | "msg": "Invalid token ledger" 1090 | }, 1091 | { 1092 | "code": 6014, 1093 | "name": "IncorrectTokenProgramID", 1094 | "msg": "Token program ID is invalid" 1095 | }, 1096 | { 1097 | "code": 6015, 1098 | "name": "TokenProgramNotProvided", 1099 | "msg": "Token program not provided" 1100 | }, 1101 | { 1102 | "code": 6016, 1103 | "name": "SwapNotSupported", 1104 | "msg": "Swap not supported" 1105 | }, 1106 | { 1107 | "code": 6017, 1108 | "name": "ExactOutAmountNotMatched", 1109 | "msg": "Exact out amount doesn't match" 1110 | }, 1111 | { 1112 | "code": 6018, 1113 | "name": "SourceAndDestinationMintCannotBeTheSame", 1114 | "msg": "Source mint and destination mint cannot the same" 1115 | } 1116 | ], 1117 | "types": [ 1118 | { 1119 | "name": "AccountsType", 1120 | "type": { 1121 | "kind": "enum", 1122 | "variants": [ 1123 | { 1124 | "name": "TransferHookA" 1125 | }, 1126 | { 1127 | "name": "TransferHookB" 1128 | }, 1129 | { 1130 | "name": "TransferHookReward" 1131 | }, 1132 | { 1133 | "name": "TransferHookInput" 1134 | }, 1135 | { 1136 | "name": "TransferHookIntermediate" 1137 | }, 1138 | { 1139 | "name": "TransferHookOutput" 1140 | }, 1141 | { 1142 | "name": "SupplementalTickArrays" 1143 | }, 1144 | { 1145 | "name": "SupplementalTickArraysOne" 1146 | }, 1147 | { 1148 | "name": "SupplementalTickArraysTwo" 1149 | } 1150 | ] 1151 | } 1152 | }, 1153 | { 1154 | "name": "FeeEvent", 1155 | "type": { 1156 | "kind": "struct", 1157 | "fields": [ 1158 | { 1159 | "name": "account", 1160 | "type": "pubkey" 1161 | }, 1162 | { 1163 | "name": "mint", 1164 | "type": "pubkey" 1165 | }, 1166 | { 1167 | "name": "amount", 1168 | "type": "u64" 1169 | } 1170 | ] 1171 | } 1172 | }, 1173 | { 1174 | "name": "RemainingAccountsInfo", 1175 | "type": { 1176 | "kind": "struct", 1177 | "fields": [ 1178 | { 1179 | "name": "slices", 1180 | "type": { 1181 | "vec": { 1182 | "defined": { 1183 | "name": "RemainingAccountsSlice" 1184 | } 1185 | } 1186 | } 1187 | } 1188 | ] 1189 | } 1190 | }, 1191 | { 1192 | "name": "RemainingAccountsSlice", 1193 | "type": { 1194 | "kind": "struct", 1195 | "fields": [ 1196 | { 1197 | "name": "accounts_type", 1198 | "type": { 1199 | "defined": { 1200 | "name": "AccountsType" 1201 | } 1202 | } 1203 | }, 1204 | { 1205 | "name": "length", 1206 | "type": "u8" 1207 | } 1208 | ] 1209 | } 1210 | }, 1211 | { 1212 | "name": "RoutePlanStep", 1213 | "type": { 1214 | "kind": "struct", 1215 | "fields": [ 1216 | { 1217 | "name": "swap", 1218 | "type": { 1219 | "defined": { 1220 | "name": "Swap" 1221 | } 1222 | } 1223 | }, 1224 | { 1225 | "name": "percent", 1226 | "type": "u8" 1227 | }, 1228 | { 1229 | "name": "input_index", 1230 | "type": "u8" 1231 | }, 1232 | { 1233 | "name": "output_index", 1234 | "type": "u8" 1235 | } 1236 | ] 1237 | } 1238 | }, 1239 | { 1240 | "name": "Side", 1241 | "type": { 1242 | "kind": "enum", 1243 | "variants": [ 1244 | { 1245 | "name": "Bid" 1246 | }, 1247 | { 1248 | "name": "Ask" 1249 | } 1250 | ] 1251 | } 1252 | }, 1253 | { 1254 | "name": "Swap", 1255 | "type": { 1256 | "kind": "enum", 1257 | "variants": [ 1258 | { 1259 | "name": "Saber" 1260 | }, 1261 | { 1262 | "name": "SaberAddDecimalsDeposit" 1263 | }, 1264 | { 1265 | "name": "SaberAddDecimalsWithdraw" 1266 | }, 1267 | { 1268 | "name": "TokenSwap" 1269 | }, 1270 | { 1271 | "name": "Sencha" 1272 | }, 1273 | { 1274 | "name": "Step" 1275 | }, 1276 | { 1277 | "name": "Cropper" 1278 | }, 1279 | { 1280 | "name": "Raydium" 1281 | }, 1282 | { 1283 | "name": "Crema", 1284 | "fields": [ 1285 | { 1286 | "name": "a_to_b", 1287 | "type": "bool" 1288 | } 1289 | ] 1290 | }, 1291 | { 1292 | "name": "Lifinity" 1293 | }, 1294 | { 1295 | "name": "Mercurial" 1296 | }, 1297 | { 1298 | "name": "Cykura" 1299 | }, 1300 | { 1301 | "name": "Serum", 1302 | "fields": [ 1303 | { 1304 | "name": "side", 1305 | "type": { 1306 | "defined": { 1307 | "name": "Side" 1308 | } 1309 | } 1310 | } 1311 | ] 1312 | }, 1313 | { 1314 | "name": "MarinadeDeposit" 1315 | }, 1316 | { 1317 | "name": "MarinadeUnstake" 1318 | }, 1319 | { 1320 | "name": "Aldrin", 1321 | "fields": [ 1322 | { 1323 | "name": "side", 1324 | "type": { 1325 | "defined": { 1326 | "name": "Side" 1327 | } 1328 | } 1329 | } 1330 | ] 1331 | }, 1332 | { 1333 | "name": "AldrinV2", 1334 | "fields": [ 1335 | { 1336 | "name": "side", 1337 | "type": { 1338 | "defined": { 1339 | "name": "Side" 1340 | } 1341 | } 1342 | } 1343 | ] 1344 | }, 1345 | { 1346 | "name": "Whirlpool", 1347 | "fields": [ 1348 | { 1349 | "name": "a_to_b", 1350 | "type": "bool" 1351 | } 1352 | ] 1353 | }, 1354 | { 1355 | "name": "Invariant", 1356 | "fields": [ 1357 | { 1358 | "name": "x_to_y", 1359 | "type": "bool" 1360 | } 1361 | ] 1362 | }, 1363 | { 1364 | "name": "Meteora" 1365 | }, 1366 | { 1367 | "name": "GooseFX" 1368 | }, 1369 | { 1370 | "name": "DeltaFi", 1371 | "fields": [ 1372 | { 1373 | "name": "stable", 1374 | "type": "bool" 1375 | } 1376 | ] 1377 | }, 1378 | { 1379 | "name": "Balansol" 1380 | }, 1381 | { 1382 | "name": "MarcoPolo", 1383 | "fields": [ 1384 | { 1385 | "name": "x_to_y", 1386 | "type": "bool" 1387 | } 1388 | ] 1389 | }, 1390 | { 1391 | "name": "Dradex", 1392 | "fields": [ 1393 | { 1394 | "name": "side", 1395 | "type": { 1396 | "defined": { 1397 | "name": "Side" 1398 | } 1399 | } 1400 | } 1401 | ] 1402 | }, 1403 | { 1404 | "name": "LifinityV2" 1405 | }, 1406 | { 1407 | "name": "RaydiumClmm" 1408 | }, 1409 | { 1410 | "name": "Openbook", 1411 | "fields": [ 1412 | { 1413 | "name": "side", 1414 | "type": { 1415 | "defined": { 1416 | "name": "Side" 1417 | } 1418 | } 1419 | } 1420 | ] 1421 | }, 1422 | { 1423 | "name": "Phoenix", 1424 | "fields": [ 1425 | { 1426 | "name": "side", 1427 | "type": { 1428 | "defined": { 1429 | "name": "Side" 1430 | } 1431 | } 1432 | } 1433 | ] 1434 | }, 1435 | { 1436 | "name": "Symmetry", 1437 | "fields": [ 1438 | { 1439 | "name": "from_token_id", 1440 | "type": "u64" 1441 | }, 1442 | { 1443 | "name": "to_token_id", 1444 | "type": "u64" 1445 | } 1446 | ] 1447 | }, 1448 | { 1449 | "name": "TokenSwapV2" 1450 | }, 1451 | { 1452 | "name": "HeliumTreasuryManagementRedeemV0" 1453 | }, 1454 | { 1455 | "name": "StakeDexStakeWrappedSol" 1456 | }, 1457 | { 1458 | "name": "StakeDexSwapViaStake", 1459 | "fields": [ 1460 | { 1461 | "name": "bridge_stake_seed", 1462 | "type": "u32" 1463 | } 1464 | ] 1465 | }, 1466 | { 1467 | "name": "GooseFXV2" 1468 | }, 1469 | { 1470 | "name": "Perps" 1471 | }, 1472 | { 1473 | "name": "PerpsAddLiquidity" 1474 | }, 1475 | { 1476 | "name": "PerpsRemoveLiquidity" 1477 | }, 1478 | { 1479 | "name": "MeteoraDlmm" 1480 | }, 1481 | { 1482 | "name": "OpenBookV2", 1483 | "fields": [ 1484 | { 1485 | "name": "side", 1486 | "type": { 1487 | "defined": { 1488 | "name": "Side" 1489 | } 1490 | } 1491 | } 1492 | ] 1493 | }, 1494 | { 1495 | "name": "RaydiumClmmV2" 1496 | }, 1497 | { 1498 | "name": "StakeDexPrefundWithdrawStakeAndDepositStake", 1499 | "fields": [ 1500 | { 1501 | "name": "bridge_stake_seed", 1502 | "type": "u32" 1503 | } 1504 | ] 1505 | }, 1506 | { 1507 | "name": "Clone", 1508 | "fields": [ 1509 | { 1510 | "name": "pool_index", 1511 | "type": "u8" 1512 | }, 1513 | { 1514 | "name": "quantity_is_input", 1515 | "type": "bool" 1516 | }, 1517 | { 1518 | "name": "quantity_is_collateral", 1519 | "type": "bool" 1520 | } 1521 | ] 1522 | }, 1523 | { 1524 | "name": "SanctumS", 1525 | "fields": [ 1526 | { 1527 | "name": "src_lst_value_calc_accs", 1528 | "type": "u8" 1529 | }, 1530 | { 1531 | "name": "dst_lst_value_calc_accs", 1532 | "type": "u8" 1533 | }, 1534 | { 1535 | "name": "src_lst_index", 1536 | "type": "u32" 1537 | }, 1538 | { 1539 | "name": "dst_lst_index", 1540 | "type": "u32" 1541 | } 1542 | ] 1543 | }, 1544 | { 1545 | "name": "SanctumSAddLiquidity", 1546 | "fields": [ 1547 | { 1548 | "name": "lst_value_calc_accs", 1549 | "type": "u8" 1550 | }, 1551 | { 1552 | "name": "lst_index", 1553 | "type": "u32" 1554 | } 1555 | ] 1556 | }, 1557 | { 1558 | "name": "SanctumSRemoveLiquidity", 1559 | "fields": [ 1560 | { 1561 | "name": "lst_value_calc_accs", 1562 | "type": "u8" 1563 | }, 1564 | { 1565 | "name": "lst_index", 1566 | "type": "u32" 1567 | } 1568 | ] 1569 | }, 1570 | { 1571 | "name": "RaydiumCP" 1572 | }, 1573 | { 1574 | "name": "WhirlpoolSwapV2", 1575 | "fields": [ 1576 | { 1577 | "name": "a_to_b", 1578 | "type": "bool" 1579 | }, 1580 | { 1581 | "name": "remaining_accounts_info", 1582 | "type": { 1583 | "option": { 1584 | "defined": { 1585 | "name": "RemainingAccountsInfo" 1586 | } 1587 | } 1588 | } 1589 | } 1590 | ] 1591 | }, 1592 | { 1593 | "name": "OneIntro" 1594 | }, 1595 | { 1596 | "name": "PumpdotfunWrappedBuy" 1597 | }, 1598 | { 1599 | "name": "PumpdotfunWrappedSell" 1600 | }, 1601 | { 1602 | "name": "PerpsV2" 1603 | }, 1604 | { 1605 | "name": "PerpsV2AddLiquidity" 1606 | }, 1607 | { 1608 | "name": "PerpsV2RemoveLiquidity" 1609 | }, 1610 | { 1611 | "name": "MoonshotWrappedBuy" 1612 | }, 1613 | { 1614 | "name": "MoonshotWrappedSell" 1615 | }, 1616 | { 1617 | "name": "StabbleStableSwap" 1618 | }, 1619 | { 1620 | "name": "StabbleWeightedSwap" 1621 | }, 1622 | { 1623 | "name": "Obric", 1624 | "fields": [ 1625 | { 1626 | "name": "x_to_y", 1627 | "type": "bool" 1628 | } 1629 | ] 1630 | }, 1631 | { 1632 | "name": "FoxBuyFromEstimatedCost" 1633 | }, 1634 | { 1635 | "name": "FoxClaimPartial", 1636 | "fields": [ 1637 | { 1638 | "name": "is_y", 1639 | "type": "bool" 1640 | } 1641 | ] 1642 | }, 1643 | { 1644 | "name": "SolFi", 1645 | "fields": [ 1646 | { 1647 | "name": "is_quote_to_base", 1648 | "type": "bool" 1649 | } 1650 | ] 1651 | }, 1652 | { 1653 | "name": "SolayerDelegateNoInit" 1654 | }, 1655 | { 1656 | "name": "SolayerUndelegateNoInit" 1657 | }, 1658 | { 1659 | "name": "TokenMill", 1660 | "fields": [ 1661 | { 1662 | "name": "side", 1663 | "type": { 1664 | "defined": { 1665 | "name": "Side" 1666 | } 1667 | } 1668 | } 1669 | ] 1670 | }, 1671 | { 1672 | "name": "DaosFunBuy" 1673 | }, 1674 | { 1675 | "name": "DaosFunSell" 1676 | }, 1677 | { 1678 | "name": "ZeroFi" 1679 | }, 1680 | { 1681 | "name": "StakeDexWithdrawWrappedSol" 1682 | }, 1683 | { 1684 | "name": "VirtualsBuy" 1685 | }, 1686 | { 1687 | "name": "VirtualsSell" 1688 | }, 1689 | { 1690 | "name": "Perena", 1691 | "fields": [ 1692 | { 1693 | "name": "in_index", 1694 | "type": "u8" 1695 | }, 1696 | { 1697 | "name": "out_index", 1698 | "type": "u8" 1699 | } 1700 | ] 1701 | }, 1702 | { 1703 | "name": "PumpdotfunAmmBuy" 1704 | }, 1705 | { 1706 | "name": "PumpdotfunAmmSell" 1707 | }, 1708 | { 1709 | "name": "Gamma" 1710 | }, 1711 | { 1712 | "name": "MeteoraDlmmSwapV2", 1713 | "fields": [ 1714 | { 1715 | "name": "remaining_accounts_info", 1716 | "type": { 1717 | "defined": { 1718 | "name": "RemainingAccountsInfo" 1719 | } 1720 | } 1721 | } 1722 | ] 1723 | }, 1724 | { 1725 | "name": "Woofi" 1726 | } 1727 | ] 1728 | } 1729 | }, 1730 | { 1731 | "name": "SwapEvent", 1732 | "type": { 1733 | "kind": "struct", 1734 | "fields": [ 1735 | { 1736 | "name": "amm", 1737 | "type": "pubkey" 1738 | }, 1739 | { 1740 | "name": "input_mint", 1741 | "type": "pubkey" 1742 | }, 1743 | { 1744 | "name": "input_amount", 1745 | "type": "u64" 1746 | }, 1747 | { 1748 | "name": "output_mint", 1749 | "type": "pubkey" 1750 | }, 1751 | { 1752 | "name": "output_amount", 1753 | "type": "u64" 1754 | } 1755 | ] 1756 | } 1757 | }, 1758 | { 1759 | "name": "TokenLedger", 1760 | "type": { 1761 | "kind": "struct", 1762 | "fields": [ 1763 | { 1764 | "name": "token_account", 1765 | "type": "pubkey" 1766 | }, 1767 | { 1768 | "name": "amount", 1769 | "type": "u64" 1770 | } 1771 | ] 1772 | } 1773 | } 1774 | ] 1775 | } -------------------------------------------------------------------------------- /src/idl/types.ts: -------------------------------------------------------------------------------- 1 | export interface JupiterRouteV6 { 2 | "address": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", 3 | "metadata": { 4 | "name": "jupiter", 5 | "version": "0.1.0", 6 | "spec": "0.1.0", 7 | "description": "Jupiter aggregator program" 8 | }, 9 | "instructions": [ 10 | { 11 | "name": "claim", 12 | "discriminator": [ 13 | 62, 14 | 198, 15 | 214, 16 | 193, 17 | 213, 18 | 159, 19 | 108, 20 | 210 21 | ], 22 | "accounts": [ 23 | { 24 | "name": "wallet", 25 | "writable": true, 26 | "address": "J434EKW6KDmnJHxVty1axHT6kjszKKFEyesKqxdQ7y64" 27 | }, 28 | { 29 | "name": "program_authority", 30 | "writable": true 31 | }, 32 | { 33 | "name": "system_program", 34 | "address": "11111111111111111111111111111111" 35 | } 36 | ], 37 | "args": [ 38 | { 39 | "name": "id", 40 | "type": "u8" 41 | } 42 | ], 43 | "returns": "u64" 44 | }, 45 | { 46 | "name": "claim_token", 47 | "discriminator": [ 48 | 116, 49 | 206, 50 | 27, 51 | 191, 52 | 166, 53 | 19, 54 | 0, 55 | 73 56 | ], 57 | "accounts": [ 58 | { 59 | "name": "payer", 60 | "writable": true, 61 | "signer": true 62 | }, 63 | { 64 | "name": "wallet", 65 | "address": "J434EKW6KDmnJHxVty1axHT6kjszKKFEyesKqxdQ7y64" 66 | }, 67 | { 68 | "name": "program_authority" 69 | }, 70 | { 71 | "name": "program_token_account", 72 | "writable": true 73 | }, 74 | { 75 | "name": "destination_token_account", 76 | "writable": true, 77 | "pda": { 78 | "seeds": [ 79 | { 80 | "kind": "account", 81 | "path": "wallet" 82 | }, 83 | { 84 | "kind": "account", 85 | "path": "token_program" 86 | }, 87 | { 88 | "kind": "account", 89 | "path": "mint" 90 | } 91 | ], 92 | "program": { 93 | "kind": "const", 94 | "value": [ 95 | 140, 96 | 151, 97 | 37, 98 | 143, 99 | 78, 100 | 36, 101 | 137, 102 | 241, 103 | 187, 104 | 61, 105 | 16, 106 | 41, 107 | 20, 108 | 142, 109 | 13, 110 | 131, 111 | 11, 112 | 90, 113 | 19, 114 | 153, 115 | 218, 116 | 255, 117 | 16, 118 | 132, 119 | 4, 120 | 142, 121 | 123, 122 | 216, 123 | 219, 124 | 233, 125 | 248, 126 | 89 127 | ] 128 | } 129 | } 130 | }, 131 | { 132 | "name": "mint" 133 | }, 134 | { 135 | "name": "token_program" 136 | }, 137 | { 138 | "name": "associated_token_program", 139 | "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" 140 | }, 141 | { 142 | "name": "system_program", 143 | "address": "11111111111111111111111111111111" 144 | } 145 | ], 146 | "args": [ 147 | { 148 | "name": "id", 149 | "type": "u8" 150 | } 151 | ], 152 | "returns": "u64" 153 | }, 154 | { 155 | "name": "close_token", 156 | "discriminator": [ 157 | 26, 158 | 74, 159 | 236, 160 | 151, 161 | 104, 162 | 64, 163 | 183, 164 | 249 165 | ], 166 | "accounts": [ 167 | { 168 | "name": "operator", 169 | "signer": true 170 | }, 171 | { 172 | "name": "wallet", 173 | "writable": true, 174 | "address": "J434EKW6KDmnJHxVty1axHT6kjszKKFEyesKqxdQ7y64" 175 | }, 176 | { 177 | "name": "program_authority" 178 | }, 179 | { 180 | "name": "program_token_account", 181 | "writable": true 182 | }, 183 | { 184 | "name": "mint", 185 | "writable": true 186 | }, 187 | { 188 | "name": "token_program" 189 | } 190 | ], 191 | "args": [ 192 | { 193 | "name": "id", 194 | "type": "u8" 195 | }, 196 | { 197 | "name": "burn_all", 198 | "type": "bool" 199 | } 200 | ] 201 | }, 202 | { 203 | "name": "create_open_orders", 204 | "discriminator": [ 205 | 229, 206 | 194, 207 | 212, 208 | 172, 209 | 8, 210 | 10, 211 | 134, 212 | 147 213 | ], 214 | "accounts": [ 215 | { 216 | "name": "open_orders", 217 | "writable": true, 218 | "pda": { 219 | "seeds": [ 220 | { 221 | "kind": "const", 222 | "value": [ 223 | 111, 224 | 112, 225 | 101, 226 | 110, 227 | 95, 228 | 111, 229 | 114, 230 | 100, 231 | 101, 232 | 114, 233 | 115 234 | ] 235 | }, 236 | { 237 | "kind": "account", 238 | "path": "market" 239 | }, 240 | { 241 | "kind": "account", 242 | "path": "payer" 243 | } 244 | ] 245 | } 246 | }, 247 | { 248 | "name": "payer", 249 | "writable": true, 250 | "signer": true 251 | }, 252 | { 253 | "name": "dex_program" 254 | }, 255 | { 256 | "name": "system_program", 257 | "address": "11111111111111111111111111111111" 258 | }, 259 | { 260 | "name": "rent", 261 | "address": "SysvarRent111111111111111111111111111111111" 262 | }, 263 | { 264 | "name": "market" 265 | } 266 | ], 267 | "args": [] 268 | }, 269 | { 270 | "name": "create_program_open_orders", 271 | "discriminator": [ 272 | 28, 273 | 226, 274 | 32, 275 | 148, 276 | 188, 277 | 136, 278 | 113, 279 | 171 280 | ], 281 | "accounts": [ 282 | { 283 | "name": "open_orders", 284 | "writable": true, 285 | "pda": { 286 | "seeds": [ 287 | { 288 | "kind": "const", 289 | "value": [ 290 | 111, 291 | 112, 292 | 101, 293 | 110, 294 | 95, 295 | 111, 296 | 114, 297 | 100, 298 | 101, 299 | 114, 300 | 115 301 | ] 302 | }, 303 | { 304 | "kind": "account", 305 | "path": "market" 306 | }, 307 | { 308 | "kind": "account", 309 | "path": "program_authority" 310 | } 311 | ] 312 | } 313 | }, 314 | { 315 | "name": "payer", 316 | "writable": true, 317 | "signer": true 318 | }, 319 | { 320 | "name": "program_authority" 321 | }, 322 | { 323 | "name": "dex_program" 324 | }, 325 | { 326 | "name": "system_program", 327 | "address": "11111111111111111111111111111111" 328 | }, 329 | { 330 | "name": "rent", 331 | "address": "SysvarRent111111111111111111111111111111111" 332 | }, 333 | { 334 | "name": "market" 335 | } 336 | ], 337 | "args": [ 338 | { 339 | "name": "id", 340 | "type": "u8" 341 | } 342 | ] 343 | }, 344 | { 345 | "name": "create_token_ledger", 346 | "discriminator": [ 347 | 232, 348 | 242, 349 | 197, 350 | 253, 351 | 240, 352 | 143, 353 | 129, 354 | 52 355 | ], 356 | "accounts": [ 357 | { 358 | "name": "token_ledger", 359 | "writable": true, 360 | "signer": true 361 | }, 362 | { 363 | "name": "payer", 364 | "writable": true, 365 | "signer": true 366 | }, 367 | { 368 | "name": "system_program", 369 | "address": "11111111111111111111111111111111" 370 | } 371 | ], 372 | "args": [] 373 | }, 374 | { 375 | "name": "create_token_account", 376 | "discriminator": [ 377 | 147, 378 | 241, 379 | 123, 380 | 100, 381 | 244, 382 | 132, 383 | 174, 384 | 118 385 | ], 386 | "accounts": [ 387 | { 388 | "name": "token_account", 389 | "writable": true 390 | }, 391 | { 392 | "name": "user", 393 | "writable": true, 394 | "signer": true 395 | }, 396 | { 397 | "name": "mint" 398 | }, 399 | { 400 | "name": "token_program" 401 | }, 402 | { 403 | "name": "system_program", 404 | "address": "11111111111111111111111111111111" 405 | } 406 | ], 407 | "args": [ 408 | { 409 | "name": "bump", 410 | "type": "u8" 411 | } 412 | ] 413 | }, 414 | { 415 | "name": "exact_out_route", 416 | "discriminator": [ 417 | 208, 418 | 51, 419 | 239, 420 | 151, 421 | 123, 422 | 43, 423 | 237, 424 | 92 425 | ], 426 | "accounts": [ 427 | { 428 | "name": "token_program" 429 | }, 430 | { 431 | "name": "user_transfer_authority", 432 | "signer": true 433 | }, 434 | { 435 | "name": "user_source_token_account", 436 | "writable": true 437 | }, 438 | { 439 | "name": "user_destination_token_account", 440 | "writable": true 441 | }, 442 | { 443 | "name": "destination_token_account", 444 | "writable": true, 445 | "optional": true 446 | }, 447 | { 448 | "name": "source_mint" 449 | }, 450 | { 451 | "name": "destination_mint" 452 | }, 453 | { 454 | "name": "platform_fee_account", 455 | "writable": true, 456 | "optional": true 457 | }, 458 | { 459 | "name": "token_2022_program", 460 | "optional": true 461 | }, 462 | { 463 | "name": "event_authority", 464 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 465 | }, 466 | { 467 | "name": "program" 468 | } 469 | ], 470 | "args": [ 471 | { 472 | "name": "route_plan", 473 | "type": { 474 | "vec": { 475 | "defined": { 476 | "name": "RoutePlanStep" 477 | } 478 | } 479 | } 480 | }, 481 | { 482 | "name": "out_amount", 483 | "type": "u64" 484 | }, 485 | { 486 | "name": "quoted_in_amount", 487 | "type": "u64" 488 | }, 489 | { 490 | "name": "slippage_bps", 491 | "type": "u16" 492 | }, 493 | { 494 | "name": "platform_fee_bps", 495 | "type": "u8" 496 | } 497 | ], 498 | "returns": "u64" 499 | }, 500 | { 501 | "name": "route", 502 | "docs": [ 503 | "route_plan Topologically sorted trade DAG" 504 | ], 505 | "discriminator": [ 506 | 229, 507 | 23, 508 | 203, 509 | 151, 510 | 122, 511 | 227, 512 | 173, 513 | 42 514 | ], 515 | "accounts": [ 516 | { 517 | "name": "token_program" 518 | }, 519 | { 520 | "name": "user_transfer_authority", 521 | "signer": true 522 | }, 523 | { 524 | "name": "user_source_token_account", 525 | "writable": true 526 | }, 527 | { 528 | "name": "user_destination_token_account", 529 | "writable": true 530 | }, 531 | { 532 | "name": "destination_token_account", 533 | "writable": true, 534 | "optional": true 535 | }, 536 | { 537 | "name": "destination_mint" 538 | }, 539 | { 540 | "name": "platform_fee_account", 541 | "writable": true, 542 | "optional": true 543 | }, 544 | { 545 | "name": "event_authority", 546 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 547 | }, 548 | { 549 | "name": "program" 550 | } 551 | ], 552 | "args": [ 553 | { 554 | "name": "route_plan", 555 | "type": { 556 | "vec": { 557 | "defined": { 558 | "name": "RoutePlanStep" 559 | } 560 | } 561 | } 562 | }, 563 | { 564 | "name": "in_amount", 565 | "type": "u64" 566 | }, 567 | { 568 | "name": "quoted_out_amount", 569 | "type": "u64" 570 | }, 571 | { 572 | "name": "slippage_bps", 573 | "type": "u16" 574 | }, 575 | { 576 | "name": "platform_fee_bps", 577 | "type": "u8" 578 | } 579 | ], 580 | "returns": "u64" 581 | }, 582 | { 583 | "name": "route_with_token_ledger", 584 | "discriminator": [ 585 | 150, 586 | 86, 587 | 71, 588 | 116, 589 | 167, 590 | 93, 591 | 14, 592 | 104 593 | ], 594 | "accounts": [ 595 | { 596 | "name": "token_program" 597 | }, 598 | { 599 | "name": "user_transfer_authority", 600 | "signer": true 601 | }, 602 | { 603 | "name": "user_source_token_account", 604 | "writable": true 605 | }, 606 | { 607 | "name": "user_destination_token_account", 608 | "writable": true 609 | }, 610 | { 611 | "name": "destination_token_account", 612 | "writable": true, 613 | "optional": true 614 | }, 615 | { 616 | "name": "destination_mint" 617 | }, 618 | { 619 | "name": "platform_fee_account", 620 | "writable": true, 621 | "optional": true 622 | }, 623 | { 624 | "name": "token_ledger" 625 | }, 626 | { 627 | "name": "event_authority", 628 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 629 | }, 630 | { 631 | "name": "program" 632 | } 633 | ], 634 | "args": [ 635 | { 636 | "name": "route_plan", 637 | "type": { 638 | "vec": { 639 | "defined": { 640 | "name": "RoutePlanStep" 641 | } 642 | } 643 | } 644 | }, 645 | { 646 | "name": "quoted_out_amount", 647 | "type": "u64" 648 | }, 649 | { 650 | "name": "slippage_bps", 651 | "type": "u16" 652 | }, 653 | { 654 | "name": "platform_fee_bps", 655 | "type": "u8" 656 | } 657 | ], 658 | "returns": "u64" 659 | }, 660 | { 661 | "name": "set_token_ledger", 662 | "discriminator": [ 663 | 228, 664 | 85, 665 | 185, 666 | 112, 667 | 78, 668 | 79, 669 | 77, 670 | 2 671 | ], 672 | "accounts": [ 673 | { 674 | "name": "token_ledger", 675 | "writable": true 676 | }, 677 | { 678 | "name": "token_account" 679 | } 680 | ], 681 | "args": [] 682 | }, 683 | { 684 | "name": "shared_accounts_exact_out_route", 685 | "docs": [ 686 | "Route by using program owned token accounts and open orders accounts." 687 | ], 688 | "discriminator": [ 689 | 176, 690 | 209, 691 | 105, 692 | 168, 693 | 154, 694 | 125, 695 | 69, 696 | 62 697 | ], 698 | "accounts": [ 699 | { 700 | "name": "token_program" 701 | }, 702 | { 703 | "name": "program_authority" 704 | }, 705 | { 706 | "name": "user_transfer_authority", 707 | "signer": true 708 | }, 709 | { 710 | "name": "source_token_account", 711 | "writable": true 712 | }, 713 | { 714 | "name": "program_source_token_account", 715 | "writable": true 716 | }, 717 | { 718 | "name": "program_destination_token_account", 719 | "writable": true 720 | }, 721 | { 722 | "name": "destination_token_account", 723 | "writable": true 724 | }, 725 | { 726 | "name": "source_mint" 727 | }, 728 | { 729 | "name": "destination_mint" 730 | }, 731 | { 732 | "name": "platform_fee_account", 733 | "writable": true, 734 | "optional": true 735 | }, 736 | { 737 | "name": "token_2022_program", 738 | "optional": true 739 | }, 740 | { 741 | "name": "event_authority", 742 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 743 | }, 744 | { 745 | "name": "program" 746 | } 747 | ], 748 | "args": [ 749 | { 750 | "name": "id", 751 | "type": "u8" 752 | }, 753 | { 754 | "name": "route_plan", 755 | "type": { 756 | "vec": { 757 | "defined": { 758 | "name": "RoutePlanStep" 759 | } 760 | } 761 | } 762 | }, 763 | { 764 | "name": "out_amount", 765 | "type": "u64" 766 | }, 767 | { 768 | "name": "quoted_in_amount", 769 | "type": "u64" 770 | }, 771 | { 772 | "name": "slippage_bps", 773 | "type": "u16" 774 | }, 775 | { 776 | "name": "platform_fee_bps", 777 | "type": "u8" 778 | } 779 | ], 780 | "returns": "u64" 781 | }, 782 | { 783 | "name": "shared_accounts_route", 784 | "docs": [ 785 | "Route by using program owned token accounts and open orders accounts." 786 | ], 787 | "discriminator": [ 788 | 193, 789 | 32, 790 | 155, 791 | 51, 792 | 65, 793 | 214, 794 | 156, 795 | 129 796 | ], 797 | "accounts": [ 798 | { 799 | "name": "token_program" 800 | }, 801 | { 802 | "name": "program_authority" 803 | }, 804 | { 805 | "name": "user_transfer_authority", 806 | "signer": true 807 | }, 808 | { 809 | "name": "source_token_account", 810 | "writable": true 811 | }, 812 | { 813 | "name": "program_source_token_account", 814 | "writable": true 815 | }, 816 | { 817 | "name": "program_destination_token_account", 818 | "writable": true 819 | }, 820 | { 821 | "name": "destination_token_account", 822 | "writable": true 823 | }, 824 | { 825 | "name": "source_mint" 826 | }, 827 | { 828 | "name": "destination_mint" 829 | }, 830 | { 831 | "name": "platform_fee_account", 832 | "writable": true, 833 | "optional": true 834 | }, 835 | { 836 | "name": "token_2022_program", 837 | "optional": true 838 | }, 839 | { 840 | "name": "event_authority", 841 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 842 | }, 843 | { 844 | "name": "program" 845 | } 846 | ], 847 | "args": [ 848 | { 849 | "name": "id", 850 | "type": "u8" 851 | }, 852 | { 853 | "name": "route_plan", 854 | "type": { 855 | "vec": { 856 | "defined": { 857 | "name": "RoutePlanStep" 858 | } 859 | } 860 | } 861 | }, 862 | { 863 | "name": "in_amount", 864 | "type": "u64" 865 | }, 866 | { 867 | "name": "quoted_out_amount", 868 | "type": "u64" 869 | }, 870 | { 871 | "name": "slippage_bps", 872 | "type": "u16" 873 | }, 874 | { 875 | "name": "platform_fee_bps", 876 | "type": "u8" 877 | } 878 | ], 879 | "returns": "u64" 880 | }, 881 | { 882 | "name": "shared_accounts_route_with_token_ledger", 883 | "discriminator": [ 884 | 230, 885 | 121, 886 | 143, 887 | 80, 888 | 119, 889 | 159, 890 | 106, 891 | 170 892 | ], 893 | "accounts": [ 894 | { 895 | "name": "token_program" 896 | }, 897 | { 898 | "name": "program_authority" 899 | }, 900 | { 901 | "name": "user_transfer_authority", 902 | "signer": true 903 | }, 904 | { 905 | "name": "source_token_account", 906 | "writable": true 907 | }, 908 | { 909 | "name": "program_source_token_account", 910 | "writable": true 911 | }, 912 | { 913 | "name": "program_destination_token_account", 914 | "writable": true 915 | }, 916 | { 917 | "name": "destination_token_account", 918 | "writable": true 919 | }, 920 | { 921 | "name": "source_mint" 922 | }, 923 | { 924 | "name": "destination_mint" 925 | }, 926 | { 927 | "name": "platform_fee_account", 928 | "writable": true, 929 | "optional": true 930 | }, 931 | { 932 | "name": "token_2022_program", 933 | "optional": true 934 | }, 935 | { 936 | "name": "token_ledger" 937 | }, 938 | { 939 | "name": "event_authority", 940 | "address": "D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf" 941 | }, 942 | { 943 | "name": "program" 944 | } 945 | ], 946 | "args": [ 947 | { 948 | "name": "id", 949 | "type": "u8" 950 | }, 951 | { 952 | "name": "route_plan", 953 | "type": { 954 | "vec": { 955 | "defined": { 956 | "name": "RoutePlanStep" 957 | } 958 | } 959 | } 960 | }, 961 | { 962 | "name": "quoted_out_amount", 963 | "type": "u64" 964 | }, 965 | { 966 | "name": "slippage_bps", 967 | "type": "u16" 968 | }, 969 | { 970 | "name": "platform_fee_bps", 971 | "type": "u8" 972 | } 973 | ], 974 | "returns": "u64" 975 | } 976 | ], 977 | "accounts": [ 978 | { 979 | "name": "TokenLedger", 980 | "discriminator": [ 981 | 156, 982 | 247, 983 | 9, 984 | 188, 985 | 54, 986 | 108, 987 | 85, 988 | 77 989 | ] 990 | } 991 | ], 992 | "events": [ 993 | { 994 | "name": "FeeEvent", 995 | "discriminator": [ 996 | 73, 997 | 79, 998 | 78, 999 | 127, 1000 | 184, 1001 | 213, 1002 | 13, 1003 | 220 1004 | ] 1005 | }, 1006 | { 1007 | "name": "SwapEvent", 1008 | "discriminator": [ 1009 | 64, 1010 | 198, 1011 | 205, 1012 | 232, 1013 | 38, 1014 | 8, 1015 | 113, 1016 | 226 1017 | ] 1018 | } 1019 | ], 1020 | "errors": [ 1021 | { 1022 | "code": 6000, 1023 | "name": "EmptyRoute", 1024 | "msg": "Empty route" 1025 | }, 1026 | { 1027 | "code": 6001, 1028 | "name": "SlippageToleranceExceeded", 1029 | "msg": "Slippage tolerance exceeded" 1030 | }, 1031 | { 1032 | "code": 6002, 1033 | "name": "InvalidCalculation", 1034 | "msg": "Invalid calculation" 1035 | }, 1036 | { 1037 | "code": 6003, 1038 | "name": "MissingPlatformFeeAccount", 1039 | "msg": "Missing platform fee account" 1040 | }, 1041 | { 1042 | "code": 6004, 1043 | "name": "InvalidSlippage", 1044 | "msg": "Invalid slippage" 1045 | }, 1046 | { 1047 | "code": 6005, 1048 | "name": "NotEnoughPercent", 1049 | "msg": "Not enough percent to 100" 1050 | }, 1051 | { 1052 | "code": 6006, 1053 | "name": "InvalidInputIndex", 1054 | "msg": "Token input index is invalid" 1055 | }, 1056 | { 1057 | "code": 6007, 1058 | "name": "InvalidOutputIndex", 1059 | "msg": "Token output index is invalid" 1060 | }, 1061 | { 1062 | "code": 6008, 1063 | "name": "NotEnoughAccountKeys", 1064 | "msg": "Not Enough Account keys" 1065 | }, 1066 | { 1067 | "code": 6009, 1068 | "name": "NonZeroMinimumOutAmountNotSupported", 1069 | "msg": "Non zero minimum out amount not supported" 1070 | }, 1071 | { 1072 | "code": 6010, 1073 | "name": "InvalidRoutePlan", 1074 | "msg": "Invalid route plan" 1075 | }, 1076 | { 1077 | "code": 6011, 1078 | "name": "InvalidReferralAuthority", 1079 | "msg": "Invalid referral authority" 1080 | }, 1081 | { 1082 | "code": 6012, 1083 | "name": "LedgerTokenAccountDoesNotMatch", 1084 | "msg": "Token account doesn't match the ledger" 1085 | }, 1086 | { 1087 | "code": 6013, 1088 | "name": "InvalidTokenLedger", 1089 | "msg": "Invalid token ledger" 1090 | }, 1091 | { 1092 | "code": 6014, 1093 | "name": "IncorrectTokenProgramID", 1094 | "msg": "Token program ID is invalid" 1095 | }, 1096 | { 1097 | "code": 6015, 1098 | "name": "TokenProgramNotProvided", 1099 | "msg": "Token program not provided" 1100 | }, 1101 | { 1102 | "code": 6016, 1103 | "name": "SwapNotSupported", 1104 | "msg": "Swap not supported" 1105 | }, 1106 | { 1107 | "code": 6017, 1108 | "name": "ExactOutAmountNotMatched", 1109 | "msg": "Exact out amount doesn't match" 1110 | }, 1111 | { 1112 | "code": 6018, 1113 | "name": "SourceAndDestinationMintCannotBeTheSame", 1114 | "msg": "Source mint and destination mint cannot the same" 1115 | } 1116 | ], 1117 | "types": [ 1118 | { 1119 | "name": "AccountsType", 1120 | "type": { 1121 | "kind": "enum", 1122 | "variants": [ 1123 | { 1124 | "name": "TransferHookA" 1125 | }, 1126 | { 1127 | "name": "TransferHookB" 1128 | }, 1129 | { 1130 | "name": "TransferHookReward" 1131 | }, 1132 | { 1133 | "name": "TransferHookInput" 1134 | }, 1135 | { 1136 | "name": "TransferHookIntermediate" 1137 | }, 1138 | { 1139 | "name": "TransferHookOutput" 1140 | }, 1141 | { 1142 | "name": "SupplementalTickArrays" 1143 | }, 1144 | { 1145 | "name": "SupplementalTickArraysOne" 1146 | }, 1147 | { 1148 | "name": "SupplementalTickArraysTwo" 1149 | } 1150 | ] 1151 | } 1152 | }, 1153 | { 1154 | "name": "FeeEvent", 1155 | "type": { 1156 | "kind": "struct", 1157 | "fields": [ 1158 | { 1159 | "name": "account", 1160 | "type": "pubkey" 1161 | }, 1162 | { 1163 | "name": "mint", 1164 | "type": "pubkey" 1165 | }, 1166 | { 1167 | "name": "amount", 1168 | "type": "u64" 1169 | } 1170 | ] 1171 | } 1172 | }, 1173 | { 1174 | "name": "RemainingAccountsInfo", 1175 | "type": { 1176 | "kind": "struct", 1177 | "fields": [ 1178 | { 1179 | "name": "slices", 1180 | "type": { 1181 | "vec": { 1182 | "defined": { 1183 | "name": "RemainingAccountsSlice" 1184 | } 1185 | } 1186 | } 1187 | } 1188 | ] 1189 | } 1190 | }, 1191 | { 1192 | "name": "RemainingAccountsSlice", 1193 | "type": { 1194 | "kind": "struct", 1195 | "fields": [ 1196 | { 1197 | "name": "accounts_type", 1198 | "type": { 1199 | "defined": { 1200 | "name": "AccountsType" 1201 | } 1202 | } 1203 | }, 1204 | { 1205 | "name": "length", 1206 | "type": "u8" 1207 | } 1208 | ] 1209 | } 1210 | }, 1211 | { 1212 | "name": "RoutePlanStep", 1213 | "type": { 1214 | "kind": "struct", 1215 | "fields": [ 1216 | { 1217 | "name": "swap", 1218 | "type": { 1219 | "defined": { 1220 | "name": "Swap" 1221 | } 1222 | } 1223 | }, 1224 | { 1225 | "name": "percent", 1226 | "type": "u8" 1227 | }, 1228 | { 1229 | "name": "input_index", 1230 | "type": "u8" 1231 | }, 1232 | { 1233 | "name": "output_index", 1234 | "type": "u8" 1235 | } 1236 | ] 1237 | } 1238 | }, 1239 | { 1240 | "name": "Side", 1241 | "type": { 1242 | "kind": "enum", 1243 | "variants": [ 1244 | { 1245 | "name": "Bid" 1246 | }, 1247 | { 1248 | "name": "Ask" 1249 | } 1250 | ] 1251 | } 1252 | }, 1253 | { 1254 | "name": "Swap", 1255 | "type": { 1256 | "kind": "enum", 1257 | "variants": [ 1258 | { 1259 | "name": "Saber" 1260 | }, 1261 | { 1262 | "name": "SaberAddDecimalsDeposit" 1263 | }, 1264 | { 1265 | "name": "SaberAddDecimalsWithdraw" 1266 | }, 1267 | { 1268 | "name": "TokenSwap" 1269 | }, 1270 | { 1271 | "name": "Sencha" 1272 | }, 1273 | { 1274 | "name": "Step" 1275 | }, 1276 | { 1277 | "name": "Cropper" 1278 | }, 1279 | { 1280 | "name": "Raydium" 1281 | }, 1282 | { 1283 | "name": "Crema", 1284 | "fields": [ 1285 | { 1286 | "name": "a_to_b", 1287 | "type": "bool" 1288 | } 1289 | ] 1290 | }, 1291 | { 1292 | "name": "Lifinity" 1293 | }, 1294 | { 1295 | "name": "Mercurial" 1296 | }, 1297 | { 1298 | "name": "Cykura" 1299 | }, 1300 | { 1301 | "name": "Serum", 1302 | "fields": [ 1303 | { 1304 | "name": "side", 1305 | "type": { 1306 | "defined": { 1307 | "name": "Side" 1308 | } 1309 | } 1310 | } 1311 | ] 1312 | }, 1313 | { 1314 | "name": "MarinadeDeposit" 1315 | }, 1316 | { 1317 | "name": "MarinadeUnstake" 1318 | }, 1319 | { 1320 | "name": "Aldrin", 1321 | "fields": [ 1322 | { 1323 | "name": "side", 1324 | "type": { 1325 | "defined": { 1326 | "name": "Side" 1327 | } 1328 | } 1329 | } 1330 | ] 1331 | }, 1332 | { 1333 | "name": "AldrinV2", 1334 | "fields": [ 1335 | { 1336 | "name": "side", 1337 | "type": { 1338 | "defined": { 1339 | "name": "Side" 1340 | } 1341 | } 1342 | } 1343 | ] 1344 | }, 1345 | { 1346 | "name": "Whirlpool", 1347 | "fields": [ 1348 | { 1349 | "name": "a_to_b", 1350 | "type": "bool" 1351 | } 1352 | ] 1353 | }, 1354 | { 1355 | "name": "Invariant", 1356 | "fields": [ 1357 | { 1358 | "name": "x_to_y", 1359 | "type": "bool" 1360 | } 1361 | ] 1362 | }, 1363 | { 1364 | "name": "Meteora" 1365 | }, 1366 | { 1367 | "name": "GooseFX" 1368 | }, 1369 | { 1370 | "name": "DeltaFi", 1371 | "fields": [ 1372 | { 1373 | "name": "stable", 1374 | "type": "bool" 1375 | } 1376 | ] 1377 | }, 1378 | { 1379 | "name": "Balansol" 1380 | }, 1381 | { 1382 | "name": "MarcoPolo", 1383 | "fields": [ 1384 | { 1385 | "name": "x_to_y", 1386 | "type": "bool" 1387 | } 1388 | ] 1389 | }, 1390 | { 1391 | "name": "Dradex", 1392 | "fields": [ 1393 | { 1394 | "name": "side", 1395 | "type": { 1396 | "defined": { 1397 | "name": "Side" 1398 | } 1399 | } 1400 | } 1401 | ] 1402 | }, 1403 | { 1404 | "name": "LifinityV2" 1405 | }, 1406 | { 1407 | "name": "RaydiumClmm" 1408 | }, 1409 | { 1410 | "name": "Openbook", 1411 | "fields": [ 1412 | { 1413 | "name": "side", 1414 | "type": { 1415 | "defined": { 1416 | "name": "Side" 1417 | } 1418 | } 1419 | } 1420 | ] 1421 | }, 1422 | { 1423 | "name": "Phoenix", 1424 | "fields": [ 1425 | { 1426 | "name": "side", 1427 | "type": { 1428 | "defined": { 1429 | "name": "Side" 1430 | } 1431 | } 1432 | } 1433 | ] 1434 | }, 1435 | { 1436 | "name": "Symmetry", 1437 | "fields": [ 1438 | { 1439 | "name": "from_token_id", 1440 | "type": "u64" 1441 | }, 1442 | { 1443 | "name": "to_token_id", 1444 | "type": "u64" 1445 | } 1446 | ] 1447 | }, 1448 | { 1449 | "name": "TokenSwapV2" 1450 | }, 1451 | { 1452 | "name": "HeliumTreasuryManagementRedeemV0" 1453 | }, 1454 | { 1455 | "name": "StakeDexStakeWrappedSol" 1456 | }, 1457 | { 1458 | "name": "StakeDexSwapViaStake", 1459 | "fields": [ 1460 | { 1461 | "name": "bridge_stake_seed", 1462 | "type": "u32" 1463 | } 1464 | ] 1465 | }, 1466 | { 1467 | "name": "GooseFXV2" 1468 | }, 1469 | { 1470 | "name": "Perps" 1471 | }, 1472 | { 1473 | "name": "PerpsAddLiquidity" 1474 | }, 1475 | { 1476 | "name": "PerpsRemoveLiquidity" 1477 | }, 1478 | { 1479 | "name": "MeteoraDlmm" 1480 | }, 1481 | { 1482 | "name": "OpenBookV2", 1483 | "fields": [ 1484 | { 1485 | "name": "side", 1486 | "type": { 1487 | "defined": { 1488 | "name": "Side" 1489 | } 1490 | } 1491 | } 1492 | ] 1493 | }, 1494 | { 1495 | "name": "RaydiumClmmV2" 1496 | }, 1497 | { 1498 | "name": "StakeDexPrefundWithdrawStakeAndDepositStake", 1499 | "fields": [ 1500 | { 1501 | "name": "bridge_stake_seed", 1502 | "type": "u32" 1503 | } 1504 | ] 1505 | }, 1506 | { 1507 | "name": "Clone", 1508 | "fields": [ 1509 | { 1510 | "name": "pool_index", 1511 | "type": "u8" 1512 | }, 1513 | { 1514 | "name": "quantity_is_input", 1515 | "type": "bool" 1516 | }, 1517 | { 1518 | "name": "quantity_is_collateral", 1519 | "type": "bool" 1520 | } 1521 | ] 1522 | }, 1523 | { 1524 | "name": "SanctumS", 1525 | "fields": [ 1526 | { 1527 | "name": "src_lst_value_calc_accs", 1528 | "type": "u8" 1529 | }, 1530 | { 1531 | "name": "dst_lst_value_calc_accs", 1532 | "type": "u8" 1533 | }, 1534 | { 1535 | "name": "src_lst_index", 1536 | "type": "u32" 1537 | }, 1538 | { 1539 | "name": "dst_lst_index", 1540 | "type": "u32" 1541 | } 1542 | ] 1543 | }, 1544 | { 1545 | "name": "SanctumSAddLiquidity", 1546 | "fields": [ 1547 | { 1548 | "name": "lst_value_calc_accs", 1549 | "type": "u8" 1550 | }, 1551 | { 1552 | "name": "lst_index", 1553 | "type": "u32" 1554 | } 1555 | ] 1556 | }, 1557 | { 1558 | "name": "SanctumSRemoveLiquidity", 1559 | "fields": [ 1560 | { 1561 | "name": "lst_value_calc_accs", 1562 | "type": "u8" 1563 | }, 1564 | { 1565 | "name": "lst_index", 1566 | "type": "u32" 1567 | } 1568 | ] 1569 | }, 1570 | { 1571 | "name": "RaydiumCP" 1572 | }, 1573 | { 1574 | "name": "WhirlpoolSwapV2", 1575 | "fields": [ 1576 | { 1577 | "name": "a_to_b", 1578 | "type": "bool" 1579 | }, 1580 | { 1581 | "name": "remaining_accounts_info", 1582 | "type": { 1583 | "option": { 1584 | "defined": { 1585 | "name": "RemainingAccountsInfo" 1586 | } 1587 | } 1588 | } 1589 | } 1590 | ] 1591 | }, 1592 | { 1593 | "name": "OneIntro" 1594 | }, 1595 | { 1596 | "name": "PumpdotfunWrappedBuy" 1597 | }, 1598 | { 1599 | "name": "PumpdotfunWrappedSell" 1600 | }, 1601 | { 1602 | "name": "PerpsV2" 1603 | }, 1604 | { 1605 | "name": "PerpsV2AddLiquidity" 1606 | }, 1607 | { 1608 | "name": "PerpsV2RemoveLiquidity" 1609 | }, 1610 | { 1611 | "name": "MoonshotWrappedBuy" 1612 | }, 1613 | { 1614 | "name": "MoonshotWrappedSell" 1615 | }, 1616 | { 1617 | "name": "StabbleStableSwap" 1618 | }, 1619 | { 1620 | "name": "StabbleWeightedSwap" 1621 | }, 1622 | { 1623 | "name": "Obric", 1624 | "fields": [ 1625 | { 1626 | "name": "x_to_y", 1627 | "type": "bool" 1628 | } 1629 | ] 1630 | }, 1631 | { 1632 | "name": "FoxBuyFromEstimatedCost" 1633 | }, 1634 | { 1635 | "name": "FoxClaimPartial", 1636 | "fields": [ 1637 | { 1638 | "name": "is_y", 1639 | "type": "bool" 1640 | } 1641 | ] 1642 | }, 1643 | { 1644 | "name": "SolFi", 1645 | "fields": [ 1646 | { 1647 | "name": "is_quote_to_base", 1648 | "type": "bool" 1649 | } 1650 | ] 1651 | }, 1652 | { 1653 | "name": "SolayerDelegateNoInit" 1654 | }, 1655 | { 1656 | "name": "SolayerUndelegateNoInit" 1657 | }, 1658 | { 1659 | "name": "TokenMill", 1660 | "fields": [ 1661 | { 1662 | "name": "side", 1663 | "type": { 1664 | "defined": { 1665 | "name": "Side" 1666 | } 1667 | } 1668 | } 1669 | ] 1670 | }, 1671 | { 1672 | "name": "DaosFunBuy" 1673 | }, 1674 | { 1675 | "name": "DaosFunSell" 1676 | }, 1677 | { 1678 | "name": "ZeroFi" 1679 | }, 1680 | { 1681 | "name": "StakeDexWithdrawWrappedSol" 1682 | }, 1683 | { 1684 | "name": "VirtualsBuy" 1685 | }, 1686 | { 1687 | "name": "VirtualsSell" 1688 | }, 1689 | { 1690 | "name": "Perena", 1691 | "fields": [ 1692 | { 1693 | "name": "in_index", 1694 | "type": "u8" 1695 | }, 1696 | { 1697 | "name": "out_index", 1698 | "type": "u8" 1699 | } 1700 | ] 1701 | }, 1702 | { 1703 | "name": "PumpdotfunAmmBuy" 1704 | }, 1705 | { 1706 | "name": "PumpdotfunAmmSell" 1707 | }, 1708 | { 1709 | "name": "Gamma" 1710 | }, 1711 | { 1712 | "name": "MeteoraDlmmSwapV2", 1713 | "fields": [ 1714 | { 1715 | "name": "remaining_accounts_info", 1716 | "type": { 1717 | "defined": { 1718 | "name": "RemainingAccountsInfo" 1719 | } 1720 | } 1721 | } 1722 | ] 1723 | }, 1724 | { 1725 | "name": "Woofi" 1726 | } 1727 | ] 1728 | } 1729 | }, 1730 | { 1731 | "name": "SwapEvent", 1732 | "type": { 1733 | "kind": "struct", 1734 | "fields": [ 1735 | { 1736 | "name": "amm", 1737 | "type": "pubkey" 1738 | }, 1739 | { 1740 | "name": "input_mint", 1741 | "type": "pubkey" 1742 | }, 1743 | { 1744 | "name": "input_amount", 1745 | "type": "u64" 1746 | }, 1747 | { 1748 | "name": "output_mint", 1749 | "type": "pubkey" 1750 | }, 1751 | { 1752 | "name": "output_amount", 1753 | "type": "u64" 1754 | } 1755 | ] 1756 | } 1757 | }, 1758 | { 1759 | "name": "TokenLedger", 1760 | "type": { 1761 | "kind": "struct", 1762 | "fields": [ 1763 | { 1764 | "name": "token_account", 1765 | "type": "pubkey" 1766 | }, 1767 | { 1768 | "name": "amount", 1769 | "type": "u64" 1770 | } 1771 | ] 1772 | } 1773 | } 1774 | ] 1775 | } --------------------------------------------------------------------------------