Skip to main content
POST
Commit phase — binds an intent to a taker under an expiry window

Authorizations

Authorization
string
header
required

TESTNET posture: simulated signature bearer — the token is the caller's 0x (address-as-identity; no per-request signature verification). Real EIP-191/EIP-712-verified bearers + SIWE (EIP-4361) sessions for the hosted UI arrive in v1.7.0. The settlement security boundary is the EIP-712 Order signature verified by SwapERC20 on-chain, not this credential. See docs/auth-posture-testnet.md.

Headers

Idempotency-Key
string

Response-REPLAY aid, NOT the correctness mechanism (R4-5): once-only settlement is a SERVER invariant (transactional claim-before-execute, SV-2 — LANDED 2026-11-18). Scope = one logical reveal (one commitId); TTL = the commitment's lifetime; same key with a DIFFERENT body or caller → 400 IDEMPOTENCY_REUSED (SV-3, LANDED 2026-11-18). Still send it on every attempt: with it, a retried reveal gets the stored response; without it, a retried reveal after a lost response relies on ALREADY_REVEALED (400) as the recovery answer.

Body

application/json
commitmentHash
string
required

keccak256(abi.encodePacked(signerWallet, signerToken, signerAmount, senderWallet, senderToken, senderAmount, commitNonce, commitmentExpiry)). Server recomputes at reveal over the STORED commitNonce + stored commitmentExpiry (the server values are authoritative — one preimage description, one rule); mismatch → 400 HASH_MISMATCH. PREIMAGE FROZEN, EXPLICITLY (R4-15): chainId and protocolFee are deliberately NOT preimage fields (hash parity proven live 32/32 — do-not-regress). Consequence: the commitment is chain-agnostic under deterministic same-address deployments, and zero-sender (0x0) commits hash differently from sender-bound ones — the form is bound by the preimage itself. Mainnet gate: adding chainId is a v2 preimage break — decided BEFORE mainnet, never after.

commitNonce
string
required

Commit-phase anti-replay value (bytes32 hex; R4-25 pattern).

Pattern: ^0x[0-9a-fA-F]{64}$
signerWallet
string
required
signerToken
string
required
signerAmount
string<uint256>
required
senderWallet
string
required

Sender-BOUND form: the taker; must match the authenticated bearer (403 FORBIDDEN otherwise). ZERO-SENDER form (R4-9): stays 0x0 AS SIGNED and the sender-match check is EXEMPT at commit — the maker signature covers 0x0 and cannot be re-signed; commit binds commitId → authenticated bearer instead (SV-6b, LANDED 2026-11-18 — the server accepts this form; only the binding bearer may reveal).

senderToken
string
required
senderAmount
string<uint256>
required
commitmentExpiry
string
required

unix-seconds STRING (canonical, C9/CR-11). The hash canonicalizes to uint256 seconds either way — parity proven live 32/32 — but a hashed field with two accepted wire formats invites mismatches; the SDK sends exactly one format. ISO is still accepted server-side during the transition ONLY. (The v0.1.0 format: date-time pin is REMOVED.) ORDERING INVARIANT (R4-14): revealDeadline ≤ commitmentExpiry == order.expiry.

chainId
enum<string>

ADDITIVE (CR-12): disambiguates the chain when quoting statelessly. ADVISORY ONLY (R4-15) — routing/echo; NEVER a signature domain (R2-2) and NOT a preimage field (preimage frozen).

Available options:
ethereum,
arbitrum,
base,
robinhood,
mantle,
ink,
xlayer,
monad,
taiko,
bsc,
polygon,
hyperevm
quoteId
string

ADDITIVE (CR-12): links the commit to its quote when one exists.

Response

Commitment accepted

commitId
string
required
status
string
required

"committed".

revealDeadline
string<date-time>
required

The server's settlement window, INSIDE the commitment expiry. ORDERING INVARIANT (R4-14): revealDeadline ≤ commitmentExpiry == order.expiry. SV-8 verifies the server enforces the ordering and that expired-at-reveal maps to a real code (not a raw 500); the invariant sentence is pinned to that verification.