Skip to main content

Overview

Use the Gas API to calculate relayer fees and obtain the cryptographic signatures required by the CashmereCCTP contracts. Quotes are deterministic for the current block state and expire 100 seconds after issuance.

GET /getEcdsaSig_native

Generates an ECDSA signature for EVM contracts (transfer, transferWithPermit, transferV2, transferV2WithPermit).

Query Parameters

Example

Response Fields

Gas drops are not returned explicitly. When isNative=false, include your desired gasDropAmount in TransferParams and pass the same value to the contract.

GET /getEd25519Sig_native

Generates an Ed25519 signature for Solana, Aptos, or Sui transfers.

Query Parameters

Example

Message Layout

BCS-encoded fields (in order):
  1. Optional version (u8).
  2. Optional localDomain (u32) when isNative is provided.
  3. destinationDomain (u32).
  4. fee (u64).
  5. deadline (u64).
  6. Optional isNative (bool).
Reproduce this byte order on-chain before verifying the signature.

Token Pricing

Returns a JSON map of { domainId: priceInUsd } pulled from Redis.

WebSocket Updates

  • { "type": "fees", "data": { <sourceChain>: { fee: { <dest>: { native, usd } }, gas: { native, usd } } } }
  • { "type": "tokenPrices", "data": { <domainId>: "<price>" } }
Use the socket to keep frontends in sync without repeatedly polling the REST endpoints.

Failure Modes

Retries are usually safe after a brief delay if the issue is cache-related.