x402Client with automatic wallet provisioning and scheme registration.
Credentials and RPC URLs fall back to environment variables; wallet
configuration is supplied explicitly via config.
The account name/address used for payments is resolved internally. Use
CdpX402Client.getAddresses to retrieve it — for example, to fund
the wallet before making a payment.
Examples
Extends
x402Client
Constructors
Constructor
Parameters
config?
CdpX402ClientConfig
Optional configuration. Credentials and RPC URLs fall back to environment variables.
Returns
CdpX402Client
Overrides
Accessors
accountName
Get Signature
Returns
string
The resolved account name, e.g. "x402-client-wallet-1".
Methods
getAddresses()
Returns
Promise<CdpX402WalletAddresses>
The EVM and Solana addresses backing this client’s payments.
createPaymentPayload()
Parameters
paymentRequired
PaymentRequired
The x402 payment requirements from the resource server.
Returns
Promise<PaymentPayload>
The signed payment payload.