@paxoslabs/amplify-sdk@1.0.0 is a hard break from 0.5.x. There is no compatibility shim — every integration must be updated.
This page lists what changed and the smallest correct update for each surface.
Removed APIs
The following are gone in1.0.0:
initAmplifySDK(...).- All flat-function exports (
prepareDeposit,prepareDepositTxData,prepareDepositWithPermitTxData,prepareDepositPermitSignature,prepareDepositAuthorization,prepareWithdrawal,prepareWithdrawalAuthorization,prepareWithdrawOrderTxData,prepareApproveWithdrawOrderTxData,prepareCancelWithdrawOrderTxData,prepareApproveDepositTokenTxData). - All ABI exports.
- EIP-712 helpers (
parsePermitSignature,toEthSignTypedDataV4,PERMIT_TYPES). Use viem (signTypedData) directly on the typed data the SDK returns. - On-chain approval-status helpers (
isDepositSpendApproved,isWithdrawalSpendApproved). - The typed-error hierarchy (
VaultNotFoundByAddressError,UnauthorizedVaultAccessError,UnsupportedChainError,VaultConfigIncompleteError, …). All errors now flow through a singleAmplifyError. - SDK-managed telemetry and logger.
- Display helpers (
getVaultTVL,getVaultAPY,getMinimumMint,getMinimumWithdrawalOrderSize,getDepositCap,getWithdrawalFee,getWithdrawalRequests,calculateDepositFee). The same data is available directly via the client’svaults.*,withdraw.*, andusers.*namespaces.
The new shape
Field-by-field rename table
Deposit
0.5.x | 1.0.0 |
|---|---|
prepareDeposit({...}) | client.amplify.deposit.prepare({...}) |
prepareDepositAuthorization({...}) | client.core.authorization.detect({ vaultAddress, tokenAddress: depositAsset, amount, userAddress, chainId }) |
signature | permitSignature |
deadline (bigint) | permitDeadline (number, Unix seconds) |
vaultName | removed — pass vaultAddress |
yieldType | removed |
distributorCode | removed |
| (implicit) | userAddress (required) |
Withdraw
0.5.x | 1.0.0 |
|---|---|
prepareWithdrawal({...}) | client.amplify.withdraw.prepare({...}) |
prepareWithdrawalAuthorization({...}) | client.core.authorization.detect({ vaultAddress, tokenAddress: vaultAddress, amount, userAddress, chainId }) |
withdrawAmount | shareAmount — base units of the share token |
prepareCancelWithdrawOrderTxData({...}) | client.amplify.withdraw.cancel({ vaultAddress, orderIndex, chainId }) |
wantAsset (on cancel) | removed |
getWithdrawalFee({...}) | client.amplify.withdraw.calculateFee({ offerAmount, wantAsset, vaultAddress, chainId }) |
getWithdrawalRequests({...}) | client.amplify.withdraw.listRequests({...}) |
Vaults / reads
0.5.x | 1.0.0 |
|---|---|
getVaults(), findVaultByConfig(...), getVaultsByConfig(...) | client.amplify.vaults.list({ filter?, pageSize?, pageToken? }) |
getSupportedAssets(...), getWithdrawSupportedAssets(...) | client.amplify.vaults.listAssets({...}) |
getVaultTVL(...) | client.amplify.vaults.getTvls({...}) |
getVaultAPY(...) | client.amplify.vaults.getApys({...}) |
getDepositCap(...) | client.amplify.vaults.getSupplyCaps({...}) |
getMinimumMint(...), getMinimumWithdrawalOrderSize(...) | Read from client.amplify.vaults.list() deployment data (depositSupplyCap, minimumWithdrawalOrderSize). |
calculateDepositFee(...) | Read from client.amplify.vaults.list() deployment assets[].depositFees. |
Users
0.5.x | 1.0.0 |
|---|---|
| (custom GraphQL queries) | client.amplify.users.getPositions({ userAddress, ... }) |
Error handling
err.statusCode and inspect err.body for backend-provided error details.
Permit deposits
Withdrawals
Withdrawals settle throughWithdrawQueue.submitOrder and require a prior ERC-20 approve(WithdrawQueue, amount) on the share token. Call client.core.authorization.detect({ tokenAddress: vaultAddress, ... }) to detect whether allowance is already sufficient (method: 'already_approved'); otherwise submit a standard approve transaction before calling client.amplify.withdraw.prepare(...).
Decimals
Token amounts in1.0.0 are decimal strings in base units. The SDK does not parse human-readable inputs. Always read decimals() live from the token contract (e.g. via viem’s readContract / useBalance) and convert with parseUnits(value, decimals).toString() before calling the SDK.