import { Keypair, Transaction, VersionedTransaction } from '@solana/web3.js'; import * as anchor from '@coral-xyz/anchor'; import type { AuthProvider, User, SolanaTransactionVersion, SolanaV1Transaction } from '@bounded-sh/core'; export declare class SolanaKeypairProvider implements AuthProvider { private readonly rpcUrl; private readonly serverKeypair; constructor(rpcUrl: string | null, serverKeypair: Keypair); private get keypair(); login(): Promise; restoreSession(): Promise; logout(): Promise; signMessage(message: string): Promise; signTransaction(transaction: Transaction | VersionedTransaction): Promise; /** * SIMD-0385 v1: the server keypair signs the exact message bytes; kit places the * signature in this key's slot and leaves every other slot (sponsor, * attestation) untouched. Refuses when the keypair is not a required signer, * because a stray signature would be silently dropped and the write would fail * later with a misleading missing-signature error. */ signTransactionV1(transaction: SolanaV1Transaction): Promise; /** A server keypair can sign every format; the write request advertises all three. */ supportedTransactionVersions(): SolanaTransactionVersion[]; /** * Signs and submits a Solana transaction to the network. * * This method handles blockhash and transaction confirmation automatically - you do NOT need to * set recentBlockhash or lastValidBlockHeight on the transaction before calling this method. * Requires an explicit RPC URL configured on the provider because this method has no * Solana transaction payload network to resolve. * * @param transaction - The transaction to sign and submit (Transaction or VersionedTransaction) * @param feePayer - Optional fee payer public key. If not provided and the transaction doesn't * already have a feePayer set, the keypair's public key will be used. * Useful for co-signing scenarios where a different account pays the fees. * @returns The transaction signature */ signAndSubmitTransaction(transaction: Transaction | VersionedTransaction, feePayer?: anchor.web3.PublicKey): Promise; /** * Submits a signed transaction and waits for confirmation using polling. * Shared by both signAndSubmitTransaction and runTransactionInner. */ private submitAndConfirmTransaction; private getRpcUrl; getNativeMethods(): Promise<{ keypair: Keypair; }>; }