# Endpoints and JSON types

Use the endpoint index to look up a request, its response and possible errors. The type definitions below describe the JSON exchanged by the public testnet API. [API overview](https://docs.veylor.cash/api/) · [OpenAPI 3.1 file](https://docs.veylor.cash/openapi.yaml)

## Request a quote

Start with a forward quote to see the price of exchanging TAZ for tUSD. Its `amount` is a decimal *string* in token base units. Its `depositZat` is an *integer* in zatoshis. [Request, field types and example response](https://docs.veylor.cash/api/endpoints/quote-forward/)

## Read a swap response

Use the reverse status endpoint to follow an accepted return swap. The maker always includes `depositTxid`. Its value is `null` until the maker records the Zcash deposit. [Status fields, success and error responses](https://docs.veylor.cash/api/endpoints/get-reverse-status/)

## Error responses

Service errors include a machine-readable `code` and a human-readable `error`. Use `code` to decide what the client should do. For example, a lookup for an unknown reverse swap returns the following body.

```json title="404 · Unknown swap"
{
  "code": "unknownSwap",
  "error": "swap is unknown"
}
```

| HTTP | Meaning and next step |
| --- | --- |
| 400, 413, 415, 422 | Check the reason, body size, content type and field encodings. A malformed body or path uses `invalidRequest`. A valid request that fails a swap check can return `rejected`. |
| 402 | `feeRequired` on forward acceptance. If the open fee was already sent, wait for it to be mined and retry the same acceptance after `Retry-After`. |
| 404, 405 | Check the HTTP method, path and ID. An expired quote can return `unknownQuote`. |
| 409 | A private transfer or deposit conflicts with a previous transaction. Inspect the returned `transactions` hashes before retrying. [Conflict response](https://docs.veylor.cash/api-types/#relayerconflict) |
| 500, 503 | Check whether the previous operation landed. For an unavailable or busy service, respect `Retry-After` when present and resume with the saved swap. |

## Discovery

| Endpoint | Reference |
| --- | --- |
| `GET /maker/healthz` | [Maker health](https://docs.veylor.cash/api/endpoints/check-maker/) |
| `GET /maker/v1/info` | [Maker info](https://docs.veylor.cash/api/endpoints/get-maker-info/) |
| `GET /relayer/v1/terms` | [Relayer terms](https://docs.veylor.cash/api/endpoints/get-relayer-terms/) |

## Forward swaps

| Endpoint | Reference |
| --- | --- |
| `POST /maker/v1/quote` | [Request a forward quote](https://docs.veylor.cash/api/endpoints/quote-forward/) |
| `POST /maker/v1/quote/{quoteId}/accept` | [Accept a forward quote](https://docs.veylor.cash/api/endpoints/accept-forward/) |
| `POST /relayer/v1/claim` | [Submit a claim](https://docs.veylor.cash/api/endpoints/claim-forward/) |
| `POST /relayer/v1/claim/hold` | [Delegate a claim](https://docs.veylor.cash/api/endpoints/hold-forward-claim/) |
| `POST /relayer/v1/payout` | [Submit a payout](https://docs.veylor.cash/api/endpoints/pay-forward/) |
| `POST /relayer/v1/rescue` | [Recover a forward payout](https://docs.veylor.cash/api/endpoints/rescue-forward/) |

## Reverse swaps

| Endpoint | Reference |
| --- | --- |
| `POST /maker/v1/reverse/quote` | [Request a reverse quote](https://docs.veylor.cash/api/endpoints/quote-reverse/) |
| `POST /maker/v1/reverse/quote/{quoteId}/accept` | [Accept a reverse quote](https://docs.veylor.cash/api/endpoints/accept-reverse/) |
| `GET /maker/v1/reverse/swaps/{swapId}` | [Get swap status](https://docs.veylor.cash/api/endpoints/get-reverse-status/) |
| `POST /relayer/v1/reverse/fund` | [Fund reverse escrow](https://docs.veylor.cash/api/endpoints/fund-reverse/) |
| `POST /relayer/v1/reverse/ready` | [Mark escrow ready](https://docs.veylor.cash/api/endpoints/ready-reverse/) |
| `POST /relayer/v1/reverse/refund` | [Request a reverse refund](https://docs.veylor.cash/api/endpoints/refund-reverse/) |
| `POST /relayer/v1/reverse/refund-payout` | [Shield a refund](https://docs.veylor.cash/api/endpoints/pay-reverse-refund/) |
| `POST /relayer/v1/reverse/rescue` | [Recover a reverse refund](https://docs.veylor.cash/api/endpoints/rescue-reverse/) |

## Deposits and transfers

| Endpoint | Reference |
| --- | --- |
| `POST /relayer/v1/railgun/transact` | [Relay a private transfer](https://docs.veylor.cash/api/endpoints/relay-private-transfer/) |
| `POST /relayer/v1/deposits/shield` | [Shield a deposit](https://docs.veylor.cash/api/endpoints/shield-deposit/) |
| `POST /relayer/v1/deposits/rescue` | [Recover a deposit](https://docs.veylor.cash/api/endpoints/rescue-deposit/) |

## JSON types

### EthereumAddress

20-byte Ethereum address in hexadecimal.

Encoded as `string`.

### Hex32

32-byte value in hexadecimal.

Encoded as `string`.

### Hex64

64-byte value in hexadecimal.

Encoded as `string`.

### EthereumSignature

65-byte Ethereum signature in hexadecimal.

Encoded as `string`.

### HexData

Hexadecimal bytes with a 0x prefix.

Encoded as `string`.

### Uint32

JSON integer from 0 to 4294967295.

### Uint64

JSON integer from 0 to 18446744073709551615.

### UnixSeconds

Unix timestamp in seconds.

Encoded as `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64).

### DecimalUint128

Unsigned integer in decimal text, at most 340282366920938463463374607431768211455. Services emit digits without leading zeroes.

Encoded as `string`.

### ZcashNetwork

Allowed values are `testnet`, `mainnet`.

### ErrorCode

Allowed values are `invalidRequest`, `rejected`, `unknownQuote`, `unknownSwap`, `unavailable`, `watchtowerUnavailable`, `internal`, `notFound`, `methodNotAllowed`, `tokenRequired`, `feeRequired`, `alreadySpent`, `conflict`.

### ErrorResponse

Structured service error.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `code` | `string` · [ErrorCode](https://docs.veylor.cash/api-types/#errorcode) | Required | Machine-readable service error code. |
| `error` | `string` | Required | Human-readable detail. |

### MakerInfo

Deployment and capabilities served by this maker.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `apiVersion` | `integer` · [Uint32](https://docs.veylor.cash/api-types/#uint32) | Required | API version number. |
| `maker` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Maker's Ethereum address. |
| `chainId` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | EIP-155 chain ID of the settlement network. |
| `contract` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the settlement contract. |
| `contractKind` | `string` | *Optional* | Contract family reported by the deployment. The window-based client expects windows. |
| `minWindow` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | *Optional* | Minimum interval required by the contract between opening and t0, and between t0 and t1, in seconds. |
| `lateWindow` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | *Optional* | Length of the forward maker's refund window after t1, in seconds. |
| `token` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the escrow token. |
| `zcashNetwork` | `string` · [ZcashNetwork](https://docs.veylor.cash/api-types/#zcashnetwork) | Required | Network of the Zcash leg. |
| `reverseEnabled` | `boolean` | Required | Whether this maker accepts reverse quotes. |

### ForwardQuoteRequest

Request a maker quote for Zcash to the escrow token.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `units` | `integer` · [Uint32](https://docs.veylor.cash/api-types/#uint32) | Required | Number of maker denominations to receive. On this testnet deployment 1000000 units is 1 tUSD. Request a quote to check the current size limits. |
| `payout` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Nonzero Ethereum account that authorizes the payout. For the account route, use the receiving signer. |
| `payoutNote` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) or `null` | *Optional* | Hash committing to the shield note for a RAILGUN payout. Omit for an account payout. |

### ForwardQuote

Maker quote fields shared by both directions. Amounts refer to the escrow token and the joint Zcash deposit.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `quoteId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | Identifier used in the acceptance URL. |
| `maker` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Maker's Ethereum address. |
| `makerShare` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | Maker's public Pallas share, encoded as two 32-byte affine coordinates. |
| `makerProof` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | Proof that the maker knows its share. |
| `chainId` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | EIP-155 chain ID of the settlement network. |
| `contract` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the settlement contract. |
| `token` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the escrow token. |
| `amount` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Gross escrow value in token base units. |
| `depositZat` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Zcash amount payable to the joint account, in zatoshis (100,000,000 per coin). |
| `expiresAt` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Quote expiry in Unix seconds. |
| `networkCost` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | *Optional* | Maker's estimated network cost already included in the quote, in token base units. |
| `openFee` | `object` · [OpenFee](https://docs.veylor.cash/api-types/#openfee) | *Optional* | A forward maker may require this separate Zcash payment before acceptance. |

### OpenFee

One-time, nonrefundable Zcash opening fee for this quote.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `zat` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Fee in zatoshis. |
| `address` | `string` | Required | Quote-specific unified address on the maker's Zcash network with an Orchard-only receiver. |

### ForwardAcceptance

Client-generated material used to open either direction. The maker uses the viewing material to recognize the joint Zcash deposit.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `userShare` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | User's public Pallas share, encoded as two 32-byte affine coordinates. |
| `userProof` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | Proof of knowledge of the user's swap share. |
| `viewingKeys` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | 64-byte Zcash viewing material for this joint account only. |

### ForwardAccepted

Acceptance receipt. Persist the swap ID, deadlines and ticket before funding.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `swapId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte escrow identifier. |
| `t0` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | End of the initial ready window, in Unix seconds. |
| `t1` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Start of the refund window for a ready swap, in Unix seconds. |
| `lateWindow` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | *Optional* | Length of the forward maker's refund window after t1, in seconds. |
| `ticket` | `string` | Required | Opaque credential for this swap. Supply it in the ZecSwap-Ticket header on protected relay routes. |

### ForwardTerms

Exact escrow terms read back from the contract. The token and Zcash roles switch when the direction reverses.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `maker` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Address on the token side. In reverse, this is the user's authorization address. |
| `token` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the escrow token. |
| `amount` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Escrowed amount in token base units. |
| `makerKey` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | Public Pallas share for the token side. |
| `userKey` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | Public Pallas share for the Zcash side. |
| `user` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Address on the Zcash side. In reverse, this is the maker's address. |
| `t0` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Ready deadline in Unix seconds. |
| `t1` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Refund boundary in Unix seconds. |
| `payoutNote` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | Committed forward shield-note hash. Zero for a forward account payout or reverse escrow. |

### ReverseQuoteRequest

Request a quote to send escrow tokens from RAILGUN and receive Zcash.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `units` | `integer` · [Uint32](https://docs.veylor.cash/api-types/#uint32) | Required | Number of maker denominations to escrow. Public testnet uses 1000000 units per tUSD and the same size limits as forward quotes. |
| `user` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Fresh Ethereum authorization address for this swap. |
| `refundNote` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | Hash committing to the RAILGUN note that will receive any token refund. |

### ReverseQuote

Business terms for the reverse swap and the deadlines imposed by the escrow.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `terms` | `object` · [ForwardQuote](https://docs.veylor.cash/api-types/#forwardquote) | Required | Maker quote fields. Here amount is the token input and depositZat is the maker's gross Zcash deposit. |
| `user` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | User's swap authorization address. |
| `refundNote` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | Shield-note commitment from the request. |
| `fundingDeadline` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Last time allowed by the signed opening authorization, in Unix seconds. |
| `readyDeadline` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | The ready authorization must land before this time (t0). |
| `refundAfter` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | From this time (t1), the user may refund a ready reverse escrow. |

### ReverseAuthorization

Signed authorization to mark a reverse escrow ready after the client verifies the joint Zcash deposit.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `swapId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte escrow identifier. |
| `terms` | `object` · [ForwardTerms](https://docs.veylor.cash/api-types/#forwardterms) | Required | Escrow terms the relayer checks against the on-chain hash. |
| `deadline` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Expiry of the signed authorization, in Unix seconds. |
| `signature` | `string` · [EthereumSignature](https://docs.veylor.cash/api-types/#ethereumsignature) | Required | 65-byte Ethereum authorization signature in r, s, v order. |

### ReverseFunding

Proved RAILGUN call that funds the quoted reverse escrow.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `swapId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte escrow identifier. |
| `chainId` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | EIP-155 chain ID of the settlement network. |
| `to` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Pinned V2 Relay Adapt contract. |
| `data` | `string` · [HexData](https://docs.veylor.cash/api-types/#hexdata) | Required | Complete calldata of the locally proved Relay Adapt transaction. |
| `value` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Native ETH value in wei. The sponsored funding route requires zero. |

### ReverseRefund

Refund authorization for an eligible reverse escrow and the signed shielding payout.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `swapId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte escrow identifier. |
| `terms` | `object` · [ForwardTerms](https://docs.veylor.cash/api-types/#forwardterms) | Required | Escrow terms the relayer checks against the on-chain hash. |
| `secret` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | User's 32-byte swap share. Supply only after the client verifies that refund is safe. |
| `payout` | `object` · [RelayerPayout](https://docs.veylor.cash/api-types/#relayerpayout) | Required | Signed payout for the note committed at funding. |

### ReversePhase

Allowed values are `awaitingFunding`, `confirmingFunding`, `sendingZec`, `awaitingReady`, `claiming`, `zecAvailable`, `refundAvailable`, `refunding`, `refunded`, `expired`.

### ReverseStatus

Maker's reported progress. Verify the escrow and spendable Zcash independently before authorizing settlement.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `swapId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte escrow identifier. |
| `phase` | `string` · [ReversePhase](https://docs.veylor.cash/api-types/#reversephase) | Required | Latest progress recorded by the maker. |
| `depositTxid` | `string` or `null` | Required | Hex Zcash transaction ID with no 0x prefix, or null until the maker records a deposit. |
| `readyDeadline` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Ready deadline (t0) in Unix seconds. |
| `refundAfter` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Ready escrow refund boundary (t1) in Unix seconds. |

### RelayerTerms

Current swap payout fee and optional services offered by the relayer.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `relayer` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the swap relayer. |
| `chainId` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | EIP-155 chain ID of the settlement network. |
| `contract` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the settlement contract. |
| `contractKind` | `string` | *Optional* | Contract family reported by the deployment. The window-based client expects windows. |
| `minWindow` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | *Optional* | Minimum interval required by the contract between opening and t0, and between t0 and t1, in seconds. |
| `lateWindow` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | *Optional* | Length of the forward maker's refund window after t1, in seconds. |
| `fee` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Swap payout fee in escrow-token base units. |
| `feeExpiresAt` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | *Optional* | Last time the relayer honors the advertised fee or rate, in Unix seconds. |
| `reverseFunding` | `object` · [ReverseFundingTerms](https://docs.veylor.cash/api-types/#reversefundingterms) | *Optional* | Present when this relayer sponsors initial reverse funding. |
| `railgunSends` | `object` · [RailgunSendTerms](https://docs.veylor.cash/api-types/#railgunsendterms) | *Optional* | Present when this relayer broadcasts RAILGUN transfers and withdrawals. |
| `deposits` | `object` · [DepositTerms](https://docs.veylor.cash/api-types/#depositterms) | *Optional* | Present when this relayer shields tokens received at public deposit addresses. |

### DepositTerms

Fee schedule and authorization limits for public-token deposits.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `contract` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Deposits contract the authorization must pay. |
| `relayer` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum account bound to the deposit fee authorization. |
| `token` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the escrow token. |
| `fee` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Base portion in token units. The total is fee plus ceil(value × feeBps / 10000). A rescue pays the base fee alone. |
| `feeBps` | `integer` · [Uint32](https://docs.veylor.cash/api-types/#uint32) | Required | Variable portion of the deposit fee, in basis points. |
| `feeExpiresAt` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | *Optional* | Last time the relayer honors the advertised fee or rate, in Unix seconds. |
| `minValue` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Minimum deposit in token base units. |
| `maxValidity` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Maximum number of seconds from now to validBefore. |
| `maxGasPriceWei` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Maximum accepted gas price in wei per unit of gas. |

### RailgunSendTerms

Relayer fee and transaction limits for private sends and withdrawals.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `railgunAddress` | `string` | Required | Relayer's 0zk address for the broadcaster fee note. |
| `railgunProxy` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Pinned RAILGUN proxy the transaction calls. |
| `token` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Token used to pay the fee. |
| `fee` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Minimum broadcaster fee in token base units. |
| `feePerUnitGas` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | *Optional* | Rate in token base units per 10^18 wei of gas cost, including the relayer's margin. |
| `feeExpiresAt` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | *Optional* | Last time the relayer honors the advertised fee or rate, in Unix seconds. |
| `maxGasLimit` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Maximum gas units the relayer will submit for one transaction. |
| `maxGasPriceWei` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Maximum accepted gas price in wei per unit of gas. |
| `maxCalldataBytes` | `integer` | Required | Maximum accepted calldata size in bytes. |

### ReverseFundingTerms

Sponsorship terms for RAILGUN funding of a reverse swap.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `relayAdapt` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | V2 Relay Adapt contract used for funding. |
| `token` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the escrow token. |
| `maker` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Maker whose escrow can be funded. |
| `maxGasLimit` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Maximum gas units the relayer will submit for one transaction. |
| `maxGasPriceWei` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Maximum accepted gas price in wei per unit of gas. |
| `maxCalldataBytes` | `integer` | Required | Maximum accepted calldata size in bytes. |
| `fee` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Fee the funding transaction pays the relayer in escrow-token base units. |

### RelayerClaim

Forward claim and signed payout assembled by the wallet.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `swapId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte escrow identifier. |
| `terms` | `object` · [ForwardTerms](https://docs.veylor.cash/api-types/#forwardterms) | Required | Escrow terms the relayer checks against the on-chain hash. |
| `secret` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | User's 32-byte swap share. Supply only when the reference client's checks allow its release. |
| `payout` | `object` · [RelayerPayout](https://docs.veylor.cash/api-types/#relayerpayout) | Required | Signed payout bound to this swap. |

### RelayerHeld

Result of accepting an authorized claim to broadcast later.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `held` | `boolean` | Required | True when the relayer has retained the claim. |

### RelayerPayout

Authorization to shield a settled payout, less the signed fee.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `swapId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte escrow identifier. |
| `terms` | `object` · [ForwardTerms](https://docs.veylor.cash/api-types/#forwardterms) | Required | Escrow terms the relayer checks against the on-chain hash. |
| `note` | `object` · [RelayerNote](https://docs.veylor.cash/api-types/#relayernote) | Required | Shield note that must match the escrow's commitment. |
| `fee` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Authorized fee in escrow-token base units. |
| `signature` | `string` · [EthereumSignature](https://docs.veylor.cash/api-types/#ethereumsignature) | Required | 65-byte Ethereum authorization signature in r, s, v order. |

### RelayerRescue

Signed instruction to shield tokens RAILGUN returned to this swap's vault.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `swapId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte escrow identifier. |
| `terms` | `object` · [ForwardTerms](https://docs.veylor.cash/api-types/#forwardterms) | Required | Escrow terms the relayer checks against the on-chain hash. |
| `note` | `object` · [RelayerNote](https://docs.veylor.cash/api-types/#relayernote) | Required | RAILGUN shield destination and ciphertext. |
| `fee` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Authorized relayer fee in escrow-token base units. |
| `nonce` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Current rescue nonce for this swap. |
| `deadline` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Expiry of the signed authorization, in Unix seconds. |
| `signature` | `string` · [EthereumSignature](https://docs.veylor.cash/api-types/#ethereumsignature) | Required | 65-byte Ethereum authorization signature in r, s, v order. |

### RelayerNote

RAILGUN shield note and its ciphertext.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `npk` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte note public key. |
| `encryptedBundle` | array of `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) (exactly 3) | Required | Three ordered 32-byte ciphertext words. |
| `shieldKey` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | 32-byte shield encryption public key. |

### RailgunTransact

Locally proved RAILGUN transfer or withdrawal submitted for broadcast.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `chainId` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | EIP-155 chain ID of the settlement network. |
| `to` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Pinned RAILGUN proxy. |
| `data` | `string` · [HexData](https://docs.veylor.cash/api-types/#hexdata) | Required | Calldata for a plain RAILGUN transact call. |
| `value` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Native ETH value in wei. The relayed transfer route requires zero. |

### RelayerConflict

Conflict details, including any related transaction hashes the relayer knows.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `code` | `string` · [ErrorCode](https://docs.veylor.cash/api-types/#errorcode) | Required | Machine-readable cause, such as alreadySpent or conflict. |
| `error` | `string` | Required | Human-readable detail. |
| `transactions` | array of `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | Known Ethereum transaction hashes. Can be empty. |

### ShieldDeposit

Signed EIP-3009 token transfer from a public deposit address into its shield vault.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `chainId` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | EIP-155 chain ID of the settlement network. |
| `contract` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Pinned Deposits contract. |
| `from` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Public deposit address that signed the authorization. |
| `value` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Token amount to shield before fees, in base units. |
| `validAfter` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Lower time bound of the token authorization, in Unix seconds. |
| `validBefore` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Authorization expiry in Unix seconds. |
| `note` | `object` · [RelayerNote](https://docs.veylor.cash/api-types/#relayernote) | Required | RAILGUN shield destination and ciphertext. |
| `fee` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Authorized relayer fee in token base units. |
| `signature` | `string` · [EthereumSignature](https://docs.veylor.cash/api-types/#ethereumsignature) | Required | EIP-3009 ReceiveWithAuthorization signature from the deposit address. |

### RescueDeposit

Signed instruction to shield a returned deposit again from its vault.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `chainId` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | EIP-155 chain ID of the settlement network. |
| `contract` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Pinned Deposits contract. |
| `from` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Public deposit address that controls the rescue. |
| `note` | `object` · [RelayerNote](https://docs.veylor.cash/api-types/#relayernote) | Required | RAILGUN shield destination and ciphertext. |
| `fee` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Authorized relayer fee in token base units. |
| `nonce` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Rescue nonce for the deposit address. |
| `deadline` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Expiry of the signed authorization, in Unix seconds. |
| `signature` | `string` · [EthereumSignature](https://docs.veylor.cash/api-types/#ethereumsignature) | Required | 65-byte Ethereum authorization signature in r, s, v order. |

### RelayerSent

Transaction submission result. Confirm settlement on chain.

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `transactions` | array of `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | Ethereum transaction hashes known to the relayer. Some idempotent operations can return an empty list. |
