Skip to main content
Copy this page into your AI coding assistant (Cursor, Copilot, Claude, etc.) for accurate Amplify REST calldata API completions — the path that returns ready-to-sign EVM transactions without requiring the TypeScript SDK.
This page is a condensed, single-file reference for the REST calldata API. For full documentation with per-language tabs and step-by-step walkthroughs, see the API Calldata Integration guide.
Using a skill-aware tool? The same content is exposed as the amplify-earn-api-calldata Agent Skill and is auto-discovered at /.well-known/agent-skills/index.json. Prefer the skill in agents that support them — it loads progressively. Use this page when you need to paste a single reference into a general-purpose AI chat.

When to Use

  • Backend transaction builders in any language (Python, Go, Rust, Java, Node)
  • Custodial wallets, HSMs, multisig services — fetch calldata, sign elsewhere
  • Non-JS stacks that can’t consume @paxoslabs/amplify-sdk
  • Prototyping with curl before application code
For the TypeScript SDK with built-in wallet hooks, see the SDK AI Reference. For calling contracts directly without the API, see the Contract AI Reference.

Base URL & Authentication

  • Obtain a key at https://app.paxoslabs.com.
  • Send the key as a header — never as a query param (it ends up in access logs).

OpenAPI Spec

Endpoint Map

Transaction preparation

Discovery

Order status

Analytics

Display helpers

On-/v2/amplify/vaults (no dedicated endpoint needed): depositSupplyCap, minimumWithdrawalOrderSize, assets[].depositFees, assets[].withdrawFees, assets[].withdrawalSLAs.

Response Format (calldata endpoints only)

/v2/amplify/deposit, /v2/amplify/withdraw, and /v2/amplify/withdraw/cancel accept a responseFormat query parameter:

Filter Syntax (filter query parameter)

  • URL-encode once: %3D = =, %20 = space.
  • Separate query params (chainId=1&inDeprecation=false) are ignored.

Discovery — GET /v2/amplify/vaults

Single aggregated endpoint. Params (all optional): filter (flags: name, chainId, inDeprecation, requiresKyt), pageSize (1–100, default 25), pageToken.

Field → Transaction Parameter Mapping

Deposit Flow

Three authorization branches handled by one API:

Step 1 — Detect authorization

GET /v2/core/permit Response variants:

Step 2 — Satisfy authorization

Step 3 — Prepare deposit calldata

GET /v2/amplify/deposit Response (encoded):

Step 4 — Sign & broadcast

Send { to, data, value }. value is always "0" for ERC-20 deposits.

Reference implementation (Node / viem)

Withdrawal Flow

Withdrawals are asynchronous. Submitting an order locks shares in the WithdrawQueue; the protocol processes the queue off-cycle and transfers the asset on completion.

Step 1 — Approve share spending

Standard ERC-20 approve(spender, amount):
  • Token contract (to): boringVaultAddress
  • spender: withdrawQueueAddress
  • amount: share amount to redeem (always 18 decimals)
Wait for a receipt before step 2.

Step 2 — Prepare withdrawal calldata

GET /v2/amplify/withdraw The server picks submitOrder vs submitOrderAndProcessAll automatically based on the account’s on-chain RolesAuthority configuration — there is no client-side atomic flag. Response:

Step 3 — Sign & submit

Broadcast. On confirmation, shares are locked under a new orderIndex.

Step 4 — Poll order status

Do not filter on status=PENDING while polling — orders disappear the moment they reach a terminal state and you lose visibility into the outcome. Filter on userAddress + vaultAddress (and optionally chainId).

Reference implementation (Node / viem)

Cancellation Flow

Only PENDING orders are cancellable. The wallet submitting the cancel tx must be the same address that submitted the original order (msg.sender enforced on-chain).

Step 1 — Find orderIndex

orderIndex is a decimal string — pass it verbatim; never coerce to a JS number.

Step 2 — Prepare cancel calldata

GET /v2/amplify/withdraw/cancel Response:

Step 3 — Sign & broadcast

Send from the same wallet that submitted the order. On confirmation, locked shares return to that wallet.

Display Helpers (read-only)

Most display data is returned inline on /v2/amplify/vaults (see Discovery above). Three dedicated helpers cover what isn’t on the discovery response: fee preview for a specific redemption, up-to-the-block supply-cap utilization, and a user’s current position. Fields already on /v2/amplify/vaults (no dedicated endpoint): Client caching of 10–30s is safe; invalidate after any of the caller’s own deposits, withdrawals, or cancellations.

Error Envelope

Retries: 429 and 503 are safe. 400, 401, 403, 404 are deterministic — do not retry without changing inputs.

Common Gotchas

Supported Chains

Canonical Docs