Skip to content

Submit a claim

Submit the client’s authorized claim and shielded payout when claimable.

Endpoint
POST /relayer/v1/claim

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 claim-forward.json.

cURL
curl -sS "https://api-testnet.veylor.cash/relayer/v1/claim" \
  -H "ZecSwap-Ticket: ${SWAP_TICKET:?}" \
  -H 'Content-Type: application/json' \
  --data-binary @claim-forward.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 · RelayerClaim

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.
secret string · Hex32 Required User's 32-byte swap share. Supply only when the reference client's checks allow its release.
payout object · RelayerPayout Required Signed payout bound to this swap.
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.
Fields of payout
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.
note object · RelayerNote Required Shield note that must match the escrow's commitment.
fee string · DecimalUint128 Required Authorized fee in escrow-token base units.
signature string · EthereumSignature Required 65-byte Ethereum authorization signature in r, s, v order.

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.