@symmetry-hq/baskets-v2-sdk
Version:
Symmetry Baskets V2 SDK
36 lines (35 loc) • 936 B
TypeScript
import { PublicKey, TransactionInstruction } from "@solana/web3.js";
/**
* Gets a quote from Jupiter for swapping tokens
*/
export declare function getQuoteResponseHandler(quoteParams: {
jupiterApiKey: string;
maxAllowedAccounts: number;
fromToken: PublicKey;
toToken: PublicKey;
amount: number;
slippageBps: number;
}): Promise<any>;
/**
* Converts Jupiter instruction format to Solana TransactionInstruction
*/
export declare function processInstruction(instruction: {
programId: string;
accounts: {
pubkey: string;
isSigner: boolean;
isWritable: boolean;
}[];
data: string;
}): TransactionInstruction;
/**
* Generates a swap instruction using Jupiter
*/
export declare function generateSwapInstruction(quoteParams: {
payer: PublicKey;
jupiterApiKey: string;
quoteResponse: any;
}): Promise<{
ix: TransactionInstruction;
luts: PublicKey[];
}>;