Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.paxoslabs.com/llms.txt

Use this file to discover all available pages before exploring further.

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

Latest Release

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 DistributorCodeDepositor 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 DistributorCodeDepositor for all deposits and permit spender

Features

  • Export CommunityCodeDepositTxData type
  • Fixed cache check for vault data

Bug Fixes

  • Updated DistributorCodeDepositor 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 1%)
  • 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.