Skip to content

Relay a private transfer

Submit a proved private send or withdrawal using the advertised fee terms.

Endpoint
POST /relayer/v1/railgun/transact

Examples

Save the request prepared by your wallet as relay-private-transfer.json.

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

Request body

object · RailgunTransact

Field JSON type Presence Meaning
chainId integer · Uint64 Required EIP-155 chain ID of the settlement network.
to string · EthereumAddress Required Pinned RAILGUN proxy.
data string · HexData Required Calldata for a plain RAILGUN transact call.
value string · DecimalUint128 Required Native ETH value in wei. The relayed transfer 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.
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.