Skip to main content
All notable changes to the Amplify SDK are documented here. This project adheres to Semantic Versioning.

Latest Release

0.5.0
2026-03-18

Breaking Changes

This release contains breaking changes. All transaction and display helper functions now identify vaults by vaultName instead of yieldType. Review the migration steps below before upgrading.
ChangeBefore (v0.4.2)After (v0.5.0)
Vault identifier in transaction functionsyieldType: YieldTypevaultName: string
Vault identifier in display helpersyieldType: YieldTypevaultName: string
Vault discoveryImplicit (SDK resolved internally)Explicit via getVaultsByConfig()
Withdrawal asset discoveryNot availablegetWithdrawSupportedAssets()
Vault fetchingfetchVaults()getVaults()
Asset fetchingfetchSupportedAssets()getSupportedAssets()
Affected functions — the yieldType parameter has been replaced by vaultName in all of the following:
CategoryFunctions
DepositprepareDepositAuthorization, prepareDeposit, prepareDepositTxData, prepareDepositPermitSignature, prepareDepositWithPermitTxData, prepareApproveDepositTokenTxData
WithdrawalprepareWithdrawalAuthorization, prepareWithdrawal, prepareWithdrawOrderTxData, prepareApproveWithdrawOrderTxData, prepareCancelWithdrawOrderTxData
DisplaygetMinimumMint, getWithdrawalFee, getMinimumWithdrawalOrderSize

New Features

  • getVaults() — Renamed from fetchVaults(). Same cache-first behavior, new name for consistency.
  • getSupportedAssets() — Renamed from fetchSupportedAssets(). Same cache-first behavior, new name for consistency.
  • getVaultsByConfig() — Multi-filter vault discovery. Filter by yieldType, chainId, depositAssetAddress, withdrawAssetAddress, and settlementAssetAddress.
  • getWithdrawSupportedAssets() — Fetch all supported withdrawal assets grouped by token with their available vaults.
  • vaultName parameter on display helpersgetVaultAPY, getVaultTVL, and getWithdrawalRequests now accept vaultName as an alternative to vaultAddress.
  • Cache management — Fully documented: initializeCache(), getCache(), refreshVaultCache(), isCacheReady(), waitForCacheReady().

Migration Guide

Why this change?

In v0.4.2, yieldType served as the vault identifier. This worked when each yield type mapped to a single vault per chain, but broke down as multiple vaults with the same yield type launched on the same chain. The vaultName identifier is unique per vault and future-proof.The new pattern is: discover → then transact.
// 1. Discover (once, at app startup or on chain/asset change)
const [vault] = await getVaultsByConfig({
  yieldType: YieldType.CORE,
  chainId: 1,
  depositAssetAddress: USDC,
})

// 2. Transact (using the vault's name)
await prepareDeposit({
  vaultName: vault.name,
  depositAsset: USDC,
  depositAmount: '1000',
  to: userAddress,
  chainId: 1,
})
Add a call to getVaultsByConfig() wherever you previously passed yieldType directly to a transaction function. Cache the result for the session.
import { getVaultsByConfig, YieldType } from '@paxoslabs/amplify-sdk'

// Before — no discovery step needed
// After  — discover the vault first
const [vault] = await getVaultsByConfig({
  yieldType: YieldType.CORE,
  chainId: 1,
  depositAssetAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
})

// vault.name is used in all subsequent calls
Replace yieldType with vaultName in every deposit function call.
// Before (v0.4.2)
await prepareDepositTxData({
  yieldType: YieldType.CORE,
  depositAsset: '0x...',
  depositAmount: '1000',
  to: userAddress,
  chainId: 1,
})

// After (v0.5.0)
await prepareDepositTxData({
  vaultName: vault.name,
  depositAsset: '0x...',
  depositAmount: '1000',
  to: userAddress,
  chainId: 1,
})
The same change applies to:
  • prepareDepositAuthorization()
  • prepareDeposit()
  • prepareDepositPermitSignature()
  • prepareDepositWithPermitTxData()
  • prepareApproveDepositTokenTxData()
// Before (v0.4.2)
await prepareWithdrawalAuthorization({
  yieldType: 'CORE',
  wantAsset: USDC,
  withdrawAmount: '1.0',
  userAddress,
  chainId: 1,
})

