x402

The exchange

POST /i/coral/embed402 + PRICESIGN EIP-3009POST + X-PAYMENTANSWERSETTLED HOURLY
curl -i -X POST https://gpuislands.com/i/coral/embed -d '{"input":["hello"]}'
# HTTP/1.1 402 Payment Required
# { "accepts": [{ "scheme": "exact", "network": "eip155:4663",
#   "asset": "0x5fc5...d168", "maxAmountRequired": "200", "payTo": "<Meter>",
#   "extra": { "island": 1, "job": 0, "domainSeparator": "0x...", ... } }] }

The X-PAYMENT header is base64 JSON with from, value, validAfter, validBefore, salt, request, v, r, s. request is keccak256(island + "\n" + good + "\n" + body). The signature is over the USDG EIP-712 digest of ReceiveWithAuthorization with to set to the Meter and the nonce rule above.