Skip to content

Recover a deposit

Shield tokens returned to the deposit address’s vault.

Endpoint
POST /relayer/v1/deposits/rescue

Examples

Save the request prepared by your wallet as rescue-deposit.json.

cURL
curl -sS "https://api-testnet.veylor.cash/relayer/v1/deposits/rescue" \
  -H 'Content-Type: application/json' \
  --data-binary @rescue-deposit.json
HTTP 200
{
  "transactions": [
    "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  ]
}

Request body

object · RescueDeposit

Field JSON type Presence Meaning
chainId integer · Uint64 Required EIP-155 chain ID of the settlement network.
contract string · EthereumAddress Required Pinned Deposits contract.
from string · EthereumAddress Required Public deposit address that controls the rescue.
note object · RelayerNote Required RAILGUN shield destination and ciphertext.
fee string · DecimalUint128 Required Authorized relayer fee in token base units.
nonce integer · Uint64 Required Rescue nonce for the deposit address.
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 note
Field JSON type Presence Meaning
npk string · Hex32 Required 32-byte note public key.
encryptedBundle array of string · Hex32 (exactly 3) Required Three ordered 32-byte ciphertext words.
shieldKey string · Hex32 Required 32-byte shield encryption public key.

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.
409 object · RelayerConflict A conflicting or already spent authorization may have transaction hashes to reconcile.
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.
RelayerConflict fields
Field JSON type Presence Meaning
code string · ErrorCode Required Machine-readable cause, such as alreadySpent or conflict.
error string Required Human-readable detail.
transactions array of string · Hex32 Required Known Ethereum transaction hashes. Can be empty.