@paxoslabs/amplify-sdk 0.1.1-beta.0 → 0.1.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/dist/index.d.mts +23 -9
- package/dist/index.d.ts +23 -9
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
<!-- auto-changelog-above -->
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
## [0.1.1-beta.0](///compare/v0.1.1-alpha.
|
|
11
|
+
## [0.1.1-beta.0](///compare/v0.1.1-alpha.5...v0.1.1-beta.0) (2025-12-10)
|
|
12
|
+
|
|
13
|
+
## [0.1.1-alpha.5](///compare/v0.1.1-alpha.4...v0.1.1-alpha.5) (2025-12-10)
|
|
14
|
+
|
|
15
|
+
## [0.1.1-alpha.4](///compare/v0.1.1-alpha.3...v0.1.1-alpha.4) (2025-12-10)
|
|
16
|
+
|
|
17
|
+
## [0.1.1-alpha.3](///compare/v0.1.1-alpha.2...v0.1.1-alpha.3) (2025-12-10)
|
|
18
|
+
|
|
19
|
+
## [0.1.1-alpha.2](///compare/v0.1.1-alpha.1...v0.1.1-alpha.2) (2025-12-10)
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **types:** correct DepositTxData args tuple and withdraw docs 748593e
|
|
12
24
|
|
|
13
25
|
## [0.1.1-alpha.1](///compare/v0.1.1-alpha.0...v0.1.1-alpha.1) (2025-12-10)
|
|
14
26
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, erc20Abi,
|
|
1
|
+
import { Address, erc20Abi, Hex } from 'viem';
|
|
2
2
|
import { A as AmplifyVault, S as SupportedAsset, a as AssetFilterOptions, V as VaultFilterOptions, W as WithdrawSupportedAsset } from './amplify-sdk-api-Biol0OIp.mjs';
|
|
3
3
|
export { b as APIError } from './amplify-sdk-api-Biol0OIp.mjs';
|
|
4
4
|
export { g as getDepositExchangeRate, a as getWithdrawExchangeRate, i as isDepositSpendApproved, b as isWithdrawalSpendApproved } from './exchange-rate-BfPH_fQt.mjs';
|
|
@@ -828,7 +828,7 @@ declare const CommunityCodeDepositorAbi: readonly [{
|
|
|
828
828
|
* @property {typeof CommunityCodeDepositorAbi} abi - ABI for the CommunityCodeDepositor contract
|
|
829
829
|
* @property {Address} address - Address of the CommunityCodeDepositor contract
|
|
830
830
|
* @property {'deposit'} functionName - Name of the function to call
|
|
831
|
-
* @property {[Address, bigint, bigint, Address,
|
|
831
|
+
* @property {readonly [depositAsset: Address, depositAmount: bigint, minimumMint: bigint, to: Address, distributorCode: Hex]} args - Arguments for the deposit function:
|
|
832
832
|
* [depositAsset, depositAmount, minimumMint, recipientAddress, distributorCode]
|
|
833
833
|
* @property {number} chainId - ID of the chain where the transaction should be executed
|
|
834
834
|
*/
|
|
@@ -836,7 +836,13 @@ interface DepositTxData {
|
|
|
836
836
|
abi: typeof CommunityCodeDepositorAbi;
|
|
837
837
|
address: Address;
|
|
838
838
|
functionName: "deposit";
|
|
839
|
-
args: [
|
|
839
|
+
args: readonly [
|
|
840
|
+
depositAsset: Address,
|
|
841
|
+
depositAmount: bigint,
|
|
842
|
+
minimumMint: bigint,
|
|
843
|
+
to: Address,
|
|
844
|
+
distributorCode: Hex
|
|
845
|
+
];
|
|
840
846
|
chainId: number;
|
|
841
847
|
}
|
|
842
848
|
/**
|
|
@@ -984,14 +990,24 @@ interface PrepareDepositPermitSignatureParams {
|
|
|
984
990
|
*
|
|
985
991
|
* @property abi - Contract ABI
|
|
986
992
|
* @property functionName - Function name to call
|
|
987
|
-
* @property args - Function arguments
|
|
993
|
+
* @property {readonly [depositAsset: Address, depositAmount: bigint, minimumMint: bigint, to: Address, distributorCode: Hex, deadline: bigint, v: number, r: Hex, s: Hex]} args - Function arguments
|
|
988
994
|
* @property address - Teller contract address
|
|
989
995
|
* @property chainId - Chain ID for transaction
|
|
990
996
|
*/
|
|
991
997
|
interface DepositWithPermitData {
|
|
992
998
|
abi: typeof CommunityCodeDepositorAbi;
|
|
993
999
|
functionName: "depositWithPermit";
|
|
994
|
-
args: [
|
|
1000
|
+
args: readonly [
|
|
1001
|
+
depositAsset: Address,
|
|
1002
|
+
depositAmount: bigint,
|
|
1003
|
+
minimumMint: bigint,
|
|
1004
|
+
to: Address,
|
|
1005
|
+
distributorCode: Hex,
|
|
1006
|
+
deadline: bigint,
|
|
1007
|
+
v: number,
|
|
1008
|
+
r: Hex,
|
|
1009
|
+
s: Hex
|
|
1010
|
+
];
|
|
995
1011
|
}
|
|
996
1012
|
interface UnencodedDepositWithPermitData {
|
|
997
1013
|
data: DepositWithPermitData;
|
|
@@ -3457,7 +3473,6 @@ type UserRequest = {
|
|
|
3457
3473
|
* @property {Address} wantAssetAddress - Address of the want token
|
|
3458
3474
|
* @property {ChainId} chainId - ID of the chain where the withdrawal will occur
|
|
3459
3475
|
* @property {string} offerAmount - Amount of vault shares to withdraw as a decimal string
|
|
3460
|
-
* @property {Address} recipientAddress - Ethereum address of the user making the withdrawal
|
|
3461
3476
|
* @property {number} [deadline] - Unix timestamp when the request expires (optional)
|
|
3462
3477
|
* @property {number} [slippage] - Maximum acceptable slippage in basis points (optional, default: 100 for 1%)
|
|
3463
3478
|
*
|
|
@@ -3522,10 +3537,9 @@ interface WithdrawTxData {
|
|
|
3522
3537
|
* yieldType: 'PRIME',
|
|
3523
3538
|
* wantAssetAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
|
|
3524
3539
|
* chainId: 1,
|
|
3525
|
-
* recipientAddress: '0x1234...',
|
|
3526
3540
|
* offerAmount: "1.0", // 1 vault share
|
|
3527
|
-
* deadline: Math.floor(Date.now() / 1000) + 3600, //
|
|
3528
|
-
* slippage: 100, //
|
|
3541
|
+
* deadline: Math.floor(Date.now() / 1000) + 3600, // Optional: Defaults to 3 days from now
|
|
3542
|
+
* slippage: 100, // Optional: Defaults to 0.5% slippage (50 bps)
|
|
3529
3543
|
* });
|
|
3530
3544
|
* ```
|
|
3531
3545
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, erc20Abi,
|
|
1
|
+
import { Address, erc20Abi, Hex } from 'viem';
|
|
2
2
|
import { A as AmplifyVault, S as SupportedAsset, a as AssetFilterOptions, V as VaultFilterOptions, W as WithdrawSupportedAsset } from './amplify-sdk-api-DGRgEybp.js';
|
|
3
3
|
export { b as APIError } from './amplify-sdk-api-DGRgEybp.js';
|
|
4
4
|
export { g as getDepositExchangeRate, a as getWithdrawExchangeRate, i as isDepositSpendApproved, b as isWithdrawalSpendApproved } from './exchange-rate-Cp1ddpw4.js';
|
|
@@ -828,7 +828,7 @@ declare const CommunityCodeDepositorAbi: readonly [{
|
|
|
828
828
|
* @property {typeof CommunityCodeDepositorAbi} abi - ABI for the CommunityCodeDepositor contract
|
|
829
829
|
* @property {Address} address - Address of the CommunityCodeDepositor contract
|
|
830
830
|
* @property {'deposit'} functionName - Name of the function to call
|
|
831
|
-
* @property {[Address, bigint, bigint, Address,
|
|
831
|
+
* @property {readonly [depositAsset: Address, depositAmount: bigint, minimumMint: bigint, to: Address, distributorCode: Hex]} args - Arguments for the deposit function:
|
|
832
832
|
* [depositAsset, depositAmount, minimumMint, recipientAddress, distributorCode]
|
|
833
833
|
* @property {number} chainId - ID of the chain where the transaction should be executed
|
|
834
834
|
*/
|
|
@@ -836,7 +836,13 @@ interface DepositTxData {
|
|
|
836
836
|
abi: typeof CommunityCodeDepositorAbi;
|
|
837
837
|
address: Address;
|
|
838
838
|
functionName: "deposit";
|
|
839
|
-
args: [
|
|
839
|
+
args: readonly [
|
|
840
|
+
depositAsset: Address,
|
|
841
|
+
depositAmount: bigint,
|
|
842
|
+
minimumMint: bigint,
|
|
843
|
+
to: Address,
|
|
844
|
+
distributorCode: Hex
|
|
845
|
+
];
|
|
840
846
|
chainId: number;
|
|
841
847
|
}
|
|
842
848
|
/**
|
|
@@ -984,14 +990,24 @@ interface PrepareDepositPermitSignatureParams {
|
|
|
984
990
|
*
|
|
985
991
|
* @property abi - Contract ABI
|
|
986
992
|
* @property functionName - Function name to call
|
|
987
|
-
* @property args - Function arguments
|
|
993
|
+
* @property {readonly [depositAsset: Address, depositAmount: bigint, minimumMint: bigint, to: Address, distributorCode: Hex, deadline: bigint, v: number, r: Hex, s: Hex]} args - Function arguments
|
|
988
994
|
* @property address - Teller contract address
|
|
989
995
|
* @property chainId - Chain ID for transaction
|
|
990
996
|
*/
|
|
991
997
|
interface DepositWithPermitData {
|
|
992
998
|
abi: typeof CommunityCodeDepositorAbi;
|
|
993
999
|
functionName: "depositWithPermit";
|
|
994
|
-
args: [
|
|
1000
|
+
args: readonly [
|
|
1001
|
+
depositAsset: Address,
|
|
1002
|
+
depositAmount: bigint,
|
|
1003
|
+
minimumMint: bigint,
|
|
1004
|
+
to: Address,
|
|
1005
|
+
distributorCode: Hex,
|
|
1006
|
+
deadline: bigint,
|
|
1007
|
+
v: number,
|
|
1008
|
+
r: Hex,
|
|
1009
|
+
s: Hex
|
|
1010
|
+
];
|
|
995
1011
|
}
|
|
996
1012
|
interface UnencodedDepositWithPermitData {
|
|
997
1013
|
data: DepositWithPermitData;
|
|
@@ -3457,7 +3473,6 @@ type UserRequest = {
|
|
|
3457
3473
|
* @property {Address} wantAssetAddress - Address of the want token
|
|
3458
3474
|
* @property {ChainId} chainId - ID of the chain where the withdrawal will occur
|
|
3459
3475
|
* @property {string} offerAmount - Amount of vault shares to withdraw as a decimal string
|
|
3460
|
-
* @property {Address} recipientAddress - Ethereum address of the user making the withdrawal
|
|
3461
3476
|
* @property {number} [deadline] - Unix timestamp when the request expires (optional)
|
|
3462
3477
|
* @property {number} [slippage] - Maximum acceptable slippage in basis points (optional, default: 100 for 1%)
|
|
3463
3478
|
*
|
|
@@ -3522,10 +3537,9 @@ interface WithdrawTxData {
|
|
|
3522
3537
|
* yieldType: 'PRIME',
|
|
3523
3538
|
* wantAssetAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
|
|
3524
3539
|
* chainId: 1,
|
|
3525
|
-
* recipientAddress: '0x1234...',
|
|
3526
3540
|
* offerAmount: "1.0", // 1 vault share
|
|
3527
|
-
* deadline: Math.floor(Date.now() / 1000) + 3600, //
|
|
3528
|
-
* slippage: 100, //
|
|
3541
|
+
* deadline: Math.floor(Date.now() / 1000) + 3600, // Optional: Defaults to 3 days from now
|
|
3542
|
+
* slippage: 100, // Optional: Defaults to 0.5% slippage (50 bps)
|
|
3529
3543
|
* });
|
|
3530
3544
|
* ```
|
|
3531
3545
|
*
|
package/dist/index.js
CHANGED
|
@@ -416,7 +416,7 @@ async function prepareDepositTxData(params) {
|
|
|
416
416
|
depositAmountAsBigInt,
|
|
417
417
|
minimumMint,
|
|
418
418
|
recipientAddress,
|
|
419
|
-
viem.
|
|
419
|
+
viem.stringToHex(partnerCode || "")
|
|
420
420
|
],
|
|
421
421
|
chainId: normalizedChainId
|
|
422
422
|
};
|
|
@@ -787,7 +787,7 @@ async function prepareDepositWithPermitTxData(params) {
|
|
|
787
787
|
depositAmountAsBigInt,
|
|
788
788
|
minimumMint,
|
|
789
789
|
recipientAddress,
|
|
790
|
-
viem.
|
|
790
|
+
viem.stringToHex(partnerCode || ""),
|
|
791
791
|
deadline,
|
|
792
792
|
v,
|
|
793
793
|
r,
|