Cross-chain is live on testnet. This example pays a Base Sepolia (
eip155:84532) endpoint.Full example on GitHub
The complete, runnable version of this guide —
examples/x402/exact-cross-chain.Prerequisites
- A Sui testnet keypair with test USDC and a little SUI for gas
- Node.js 24+
- An x402 endpoint on the destination chain to call
1. Install dependencies
2. Set up the Sui client
The cross-chain signer needs a Sui client — funds move on Sui, and the signer follows the client’s network (testnet or mainnet):
client.ts
3. Create the cross-chain signer
createCrossChainEvmSigner returns a signer that looks like a normal EVM signer to x402 — its address is the dWallet’s, resolved from the verifier, and every signature is produced by the dWallet, paid for with USDC on Sui:
client.ts
4. Register the destination scheme and wrap fetch
Register the destination chain’sexact scheme with the cross-chain signer, then wrap fetch:
client.ts
5. Make the request and read the receipt
The call is identical to a native x402 request. The settlement happens on the destination chain:client.ts
Next steps
Architecture
How the dWallet, verifier, and on-chain contract authorize each payment.