Mark escrow ready¶
Submit Ready after the wallet verifies that the full Zcash deposit is spendable.
Endpoint
POST /relayer/v1/reverse/ready
Examples¶
To include the optional ZecSwap-Ticket header, set SWAP_TICKET to the ticket from acceptance. Otherwise, remove the header line. Save the request prepared by your wallet as ready-reverse.json.
cURL
curl -sS "https://api-testnet.veylor.cash/relayer/v1/reverse/ready" \
-H "ZecSwap-Ticket: ${SWAP_TICKET:?}" \
-H 'Content-Type: application/json' \
--data-binary @ready-reverse.json
HTTP 200
{
"transactions": [
"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
]
}
Request parameters¶
| Name | In | Type | Presence | Meaning |
|---|---|---|---|---|
ZecSwap-Ticket |
header | string |
Optional | Send the ticket returned on acceptance for this swap’s relayer allowance. The wallet still signs and proves the requested action. |
Request body¶
object · ReverseAuthorization
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
swapId |
string · Hex32 |
Required | 32-byte escrow identifier. |
terms |
object · ForwardTerms |
Required | Escrow terms the relayer checks against the on-chain hash. |
deadline |
integer · UnixSeconds |
Required | Expiry of the signed authorization, in Unix seconds. |
signature |
string · EthereumSignature |
Required | 65-byte Ethereum authorization signature in r, s, v order. |
Fields of terms
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
maker |
string · EthereumAddress |
Required | Address on the token side. In reverse, this is the user's authorization address. |
token |
string · EthereumAddress |
Required | Ethereum address of the escrow token. |
amount |
string · DecimalUint128 |
Required | Escrowed amount in token base units. |
makerKey |
string · Hex64 |
Required | Public Pallas share for the token side. |
userKey |
string · Hex64 |
Required | Public Pallas share for the Zcash side. |
user |
string · EthereumAddress |
Required | Address on the Zcash side. In reverse, this is the maker's address. |
t0 |
integer · UnixSeconds |
Required | Ready deadline in Unix seconds. |
t1 |
integer · UnixSeconds |
Required | Refund boundary in Unix seconds. |
payoutNote |
string · Hex32 |
Required | Committed forward shield-note hash. Zero for a forward account payout or reverse escrow. |
Responses¶
HTTP 200¶
object · RelayerSent
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
transactions |
array of string · Hex32 |
Required | Ethereum transaction hashes known to the relayer. Some idempotent operations can return an empty list. |
Errors¶
| HTTP | Body | Meaning |
|---|---|---|
| 400 | object · ErrorResponse |
Malformed input or a request rejected for this swap. |
| 413 | object · ErrorResponse |
The request exceeds the service’s body limit. |
| 415 | object · ErrorResponse |
Use Content-Type: application/json. |
| 422 | object · ErrorResponse |
The JSON fields or encoded values do not match the request type. |
| 503 | object · ErrorResponse |
Temporarily unavailable, throttled, or waiting for a chain event. Respect Retry-After when present. Retry-After — Seconds to wait before retrying, when supplied. |
| Other | object · ErrorResponse |
Other service error. Read code and error. |
ErrorResponse fields
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
code |
string · ErrorCode |
Required | Machine-readable service error code. |
error |
string |
Required | Human-readable detail. |