export { E as ExactSvmScheme } from './scheme-MoBRXFM8.js';
export { a as ClientSvmConfig, C as ClientSvmSigner, c as FacilitatorRpcClient, d as FacilitatorRpcConfig, F as FacilitatorSvmSigner, t as toClientSvmSigner, b as toFacilitatorSvmSigner } from './signer-BMkbhFYE.js';
export { S as SettlementCache } from './settlement-cache-D9gb94wH.js';
import { Transaction, RpcDevnet, SolanaRpcApiDevnet, RpcTestnet, SolanaRpcApiTestnet, RpcMainnet, SolanaRpcApiMainnet } from '@solana/kit';
import { Network } from '@x402/core/types';

/**
 * Exact SVM payload structure containing a base64 encoded Solana transaction
 */
type ExactSvmPayloadV1 = {
    /**
     * Base64 encoded Solana transaction
     */
    transaction: string;
};
/**
 * Exact SVM payload V2 structure (currently same as V1, reserved for future extensions)
 */
type ExactSvmPayloadV2 = ExactSvmPayloadV1;

/**
 * Token program addresses for SPL Token and Token-2022
 * These addresses are the same across all Solana networks (mainnet, devnet, testnet)
 */
declare const TOKEN_PROGRAM_ADDRESS = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
declare const TOKEN_2022_PROGRAM_ADDRESS = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
declare const COMPUTE_BUDGET_PROGRAM_ADDRESS = "ComputeBudget111111111111111111111111111111";
declare const MEMO_PROGRAM_ADDRESS = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr";
/**
 * Phantom/Solflare Lighthouse program address
 * Phantom and Solflare wallets inject Lighthouse instructions for user protection on mainnet transactions.
 * - Phantom adds 1 Lighthouse instruction (4th instruction)
 * - Solflare adds 2 Lighthouse instructions (4th and 5th instructions)
 * We allow these as optional instructions to support these wallets.
 * See: https://github.com/coinbase/x402/issues/828
 */
declare const LIGHTHOUSE_PROGRAM_ADDRESS = "L2TExMFKdjpN9kozasaurPirfHy9P8sbXoAN1qA3S95";
/**
 * Default RPC URLs for Solana networks
 */
declare const DEVNET_RPC_URL = "https://api.devnet.solana.com";
declare const TESTNET_RPC_URL = "https://api.testnet.solana.com";
declare const MAINNET_RPC_URL = "https://api.mainnet-beta.solana.com";
declare const DEVNET_WS_URL = "wss://api.devnet.solana.com";
declare const TESTNET_WS_URL = "wss://api.testnet.solana.com";
declare const MAINNET_WS_URL = "wss://api.mainnet-beta.solana.com";
/**
 * USDC token mint addresses (default stablecoin)
 */
declare const USDC_MAINNET_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
declare const USDC_DEVNET_ADDRESS = "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU";
declare const USDC_TESTNET_ADDRESS = "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU";
/**
 * Compute budget configuration
 * All prices are in microlamports (1 lamport = 1,000,000 microlamports)
 */
declare const DEFAULT_COMPUTE_UNIT_PRICE_MICROLAMPORTS = 1;
declare const MAX_COMPUTE_UNIT_PRICE_MICROLAMPORTS = 5000000;
declare const DEFAULT_COMPUTE_UNIT_LIMIT = 20000;
/**
 * How long a transaction is held in the duplicate settlement cache (ms).
 * Covers the Solana blockhash lifetime (~60-90s) with margin.
 */
declare const SETTLEMENT_TTL_MS = 120000;
/**
 * Solana address validation regex (base58, 32-44 characters)
 */
declare const SVM_ADDRESS_REGEX: RegExp;
/**
 * CAIP-2 network identifiers for Solana (V2)
 */
declare const SOLANA_MAINNET_CAIP2 = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
declare const SOLANA_DEVNET_CAIP2 = "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1";
declare const SOLANA_TESTNET_CAIP2 = "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z";
/**
 * V1 to V2 network identifier mappings (for backwards compatibility)
 * V1 used simple names like solana, V2 uses CAIP-2
 */
declare const V1_TO_V2_NETWORK_MAP: Record<string, string>;

/**
 * Normalize network identifier to CAIP-2 format
 * Handles both V1 names (solana, solana-devnet) and V2 CAIP-2 format
 *
 * @param network - Network identifier (V1 or V2 format)
 * @returns CAIP-2 network identifier
 */
declare function normalizeNetwork(network: Network): string;
/**
 * Validate Solana address format
 *
 * @param address - Base58 encoded address string
 * @returns true if address is valid, false otherwise
 */
declare function validateSvmAddress(address: string): boolean;
/**
 * Decode a base64 encoded transaction from an SVM payload
 *
 * @param svmPayload - The SVM payload containing a base64 encoded transaction
 * @returns Decoded Transaction object
 */
declare function decodeTransactionFromPayload(svmPayload: ExactSvmPayloadV1): Transaction;
/**
 * Extract the token sender (owner of the source token account) from a TransferChecked instruction
 *
 * @param transaction - The decoded transaction
 * @returns The token payer address as a base58 string
 */
declare function getTokenPayerFromTransaction(transaction: Transaction): string;
/**
 * Create an RPC client for the specified network
 *
 * @param network - Network identifier (CAIP-2 or V1 format)
 * @param customRpcUrl - Optional custom RPC URL
 * @returns RPC client for the specified network
 */
declare function createRpcClient(network: Network, customRpcUrl?: string): RpcDevnet<SolanaRpcApiDevnet> | RpcTestnet<SolanaRpcApiTestnet> | RpcMainnet<SolanaRpcApiMainnet>;
/**
 * Get the default USDC mint address for a network
 *
 * @param network - Network identifier (CAIP-2 or V1 format)
 * @returns USDC mint address for the network
 */
declare function getUsdcAddress(network: Network): string;
/**
 * Convert a decimal amount to token smallest units
 *
 * @param decimalAmount - The decimal amount (e.g., "0.10")
 * @param decimals - The number of decimals for the token (e.g., 6 for USDC)
 * @returns The amount in smallest units as a string
 */
declare function convertToTokenAmount(decimalAmount: string, decimals: number): string;

export { COMPUTE_BUDGET_PROGRAM_ADDRESS, DEFAULT_COMPUTE_UNIT_LIMIT, DEFAULT_COMPUTE_UNIT_PRICE_MICROLAMPORTS, DEVNET_RPC_URL, DEVNET_WS_URL, type ExactSvmPayloadV1, type ExactSvmPayloadV2, LIGHTHOUSE_PROGRAM_ADDRESS, MAINNET_RPC_URL, MAINNET_WS_URL, MAX_COMPUTE_UNIT_PRICE_MICROLAMPORTS, MEMO_PROGRAM_ADDRESS, SETTLEMENT_TTL_MS, SOLANA_DEVNET_CAIP2, SOLANA_MAINNET_CAIP2, SOLANA_TESTNET_CAIP2, SVM_ADDRESS_REGEX, TESTNET_RPC_URL, TESTNET_WS_URL, TOKEN_2022_PROGRAM_ADDRESS, TOKEN_PROGRAM_ADDRESS, USDC_DEVNET_ADDRESS, USDC_MAINNET_ADDRESS, USDC_TESTNET_ADDRESS, V1_TO_V2_NETWORK_MAP, convertToTokenAmount, createRpcClient, decodeTransactionFromPayload, getTokenPayerFromTransaction, getUsdcAddress, normalizeNetwork, validateSvmAddress };
