Submit a signed gasless swap

Submits the signatures for a gasless swap quote from GET /swap/gasless. For HyperCore origin routes (e.g. Hyperliquid withdrawals), the quote returns the steps to sign in swapTxns[]. Have the user sign each step, then submit { swapTx, swapTxns, signaturesByStepId }. One signature per step, keyed by the step's stepId. Pass swapTx and swapTxns through from the quote unchanged. Across submits the transactions and covers the gas. Returns a depositId for tracking the deposit.

Origin support. Gasless quoting and submission are currently supported for HyperCore (Hyperliquid) as the origin chain (originChainId: 1337) — support for additional origin chains is coming soon. See the Hyperliquid Withdrawals Guide for a working example.

POST
/gasless/submit

Authorization

bearerAuth
AuthorizationBearer <token>

API key for authentication.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://across.to/api/gasless/submit" \  -H "Content-Type: application/json" \  -d '{    "swapTx": {      "ecosystem": "evm-gasless",      "chainId": 42161,      "to": "0x10D8b8DaA26d307489803e10477De69C0492B610",      "data": {        "type": "erc3009"      }    },    "signature": "0xabc..."  }'
{
  "depositId": "63138902050176194869835581561020090006750407517885256902905383053846970918917",
  "messageId": null,
  "id": "7fg9l-1780952860050-cde67e6bc61f"
}

{
  "type": "AcrossApiError",
  "code": "INVALID_PARAM",
  "status": 400,
  "message": "Invalid signature: unable to verify signature",
  "param": "signature",
  "id": "w8cbj-1780949503966-fe83ebbc58dd"
}

{
  "type": "AcrossApiError",
  "code": "FORBIDDEN_API_KEY",
  "status": 403,
  "message": "Sponsored gasless route not eligible for this API key"
}

{
  "type": "AcrossApiError",
  "status": 409,
  "message": "Another submit is in flight for this depositId; retry shortly"
}
{
  "type": "AcrossApiError",
  "code": "INTERNAL_SERVER_ERROR",
  "status": 500,
  "message": "Internal server error"
}
{
  "type": "AcrossApiError",
  "code": "NO_RELAYER_AVAILABLE",
  "status": 503,
  "message": "No gasless relayer available"
}