Skip to main content

Overview

Cashmere does not expose a custodial /transfer REST endpoint. Transfers happen on-chain using the smart contract interfaces, powered by fees and signatures generated via the Gas API. The high-level flow:
  1. Fetch fees and signatures from the Gas API (/getEcdsaSig_native or /getEd25519Sig_native).
  2. Populate the appropriate TransferParams / TransferV2Params.
  3. Call the contract on the origin chain.
  4. Monitor settlement using the Monitoring API (/transactions or /transactionsmainnet).

Step-by-Step (EVM)

  • 1. Quote
  • 2. Prepare Params
  • 3. Send Tx
const res = await fetch(
  'https://gas.cashmere.exchange/getEcdsaSig_native?' +
    new URLSearchParams({
      localDomain: '0',          // Ethereum
      destinationDomain: '3',    // Arbitrum
      isV2: 'true',
      isNative: 'false',
    })
);
const quote = await res.json();
Quotes expire in ~100 seconds. Submit the transaction immediately after fetching the signature.
Circle publishes recommended minimumFee values per domain via https://iris-api.circle.com/v2/burn/USDC/fees/{sourceDomainId}/{destDomainId}. Align maxFee with the returned value for your selected finalityThreshold (1000 for Fast, 2000 for Normal) before submitting transferV2* transactions.Bridging into Solana? The recipient must be the hex-encoded USDC ATA for the destination wallet and solanaOwner must contain that wallet’s 32-byte public key.

Step-by-Step (Solana)

  1. Fetch an Ed25519 signature (version=2 for transfer_v2 routes).
  2. Convert the destination Solana wallet into its USDC Associated Token Account (ATA) and encode both ATA + owner as 32-byte hex.
  3. Add an Ed25519Program.createInstructionWithPublicKey instruction using the quote payload, then call transfer_v2 with the same fee/deadline values and required PDAs (see Smart Contracts guide for the full account list).

Permit Variants

  • EVM transferWithPermit / transferV2WithPermit accept a PermitParams struct. Sign EIP-2612 locally, then call the contract with the same Gas API response.
  • Non-EVM chains do not support permit flows; approval/revocation is handled by their native token standards.

Monitoring Settlement

EndpointDescription
GET https://kapi.cashmere.exchange/transactionsCombined testnet dataset.
GET https://kapi.cashmere.exchange/transactionsmainnetProduction transactions (supports cursor pagination and timestamp filters).
GET https://gas.cashmere.exchange/subscribeWebSocket notifications for fee updates (no settlement data).
The transaction payload includes relayer_fee, gas_drop_amount, destination_tx_hash, and status fields you can use for dashboards or reconciliation.

Common Pitfalls

  • Signature mismatch – Verify that isV2, isNative, and the domain IDs match the contract function you intend to call.
  • Allowance errors – When isNative=false, approve amount + gasDropAmount USDC.
  • Native fee shortfall – When isNative=true, attach fee + gasDropAmount wei as msg.value.
  • Expired deadline – Fetch a fresh signature if the transaction is not broadcast within the 100-second validity window.