@ember-finance/sdk 2.5.0 → 2.6.0-pre.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.
Files changed (79) hide show
  1. package/dist/src/abis/AtomicLiquidity.json +4050 -0
  2. package/dist/src/abis/ERC20Token.json +2 -2
  3. package/dist/src/abis/EmberETHVault.json +279 -5
  4. package/dist/src/abis/EmberProtocolConfig.json +170 -2
  5. package/dist/src/abis/EmberVault.json +2 -2
  6. package/dist/src/abis/EmberVaultMintBurnOFTAdapter.json +43 -2
  7. package/dist/src/api/v2/apis/accounts-api.d.ts +75 -0
  8. package/dist/src/api/v2/apis/accounts-api.js +134 -1
  9. package/dist/src/api/v2/apis/vaults-api.d.ts +16 -4
  10. package/dist/src/api/v2/apis/vaults-api.js +21 -7
  11. package/dist/src/api/v2/models/account-holdback.d.ts +103 -0
  12. package/dist/src/api/v2/models/account-holdback.js +17 -0
  13. package/dist/src/api/v2/models/account-transaction-transaction-data.d.ts +5 -1
  14. package/dist/src/api/v2/models/account-transaction.d.ts +5 -0
  15. package/dist/src/api/v2/models/account-transaction.js +6 -1
  16. package/dist/src/api/v2/models/chain-vault-details.d.ts +14 -0
  17. package/dist/src/api/v2/models/escrow-claim-transaction.d.ts +56 -0
  18. package/dist/src/api/v2/models/escrow-claim-transaction.js +14 -0
  19. package/dist/src/api/v2/models/evm-atomic-liquidity-lib.d.ts +48 -0
  20. package/dist/src/api/v2/models/evm-atomic-liquidity-lib.js +14 -0
  21. package/dist/src/api/v2/models/evm-atomic-vault.d.ts +102 -0
  22. package/dist/src/api/v2/models/evm-atomic-vault.js +14 -0
  23. package/dist/src/api/v2/models/evm-contracts.d.ts +16 -0
  24. package/dist/src/api/v2/models/fee-multiplier-tier.d.ts +30 -0
  25. package/dist/src/api/v2/models/fee-multiplier-tier.js +14 -0
  26. package/dist/src/api/v2/models/holdback-release-transaction.d.ts +56 -0
  27. package/dist/src/api/v2/models/holdback-release-transaction.js +14 -0
  28. package/dist/src/api/v2/models/index.d.ts +10 -0
  29. package/dist/src/api/v2/models/index.js +10 -0
  30. package/dist/src/api/v2/models/instant-withdraw-config.d.ts +109 -0
  31. package/dist/src/api/v2/models/instant-withdraw-config.js +14 -0
  32. package/dist/src/api/v2/models/instant-withdraw-transaction.d.ts +74 -0
  33. package/dist/src/api/v2/models/instant-withdraw-transaction.js +14 -0
  34. package/dist/src/api/v2/models/instant-withdraw-via-swap-transaction.d.ts +74 -0
  35. package/dist/src/api/v2/models/instant-withdraw-via-swap-transaction.js +14 -0
  36. package/dist/src/api/v2/models/supported-ember-vault.d.ts +42 -0
  37. package/dist/src/api/v2/models/supported-ember-vault.js +14 -0
  38. package/dist/src/api/v2/models/vault-detail.d.ts +11 -0
  39. package/dist/src/api/v2/models/vault-detail.js +4 -0
  40. package/dist/src/atomic/instant-withdraw.d.ts +125 -0
  41. package/dist/src/atomic/instant-withdraw.js +122 -0
  42. package/dist/src/ember-vaults.d.ts +2 -1
  43. package/dist/src/evm-vaults/on-chain-calls/atomic-liquidity.d.ts +98 -0
  44. package/dist/src/evm-vaults/on-chain-calls/atomic-liquidity.js +212 -0
  45. package/dist/src/evm-vaults/on-chain-calls/index.d.ts +1 -0
  46. package/dist/src/evm-vaults/on-chain-calls/index.js +1 -0
  47. package/dist/src/evm-vaults/on-chain-calls/operator.d.ts +10 -0
  48. package/dist/src/evm-vaults/on-chain-calls/operator.js +28 -0
  49. package/dist/src/evm-vaults/on-chain-calls/tx-builder.d.ts +109 -0
  50. package/dist/src/evm-vaults/on-chain-calls/tx-builder.js +281 -0
  51. package/dist/src/evm-vaults/on-chain-calls/user.d.ts +50 -0
  52. package/dist/src/evm-vaults/on-chain-calls/user.js +75 -0
  53. package/dist/src/evm-vaults/on-chain-calls/vault-admin.d.ts +55 -0
  54. package/dist/src/evm-vaults/on-chain-calls/vault-admin.js +122 -0
  55. package/dist/src/evm-vaults/on-chain-calls/vault-reader.d.ts +6 -0
  56. package/dist/src/evm-vaults/on-chain-calls/vault-reader.js +9 -0
  57. package/dist/src/evm-vaults/utils/deployment-parser.d.ts +8 -0
  58. package/dist/src/evm-vaults/utils/deployment-parser.js +11 -0
  59. package/dist/src/sui-vaults/interfaces/index.d.ts +15 -0
  60. package/dist/src/sui-vaults/on-chain-calls/admin.d.ts +37 -1
  61. package/dist/src/sui-vaults/on-chain-calls/admin.js +56 -0
  62. package/dist/src/sui-vaults/on-chain-calls/atomic-liquidity.d.ts +62 -0
  63. package/dist/src/sui-vaults/on-chain-calls/atomic-liquidity.js +174 -0
  64. package/dist/src/sui-vaults/on-chain-calls/index.d.ts +1 -0
  65. package/dist/src/sui-vaults/on-chain-calls/index.js +1 -0
  66. package/dist/src/sui-vaults/on-chain-calls/onchain-calls.d.ts +2 -1
  67. package/dist/src/sui-vaults/on-chain-calls/operator.d.ts +129 -1
  68. package/dist/src/sui-vaults/on-chain-calls/operator.js +210 -0
  69. package/dist/src/sui-vaults/on-chain-calls/tx-builder.d.ts +482 -0
  70. package/dist/src/sui-vaults/on-chain-calls/tx-builder.js +1430 -0
  71. package/dist/src/sui-vaults/on-chain-calls/user.d.ts +107 -1
  72. package/dist/src/sui-vaults/on-chain-calls/user.js +190 -0
  73. package/dist/src/sui-vaults/on-chain-calls/vault-admin.d.ts +229 -1
  74. package/dist/src/sui-vaults/on-chain-calls/vault-admin.js +391 -0
  75. package/dist/src/sui-vaults/on-chain-calls/vault.d.ts +2 -1
  76. package/dist/src/sui-vaults/utils/common.d.ts +2 -1
  77. package/dist/src/sui-vaults/utils/deployment-parser.d.ts +12 -0
  78. package/dist/src/sui-vaults/utils/deployment-parser.js +24 -0
  79. package/package.json +3 -2
