@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.
Files changed (58) hide show
  1. package/dist/{chain-utils-BdJecHBA.d.mts → chain-utils-5r2UnCDS.d.mts} +47 -1
  2. package/dist/{chain-utils-BdJecHBA.d.ts → chain-utils-5r2UnCDS.d.ts} +47 -1
  3. package/dist/{chunk-5OK753GA.js → chunk-4NQPS3JC.js} +470 -358
  4. package/dist/chunk-4NQPS3JC.js.map +1 -0
  5. package/dist/chunk-6JLKHV6O.js +128 -0
  6. package/dist/chunk-6JLKHV6O.js.map +1 -0
  7. package/dist/{chunk-NNDY5TID.js → chunk-FHE43NKY.js} +12 -12
  8. package/dist/{chunk-NNDY5TID.js.map → chunk-FHE43NKY.js.map} +1 -1
  9. package/dist/chunk-GOJQYEJQ.js +3212 -0
  10. package/dist/chunk-GOJQYEJQ.js.map +1 -0
  11. package/dist/{chunk-HU5CTL4C.mjs → chunk-LMNADWTH.mjs} +364 -253
  12. package/dist/chunk-LMNADWTH.mjs.map +1 -0
  13. package/dist/chunk-ODXJYXUH.mjs +3168 -0
  14. package/dist/chunk-ODXJYXUH.mjs.map +1 -0
  15. package/dist/{chunk-QZHI2T7O.mjs → chunk-QMFYPHX5.mjs} +280 -47
  16. package/dist/chunk-QMFYPHX5.mjs.map +1 -0
  17. package/dist/{chunk-Q5FXJU5Y.mjs → chunk-UY2WD7MF.mjs} +3 -3
  18. package/dist/{chunk-Q5FXJU5Y.mjs.map → chunk-UY2WD7MF.mjs.map} +1 -1
  19. package/dist/chunk-WD6QFSXZ.js +701 -0
  20. package/dist/chunk-WD6QFSXZ.js.map +1 -0
  21. package/dist/chunk-Y5LBT2WT.mjs +118 -0
  22. package/dist/chunk-Y5LBT2WT.mjs.map +1 -0
  23. package/dist/core.d.mts +50 -7
  24. package/dist/core.d.ts +50 -7
  25. package/dist/core.js +32 -16
  26. package/dist/core.mjs +4 -4
  27. package/dist/display.d.mts +211 -2
  28. package/dist/display.d.ts +211 -2
  29. package/dist/display.js +26 -10
  30. package/dist/display.mjs +4 -4
  31. package/dist/{index-DXXA8gEA.d.mts → index-D8RtV9cB.d.mts} +498 -410
  32. package/dist/{index-aE5lTOUH.d.ts → index-ev_V5sjt.d.ts} +498 -410
  33. package/dist/index.d.mts +40 -5
  34. package/dist/index.d.ts +40 -5
  35. package/dist/index.js +80 -60
  36. package/dist/index.mjs +5 -5
  37. package/dist/utils.d.mts +1 -1
  38. package/dist/utils.d.ts +1 -1
  39. package/dist/utils.js +7 -7
  40. package/dist/utils.mjs +2 -2
  41. package/dist/vaults.d.mts +2 -2
  42. package/dist/vaults.d.ts +2 -2
  43. package/dist/vaults.js +25 -25
  44. package/dist/vaults.mjs +4 -4
  45. package/package.json +1 -1
  46. package/dist/chunk-5OK753GA.js.map +0 -1
  47. package/dist/chunk-7JQQ2TH4.mjs +0 -1231
  48. package/dist/chunk-7JQQ2TH4.mjs.map +0 -1
  49. package/dist/chunk-HU5CTL4C.mjs.map +0 -1
  50. package/dist/chunk-QZHI2T7O.mjs.map +0 -1
  51. package/dist/chunk-SWUG4PTB.js +0 -464
  52. package/dist/chunk-SWUG4PTB.js.map +0 -1
  53. package/dist/chunk-WK7EJRBB.mjs +0 -1482
  54. package/dist/chunk-WK7EJRBB.mjs.map +0 -1
  55. package/dist/chunk-WYBYBPX5.js +0 -1518
  56. package/dist/chunk-WYBYBPX5.js.map +0 -1
  57. package/dist/chunk-ZKDXRGI5.js +0 -1239
  58. 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 VaultSLA as d, type VaultSupportedAsset as e, getChainFromConfig as g, toChainId as t };
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 VaultSLA as d, type VaultSupportedAsset as e, getChainFromConfig as g, toChainId as t };
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 };