> ## 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.

# Changelog

> Release history and migration guides for the Amplify SDK

All notable changes to the Amplify SDK are documented here. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Latest Release

<Update label="0.4.2" description="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.
</Update>

***

<Update label="0.3.0-beta.0" description="2025-01-30">
  ### Breaking Changes

  <Warning>
    This release contains breaking changes. Review the migration steps below
    before upgrading.
  </Warning>

  | Change                  | Before                             | After                          |
  | ----------------------- | ---------------------------------- | ------------------------------ |
  | Deposit parameter names | `depositToken`, `recipientAddress` | `depositAsset`, `to`           |
  | Node.js requirement     | 20+                                | 22+                            |
  | Yield type constants    | `PRIME`, `TBILL`, `LENDING`        | `CORE`, `TREASURY`, `FRONTIER` |

  <Accordion title="Migration: Update deposit function calls">
    ```ts theme={null}
    // Before (v0.2.x)
    await prepareDepositTxData({
      depositToken: "0x...",
      recipientAddress: "0x...",
      // ...
    });

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

    ```
  </Accordion>

  <Accordion title="Migration: Update YieldType references">
    ```ts theme={null}
    // 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;
    ```
  </Accordion>

  ### 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
</Update>

***

## Previous Releases

<AccordionGroup>
  <Accordion title="0.2.3-beta.2 - January 15, 2025">
    ### Bug Fixes

    * Fixed spender address and decimals for permit flow
    * Improved cache-based lookup for token address resolution
    * Aligned `EIP712Domain` with viem's `TypedDataDomain`
  </Accordion>

  <Accordion title="0.2.0-beta.4 - January 10, 2025">
    ### 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
  </Accordion>

  <Accordion title="0.2.0-beta.0 - January 5, 2025">
    ### Refactoring

    * Converted `LogLevel` enum to `as const` pattern for better tree-shaking
  </Accordion>

  <Accordion title="0.2.0-alpha.0 - January 1, 2025">
    ### 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`
  </Accordion>

  <Accordion title="0.1.1 - December 10, 2024">
    ### 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
  </Accordion>

  <Accordion title="0.1.0 - December 8, 2024">
    ### 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
  </Accordion>

  <Accordion title="0.0.1-alpha.1 - November 1, 2024">
    ### 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
  </Accordion>
</AccordionGroup>

***

## SDK Rename Migration

<Info>
  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`.
</Info>

<Steps>
  <Step title="Update package">
    ```bash npm uninstall @paxoslabs/earn-sdk npm install @paxoslabs/amplify-sdk theme={null}
    ```
  </Step>

  <Step title="Update imports">
    ```ts theme={null}
    // Before
    import { initEarnSDK, type EarnVault } from "@paxoslabs/earn-sdk";

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

    ```
  </Step>

  <Step title="Update function calls">
    ```ts theme={null}
    // Before
    await initEarnSDK("pxl_your_api_key");

    // After
    await initAmplifySDK("pxl_your_api_key");
    ```
  </Step>

  <Step title="Update type references">
    ```ts theme={null}
    // Before
    const vault: EarnVault = /* ... */;

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

    ```
  </Step>
</Steps>

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

```
```
