Fund reverse escrow¶
Submit the wallet’s proved Relay Adapt funding transaction.
Endpoint
POST /relayer/v1/reverse/fund
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 fund-reverse.json.
cURL
curl -sS "https://api-testnet.veylor.cash/relayer/v1/reverse/fund" \
-H "ZecSwap-Ticket: ${SWAP_TICKET:?}" \
-H 'Content-Type: application/json' \
--data-binary @fund-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 · ReverseFunding
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
swapId |
string · Hex32 |
Required | 32-byte escrow identifier. |
chainId |
integer · Uint64 |
Required | EIP-155 chain ID of the settlement network. |
to |
string · EthereumAddress |
Required | Pinned V2 Relay Adapt contract. |
data |
string · HexData |
Required | Complete calldata of the locally proved Relay Adapt transaction. |
value |
string · DecimalUint128 |
Required | Native ETH value in wei. The sponsored funding route requires zero. |
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. |