import { Commitment, Connection, PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js'; import type { SolanaWalletAdapter } from '../types'; import { BuildTransactionRequest, type SolanaClientConfig } from './types'; /** * This service is the main interaction source with Solana. It includes the * RPC client connection and the wallet adapter. * * The service contains helpful primitives for helping build, send, and confirm * transactions. */ export declare class SolanaClient { /** The Solana RPC client. */ readonly connection: Connection; private readonly wallet; private readonly logger; constructor(config: SolanaClientConfig); /** * Convenience helper to construct v0 transactions. * * Handles fetching a recent blockhash, getting lookup table accounts, * and assigning a fee payer. */ buildTransaction(params: BuildTransactionRequest): Promise; /** * Sends a transaction using the connected wallet adapter and the connection. * @param transaction The transaction to send. * @param sendOptions The options to send it with. */ sendTransaction(transaction: Parameters[0], sendOptions?: Parameters[2]): Promise; /** * Confirms all the transactions provided */ confirmAllTransactions(signatures: string[], commitment?: Commitment): Promise; /** * Gets the fee payer from the connected wallet. */ getFeePayer(): Promise; /** * Normalizes the instructions as TransactionInstruction whether from * versioned transactions or legacy transactions. */ getInstructions(transaction: VersionedTransaction | Transaction): Promise; /** * Fetches the address look up tables for populating transaction objects */ getLookupTableAccounts(lookupTableKeys: PublicKey[]): Promise; }