@paxoslabs/amplify-sdk 0.4.2 → 0.4.3-alpha.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 +79 -64
- package/dist/{chain-utils-CRMbWzu7.d.mts → chain-utils-CpOJcWig.d.mts} +48 -29
- package/dist/{chain-utils-CRMbWzu7.d.ts → chain-utils-CpOJcWig.d.ts} +48 -29
- package/dist/{chunk-RW7PZETN.mjs → chunk-7JMQWERX.mjs} +238 -254
- package/dist/chunk-7JMQWERX.mjs.map +1 -0
- package/dist/{chunk-TPU2HZAX.mjs → chunk-HV2LE2M6.mjs} +86 -169
- package/dist/chunk-HV2LE2M6.mjs.map +1 -0
- package/dist/{chunk-WZXCJAKM.js → chunk-JTURYJHV.js} +12 -12
- package/dist/{chunk-WZXCJAKM.js.map → chunk-JTURYJHV.js.map} +1 -1
- package/dist/{chunk-5CV25BTQ.js → chunk-KXU3GSF4.mjs} +87 -4
- package/dist/chunk-KXU3GSF4.mjs.map +1 -0
- package/dist/{chunk-CQZCGPZK.mjs → chunk-MB6HYA7R.js} +96 -3
- package/dist/chunk-MB6HYA7R.js.map +1 -0
- package/dist/{chunk-BQG3XKTU.js → chunk-PKGFLHZA.js} +239 -253
- package/dist/chunk-PKGFLHZA.js.map +1 -0
- package/dist/{chunk-2YPKHXFJ.js → chunk-R35K46S5.js} +180 -263
- package/dist/chunk-R35K46S5.js.map +1 -0
- package/dist/{chunk-GMMBJB4B.mjs → chunk-UM7S7U45.mjs} +71 -46
- package/dist/chunk-UM7S7U45.mjs.map +1 -0
- package/dist/{chunk-VZED4E3L.mjs → chunk-USF4CU2K.mjs} +3 -3
- package/dist/{chunk-VZED4E3L.mjs.map → chunk-USF4CU2K.mjs.map} +1 -1
- package/dist/{chunk-OZJNKGW6.js → chunk-YEAWQB72.js} +120 -95
- package/dist/chunk-YEAWQB72.js.map +1 -0
- package/dist/core.d.mts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +16 -16
- package/dist/core.mjs +4 -4
- package/dist/display.d.mts +23 -11
- package/dist/display.d.ts +23 -11
- package/dist/display.js +10 -10
- package/dist/display.mjs +4 -4
- package/dist/index.d.mts +107 -7
- package/dist/index.d.ts +107 -7
- package/dist/index.js +75 -51
- package/dist/index.mjs +5 -5
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +7 -7
- package/dist/utils.mjs +2 -2
- package/dist/vaults.d.mts +107 -94
- package/dist/vaults.d.ts +107 -94
- package/dist/vaults.js +25 -25
- package/dist/vaults.mjs +4 -4
- package/package.json +18 -11
- package/dist/chunk-2YPKHXFJ.js.map +0 -1
- package/dist/chunk-5CV25BTQ.js.map +0 -1
- package/dist/chunk-BQG3XKTU.js.map +0 -1
- package/dist/chunk-CQZCGPZK.mjs.map +0 -1
- package/dist/chunk-GMMBJB4B.mjs.map +0 -1
- package/dist/chunk-OZJNKGW6.js.map +0 -1
- package/dist/chunk-RW7PZETN.mjs.map +0 -1
- package/dist/chunk-TPU2HZAX.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { GetMinimumMintParams, GetMinimumWithdrawalOrderSizeParams, GetVaultAPYParams, GetVaultTVLParams, GetWithdrawalFeeParams, GetWithdrawalRequestsParams, MinimumMintResult, MinimumWithdrawalOrderSizeResult, VaultAPYResult, VaultTVLResult, WithdrawalFeeResult, WithdrawalRequest, WithdrawalRequestStatus, WithdrawalRequestsResult, getMinimumMint, getMinimumWithdrawalOrderSize, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './display.js';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
|
-
import { A as AmplifyVault, S as SupportedAsset, a as AssetFilterOptions, V as VaultFilterOptions, W as WithdrawSupportedAsset,
|
|
4
|
-
export { b as APIError } from './chain-utils-
|
|
3
|
+
import { A as AmplifyVault, S as SupportedAsset, Y as YieldType, a as AssetFilterOptions, V as VaultFilterOptions, W as WithdrawSupportedAsset, C as ChainId } from './chain-utils-CpOJcWig.js';
|
|
4
|
+
export { b as APIError, d as VaultSLA, e as VaultSupportedAsset } from './chain-utils-CpOJcWig.js';
|
|
5
5
|
export { AlreadyApprovedAuthorizationResult, ApprovalAuthorizationResult, ApproveDepositTokenTxData, ApproveWithdrawOrderTxData, CancelWithdrawOrderTxData, DepositAuthMethod, DepositAuthorizationResult, DepositTxData, EIP712Domain, PERMIT_TYPES, ParsedPermitSignature, PermitAuthorizationResult, PermitDepositResult, PermitSignatureData, PrepareCancelWithdrawOrderTxDataParams, PrepareDepositAuthorizationParams, PrepareDepositParams, PrepareDepositPermitSignatureParams, PrepareDepositResult, PrepareDepositWithPermitTxDataParams, PrepareWithdrawOrderTxDataParams, PrepareWithdrawalAuthorizationParams, PrepareWithdrawalParams, PrepareWithdrawalResult, StandardDepositResult, UnencodedDepositWithPermitData, WithdrawAlreadyApprovedAuthorizationResult, WithdrawApprovalAuthorizationResult, WithdrawAuthMethod, WithdrawAuthorizationResult, WithdrawOrderTxData, isAlreadyApprovedAuth, isApprovalAuth, isPermitAuth, isWithdrawAlreadyApprovedAuth, isWithdrawApprovalAuth, parsePermitSignature, prepareApproveDepositTokenTxData, prepareApproveWithdrawOrderTxData, prepareCancelWithdrawOrderTxData, prepareDeposit, prepareDepositAuthorization, prepareDepositPermitSignature, prepareDepositTxData, prepareDepositWithPermitTxData, prepareWithdrawOrderTxData, prepareWithdrawal, prepareWithdrawalAuthorization, toEthSignTypedDataV4 } from './vaults.js';
|
|
6
6
|
import 'viem/chains';
|
|
7
7
|
|
|
@@ -54,6 +54,14 @@ declare class VaultCache {
|
|
|
54
54
|
* Assets keyed by token address
|
|
55
55
|
*/
|
|
56
56
|
private assets;
|
|
57
|
+
/**
|
|
58
|
+
* Vaults keyed by boringVaultAddress (lowercase, for case-insensitive lookup)
|
|
59
|
+
*/
|
|
60
|
+
private vaultsByAddress;
|
|
61
|
+
/**
|
|
62
|
+
* Vaults keyed by vault name (lowercase, for case-insensitive lookup)
|
|
63
|
+
*/
|
|
64
|
+
private vaultsByName;
|
|
57
65
|
/**
|
|
58
66
|
* Unix timestamp (milliseconds) of last successful fetch
|
|
59
67
|
*/
|
|
@@ -83,6 +91,16 @@ declare class VaultCache {
|
|
|
83
91
|
* @returns Array of AmplifyVault objects, or undefined if not found
|
|
84
92
|
*/
|
|
85
93
|
getVault(tokenAddress: string): AmplifyVault[] | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Gets a vault by its boringVaultAddress (on-chain vault contract).
|
|
96
|
+
* Case-insensitive lookup.
|
|
97
|
+
*/
|
|
98
|
+
getVaultByAddress(address: string): AmplifyVault | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Gets a vault by its human-readable name.
|
|
101
|
+
* Case-insensitive lookup.
|
|
102
|
+
*/
|
|
103
|
+
getVaultByName(name: string): AmplifyVault | undefined;
|
|
86
104
|
/**
|
|
87
105
|
* Gets asset by token address
|
|
88
106
|
*
|
|
@@ -344,6 +362,24 @@ declare function findVaultByConfig(params: {
|
|
|
344
362
|
yieldType: string;
|
|
345
363
|
chainId: number;
|
|
346
364
|
}): Promise<AmplifyVault | null>;
|
|
365
|
+
/**
|
|
366
|
+
* Filter options for getVaultsByConfig
|
|
367
|
+
*/
|
|
368
|
+
interface GetVaultsByConfigParams {
|
|
369
|
+
yieldType?: YieldType;
|
|
370
|
+
chainId?: number;
|
|
371
|
+
depositAssetAddress?: Address;
|
|
372
|
+
withdrawAssetAddress?: Address;
|
|
373
|
+
settlementAssetAddress?: Address;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Returns vaults matching the provided configuration filters.
|
|
377
|
+
*
|
|
378
|
+
* Results are automatically scoped to the organization associated with
|
|
379
|
+
* the API key the SDK was initialized with (enterprise filtering is
|
|
380
|
+
* handled server-side by the amplifySdkConfigs resolver).
|
|
381
|
+
*/
|
|
382
|
+
declare function getVaultsByConfig(params?: GetVaultsByConfigParams): Promise<AmplifyVault[]>;
|
|
347
383
|
/**
|
|
348
384
|
* Gets supported assets grouped by token with available vaults
|
|
349
385
|
*
|
|
@@ -724,8 +760,59 @@ declare function waitForCacheReady(): Promise<void>;
|
|
|
724
760
|
*/
|
|
725
761
|
declare function initAmplifySDK(apiKey: string, options?: SDKInitOptions): Promise<void>;
|
|
726
762
|
|
|
727
|
-
|
|
728
|
-
|
|
763
|
+
/**
|
|
764
|
+
* Withdraw operation error types
|
|
765
|
+
*
|
|
766
|
+
* Defines all error classes and error scenarios specific to the withdraw flow.
|
|
767
|
+
* Provides type-safe error handling with clear error messages for different failure modes.
|
|
768
|
+
*
|
|
769
|
+
* @module types/withdraw-errors
|
|
770
|
+
*/
|
|
771
|
+
/**
|
|
772
|
+
* Base class for all withdraw-related errors
|
|
773
|
+
*
|
|
774
|
+
* Extends Error with additional context information for better error handling
|
|
775
|
+
* and debugging in consuming applications.
|
|
776
|
+
*/
|
|
777
|
+
declare class WithdrawError extends Error {
|
|
778
|
+
/**
|
|
779
|
+
* Error code for programmatic handling
|
|
780
|
+
* @example "VAULT_NOT_FOUND", "INVALID_ADDRESS", "INSUFFICIENT_BALANCE"
|
|
781
|
+
*/
|
|
782
|
+
readonly code: string;
|
|
783
|
+
/**
|
|
784
|
+
* Additional context data for debugging
|
|
785
|
+
*/
|
|
786
|
+
readonly context?: Record<string, unknown>;
|
|
787
|
+
constructor(message: string, code: string, context?: Record<string, unknown>);
|
|
788
|
+
}
|
|
789
|
+
declare class VaultNotFoundByAddressError extends WithdrawError {
|
|
790
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
791
|
+
}
|
|
792
|
+
declare class VaultNotFoundByNameError extends WithdrawError {
|
|
793
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
794
|
+
}
|
|
795
|
+
declare class UnauthorizedVaultAccessError extends WithdrawError {
|
|
796
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
797
|
+
}
|
|
798
|
+
declare function isVaultNotFoundByAddressError(error: unknown): error is VaultNotFoundByAddressError;
|
|
799
|
+
declare function isVaultNotFoundByNameError(error: unknown): error is VaultNotFoundByNameError;
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Checks whether a deposit spend has been approved for the CommunityCodeDepositor contract.
|
|
803
|
+
*
|
|
804
|
+
* Resolves the vault by `vaultName` + `chainId` + `depositAssetAddress`, then reads the
|
|
805
|
+
* current ERC20 allowance and permit support via a single multicall.
|
|
806
|
+
*
|
|
807
|
+
* @param vaultName - Human-readable vault name
|
|
808
|
+
* @param chainId - Chain ID where the vault is deployed
|
|
809
|
+
* @param depositAssetAddress - Token contract address being deposited
|
|
810
|
+
* @param recipientAddress - Wallet address that owns the tokens (permit owner / approval sender)
|
|
811
|
+
* @returns Allowance, permit support info, and token metadata
|
|
812
|
+
* @throws {APIError} If vault not found, chain/asset mismatch, or contract read fails
|
|
813
|
+
*/
|
|
814
|
+
declare const isDepositSpendApproved: ({ vaultName, chainId, depositAssetAddress, recipientAddress, }: {
|
|
815
|
+
vaultName: string;
|
|
729
816
|
chainId: ChainId;
|
|
730
817
|
depositAssetAddress: Address;
|
|
731
818
|
recipientAddress: Address;
|
|
@@ -741,8 +828,21 @@ declare const isDepositSpendApproved: ({ yieldType, chainId, depositAssetAddress
|
|
|
741
828
|
tokenVersion: string;
|
|
742
829
|
error: null;
|
|
743
830
|
}>;
|
|
744
|
-
|
|
745
|
-
|
|
831
|
+
/**
|
|
832
|
+
* Checks whether a withdrawal spend has been approved for the WithdrawQueue contract.
|
|
833
|
+
*
|
|
834
|
+
* Resolves the vault by `vaultName` + `chainId` + `wantAssetAddress`, then reads the
|
|
835
|
+
* current vault-share allowance via a multicall.
|
|
836
|
+
*
|
|
837
|
+
* @param vaultName - Human-readable vault name
|
|
838
|
+
* @param chainId - Chain ID where the vault is deployed
|
|
839
|
+
* @param wantAssetAddress - Token contract address the user wants to receive upon withdrawal
|
|
840
|
+
* @param recipientAddress - Wallet address that owns the vault shares
|
|
841
|
+
* @returns Allowance info
|
|
842
|
+
* @throws {APIError} If vault not found, chain/asset mismatch, or contract read fails
|
|
843
|
+
*/
|
|
844
|
+
declare const isWithdrawalSpendApproved: ({ vaultName, chainId, wantAssetAddress, recipientAddress, }: {
|
|
845
|
+
vaultName: string;
|
|
746
846
|
chainId: ChainId;
|
|
747
847
|
wantAssetAddress: Address;
|
|
748
848
|
recipientAddress: Address;
|
|
@@ -760,4 +860,4 @@ declare const isWithdrawalSpendApproved: ({ yieldType, chainId, wantAssetAddress
|
|
|
760
860
|
error: null;
|
|
761
861
|
}>;
|
|
762
862
|
|
|
763
|
-
export { AmplifyVault, AssetFilterOptions, type InitErrorCode, LogLevel, type Logger, type RequestHeaders, type SDKConfig, type SDKInitOptions, SupportedAsset, VaultFilterOptions, WithdrawSupportedAsset, YieldType, fetchSupportedAssets, fetchVaults, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, isDepositSpendApproved, isWithdrawalSpendApproved, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady };
|
|
863
|
+
export { AmplifyVault, AssetFilterOptions, type GetVaultsByConfigParams, type InitErrorCode, LogLevel, type Logger, type RequestHeaders, type SDKConfig, type SDKInitOptions, SupportedAsset, UnauthorizedVaultAccessError, VaultFilterOptions, VaultNotFoundByAddressError, VaultNotFoundByNameError, WithdrawSupportedAsset, YieldType, fetchSupportedAssets, fetchVaults, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getVaultsByConfig, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, isDepositSpendApproved, isVaultNotFoundByAddressError, isVaultNotFoundByNameError, isWithdrawalSpendApproved, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady };
|
package/dist/index.js
CHANGED
|
@@ -1,197 +1,221 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkR35K46S5_js = require('./chunk-R35K46S5.js');
|
|
4
|
+
var chunkYEAWQB72_js = require('./chunk-YEAWQB72.js');
|
|
5
|
+
var chunkMB6HYA7R_js = require('./chunk-MB6HYA7R.js');
|
|
6
|
+
require('./chunk-JTURYJHV.js');
|
|
7
7
|
require('./chunk-3I3PYX2F.js');
|
|
8
|
-
var
|
|
8
|
+
var chunkPKGFLHZA_js = require('./chunk-PKGFLHZA.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "DepositAuthMethod", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkR35K46S5_js.DepositAuthMethod; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "PERMIT_TYPES", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkR35K46S5_js.PERMIT_TYPES; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "WithdrawAuthMethod", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkR35K46S5_js.WithdrawAuthMethod; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "isAlreadyApprovedAuth", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkR35K46S5_js.isAlreadyApprovedAuth; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "isApprovalAuth", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkR35K46S5_js.isApprovalAuth; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "isDepositSpendApproved", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkR35K46S5_js.isDepositSpendApproved; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "isPermitAuth", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkR35K46S5_js.isPermitAuth; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "isWithdrawAlreadyApprovedAuth", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkR35K46S5_js.isWithdrawAlreadyApprovedAuth; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "isWithdrawApprovalAuth", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkR35K46S5_js.isWithdrawApprovalAuth; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "isWithdrawalSpendApproved", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkR35K46S5_js.isWithdrawalSpendApproved; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "parsePermitSignature", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkR35K46S5_js.parsePermitSignature; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "prepareApproveDepositTokenTxData", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkR35K46S5_js.prepareApproveDepositTokenTxData; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "prepareApproveWithdrawOrderTxData", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkR35K46S5_js.prepareApproveWithdrawOrderTxData; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "prepareCancelWithdrawOrderTxData", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkR35K46S5_js.prepareCancelWithdrawOrderTxData; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "prepareDeposit", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkR35K46S5_js.prepareDeposit; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "prepareDepositAuthorization", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkR35K46S5_js.prepareDepositAuthorization; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "prepareDepositPermitSignature", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkR35K46S5_js.prepareDepositPermitSignature; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "prepareDepositTxData", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkR35K46S5_js.prepareDepositTxData; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "prepareDepositWithPermitTxData", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkR35K46S5_js.prepareDepositWithPermitTxData; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "prepareWithdrawOrderTxData", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkR35K46S5_js.prepareWithdrawOrderTxData; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "prepareWithdrawal", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkR35K46S5_js.prepareWithdrawal; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "prepareWithdrawalAuthorization", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkR35K46S5_js.prepareWithdrawalAuthorization; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "toEthSignTypedDataV4", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkR35K46S5_js.toEthSignTypedDataV4; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "getMinimumMint", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkYEAWQB72_js.getMinimumMint; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "getMinimumWithdrawalOrderSize", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkYEAWQB72_js.getMinimumWithdrawalOrderSize; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "getVaultAPY", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkYEAWQB72_js.getVaultAPY; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "getVaultTVL", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkYEAWQB72_js.getVaultTVL; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "getWithdrawalFee", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkYEAWQB72_js.getWithdrawalFee; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "getWithdrawalRequests", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkYEAWQB72_js.getWithdrawalRequests; }
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "UnauthorizedVaultAccessError", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () { return chunkMB6HYA7R_js.UnauthorizedVaultAccessError; }
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "VaultNotFoundByAddressError", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () { return chunkMB6HYA7R_js.VaultNotFoundByAddressError; }
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "VaultNotFoundByNameError", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function () { return chunkMB6HYA7R_js.VaultNotFoundByNameError; }
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "isVaultNotFoundByAddressError", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function () { return chunkMB6HYA7R_js.isVaultNotFoundByAddressError; }
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "isVaultNotFoundByNameError", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () { return chunkMB6HYA7R_js.isVaultNotFoundByNameError; }
|
|
127
147
|
});
|
|
128
148
|
Object.defineProperty(exports, "APIError", {
|
|
129
149
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkPKGFLHZA_js.APIError; }
|
|
131
151
|
});
|
|
132
152
|
Object.defineProperty(exports, "LogLevel", {
|
|
133
153
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkPKGFLHZA_js.LogLevel; }
|
|
135
155
|
});
|
|
136
156
|
Object.defineProperty(exports, "YieldType", {
|
|
137
157
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkPKGFLHZA_js.YieldType; }
|
|
139
159
|
});
|
|
140
160
|
Object.defineProperty(exports, "fetchSupportedAssets", {
|
|
141
161
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkPKGFLHZA_js.fetchSupportedAssets; }
|
|
143
163
|
});
|
|
144
164
|
Object.defineProperty(exports, "fetchVaults", {
|
|
145
165
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunkPKGFLHZA_js.fetchVaults; }
|
|
147
167
|
});
|
|
148
168
|
Object.defineProperty(exports, "findVaultByConfig", {
|
|
149
169
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunkPKGFLHZA_js.findVaultByConfig; }
|
|
151
171
|
});
|
|
152
172
|
Object.defineProperty(exports, "getAssetsFromCache", {
|
|
153
173
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunkPKGFLHZA_js.getAssetsFromCache; }
|
|
155
175
|
});
|
|
156
176
|
Object.defineProperty(exports, "getCache", {
|
|
157
177
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkPKGFLHZA_js.getCache; }
|
|
159
179
|
});
|
|
160
180
|
Object.defineProperty(exports, "getLogger", {
|
|
161
181
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkPKGFLHZA_js.getLogger; }
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, "getVaultsByConfig", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function () { return chunkPKGFLHZA_js.getVaultsByConfig; }
|
|
163
187
|
});
|
|
164
188
|
Object.defineProperty(exports, "getWithdrawSupportedAssets", {
|
|
165
189
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkPKGFLHZA_js.getWithdrawSupportedAssets; }
|
|
167
191
|
});
|
|
168
192
|
Object.defineProperty(exports, "initAmplifySDK", {
|
|
169
193
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkPKGFLHZA_js.initAmplifySDK; }
|
|
171
195
|
});
|
|
172
196
|
Object.defineProperty(exports, "initializeCache", {
|
|
173
197
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkPKGFLHZA_js.initializeCache; }
|
|
175
199
|
});
|
|
176
200
|
Object.defineProperty(exports, "isCacheReady", {
|
|
177
201
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunkPKGFLHZA_js.isCacheReady; }
|
|
179
203
|
});
|
|
180
204
|
Object.defineProperty(exports, "refreshVaultCache", {
|
|
181
205
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunkPKGFLHZA_js.refreshVaultCache; }
|
|
183
207
|
});
|
|
184
208
|
Object.defineProperty(exports, "setLogLevel", {
|
|
185
209
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunkPKGFLHZA_js.setLogLevel; }
|
|
187
211
|
});
|
|
188
212
|
Object.defineProperty(exports, "setLogger", {
|
|
189
213
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
214
|
+
get: function () { return chunkPKGFLHZA_js.setLogger; }
|
|
191
215
|
});
|
|
192
216
|
Object.defineProperty(exports, "waitForCacheReady", {
|
|
193
217
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunkPKGFLHZA_js.waitForCacheReady; }
|
|
195
219
|
});
|
|
196
220
|
//# sourceMappingURL=index.js.map
|
|
197
221
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { DepositAuthMethod, PERMIT_TYPES, WithdrawAuthMethod, isAlreadyApprovedAuth, isApprovalAuth, isDepositSpendApproved, isPermitAuth, isWithdrawAlreadyApprovedAuth, isWithdrawApprovalAuth, isWithdrawalSpendApproved, parsePermitSignature, prepareApproveDepositTokenTxData, prepareApproveWithdrawOrderTxData, prepareCancelWithdrawOrderTxData, prepareDeposit, prepareDepositAuthorization, prepareDepositPermitSignature, prepareDepositTxData, prepareDepositWithPermitTxData, prepareWithdrawOrderTxData, prepareWithdrawal, prepareWithdrawalAuthorization, toEthSignTypedDataV4 } from './chunk-
|
|
2
|
-
export { getMinimumMint, getMinimumWithdrawalOrderSize, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './chunk-
|
|
3
|
-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { DepositAuthMethod, PERMIT_TYPES, WithdrawAuthMethod, isAlreadyApprovedAuth, isApprovalAuth, isDepositSpendApproved, isPermitAuth, isWithdrawAlreadyApprovedAuth, isWithdrawApprovalAuth, isWithdrawalSpendApproved, parsePermitSignature, prepareApproveDepositTokenTxData, prepareApproveWithdrawOrderTxData, prepareCancelWithdrawOrderTxData, prepareDeposit, prepareDepositAuthorization, prepareDepositPermitSignature, prepareDepositTxData, prepareDepositWithPermitTxData, prepareWithdrawOrderTxData, prepareWithdrawal, prepareWithdrawalAuthorization, toEthSignTypedDataV4 } from './chunk-HV2LE2M6.mjs';
|
|
2
|
+
export { getMinimumMint, getMinimumWithdrawalOrderSize, getVaultAPY, getVaultTVL, getWithdrawalFee, getWithdrawalRequests } from './chunk-UM7S7U45.mjs';
|
|
3
|
+
export { UnauthorizedVaultAccessError, VaultNotFoundByAddressError, VaultNotFoundByNameError, isVaultNotFoundByAddressError, isVaultNotFoundByNameError } from './chunk-KXU3GSF4.mjs';
|
|
4
|
+
import './chunk-USF4CU2K.mjs';
|
|
5
5
|
import './chunk-7RWWVUHP.mjs';
|
|
6
|
-
export { APIError, LogLevel, YieldType, fetchSupportedAssets, fetchVaults, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady } from './chunk-
|
|
6
|
+
export { APIError, LogLevel, YieldType, fetchSupportedAssets, fetchVaults, findVaultByConfig, getAssetsFromCache, getCache, getLogger, getVaultsByConfig, getWithdrawSupportedAssets, initAmplifySDK, initializeCache, isCacheReady, refreshVaultCache, setLogLevel, setLogger, waitForCacheReady } from './chunk-7JMQWERX.mjs';
|
|
7
7
|
//# sourceMappingURL=index.mjs.map
|
|
8
8
|
//# sourceMappingURL=index.mjs.map
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ChainId, c as clearChainsCache, g as getChainFromConfig, t as toChainId } from './chain-utils-
|
|
1
|
+
export { C as ChainId, c as clearChainsCache, g as getChainFromConfig, t as toChainId } from './chain-utils-CpOJcWig.mjs';
|
|
2
2
|
import 'viem/chains';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ChainId, c as clearChainsCache, g as getChainFromConfig, t as toChainId } from './chain-utils-
|
|
1
|
+
export { C as ChainId, c as clearChainsCache, g as getChainFromConfig, t as toChainId } from './chain-utils-CpOJcWig.js';
|
|
2
2
|
import 'viem/chains';
|
|
3
3
|
import 'viem';
|
|
4
4
|
|
package/dist/utils.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk3I3PYX2F_js = require('./chunk-3I3PYX2F.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkPKGFLHZA_js = require('./chunk-PKGFLHZA.js');
|
|
5
5
|
|
|
6
6
|
// src/utils/time.ts
|
|
7
|
-
var calculateDeadline = (daysFromNow =
|
|
7
|
+
var calculateDeadline = (daysFromNow = chunkPKGFLHZA_js.DEFAULT_DEADLINE) => {
|
|
8
8
|
const daysInSeconds = daysFromNow * 24 * 60 * 60;
|
|
9
9
|
const currentTimeStamp = Math.floor(Date.now() / 1e3);
|
|
10
10
|
const deadline = currentTimeStamp + daysInSeconds;
|
|
@@ -43,23 +43,23 @@ Object.defineProperty(exports, "calculateExpectedSharesMinted", {
|
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "DEFAULT_TIMEOUT", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkPKGFLHZA_js.DEFAULT_TIMEOUT; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "clearChainsCache", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkPKGFLHZA_js.clearChainsCache; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "createTimeoutSignal", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkPKGFLHZA_js.createTimeoutSignal; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "getChainFromConfig", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkPKGFLHZA_js.getChainFromConfig; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "toChainId", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkPKGFLHZA_js.toChainId; }
|
|
63
63
|
});
|
|
64
64
|
exports.calculateDeadline = calculateDeadline;
|
|
65
65
|
exports.tryCatch = tryCatch;
|
package/dist/utils.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { RAY, WAD, bigIntToNumberAsString, calculateAtomicPrice, calculateExpectedSharesMinted } from './chunk-7RWWVUHP.mjs';
|
|
2
|
-
import { DEFAULT_DEADLINE } from './chunk-
|
|
3
|
-
export { DEFAULT_TIMEOUT, clearChainsCache, createTimeoutSignal, getChainFromConfig, toChainId } from './chunk-
|
|
2
|
+
import { DEFAULT_DEADLINE } from './chunk-7JMQWERX.mjs';
|
|
3
|
+
export { DEFAULT_TIMEOUT, clearChainsCache, createTimeoutSignal, getChainFromConfig, toChainId } from './chunk-7JMQWERX.mjs';
|
|
4
4
|
|
|
5
5
|
// src/utils/time.ts
|
|
6
6
|
var calculateDeadline = (daysFromNow = DEFAULT_DEADLINE) => {
|