Example inputPOST /api/v1/x402/token-amount-to-raw
{
"amount": 1.25,
"decimals": 6
}
Portable intent card · chain-primitives-local
Scale human token amounts by decimals into on-chain raw units. Call when building ERC-20 transfer/approve amounts from UI-facing quantities. Returns raw integer string, amount, and decimals used as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.
Intent to transaction
The source header follows this discovery route through challenge, payment and delivery without exposing the buyer or request body.
npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/token-amount-to-raw -m POST -H 'x-delx-source: intent-card-token-amount-to-raw-api' --max-amount 0.001 -b '{"amount":1.25,"decimals":6}'
{
"amount": 1.25,
"decimals": 6
}
{
"intent": "Token Amount to Raw Units for an agent workflow",
"tool_name": "util_token_amount_to_raw",
"price_usdc": "0.001",
"machine_url": "https://commerce.delx.ai/intents/token-amount-to-raw-api.json"
}
Portable and inspectable