Skip to main content

Overview

Every Cashmere transfer needs a fee quote signed by the Gas API: the contracts check the signature before they burn any USDC. A quote covers one route, fee mode and CCTP version, and expires about 100 seconds after it is issued.

GET /getEcdsaSig_native

An ECDSA quote for the EVM contracts: transferV2 and transferV2WithPermit, or the V1 transfer and transferWithPermit.

Query Parameters

Example

Response Fields

Gas drop is not offered: pass gasDropAmount: 0. With isNative=true, send at least fee as the transaction’s value (the contract refunds any excess); otherwise the contract takes the fee out of amount.

GET /getEd25519Sig_native

An Ed25519 quote for the Solana program and the Aptos and Sui modules.

Query Parameters

Example

Response Fields

Message Layout

Little-endian, 26 bytes (25 without version):
  1. version (u8), only if you passed version
  2. localDomain (u32)
  3. destinationDomain (u32)
  4. fee (u64)
  5. deadline (u64)
  6. isNative (bool)
The Solana program reads these bytes from the Ed25519Program instruction placed before the transfer. The Aptos and Sui modules rebuild them as the BCS encoding of TransferParamsV2 and verify the signature you pass. See Signed Payloads.

Token Pricing

The USD price of each chain’s gas token, as decimal strings keyed by chain name:

WebSocket Updates

The socket sends the current fees and token prices as soon as you connect:
  • { "type": "fees", "data": { <sourceChain>: { fee: { <destinationChain>: { native, usd } }, gas: { native, usd } } } }
  • { "type": "tokenPrices", "data": { <chain>: "<USD price>" } }
Keys are chain names, not domain IDs. native is in the source chain’s smallest native unit, and usd in USDC base units ("190000" is 0.19 USDC).
Use the socket for display only: a transfer still needs a signed quote from the REST endpoints.

Failure Modes

The Gas API doesn’t answer 400. Check the parameters first, then retry with backoff, and never sign with an expired quote.