@@ -1,6 +1,7 @@
1
+ import { BaseClient as SuiClient } from "@mysten/sui/client";
1
2
  import { OnChainCalls } from "./onchain-calls.js";
2
3
  import { ISuiDeployment, IVaultOptionalParams } from "../interfaces/index.js";
3
- import { OnChainCallResponse, Signer, SuiAddress, SuiClient, SuiTransactionBlockResponseOptions, NumStr } from "@firefly-exchange/library-sui";
4
+ import { OnChainCallResponse, Signer, SuiAddress, SuiTransactionBlockResponseOptions, NumStr } from "@firefly-exchange/library-sui";
4
5
  import { TransactionObjectArgument } from "@mysten/sui/transactions";
5
6
  export declare class UserCalls extends OnChainCalls {
6
7
  constructor(_network: string, _suiClient: SuiClient, _deployment: ISuiDeployment, _signer?: Signer, _walletAddress?: string, _isUIWallet?: boolean);
@@ -55,4 +56,109 @@ export declare class UserCalls extends OnChainCalls {
55
56
  * @returns OnChainCallResponse
56
57
  */
57
58
  cancelPendingWithdrawalRequest(vaultId: string, sequenceNumber: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
59
+ /**
60
+ * Deposit collateral into an atomic liquidity vault, minting shares
61
+ * @param vaultId The id of the atomic vault to deposit into
62
+ * @param amount The amount of collateral to deposit
63
+ * @param minShares The minimum number of shares to mint for the deposit
64
+ * @param options Optional tx execution params
65
+ * @returns OnChainCallResponse
66
+ */
67
+ atomicDeposit(vaultId: string, amount: NumStr, minShares: NumStr, options?: IVaultOptionalParams & {
68
+ coinId?: string;
69
+ receiver?: SuiAddress;
70
+ } & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
71
+ /**
72
+ * Redeem shares from an atomic liquidity vault (queued withdrawal)
73
+ * @param vaultId The id of the atomic vault to redeem shares from
74
+ * @param shares The number of shares to redeem
75
+ * @param options Optional tx execution params
76
+ * @returns OnChainCallResponse
77
+ */
78
+ atomicRedeemShares(vaultId: string, shares: NumStr, options?: IVaultOptionalParams & {
79
+ receiver?: SuiAddress;
80
+ } & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
81
+ /**
82
+ * Cancel a pending withdrawal request on an atomic liquidity vault
83
+ * @param vaultId The id of the atomic vault
84
+ * @param sequenceNumber The sequence number of the withdrawal request to cancel
85
+ * @param options Optional tx execution params
86
+ * @returns OnChainCallResponse
87
+ */
88
+ atomicCancelPendingWithdrawalRequest(vaultId: string, sequenceNumber: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
89
+ /**
90
+ * Instantly withdraw collateral from an atomic liquidity vault (no strategy)
91
+ * @param vaultId The id of the atomic vault
92
+ * @param shares The number of shares to withdraw
93
+ * @param options Optional tx execution params
94
+ * @returns OnChainCallResponse
95
+ */
96
+ atomicInstantWithdraw(vaultId: string, shares: NumStr, options?: IVaultOptionalParams & {
97
+ receiver?: SuiAddress;
98
+ } & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
99
+ /**
100
+ * Instantly withdraw collateral from an atomic vault routed through Suilend
101
+ * @param vaultId The id of the atomic vault
102
+ * @param poolCoinType The Suilend pool coin type (P)
103
+ * @param lendingMarketId Object id of the Suilend LendingMarket<P>
104
+ * @param shares The number of shares to withdraw
105
+ * @param options Optional tx execution params
106
+ * @returns OnChainCallResponse
107
+ */
108
+ atomicInstantWithdrawWithSuilend(vaultId: string, poolCoinType: string, lendingMarketId: string, shares: NumStr, options?: IVaultOptionalParams & {
109
+ receiver?: SuiAddress;
110
+ } & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
111
+ /**
112
+ * Instantly withdraw collateral from an atomic vault routed through AlphaLend
113
+ * @param vaultId The id of the atomic vault
114
+ * @param lendingProtocolId Object id of the AlphaLend LendingProtocol
115
+ * @param shares The number of shares to withdraw
116
+ * @param options Optional tx execution params
117
+ * @returns OnChainCallResponse
118
+ */
119
+ atomicInstantWithdrawWithAlphalend(vaultId: string, lendingProtocolId: string, shares: NumStr, options?: IVaultOptionalParams & {
120
+ receiver?: SuiAddress;
121
+ } & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
122
+ /**
123
+ * Swap ember shares (source vault receipt coin) into an atomic vault
124
+ * @param vaultId The id of the atomic vault
125
+ * @param sourceReceiptType The receipt coin type of the source vault (R)
126
+ * @param sourceVaultId Object id of the source Vault<T, R>
127
+ * @param amount The amount of source shares to swap
128
+ * @param options Optional tx execution params
129
+ * @returns OnChainCallResponse
130
+ */
131
+ atomicSwapEmberShares(vaultId: string, sourceReceiptType: string, sourceVaultId: string, amount: NumStr, options?: IVaultOptionalParams & {
132
+ coinId?: string;
133
+ receiver?: SuiAddress;
134
+ } & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
135
+ /**
136
+ * Swap ember shares into an atomic vault, routing collateral through Suilend
137
+ * @param vaultId The id of the atomic vault
138
+ * @param sourceReceiptType The receipt coin type of the source vault (R)
139
+ * @param poolCoinType The Suilend pool coin type (P)
140
+ * @param sourceVaultId Object id of the source Vault<T, R>
141
+ * @param lendingMarketId Object id of the Suilend LendingMarket<P>
142
+ * @param amount The amount of source shares to swap
143
+ * @param options Optional tx execution params
144
+ * @returns OnChainCallResponse
145
+ */
146
+ atomicSwapEmberSharesWithSuilend(vaultId: string, sourceReceiptType: string, poolCoinType: string, sourceVaultId: string, lendingMarketId: string, amount: NumStr, options?: IVaultOptionalParams & {
147
+ coinId?: string;
148
+ receiver?: SuiAddress;
149
+ } & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
150
+ /**
151
+ * Swap ember shares into an atomic vault, routing collateral through AlphaLend
152
+ * @param vaultId The id of the atomic vault
153
+ * @param sourceReceiptType The receipt coin type of the source vault (R)
154
+ * @param sourceVaultId Object id of the source Vault<T, R>
155
+ * @param lendingProtocolId Object id of the AlphaLend LendingProtocol
156
+ * @param amount The amount of source shares to swap
157
+ * @param options Optional tx execution params
158
+ * @returns OnChainCallResponse
159
+ */
160
+ atomicSwapEmberSharesWithAlphalend(vaultId: string, sourceReceiptType: string, sourceVaultId: string, lendingProtocolId: string, amount: NumStr, options?: IVaultOptionalParams & {
161
+ coinId?: string;
162
+ receiver?: SuiAddress;
163
+ } & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
58
164
  }
@@ -124,4 +124,194 @@ export class UserCalls extends OnChainCalls {
124
124
  });
125
125
  return this.execCall(txb, options);
126
126
  }
127
+ // ============================================================================
128
+ // Atomic Liquidity Vault (BFE-818) — user-callable methods
129
+ // ============================================================================
130
+ /**
131
+ * Deposit collateral into an atomic liquidity vault, minting shares
132
+ * @param vaultId The id of the atomic vault to deposit into
133
+ * @param amount The amount of collateral to deposit
134
+ * @param minShares The minimum number of shares to mint for the deposit
135
+ * @param options Optional tx execution params
136
+ * @returns OnChainCallResponse
137
+ */
138
+ async atomicDeposit(vaultId, amount, minShares, options) {
139
+ let coinId = options?.coinId;
140
+ const txb = options?.txBlock || new TransactionBlock();
141
+ let split;
142
+ let merged;
143
+ if (!coinId) {
144
+ const coinType = this.parser.getAtomicCollateralType(vaultId);
145
+ [split, merged] = await CoinUtils.createCoinWithBalance(this.suiClient, txb, bigNumber(amount).toFixed(0), coinType, this.walletAddress);
146
+ coinId = split;
147
+ }
148
+ else {
149
+ [split, merged] = await CoinUtils.validateCoinBalance(this.suiClient, txb, bigNumber(amount).toFixed(0), coinId);
150
+ coinId = split;
151
+ }
152
+ this.txBuilder.atomicDeposit(vaultId, coinId, minShares, options?.receiver ?? null, { ...options, txBlock: txb });
153
+ if (merged) {
154
+ txb.transferObjects([merged], this.walletAddress);
155
+ }
156
+ return this.execCall(txb, options);
157
+ }
158
+ /**
159
+ * Redeem shares from an atomic liquidity vault (queued withdrawal)
160
+ * @param vaultId The id of the atomic vault to redeem shares from
161
+ * @param shares The number of shares to redeem
162
+ * @param options Optional tx execution params
163
+ * @returns OnChainCallResponse
164
+ */
165
+ async atomicRedeemShares(vaultId, shares, options) {
166
+ const txb = options?.txBlock || new TransactionBlock();
167
+ this.txBuilder.atomicRedeemShares(vaultId, shares, options?.receiver ?? null, {
168
+ ...options,
169
+ txBlock: txb
170
+ });
171
+ return this.execCall(txb, options);
172
+ }
173
+ /**
174
+ * Cancel a pending withdrawal request on an atomic liquidity vault
175
+ * @param vaultId The id of the atomic vault
176
+ * @param sequenceNumber The sequence number of the withdrawal request to cancel
177
+ * @param options Optional tx execution params
178
+ * @returns OnChainCallResponse
179
+ */
180
+ async atomicCancelPendingWithdrawalRequest(vaultId, sequenceNumber, options) {
181
+ const txb = options?.txBlock || new TransactionBlock();
182
+ this.txBuilder.atomicCancelPendingWithdrawalRequest(vaultId, sequenceNumber, {
183
+ ...options,
184
+ txBlock: txb
185
+ });
186
+ return this.execCall(txb, options);
187
+ }
188
+ /**
189
+ * Instantly withdraw collateral from an atomic liquidity vault (no strategy)
190
+ * @param vaultId The id of the atomic vault
191
+ * @param shares The number of shares to withdraw
192
+ * @param options Optional tx execution params
193
+ * @returns OnChainCallResponse
194
+ */
195
+ async atomicInstantWithdraw(vaultId, shares, options) {
196
+ const txb = options?.txBlock || new TransactionBlock();
197
+ this.txBuilder.atomicInstantWithdraw(vaultId, shares, options?.receiver ?? null, {
198
+ ...options,
199
+ txBlock: txb
200
+ });
201
+ return this.execCall(txb, options);
202
+ }
203
+ /**
204
+ * Instantly withdraw collateral from an atomic vault routed through Suilend
205
+ * @param vaultId The id of the atomic vault
206
+ * @param poolCoinType The Suilend pool coin type (P)
207
+ * @param lendingMarketId Object id of the Suilend LendingMarket<P>
208
+ * @param shares The number of shares to withdraw
209
+ * @param options Optional tx execution params
210
+ * @returns OnChainCallResponse
211
+ */
212
+ async atomicInstantWithdrawWithSuilend(vaultId, poolCoinType, lendingMarketId, shares, options) {
213
+ const txb = options?.txBlock || new TransactionBlock();
214
+ this.txBuilder.atomicInstantWithdrawWithSuilend(vaultId, poolCoinType, lendingMarketId, shares, options?.receiver ?? null, { ...options, txBlock: txb });
215
+ return this.execCall(txb, options);
216
+ }
217
+ /**
218
+ * Instantly withdraw collateral from an atomic vault routed through AlphaLend
219
+ * @param vaultId The id of the atomic vault
220
+ * @param lendingProtocolId Object id of the AlphaLend LendingProtocol
221
+ * @param shares The number of shares to withdraw
222
+ * @param options Optional tx execution params
223
+ * @returns OnChainCallResponse
224
+ */
225
+ async atomicInstantWithdrawWithAlphalend(vaultId, lendingProtocolId, shares, options) {
226
+ const txb = options?.txBlock || new TransactionBlock();
227
+ this.txBuilder.atomicInstantWithdrawWithAlphalend(vaultId, lendingProtocolId, shares, options?.receiver ?? null, { ...options, txBlock: txb });
228
+ return this.execCall(txb, options);
229
+ }
230
+ /**
231
+ * Swap ember shares (source vault receipt coin) into an atomic vault
232
+ * @param vaultId The id of the atomic vault
233
+ * @param sourceReceiptType The receipt coin type of the source vault (R)
234
+ * @param sourceVaultId Object id of the source Vault<T, R>
235
+ * @param amount The amount of source shares to swap
236
+ * @param options Optional tx execution params
237
+ * @returns OnChainCallResponse
238
+ */
239
+ async atomicSwapEmberShares(vaultId, sourceReceiptType, sourceVaultId, amount, options) {
240
+ let coinId = options?.coinId;
241
+ const txb = options?.txBlock || new TransactionBlock();
242
+ let split;
243
+ let merged;
244
+ if (!coinId) {
245
+ [split, merged] = await CoinUtils.createCoinWithBalance(this.suiClient, txb, bigNumber(amount).toFixed(0), sourceReceiptType, this.walletAddress);
246
+ coinId = split;
247
+ }
248
+ else {
249
+ [split, merged] = await CoinUtils.validateCoinBalance(this.suiClient, txb, bigNumber(amount).toFixed(0), coinId);
250
+ coinId = split;
251
+ }
252
+ this.txBuilder.atomicSwapEmberShares(vaultId, sourceReceiptType, sourceVaultId, coinId, options?.receiver ?? null, { ...options, txBlock: txb });
253
+ if (merged) {
254
+ txb.transferObjects([merged], this.walletAddress);
255
+ }
256
+ return this.execCall(txb, options);
257
+ }
258
+ /**
259
+ * Swap ember shares into an atomic vault, routing collateral through Suilend
260
+ * @param vaultId The id of the atomic vault
261
+ * @param sourceReceiptType The receipt coin type of the source vault (R)
262
+ * @param poolCoinType The Suilend pool coin type (P)
263
+ * @param sourceVaultId Object id of the source Vault<T, R>
264
+ * @param lendingMarketId Object id of the Suilend LendingMarket<P>
265
+ * @param amount The amount of source shares to swap
266
+ * @param options Optional tx execution params
267
+ * @returns OnChainCallResponse
268
+ */
269
+ async atomicSwapEmberSharesWithSuilend(vaultId, sourceReceiptType, poolCoinType, sourceVaultId, lendingMarketId, amount, options) {
270
+ let coinId = options?.coinId;
271
+ const txb = options?.txBlock || new TransactionBlock();
272
+ let split;
273
+ let merged;
274
+ if (!coinId) {
275
+ [split, merged] = await CoinUtils.createCoinWithBalance(this.suiClient, txb, bigNumber(amount).toFixed(0), sourceReceiptType, this.walletAddress);
276
+ coinId = split;
277
+ }
278
+ else {
279
+ [split, merged] = await CoinUtils.validateCoinBalance(this.suiClient, txb, bigNumber(amount).toFixed(0), coinId);
280
+ coinId = split;
281
+ }
282
+ this.txBuilder.atomicSwapEmberSharesWithSuilend(vaultId, sourceReceiptType, poolCoinType, sourceVaultId, lendingMarketId, coinId, options?.receiver ?? null, { ...options, txBlock: txb });
283
+ if (merged) {
284
+ txb.transferObjects([merged], this.walletAddress);
285
+ }
286
+ return this.execCall(txb, options);
287
+ }
288
+ /**
289
+ * Swap ember shares into an atomic vault, routing collateral through AlphaLend
290
+ * @param vaultId The id of the atomic vault
291
+ * @param sourceReceiptType The receipt coin type of the source vault (R)
292
+ * @param sourceVaultId Object id of the source Vault<T, R>
293
+ * @param lendingProtocolId Object id of the AlphaLend LendingProtocol
294
+ * @param amount The amount of source shares to swap
295
+ * @param options Optional tx execution params
296
+ * @returns OnChainCallResponse
297
+ */
298
+ async atomicSwapEmberSharesWithAlphalend(vaultId, sourceReceiptType, sourceVaultId, lendingProtocolId, amount, options) {
299
+ let coinId = options?.coinId;
300
+ const txb = options?.txBlock || new TransactionBlock();
301
+ let split;
302
+ let merged;
303
+ if (!coinId) {
304
+ [split, merged] = await CoinUtils.createCoinWithBalance(this.suiClient, txb, bigNumber(amount).toFixed(0), sourceReceiptType, this.walletAddress);
305
+ coinId = split;
306
+ }
307
+ else {
308
+ [split, merged] = await CoinUtils.validateCoinBalance(this.suiClient, txb, bigNumber(amount).toFixed(0), coinId);
309
+ coinId = split;
310
+ }
311
+ this.txBuilder.atomicSwapEmberSharesWithAlphalend(vaultId, sourceReceiptType, sourceVaultId, lendingProtocolId, coinId, options?.receiver ?? null, { ...options, txBlock: txb });
312
+ if (merged) {
313
+ txb.transferObjects([merged], this.walletAddress);
314
+ }
315
+ return this.execCall(txb, options);
316
+ }
127
317
  }
@@ -1,7 +1,8 @@
1
+ import { BaseClient as SuiClient } from "@mysten/sui/client";
1
2
  import { OnChainCalls } from "./onchain-calls.js";
2
3
  import { ISuiDeployment, IVaultOptionalParams } from "../interfaces/index.js";
3
4
  import { NumStr } from "@firefly-exchange/library-sui";
4
- import { OnChainCallResponse, Signer, SuiClient, SuiTransactionBlockResponseOptions } from "@firefly-exchange/library-sui";
5
+ import { OnChainCallResponse, Signer, SuiAddress, SuiTransactionBlockResponseOptions } from "@firefly-exchange/library-sui";
5
6
  export declare class VaultAdminCalls extends OnChainCalls {
6
7
  constructor(_network: string, _suiClient: SuiClient, _deployment: ISuiDeployment, _signer?: Signer, _walletAddress?: string);
7
8
  /**
@@ -85,4 +86,231 @@ export declare class VaultAdminCalls extends OnChainCalls {
85
86
  * @returns OnChainCallResponse
86
87
  */
87
88
  setTimeBasedFeeThreshold(vaultId: string, timeBasedFeeThreshold: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
89
+ /**
90
+ * Update the name of an atomic vault
91
+ * @param vaultId The id of the atomic vault
92
+ * @param name The new vault name
93
+ * @param options Optional tx execution params
94
+ * @returns OnChainCallResponse
95
+ */
96
+ atomicUpdateVaultName(vaultId: string, name: string, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
97
+ /**
98
+ * Update the max TVL of an atomic vault
99
+ * @param vaultId The id of the atomic vault
100
+ * @param maxTVL The new max TVL
101
+ * @param options Optional tx execution params
102
+ * @returns OnChainCallResponse
103
+ */
104
+ atomicUpdateVaultMaxTvl(vaultId: string, maxTVL: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
105
+ /**
106
+ * Update the max rate change per update of an atomic vault
107
+ * @param vaultId The id of the atomic vault
108
+ * @param maxRateChangePerUpdate The new max rate change per update
109
+ * @param options Optional tx execution params
110
+ * @returns OnChainCallResponse
111
+ */
112
+ atomicUpdateVaultMaxRateChangePerUpdate(vaultId: string, maxRateChangePerUpdate: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
113
+ /**
114
+ * Change the rate update interval of an atomic vault
115
+ * @param vaultId The id of the atomic vault
116
+ * @param interval The new rate update interval in ms
117
+ * @param options Optional tx execution params
118
+ * @returns OnChainCallResponse
119
+ */
120
+ atomicChangeVaultRateUpdateInterval(vaultId: string, interval: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
121
+ /**
122
+ * Change the operator of an atomic vault
123
+ * @param vaultId The id of the atomic vault
124
+ * @param newOperator The new operator address
125
+ * @param options Optional tx execution params
126
+ * @returns OnChainCallResponse
127
+ */
128
+ atomicChangeVaultOperator(vaultId: string, newOperator: SuiAddress, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
129
+ /**
130
+ * Update the rate manager of an atomic vault
131
+ * @param vaultId The id of the atomic vault
132
+ * @param newRateManager The new rate manager address
133
+ * @param options Optional tx execution params
134
+ * @returns OnChainCallResponse
135
+ */
136
+ atomicUpdateVaultRateManager(vaultId: string, newRateManager: SuiAddress, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
137
+ /**
138
+ * Update the fee percentage of an atomic vault
139
+ * @param vaultId The id of the atomic vault
140
+ * @param feePercentage The new fee percentage
141
+ * @param options Optional tx execution params
142
+ * @returns OnChainCallResponse
143
+ */
144
+ atomicUpdateVaultFeePercentage(vaultId: string, feePercentage: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
145
+ /**
146
+ * Set the min withdrawal shares of an atomic vault
147
+ * @param vaultId The id of the atomic vault
148
+ * @param minWithdrawalShares The new min withdrawal shares
149
+ * @param options Optional tx execution params
150
+ * @returns OnChainCallResponse
151
+ */
152
+ atomicSetMinWithdrawalShares(vaultId: string, minWithdrawalShares: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
153
+ /**
154
+ * Set / unset a sub account on an atomic vault
155
+ * @param vaultId The id of the atomic vault
156
+ * @param account The sub account address
157
+ * @param status Whether the account is a sub account
158
+ * @param options Optional tx execution params
159
+ * @returns OnChainCallResponse
160
+ */
161
+ atomicSetSubAccount(vaultId: string, account: SuiAddress, status: boolean, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
162
+ /**
163
+ * Set the pause status of an operation on an atomic vault
164
+ * @param vaultId The id of the atomic vault
165
+ * @param operation The operation identifier bytes (vector<u8>)
166
+ * @param paused The new paused status
167
+ * @param options Optional tx execution params
168
+ * @returns OnChainCallResponse
169
+ */
170
+ atomicSetPauseStatus(vaultId: string, operation: number[], paused: boolean, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
171
+ /**
172
+ * Set the max instant withdraw shares of an atomic vault
173
+ * @param vaultId The id of the atomic vault
174
+ * @param newMax The new max instant withdraw shares
175
+ * @param options Optional tx execution params
176
+ * @returns OnChainCallResponse
177
+ */
178
+ atomicSetMaxInstantWithdrawShares(vaultId: string, newMax: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
179
+ /**
180
+ * Set the instant withdraw fee percentage of an atomic vault
181
+ * @param vaultId The id of the atomic vault
182
+ * @param newFeePercentage The new instant withdraw fee percentage
183
+ * @param options Optional tx execution params
184
+ * @returns OnChainCallResponse
185
+ */
186
+ atomicSetInstantWithdrawFeePercentage(vaultId: string, newFeePercentage: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
187
+ /**
188
+ * Whitelist (or update) an ember share source vault for an atomic vault
189
+ * @param vaultId The id of the atomic vault
190
+ * @param shareVaultId Id of the source ember share vault
191
+ * @param whitelisted The whitelist status
192
+ * @param feePercentage The fee percentage
193
+ * @param maxCapacityPercentage The max capacity percentage
194
+ * @param holdbackPercentage The holdback percentage
195
+ * @param maxUtilizationPercentage The max utilization percentage
196
+ * @param options Optional tx execution params
197
+ * @returns OnChainCallResponse
198
+ */
199
+ atomicSetEmberShareWhitelist(vaultId: string, shareVaultId: string, whitelisted: boolean, feePercentage: NumStr, maxCapacityPercentage: NumStr, holdbackPercentage: NumStr, maxUtilizationPercentage: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
200
+ /**
201
+ * Set the max utilization percentage of an ember share source vault
202
+ * @param vaultId The id of the atomic vault
203
+ * @param shareVaultId Id of the source ember share vault
204
+ * @param maxUtilizationPercentage The max utilization percentage
205
+ * @param options Optional tx execution params
206
+ * @returns OnChainCallResponse
207
+ */
208
+ atomicSetEmberShareMaxUtilization(vaultId: string, shareVaultId: string, maxUtilizationPercentage: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
209
+ /**
210
+ * Set a fee multiplier tier for an ember share source vault
211
+ * @param vaultId The id of the atomic vault
212
+ * @param shareVaultId Id of the source ember share vault
213
+ * @param threshold The tier threshold
214
+ * @param multiplier The tier multiplier
215
+ * @param options Optional tx execution params
216
+ * @returns OnChainCallResponse
217
+ */
218
+ atomicSetEmberShareFeeMultiplierTier(vaultId: string, shareVaultId: string, threshold: NumStr, multiplier: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
219
+ /**
220
+ * Remove a fee multiplier tier for an ember share source vault
221
+ * @param vaultId The id of the atomic vault
222
+ * @param shareVaultId Id of the source ember share vault
223
+ * @param threshold The tier threshold to remove
224
+ * @param options Optional tx execution params
225
+ * @returns OnChainCallResponse
226
+ */
227
+ atomicRemoveEmberShareFeeMultiplierTier(vaultId: string, shareVaultId: string, threshold: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
228
+ /**
229
+ * Set a swap waiver for an account on an atomic vault
230
+ * @param vaultId The id of the atomic vault
231
+ * @param account The account address
232
+ * @param feeWaived Whether the swap fee is waived
233
+ * @param holdbackWaived Whether the holdback is waived
234
+ * @param options Optional tx execution params
235
+ * @returns OnChainCallResponse
236
+ */
237
+ atomicSetSwapWaiver(vaultId: string, account: SuiAddress, feeWaived: boolean, holdbackWaived: boolean, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
238
+ /**
239
+ * Set the permanent withdrawal fee percentage of an atomic vault
240
+ * @param vaultId The id of the atomic vault
241
+ * @param permanentFeePercentage The new permanent fee percentage
242
+ * @param options Optional tx execution params
243
+ * @returns OnChainCallResponse
244
+ */
245
+ atomicSetPermanentFeePercentage(vaultId: string, permanentFeePercentage: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
246
+ /**
247
+ * Set the time based withdrawal fee percentage of an atomic vault
248
+ * @param vaultId The id of the atomic vault
249
+ * @param timeBasedFeePercentage The new time based fee percentage
250
+ * @param options Optional tx execution params
251
+ * @returns OnChainCallResponse
252
+ */
253
+ atomicSetTimeBasedFeePercentage(vaultId: string, timeBasedFeePercentage: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
254
+ /**
255
+ * Set the time based withdrawal fee threshold of an atomic vault
256
+ * @param vaultId The id of the atomic vault
257
+ * @param timeBasedFeeThreshold The new time based fee threshold
258
+ * @param options Optional tx execution params
259
+ * @returns OnChainCallResponse
260
+ */
261
+ atomicSetTimeBasedFeeThreshold(vaultId: string, timeBasedFeeThreshold: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
262
+ /**
263
+ * Set / unset a user on the fee exemption list of an atomic vault
264
+ * @param vaultId The id of the atomic vault
265
+ * @param user The user address
266
+ * @param status The status of the user in the fee exemption list
267
+ * @param options Optional tx execution params
268
+ * @returns OnChainCallResponse
269
+ */
270
+ atomicSetFeeExemptionList(vaultId: string, user: SuiAddress, status: boolean, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
271
+ /**
272
+ * Set / unset a user on the deposit user list of an atomic vault
273
+ * @param vaultId The id of the atomic vault
274
+ * @param user The user address
275
+ * @param status The status of the user in the deposit list
276
+ * @param options Optional tx execution params
277
+ * @returns OnChainCallResponse
278
+ */
279
+ atomicSetDepositUserList(vaultId: string, user: SuiAddress, status: boolean, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
280
+ /**
281
+ * Set the Suilend strategy for an atomic vault
282
+ * @param vaultId The id of the atomic vault
283
+ * @param reserveArrayIndex The Suilend reserve array index
284
+ * @param options Optional tx execution params
285
+ * @returns OnChainCallResponse
286
+ */
287
+ atomicSetStrategySuilend(vaultId: string, reserveArrayIndex: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
288
+ /**
289
+ * Set the AlphaLend strategy for an atomic vault
290
+ * @param vaultId The id of the atomic vault
291
+ * @param lendingProtocolId Object id of the AlphaLend LendingProtocol
292
+ * @param marketId The AlphaLend market id
293
+ * @param options Optional tx execution params
294
+ * @returns OnChainCallResponse
295
+ */
296
+ atomicSetStrategyAlphalend(vaultId: string, lendingProtocolId: string, marketId: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
297
+ /**
298
+ * Switch an atomic vault from the Suilend strategy to STRATEGY_NONE,
299
+ * draining cTokens back into the vault balance
300
+ * @param vaultId The id of the atomic vault
301
+ * @param poolCoinType The Suilend pool coin type (P)
302
+ * @param lendingMarketId Object id of the Suilend LendingMarket<P>
303
+ * @param options Optional tx execution params
304
+ * @returns OnChainCallResponse
305
+ */
306
+ atomicSetStrategyNoneFromSuilend(vaultId: string, poolCoinType: string, lendingMarketId: string, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
307
+ /**
308
+ * Switch an atomic vault from the AlphaLend strategy to STRATEGY_NONE,
309
+ * draining the full position collateral back into the vault balance
310
+ * @param vaultId The id of the atomic vault
311
+ * @param lendingProtocolId Object id of the AlphaLend LendingProtocol
312
+ * @param options Optional tx execution params
313
+ * @returns OnChainCallResponse
314
+ */
315
+ atomicSetStrategyNoneFromAlphalend(vaultId: string, lendingProtocolId: string, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
88
316
  }