/** * Standalone x402 types (no @x402/* deps). */ import type { TransactionSigner } from "@solana/kit"; import type { Hex, SignableMessage } from "viem"; export type Network = string; export interface ResourceInfo { url: string; description: string; mimeType: string; } export interface PaymentRequirements { scheme: string; network: Network; asset: string; amount: string; payTo: string; maxTimeoutSeconds: number; extra: Record; } export interface PaymentRequired { x402Version: number; error?: string; resource: ResourceInfo; accepts: PaymentRequirements[]; extensions?: Record; } export interface PaymentPayload { x402Version: number; resource: ResourceInfo; accepted: PaymentRequirements; payload: Record; extensions?: Record; } export interface ExactEvmPayloadV2 { authorization: { from: string; to: string; value: string; validAfter: string; validBefore: string; nonce: `0x${string}`; }; signature: `0x${string}`; } export type ClientEvmSigner = { readonly address: `0x${string}`; signTypedData(message: { domain: Record; types: Record; primaryType: string; message: Record; }): Promise<`0x${string}`>; /** 托管钱包 MPP / Base 链上写合约时由 createQuickWalletSigner 填充 */ signMessage?(args: { message: SignableMessage; }): Promise; signTransaction?(transaction: unknown, options?: unknown): Promise; signDigest?(digest: `0x${string}`): Promise<`0x${string}`>; }; export type ClientSvmSigner = TransactionSigner; export interface ExactSvmPayloadV2 { transaction: string; } export interface SchemeNetworkClient { scheme: string; createPaymentPayload(x402Version: number, paymentRequirements: PaymentRequirements): Promise>; } //# sourceMappingURL=types.d.ts.map