Skip to Content
APISubmitted evidence

Submitted evidence

POST /api/external/attempts/{attemptId}/submitted

Reports wallet execution evidence. Reporting is additive and at-least-once: report a bundle id or transaction hash as soon as the wallet produces it, then add stronger evidence later. Sweep verifies the prepared execution on-chain.

Request

Batch evidence (submitMethod: "wallet_sendCalls"):

{ "walletAuthorization": { "signature": "0x<65-byte ECDSA hex>" }, "chainResults": [ { "chainId": 8453, "bundleId": "0xwallet-call-id" } ] }

Transaction evidence (submitMethod: "sendTransaction"):

{ "walletAuthorization": { "signature": "0x<65-byte ECDSA hex>" }, "chainResults": [ { "chainId": 8453, "txHashes": [ "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" ] } ] }
FieldConstraint
walletAuthorization.signature65-byte ECDSA signature of the prepared EIP-712 authorization
chainResults[]1–16 entries, one per source chain
chainResults[].bundleIdNon-empty string, max 255 chars
chainResults[].txHashes[]Up to 64 entries; each a 32-byte 0x-prefixed hex value

A chain result may carry a bundle id, transaction hashes, or both as evidence becomes available. Do not invent quoteIndex, callId or hash attribution.

Response

The response is the same attempt snapshot returned by GET /status — see that page for the shape and status table.

Evidence rules

  • Persist the evidence and its idempotency key before sending.
  • Report the wallet_sendCalls bundle id immediately; do not wait for receipt hashes.
  • When wallet_getCallsStatus later reveals receipt hashes, call /submitted again with a new idempotency key and the additional hashes.
  • Re-sending the same evidence reuses the original body and key; adding new evidence uses a new body and key.
  • Initial evidence must be accepted before the attempt’s evidenceDeadlineAt. Once initial evidence is accepted, later additive receipt evidence is not bounded by that window.

Code

import crypto from 'node:crypto'; // Initial report — as soon as the wallet returns evidence. const initialKey = `submitted-${crypto.randomUUID()}`; // Persist { initialKey, body } BEFORE transmission. await client.submitted(attemptId, { walletAuthorization: { signature }, chainResults: [{ chainId: 8453, bundleId }], }, initialKey); // Later: receipts appeared via wallet_getCallsStatus -> additive evidence, NEW key. const additiveKey = `submitted-${crypto.randomUUID()}`; await client.submitted(attemptId, { walletAuthorization: { signature }, chainResults: [{ chainId: 8453, bundleId, txHashes: receiptHashes }], }, additiveKey);

Failure codes: Errors.

Last updated on