Skip to main content
This guide walks through the complete deposit flow using REST API calls: discover an account, detect the authorization method, prepare calldata, sign, and submit the transaction. The unified deposit API handles three authorization paths automatically:

Prerequisites

  • A Paxos Labs API key
  • An EVM-compatible signer (private key, HSM, or wallet service)
  • An HTTP client library for your language

Step 0: Fetch Available Accounts

Retrieve all accounts accessible with your API key. Accounts are grouped by name, with a deployments[] array per chain. Record boringVaultAddress, chainId, and baseTokenAddress for the deployment you want to deposit into.
From the response, pick an account and note these fields from the matching deployments[i] entry:

Step 1: Check Authorization

GET /v2/core/permit detects whether the deposit token supports EIP-2612 permits, requires a standard ERC-20 approval, or already has sufficient allowance.

Parameters

Response Variants

The response method field tells you which path to follow: permit — Gas-efficient off-chain signature (EIP-2612). Single transaction, no separate approval needed.
approval — Standard ERC-20 approve() required before depositing.
already_approved — Sufficient allowance exists. Skip directly to the deposit.

Step 2: Handle Authorization

Permit Path

Sign the EIP-712 typed data from permitData using eth_signTypedData_v4 (or your library’s equivalent), then include the signature in the deposit request.

Approval Path

Send the approvalTransaction.encoded calldata as a transaction to the deposit token contract address (tokenAddress from step 1). Wait for confirmation, then proceed to the deposit.

Already Approved Path

Skip directly to step 3.

Step 3: Prepare Deposit Calldata

GET /v2/amplify/deposit returns the transaction object for the deposit.

Parameters

Response

The abi, functionName, and args fields are only present when responseFormat is full or structured. See Authentication for details.

Step 4: Sign and Submit

Send the transaction using your signer or wallet infrastructure:
  • to — the contract address to call
  • data — the ABI-encoded calldata (when using encoded or full format)
  • value — ETH to send (usually "0" for ERC-20 deposits)

Complete Examples

Error Responses