curl --request POST \
--url https://api.skia.money/api/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"commitmentHash": "<string>",
"commitNonce": "<string>",
"signerWallet": "<string>",
"signerToken": "<string>",
"signerAmount": "<string>",
"senderWallet": "<string>",
"senderToken": "<string>",
"senderAmount": "<string>",
"commitmentExpiry": "<string>",
"quoteId": "<string>"
}
'import requests
url = "https://api.skia.money/api/commit"
payload = {
"commitmentHash": "<string>",
"commitNonce": "<string>",
"signerWallet": "<string>",
"signerToken": "<string>",
"signerAmount": "<string>",
"senderWallet": "<string>",
"senderToken": "<string>",
"senderAmount": "<string>",
"commitmentExpiry": "<string>",
"quoteId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
commitmentHash: '<string>',
commitNonce: '<string>',
signerWallet: '<string>',
signerToken: '<string>',
signerAmount: '<string>',
senderWallet: '<string>',
senderToken: '<string>',
senderAmount: '<string>',
commitmentExpiry: '<string>',
quoteId: '<string>'
})
};
fetch('https://api.skia.money/api/commit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.skia.money/api/commit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'commitmentHash' => '<string>',
'commitNonce' => '<string>',
'signerWallet' => '<string>',
'signerToken' => '<string>',
'signerAmount' => '<string>',
'senderWallet' => '<string>',
'senderToken' => '<string>',
'senderAmount' => '<string>',
'commitmentExpiry' => '<string>',
'quoteId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.skia.money/api/commit"
payload := strings.NewReader("{\n \"commitmentHash\": \"<string>\",\n \"commitNonce\": \"<string>\",\n \"signerWallet\": \"<string>\",\n \"signerToken\": \"<string>\",\n \"signerAmount\": \"<string>\",\n \"senderWallet\": \"<string>\",\n \"senderToken\": \"<string>\",\n \"senderAmount\": \"<string>\",\n \"commitmentExpiry\": \"<string>\",\n \"quoteId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.skia.money/api/commit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"commitmentHash\": \"<string>\",\n \"commitNonce\": \"<string>\",\n \"signerWallet\": \"<string>\",\n \"signerToken\": \"<string>\",\n \"signerAmount\": \"<string>\",\n \"senderWallet\": \"<string>\",\n \"senderToken\": \"<string>\",\n \"senderAmount\": \"<string>\",\n \"commitmentExpiry\": \"<string>\",\n \"quoteId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skia.money/api/commit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"commitmentHash\": \"<string>\",\n \"commitNonce\": \"<string>\",\n \"signerWallet\": \"<string>\",\n \"signerToken\": \"<string>\",\n \"signerAmount\": \"<string>\",\n \"senderWallet\": \"<string>\",\n \"senderToken\": \"<string>\",\n \"senderAmount\": \"<string>\",\n \"commitmentExpiry\": \"<string>\",\n \"quoteId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"commitId": "<string>",
"status": "<string>",
"revealDeadline": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}Commit phase — binds an intent to a taker under an expiry window
NO CONFIDENTIALITY (R4-10): the commit body carries all nine preimage fields in plaintext — the withheld pieces are the makerSignature, the AirSwap order nonce, and protocolFee. What the commit buys is equivocation-binding: the intent is bound to the taker under an expiry window, and the SERVER’s stored commitNonce + commitmentExpiry are authoritative at reveal. The commitmentHash preimage is FULLY determined by this body (one description, one rule — do-not-regress). PHASE-GATING INFERENCE RULE (R4-16): the Phase-1 trigger set is EMPTY — every /api/commit body is SWAP-class until registry routes activate; when they do, class inference comes from the route table (asset pair + capitalState), and an optional additive routeClass field may be declared then (no required-field change).
curl --request POST \
--url https://api.skia.money/api/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"commitmentHash": "<string>",
"commitNonce": "<string>",
"signerWallet": "<string>",
"signerToken": "<string>",
"signerAmount": "<string>",
"senderWallet": "<string>",
"senderToken": "<string>",
"senderAmount": "<string>",
"commitmentExpiry": "<string>",
"quoteId": "<string>"
}
'import requests
url = "https://api.skia.money/api/commit"
payload = {
"commitmentHash": "<string>",
"commitNonce": "<string>",
"signerWallet": "<string>",
"signerToken": "<string>",
"signerAmount": "<string>",
"senderWallet": "<string>",
"senderToken": "<string>",
"senderAmount": "<string>",
"commitmentExpiry": "<string>",
"quoteId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
commitmentHash: '<string>',
commitNonce: '<string>',
signerWallet: '<string>',
signerToken: '<string>',
signerAmount: '<string>',
senderWallet: '<string>',
senderToken: '<string>',
senderAmount: '<string>',
commitmentExpiry: '<string>',
quoteId: '<string>'
})
};
fetch('https://api.skia.money/api/commit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.skia.money/api/commit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'commitmentHash' => '<string>',
'commitNonce' => '<string>',
'signerWallet' => '<string>',
'signerToken' => '<string>',
'signerAmount' => '<string>',
'senderWallet' => '<string>',
'senderToken' => '<string>',
'senderAmount' => '<string>',
'commitmentExpiry' => '<string>',
'quoteId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.skia.money/api/commit"
payload := strings.NewReader("{\n \"commitmentHash\": \"<string>\",\n \"commitNonce\": \"<string>\",\n \"signerWallet\": \"<string>\",\n \"signerToken\": \"<string>\",\n \"signerAmount\": \"<string>\",\n \"senderWallet\": \"<string>\",\n \"senderToken\": \"<string>\",\n \"senderAmount\": \"<string>\",\n \"commitmentExpiry\": \"<string>\",\n \"quoteId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.skia.money/api/commit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"commitmentHash\": \"<string>\",\n \"commitNonce\": \"<string>\",\n \"signerWallet\": \"<string>\",\n \"signerToken\": \"<string>\",\n \"signerAmount\": \"<string>\",\n \"senderWallet\": \"<string>\",\n \"senderToken\": \"<string>\",\n \"senderAmount\": \"<string>\",\n \"commitmentExpiry\": \"<string>\",\n \"quoteId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skia.money/api/commit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"commitmentHash\": \"<string>\",\n \"commitNonce\": \"<string>\",\n \"signerWallet\": \"<string>\",\n \"signerToken\": \"<string>\",\n \"signerAmount\": \"<string>\",\n \"senderWallet\": \"<string>\",\n \"senderToken\": \"<string>\",\n \"senderAmount\": \"<string>\",\n \"commitmentExpiry\": \"<string>\",\n \"quoteId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"commitId": "<string>",
"status": "<string>",
"revealDeadline": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}Authorizations
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
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
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.
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).
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.
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).
ethereum, arbitrum, base, robinhood, mantle, ink, xlayer, monad, taiko, bsc, polygon, hyperevm Response
Commitment accepted
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.