import { ClientWallet, FacilitatorWallet } from '@bankofai/x402-core/wallets'; import { C as ClientEvmSigner, F as FacilitatorEvmSigner } from '../signer-m5yRWbVQ.js'; import 'viem'; /** EVM client wallet — the chain-agnostic {@link ClientWallet} (no EVM refinement). */ type ClientEvmWallet = ClientWallet; /** Options for {@link createClientEvmSigner}. */ interface CreateClientEvmSignerOptions { /** CAIP-2 network, e.g. `"eip155:97"`. The viem client is built from it. */ network: string; /** Optional RPC URL override; falls back to the chain's default. */ rpcUrl?: string; } /** * Creates a {@link ClientEvmSigner} from a wallet — the EVM counterpart of * `createClientTronSigner`. The key never enters the SDK; the wallet signs. The * viem public client (for EIP-2612 / permit2 enrichment + the gas-sponsored * approve) is built internally from `opts.network`. * * @param wallet - The wallet that signs payment authorizations. * @param opts - Target network (+ optional RPC override). * @returns A {@link ClientEvmSigner} backed by the wallet. * * @example * ```typescript * const wallet = await resolveWallet({ network: "eip155:97" }); // @bankofai/agent-wallet * const signer = await createClientEvmSigner(wallet, { network: "eip155:97" }); * client.register("eip155:97", new ExactEvmScheme(signer)); * ``` */ declare function createClientEvmSigner(wallet: ClientEvmWallet, opts: CreateClientEvmSignerOptions): Promise; /** * A typed-data signer with an eagerly-resolved address. Structurally satisfies * the batch-settlement `AuthorizerSigner` (the receiver-authorizer key). */ type EvmAuthorizerSigner = Pick; /** * Creates an authorizer signer (address + typed-data signing) from a wallet — * e.g. the batch-settlement `receiverAuthorizer`, which signs `ClaimBatch` / * `Refund` EIP-712 digests. No chain client is built (signing is offline). * * @param wallet - The wallet that holds the authorizer key. * @returns A signer satisfying batch-settlement's `AuthorizerSigner`. */ declare function createAuthorizerEvmSigner(wallet: ClientWallet): Promise; /** * Typed EIP-1559 fields the facilitator wallet receives to sign a settlement tx. * A `type` (not `interface`) so it stays assignable to `Record` * — the shape a generic agent-wallet `signTransaction` accepts. */ type Eip1559TxFields = { to: `0x${string}`; data: `0x${string}`; value: bigint; nonce: number; gas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; chainId: number; }; /** EVM facilitator wallet — {@link FacilitatorWallet} refined to EIP-1559 fields. */ type FacilitatorEvmWallet = FacilitatorWallet; /** Options for {@link createFacilitatorEvmSigner}. */ interface CreateFacilitatorEvmSignerOptions { /** CAIP-2 network, e.g. `"eip155:97"`. The viem client is built from it. */ network: string; /** Optional RPC URL override; falls back to the chain's default. */ rpcUrl?: string; /** Gas limit when a per-call `gas` is not supplied; otherwise estimated. */ defaultGas?: bigint; } /** * One transaction for {@link GasSponsoringFacilitatorEvmSigner.sendTransactions}: * a pre-signed serialized tx (broadcast as-is) or an unsigned call intent (signed * by the facilitator wallet, then broadcast). */ type EvmTransactionRequest = `0x${string}` | { to: `0x${string}`; data: `0x${string}`; gas?: bigint; }; /** * {@link FacilitatorEvmSigner} plus `sendTransactions` — the shape the ERC-20 * approval gas-sponsoring extension expects (broadcasts the client's pre-signed * `approve` bundled with `settle`). */ type GasSponsoringFacilitatorEvmSigner = FacilitatorEvmSigner & { sendTransactions(transactions: readonly EvmTransactionRequest[]): Promise<`0x${string}`[]>; }; /** * Creates a {@link FacilitatorEvmSigner} from a wallet — the EVM counterpart of * `createFacilitatorTronSigner`. The viem public client (reads / verification / * broadcast) is built internally from `opts.network`. The transaction is built * (nonce / EIP-1559 fees / gas), handed to the wallet to sign (the private key * never enters the SDK), then broadcast. * * @param wallet - The wallet that signs settlement transactions. * @param opts - Target network (+ optional RPC override / default gas). * @returns A {@link GasSponsoringFacilitatorEvmSigner} backed by the wallet. * * @example * ```typescript * const signer = await createFacilitatorEvmSigner(agentWallet, { network: "eip155:97" }); * facilitator.register("eip155:97", new ExactEvmScheme(signer)); * ``` */ declare function createFacilitatorEvmSigner(wallet: FacilitatorEvmWallet, opts: CreateFacilitatorEvmSignerOptions): Promise; export { type ClientEvmWallet, type CreateClientEvmSignerOptions, type CreateFacilitatorEvmSignerOptions, type Eip1559TxFields, type EvmAuthorizerSigner, type EvmTransactionRequest, type FacilitatorEvmWallet, type GasSponsoringFacilitatorEvmSigner, createAuthorizerEvmSigner, createClientEvmSigner, createFacilitatorEvmSigner };