UNPKG

@shogun-sdk/money-legos

Version:

Shogun Money Legos: clients and types for quotes, memes, prices, balances, fees, validations, etc.

42 lines 1.96 kB
import { Connection, type TransactionError, VersionedTransaction } from '@solana/web3.js'; import type { SimulateBundleOptions } from '../types/index.js'; export declare const SLIPPAGE_ERROR_CODE = 6001; type SolanaError = { InstructionError: [number, { Custom?: number; }]; } | string | TransactionError | null; type ConfirmResult = { success: boolean; error?: string; isTimeout?: boolean; slot?: number; transactionResponse?: { transactionHash: string; slot: number; }; }; export declare const sendTransactionUsingJito: (transactionBase64: string) => Promise<string>; export declare const sendBundleUsingJito: (transactionBase64Array: string[]) => Promise<any>; export declare function isValidSolanaSignature(signature: string): boolean; export declare const confirmTransaction: (transactionHash: string, options?: { maxRetries?: number; commitment?: "processed" | "confirmed" | "finalized"; checkInterval?: number; }) => Promise<ConfirmResult>; export declare const parseInstructionError: (err: SolanaError) => string; export declare const SOL_NATIVE_DEXTRA = "11111111111111111111111111111111"; export declare const WRAPPED_SOL_MINT = "So11111111111111111111111111111111111111112"; export declare const NATIVE_SOL_MINT = "So11111111111111111111111111111111111111111"; export declare const getNormalizedSolanaToken: (address: string) => string; export interface SimulationResult { preBalances?: Record<string, bigint>; postBalances?: Record<string, bigint>; success: boolean; } export declare function simulateBundle({ encodedTransactions }: SimulateBundleOptions): Promise<SimulationResult | null>; export declare function processTransactionsWithFeePayer(input: { data: string; }[] | VersionedTransaction, connection: Connection, senderAddressString: string, feePayerAddressString: string): Promise<VersionedTransaction[]>; export {}; //# sourceMappingURL=solana.d.ts.map