Skip to main content
This guide demonstrates complete deposit flows using the unified deposit API, which automatically detects the optimal authorization method (permit vs approval).
Breaking change in v0.5.0: Transaction functions now use vaultName instead of yieldType. Discover account names with getVaultsByConfig() before making deposit calls. See the migration guide.
The unified deposit API handles three authorization paths automatically:

Prerequisites

  • Node.js 22+
  • Amplify API key from Paxos Labs
  • SDK initialized with initAmplifySDK()

Installation

Imports

Step 0: Fetch Available Accounts

Retrieve all accounts accessible with your API key. This is the data you need to build an account selector for your users.
You can also narrow the list with filters:

Step 1: Select an Account

Once the user picks an account from your UI, record its vault.name — all subsequent transaction calls require it.

Step 2: Check Authorization

Determine the optimal authorization method for this deposit. The SDK auto-detects permit support.

Step 3: Execute Deposit

After authorization, prepare and submit the deposit transaction.

Complete Examples

useDeposit Hook

Deposit Component

Customization

Custom Slippage

Distributor Code

Force Approval Flow

Troubleshooting

For more details on the deposit API, see Deposit Workflow.