// After (v0.5.0)
const [vault] = await getVaultsByConfig({ yieldType: 'CORE', chainId: 1 })

await prepareWithdrawalAuthorization({
  vaultName: vault.name,
  wantAsset: USDC,
  withdrawAmount: '1.0',
  userAddress,
  chainId: 1,
})
The same change applies to:
  • prepareWithdrawal()
  • prepareWithdrawOrderTxData()
  • prepareApproveWithdrawOrderTxData()
  • prepareCancelWithdrawOrderTxData()
Display helpers that previously used yieldType to locate a vault now use vaultName.
// Before (v0.4.2)
const result = await getMinimumMint({
  yieldType: YieldType.CORE,
  chainId: 1,
  depositAssetAddress: USDC,
  depositAmount: '1000.0',
})

// After (v0.5.0)
const [vault] = await getVaultsByConfig({ yieldType: YieldType.CORE, chainId: 1 })

const result = await getMinimumMint({
  vaultName: vault.name,
  chainId: 1,
  depositAssetAddress: USDC,
  depositAmount: '1000.0',
})
The same change applies to:
  • getWithdrawalFee()
  • getMinimumWithdrawalOrderSize()
Additionally, getVaultAPY(), getVaultTVL(), and getWithdrawalRequests() now accept vaultName as an alternative to vaultAddress:
// New — use vaultName instead of looking up vaultAddress manually
const apy = await getVaultAPY({ vaultName: vault.name })
const tvl = await getVaultTVL({ vaultName: vault.name, chainId: 1 })
If you wrapped SDK calls in React hooks, update the interface and params:
// Before (v0.4.2)
interface DepositParams {
  amount: string
  depositAsset: `0x${string}`
  yieldType: YieldType
}

const params = {
  yieldType,
  depositAsset,
  depositAmount: amount,
  to: address,
  chainId,
}

// After (v0.5.0)
interface DepositParams {
  amount: string
  depositAsset: `0x${string}`
  vaultName: string
}

const params = {
  vaultName,
  depositAsset,
  depositAmount: amount,
  to: address,
  chainId,
}
Use getVaultsByConfig() in a useQuery or useEffect to discover the vault name at component mount time, then pass it to your deposit/withdrawal hooks.
Use these patterns to locate all call sites in your codebase:
# Find all yieldType usages in SDK calls
rg "yieldType.*YieldType\." --type ts
rg "yieldType.*['\"]CORE['\"]" --type ts

# Find all affected function calls
rg "prepare(Deposit|Withdrawal|WithdrawOrder|ApproveWithdraw|CancelWithdrawOrder)" --type ts
rg "get(MinimumMint|WithdrawalFee|MinimumWithdrawalOrderSize)" --type ts

0.4.2
2026-02-13

Breaking Changes

  • Withdrawal flow migrated from AtomicQueue to WithdrawQueue.
  • Renamed withdrawal APIs:
    • prepareWithdrawTransactionData() -> prepareWithdrawOrderTxData()
    • prepareApproveWithdrawToken() -> prepareApproveWithdrawOrderTxData()
  • Added prepareCancelWithdrawOrderTxData() for order cancellation.
  • Withdrawal slippage parameters removed from the new flow.

Highlights

  • Added unified prepareWithdrawal() wrapper for withdrawal execution.
  • Added unified prepareWithdrawalAuthorization() wrapper.
  • Added smart-wallet detection for deposit/withdraw authorization routing.
  • Added forceMethod parameter for explicit authorization routing.

0.3.0-beta.0
2025-01-30

Breaking Changes

This release contains breaking changes. Review the migration steps below before upgrading.
ChangeBeforeAfter
Deposit parameter namesdepositToken, recipientAddressdepositAsset, to
Node.js requirement20+22+
Yield type constantsPRIME, TBILL, LENDINGCORE, TREASURY, FRONTIER
// Before (v0.2.x)
await prepareDepositTxData({
  depositToken: "0x...",
  recipientAddress: "0x...",
  // ...
});

// After (v0.3.0)
await prepareDepositTxData({
depositAsset: "0x...",
to: "0x...",
// ...
});

