@macalinao/wallet-adapter-compat
Version:
Compatibility layer that bridges @solana/wallet-adapter with @solana/kit and grill
22 lines • 1.39 kB
TypeScript
import type { Address, TransactionSendingSigner } from "@solana/kit";
import type { SendTransactionOptions, SupportedTransactionVersions, TransactionOrVersionedTransaction } from "@solana/wallet-adapter-base";
import type { Connection, TransactionSignature } from "@solana/web3.js";
import { PublicKey } from "@solana/web3.js";
export interface WalletAdapter {
publicKey: PublicKey | null;
supportedTransactionVersions?: SupportedTransactionVersions;
sendTransaction(transaction: TransactionOrVersionedTransaction<this["supportedTransactionVersions"]>, connection: Connection, options?: SendTransactionOptions): Promise<TransactionSignature>;
}
/**
* Creates a TransactionSendingSigner from a Solana wallet adapter.
* This signer can send transactions using the wallet adapter's capabilities.
*
* Note: Wallet adapters don't sign transactions separately - they sign and send in one operation.
* This implementation uses the sendTransaction method which signs and sends atomically.
*
* @param wallet - The wallet adapter instance
* @param connection - The Solana connection
* @returns TransactionSendingSigner - A signer that can send transactions
*/
export declare function createWalletTransactionSendingSigner(walletAdapter: WalletAdapter, connection: Connection): TransactionSendingSigner<Address> | null;
//# sourceMappingURL=walletTransactionSendingSigner.d.ts.map