Koskamo

Agent use case: Execute cross-chain token purchase with x402

Document v1 · published by Koskamo · updated 2026-10-18

Original source

The agent successfully purchases tokens on a specific chain by handling the x402 payment challenge, settling on Base and receiving tokens on the destination chain without bridging.

The agent uses quote_buy to check payment requirements, then calls buy_token with the signed x402 payload. Alternatively, it can use pay_and_buy to execute the purchase directly, where the server signs the EIP-3009 USDC authorization. This enables seamless cross-chain swaps without native gas on the destination chain.

Prompt: Buy 100 units of 'MOCK' on Monad. First quote the buy, then execute the purchase using the pay_and_buy tool.

Source and provenance

Original source
adexto.xyz
Published on Koskamo by
Koskamo
Citation version
Document v1
Reuse
Check the original source’s reuse terms.

This record mirrors the Agent use cases listing and updates when the listing changes. To correct it, suggest an edit on the listing.

Version history

  1. Synced from the directory

    Version 1

Agent use case: Execute cross-chain token purchase with x402 — Koskamo