import { Transaction, VersionedTransaction } from '@solana/web3.js'; import { Wallet } from '@phoenix-wallet/core'; import { SolanaChain } from '../chains/SolanaChain'; import { SolanaConnector } from '../connectors/SolanaConnector'; import { SolanaWalletClient } from '../connectors/SolanaWalletClient'; /** * Solana transaction type * * Supports both Legacy and Versioned (v0) transactions * * @public */ export type SolanaTransaction = Transaction | VersionedTransaction; /** * Solana wallet implementation * * Provides wallet functionality for the Solana blockchain including transaction * signing, message signing, and SOL balance queries. Supports both Legacy and * Versioned transactions. * * Compatible with all wallet-standard wallets including Phantom, Solflare, * Backpack, and more. * * @example Basic usage * ```typescript * const wallet = new SolanaWallet( * 'DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK', * solanaChain, * connector, * walletClient * ); * * // Sign a message * const signature = await wallet.signMessage('Hello, Solana!'); * * // Get balance * const { uiAmount, symbol } = await wallet.getBalance(); * console.log(`Balance: ${uiAmount} ${symbol}`); * ``` * * @example Sending a transaction * ```typescript * import { Transaction, SystemProgram, PublicKey } from '@solana/web3.js'; * * const transaction = new Transaction().add( * SystemProgram.transfer({ * fromPubkey: new PublicKey(wallet.address), * toPubkey: new PublicKey('...'), * lamports: 1000000 * }) * ); * * const txHash = await wallet.sendTransaction(transaction); * console.log('Transaction hash:', txHash); * ``` * * @public */ export declare class SolanaWallet extends Wallet { constructor(_address: string, chain: SolanaChain, connector: SolanaConnector, walletClient: SolanaWalletClient); signMessage(message: string | Uint8Array): Promise; signTransaction(transaction: SolanaTransaction): Promise; sendTransaction(transaction: SolanaTransaction): Promise; sendRawTransaction(transaction: string): Promise; signAllTransactions(transactions: SolanaTransaction[]): Promise; get address(): string; getBalance(): Promise<{ amount: string; uiAmount: string; decimals: number; symbol: string; name: string; }>; } //# sourceMappingURL=SolanaWallet.d.ts.map