// Before (v0.2.x)
import { YieldType } from "@paxoslabs/amplify-sdk";
YieldType.PRIME;
YieldType.TBILL;
YieldType.LENDING;

// After (v0.3.0)
import { YieldType } from "@paxoslabs/amplify-sdk";
YieldType.CORE;
YieldType.TREASURY;
YieldType.FRONTIER;

Features

  • Improved TypeScript inference for deposit functions
  • Added eth_signTypedData_v4 helper for better wallet compatibility

Bug Fixes

  • Fixed instanceof checks for APIError and WithdrawError in transpiled code

Refactoring

  • Standardized parameter naming across deposit APIs to match contract terminology
  • Removed deprecated display module and bridge functionality
  • Added explicit exports for tree-shaking optimization

Previous Releases

Bug Fixes

  • Fixed spender address and decimals for permit flow
  • Improved cache-based lookup for token address resolution
  • Aligned EIP712Domain with viem’s TypedDataDomain

Bug Fixes

  • Use non-interactive test command in release hooks
  • Resolved preact JSON VNode Injection vulnerability
  • Use CommunityCodeDepositor as approval spender
  • Aligned slippage defaults to DEFAULT_SLIPPAGE_BPS (50 bps)

Documentation

  • Completed Quick Start deposit example in README

Refactoring

  • Converted LogLevel enum to as const pattern for better tree-shaking

Features

  • Unified Deposit API: Added prepareDeposit and prepareDepositAuthorization wrapper functions
  • Observability: Added logging and telemetry infrastructure
  • ERC-20 Enhancements: Added getTokenPermitInfoWithAllowance with unified multicall

Bug Fixes

  • Updated Sei chain ID from 713715 to 1329
  • Fixed missing multicall mock in deposit-with-permit tests
  • Prevented duplicate buffer-full warning messages in telemetry

Refactoring

  • Converted DepositAuthMethod enum to as const pattern
  • Centralized API_BASE_URL constant
  • Use unified multicall for isDepositSpendApproved

Bug Fixes

  • Corrected DepositTxData args tuple
  • Fixed withdraw documentation
  • Resolved whatBump is not a function release error

Refactoring

  • Use CommunityCodeDepositor for all deposits and permit spender

Features

  • Export CommunityCodeDepositTxData type
  • Fixed cache check for vault data

Bug Fixes

  • Updated CommunityCodeDepositor support for partner code deposits
  • Improved type safety and chain cache initialization

Refactoring

  • Updated branding from Earn SDK to Amplify SDK

Features

  • Initial SDK Release
    • Comprehensive AmplifyVault support
    • Multi-chain support for yield vaults
    • Complete deposit functionality with approval management
    • Slippage protection for all operations
  • Withdraw Flow
    • prepareWithdrawTransactionData() for transaction preparation
    • Automatic vault data fetching via fetchSupportedAssets()
    • Three-field vault resolution (yieldType + wantToken + chainId)
    • Configurable slippage protection (default 0.5%)
  • Developer Experience
    • Full TypeScript support with type safety
    • Comprehensive error handling with specific error codes
    • Exchange rate calculations

Build System

  • Automated release workflow with conventional commits
  • Semantic versioning with alpha/beta/rc support
  • CI/CD pipeline with quality gates
  • Security auditing and dependency scanning
  • Automated NPM publishing with provenance

SDK Rename Migration

The SDK was renamed from Earn SDK to Amplify SDK in version 0.1.0. Follow the migration steps below if upgrading from @paxoslabs/earn-sdk.
1

Update package

npm uninstall @paxoslabs/earn-sdk npm install @paxoslabs/amplify-sdk
2

Update imports

// Before
import { initEarnSDK, type EarnVault } from "@paxoslabs/earn-sdk";

// After
import { initAmplifySDK, type AmplifyVault } from "@paxoslabs/amplify-sdk";

3

Update function calls

// Before
await initEarnSDK("pxl_your_api_key");

// After
await initAmplifySDK("pxl_your_api_key");
4

Update type references

// Before
const vault: EarnVault = /* ... */;

// After
const vault: AmplifyVault = /_ ... _/;

API endpoints continue to use /v1/earn-sdk/* for backwards compatibility. No backend changes required.