@paxoslabs/amplify-sdk 0.5.2 → 0.5.3
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/dist/{chain-utils-BdJecHBA.d.mts → chain-utils-5r2UnCDS.d.mts} +47 -1
- package/dist/{chain-utils-BdJecHBA.d.ts → chain-utils-5r2UnCDS.d.ts} +47 -1
- package/dist/{chunk-5OK753GA.js → chunk-4NQPS3JC.js} +470 -358
- package/dist/chunk-4NQPS3JC.js.map +1 -0
- package/dist/chunk-6JLKHV6O.js +128 -0
- package/dist/chunk-6JLKHV6O.js.map +1 -0
- package/dist/{chunk-NNDY5TID.js → chunk-FHE43NKY.js} +12 -12
- package/dist/{chunk-NNDY5TID.js.map → chunk-FHE43NKY.js.map} +1 -1
- package/dist/chunk-GOJQYEJQ.js +3212 -0
- package/dist/chunk-GOJQYEJQ.js.map +1 -0
- package/dist/{chunk-HU5CTL4C.mjs → chunk-LMNADWTH.mjs} +364 -253
- package/dist/chunk-LMNADWTH.mjs.map +1 -0
- package/dist/chunk-ODXJYXUH.mjs +3168 -0
- package/dist/chunk-ODXJYXUH.mjs.map +1 -0
- package/dist/{chunk-QZHI2T7O.mjs → chunk-QMFYPHX5.mjs} +280 -47
- package/dist/chunk-QMFYPHX5.mjs.map +1 -0
- package/dist/{chunk-Q5FXJU5Y.mjs → chunk-UY2WD7MF.mjs} +3 -3
- package/dist/{chunk-Q5FXJU5Y.mjs.map → chunk-UY2WD7MF.mjs.map} +1 -1
- package/dist/chunk-WD6QFSXZ.js +701 -0
- package/dist/chunk-WD6QFSXZ.js.map +1 -0
- package/dist/chunk-Y5LBT2WT.mjs +118 -0
- package/dist/chunk-Y5LBT2WT.mjs.map +1 -0
- package/dist/core.d.mts +50 -7
- package/dist/core.d.ts +50 -7
- package/dist/core.js +32 -16
- package/dist/core.mjs +4 -4
- package/dist/display.d.mts +211 -2
- package/dist/display.d.ts +211 -2
- package/dist/display.js +26 -10
- package/dist/display.mjs +4 -4
- package/dist/{index-DXXA8gEA.d.mts → index-D8RtV9cB.d.mts} +498 -410
- package/dist/{index-aE5lTOUH.d.ts → index-ev_V5sjt.d.ts} +498 -410
- package/dist/index.d.mts +40 -5
- package/dist/index.d.ts +40 -5
- package/dist/index.js +80 -60
- 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 +2 -2
- package/dist/vaults.d.ts +2 -2
- package/dist/vaults.js +25 -25
- package/dist/vaults.mjs +4 -4
- package/package.json +1 -1
- package/dist/chunk-5OK753GA.js.map +0 -1
- package/dist/chunk-7JQQ2TH4.mjs +0 -1231
- package/dist/chunk-7JQQ2TH4.mjs.map +0 -1
- package/dist/chunk-HU5CTL4C.mjs.map +0 -1
- package/dist/chunk-QZHI2T7O.mjs.map +0 -1
- package/dist/chunk-SWUG4PTB.js +0 -464
- package/dist/chunk-SWUG4PTB.js.map +0 -1
- package/dist/chunk-WK7EJRBB.mjs +0 -1482
- package/dist/chunk-WK7EJRBB.mjs.map +0 -1
- package/dist/chunk-WYBYBPX5.js +0 -1518
- package/dist/chunk-WYBYBPX5.js.map +0 -1
- package/dist/chunk-ZKDXRGI5.js +0 -1239
- package/dist/chunk-ZKDXRGI5.js.map +0 -1
|
@@ -53,6 +53,8 @@ interface VaultContracts {
|
|
|
53
53
|
baseTokenStandIn?: Address;
|
|
54
54
|
communityCodeDepositorAddress?: Address;
|
|
55
55
|
withdrawQueueAddress?: Address;
|
|
56
|
+
depositFeeModuleAddress?: Address;
|
|
57
|
+
withdrawFeeModuleAddress?: Address;
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
60
|
* Enterprise customer configuration for compliance features (e.g. KYT).
|
|
@@ -118,6 +120,39 @@ interface VaultSLA {
|
|
|
118
120
|
externalWithdrawalQueueDelaySLA: number;
|
|
119
121
|
externalAccountantRateUpdateSLA: number;
|
|
120
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Deposit cap data read on-chain from a CommunityCodeDepositor contract.
|
|
125
|
+
* Only populated for vaults that have both `communityCodeDepositorAddress`
|
|
126
|
+
* and `depositFeeModuleAddress` configured.
|
|
127
|
+
*/
|
|
128
|
+
interface VaultDepositCap {
|
|
129
|
+
supplyCapInBase: bigint;
|
|
130
|
+
/** True when `supplyCapInBase` is neither `0` nor `maxUint256` (unlimited). */
|
|
131
|
+
hasDepositCap: boolean;
|
|
132
|
+
}
|
|
133
|
+
interface VaultDepositFeeEntry {
|
|
134
|
+
/** Deposit asset address, null for global/default fee that applies to all assets */
|
|
135
|
+
depositAsset: Address | null;
|
|
136
|
+
/** Fee percentage as raw bigint (denominator 1e18 for DCD contracts), 0n when no fee */
|
|
137
|
+
feePercentage: bigint;
|
|
138
|
+
/** Flat fee as raw bigint, 0n when no fee */
|
|
139
|
+
flatFee: bigint;
|
|
140
|
+
}
|
|
141
|
+
interface VaultDepositFees {
|
|
142
|
+
hasFees: boolean;
|
|
143
|
+
feeModuleAddress: Address | null;
|
|
144
|
+
fees: VaultDepositFeeEntry[];
|
|
145
|
+
/** ONE_HUNDRED_PERCENT constant from the fee module contract (denominator for percentage and flat fee calculations) */
|
|
146
|
+
oneHundredPercent?: bigint;
|
|
147
|
+
}
|
|
148
|
+
interface VaultWithdrawFees {
|
|
149
|
+
hasFees: boolean;
|
|
150
|
+
feeModuleAddress: Address | null;
|
|
151
|
+
/** Offer fee in basis points (e.g. 100n = 1%), 0n when no fee */
|
|
152
|
+
offerFeeBps: bigint;
|
|
153
|
+
/** Offer fee rate as raw bigint from indexer, 0n when no fee */
|
|
154
|
+
offerFeeRate: bigint;
|
|
155
|
+
}
|
|
121
156
|
interface AmplifyVault {
|
|
122
157
|
/** Unique identifier for the vault configuration */
|
|
123
158
|
id: string;
|
|
@@ -135,8 +170,19 @@ interface AmplifyVault {
|
|
|
135
170
|
enterpriseConfig?: EnterpriseConfig;
|
|
136
171
|
/** SLA data from VaultSLAs table */
|
|
137
172
|
sla?: VaultSLA;
|
|
173
|
+
/** Whether this vault uses atomic settlement via submitOrderAndProcessAll */
|
|
174
|
+
atomicWithdrawal: boolean;
|
|
138
175
|
/** Supported deposit assets for this vault */
|
|
139
176
|
supportedAssets: VaultSupportedAsset[];
|
|
177
|
+
/**
|
|
178
|
+
* Deposit cap data — only present for vaults with both a
|
|
179
|
+
* CommunityCodeDepositor and a deposit fee module.
|
|
180
|
+
*/
|
|
181
|
+
depositCap?: VaultDepositCap;
|
|
182
|
+
/** (Optional) deposits fees for this vault */
|
|
183
|
+
depositFees?: VaultDepositFees;
|
|
184
|
+
/** (Optional) withdraw queue fees for this vault */
|
|
185
|
+
withdrawFees?: VaultWithdrawFees;
|
|
140
186
|
}
|
|
141
187
|
/**
|
|
142
188
|
* Supported asset (token) metadata
|
|
@@ -331,4 +377,4 @@ declare function getChainFromConfig(chainId: number, config?: AmplifyVault[]): P
|
|
|
331
377
|
*/
|
|
332
378
|
declare function clearChainsCache(): void;
|
|
333
379
|
|
|
334
|
-
export { type AmplifyVault as A, type ChainId as C, type EnterpriseConfig as E, type SupportedAsset as S, type VaultFilterOptions as V, type WithdrawSupportedAsset as W, YieldType as Y, type AssetFilterOptions as a, APIError as b, clearChainsCache as c, type
|
|
380
|
+
export { type AmplifyVault as A, type ChainId as C, type EnterpriseConfig as E, type SupportedAsset as S, type VaultFilterOptions as V, type WithdrawSupportedAsset as W, YieldType as Y, type AssetFilterOptions as a, APIError as b, clearChainsCache as c, type VaultDepositFees as d, type VaultSLA as e, type VaultSupportedAsset as f, getChainFromConfig as g, type VaultWithdrawFees as h, toChainId as t };
|
|
@@ -53,6 +53,8 @@ interface VaultContracts {
|
|
|
53
53
|
baseTokenStandIn?: Address;
|
|
54
54
|
communityCodeDepositorAddress?: Address;
|
|
55
55
|
withdrawQueueAddress?: Address;
|
|
56
|
+
depositFeeModuleAddress?: Address;
|
|
57
|
+
withdrawFeeModuleAddress?: Address;
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
60
|
* Enterprise customer configuration for compliance features (e.g. KYT).
|
|
@@ -118,6 +120,39 @@ interface VaultSLA {
|
|
|
118
120
|
externalWithdrawalQueueDelaySLA: number;
|
|
119
121
|
externalAccountantRateUpdateSLA: number;
|
|
120
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Deposit cap data read on-chain from a CommunityCodeDepositor contract.
|
|
125
|
+
* Only populated for vaults that have both `communityCodeDepositorAddress`
|
|
126
|
+
* and `depositFeeModuleAddress` configured.
|
|
127
|
+
*/
|
|
128
|
+
interface VaultDepositCap {
|
|
129
|
+
supplyCapInBase: bigint;
|
|
130
|
+
/** True when `supplyCapInBase` is neither `0` nor `maxUint256` (unlimited). */
|
|
131
|
+
hasDepositCap: boolean;
|
|
132
|
+
}
|
|
133
|
+
interface VaultDepositFeeEntry {
|
|
134
|
+
/** Deposit asset address, null for global/default fee that applies to all assets */
|
|
135
|
+
depositAsset: Address | null;
|
|
136
|
+
/** Fee percentage as raw bigint (denominator 1e18 for DCD contracts), 0n when no fee */
|
|
137
|
+
feePercentage: bigint;
|
|
138
|
+
/** Flat fee as raw bigint, 0n when no fee */
|
|
139
|
+
flatFee: bigint;
|
|
140
|
+
}
|
|
141
|
+
interface VaultDepositFees {
|
|
142
|
+
hasFees: boolean;
|
|
143
|
+
feeModuleAddress: Address | null;
|
|
144
|
+
fees: VaultDepositFeeEntry[];
|
|
145
|
+
/** ONE_HUNDRED_PERCENT constant from the fee module contract (denominator for percentage and flat fee calculations) */
|
|
146
|
+
oneHundredPercent?: bigint;
|
|
147
|
+
}
|
|
148
|
+
interface VaultWithdrawFees {
|
|
149
|
+
hasFees: boolean;
|
|
150
|
+
feeModuleAddress: Address | null;
|
|
151
|
+
/** Offer fee in basis points (e.g. 100n = 1%), 0n when no fee */
|
|
152
|
+
offerFeeBps: bigint;
|
|
153
|
+
/** Offer fee rate as raw bigint from indexer, 0n when no fee */
|
|
154
|
+
offerFeeRate: bigint;
|
|
155
|
+
}
|
|
121
156
|
interface AmplifyVault {
|
|
122
157
|
/** Unique identifier for the vault configuration */
|
|
123
158
|
id: string;
|
|
@@ -135,8 +170,19 @@ interface AmplifyVault {
|
|
|
135
170
|
enterpriseConfig?: EnterpriseConfig;
|
|
136
171
|
/** SLA data from VaultSLAs table */
|
|
137
172
|
sla?: VaultSLA;
|
|
173
|
+
/** Whether this vault uses atomic settlement via submitOrderAndProcessAll */
|
|
174
|
+
atomicWithdrawal: boolean;
|
|
138
175
|
/** Supported deposit assets for this vault */
|
|
139
176
|
supportedAssets: VaultSupportedAsset[];
|
|
177
|
+
/**
|
|
178
|
+
* Deposit cap data — only present for vaults with both a
|
|
179
|
+
* CommunityCodeDepositor and a deposit fee module.
|
|
180
|
+
*/
|
|
181
|
+
depositCap?: VaultDepositCap;
|
|
182
|
+
/** (Optional) deposits fees for this vault */
|
|
183
|
+
depositFees?: VaultDepositFees;
|
|
184
|
+
/** (Optional) withdraw queue fees for this vault */
|
|
185
|
+
withdrawFees?: VaultWithdrawFees;
|
|
140
186
|
}
|
|
141
187
|
/**
|
|
142
188
|
* Supported asset (token) metadata
|
|
@@ -331,4 +377,4 @@ declare function getChainFromConfig(chainId: number, config?: AmplifyVault[]): P
|
|
|
331
377
|
*/
|
|
332
378
|
declare function clearChainsCache(): void;
|
|
333
379
|
|
|
334
|
-
export { type AmplifyVault as A, type ChainId as C, type EnterpriseConfig as E, type SupportedAsset as S, type VaultFilterOptions as V, type WithdrawSupportedAsset as W, YieldType as Y, type AssetFilterOptions as a, APIError as b, clearChainsCache as c, type
|
|
380
|
+
export { type AmplifyVault as A, type ChainId as C, type EnterpriseConfig as E, type SupportedAsset as S, type VaultFilterOptions as V, type WithdrawSupportedAsset as W, YieldType as Y, type AssetFilterOptions as a, APIError as b, clearChainsCache as c, type VaultDepositFees as d, type VaultSLA as e, type VaultSupportedAsset as f, getChainFromConfig as g, type VaultWithdrawFees as h, toChainId as t };
|