@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.
- package/dist/src/abis/AtomicLiquidity.json +4050 -0
- package/dist/src/abis/ERC20Token.json +2 -2
- package/dist/src/abis/EmberETHVault.json +279 -5
- package/dist/src/abis/EmberProtocolConfig.json +170 -2
- package/dist/src/abis/EmberVault.json +2 -2
- package/dist/src/abis/EmberVaultMintBurnOFTAdapter.json +43 -2
- package/dist/src/api/v2/apis/accounts-api.d.ts +75 -0
- package/dist/src/api/v2/apis/accounts-api.js +134 -1
- package/dist/src/api/v2/apis/vaults-api.d.ts +16 -4
- package/dist/src/api/v2/apis/vaults-api.js +21 -7
- package/dist/src/api/v2/models/account-holdback.d.ts +103 -0
- package/dist/src/api/v2/models/account-holdback.js +17 -0
- package/dist/src/api/v2/models/account-transaction-transaction-data.d.ts +5 -1
- package/dist/src/api/v2/models/account-transaction.d.ts +5 -0
- package/dist/src/api/v2/models/account-transaction.js +6 -1
- package/dist/src/api/v2/models/chain-vault-details.d.ts +14 -0
- package/dist/src/api/v2/models/escrow-claim-transaction.d.ts +56 -0
- package/dist/src/api/v2/models/escrow-claim-transaction.js +14 -0
- package/dist/src/api/v2/models/evm-atomic-liquidity-lib.d.ts +48 -0
- package/dist/src/api/v2/models/evm-atomic-liquidity-lib.js +14 -0
- package/dist/src/api/v2/models/evm-atomic-vault.d.ts +102 -0
- package/dist/src/api/v2/models/evm-atomic-vault.js +14 -0
- package/dist/src/api/v2/models/evm-contracts.d.ts +16 -0
- package/dist/src/api/v2/models/fee-multiplier-tier.d.ts +30 -0
- package/dist/src/api/v2/models/fee-multiplier-tier.js +14 -0
- package/dist/src/api/v2/models/holdback-release-transaction.d.ts +56 -0
- package/dist/src/api/v2/models/holdback-release-transaction.js +14 -0
- package/dist/src/api/v2/models/index.d.ts +10 -0
- package/dist/src/api/v2/models/index.js +10 -0
- package/dist/src/api/v2/models/instant-withdraw-config.d.ts +109 -0
- package/dist/src/api/v2/models/instant-withdraw-config.js +14 -0
- package/dist/src/api/v2/models/instant-withdraw-transaction.d.ts +74 -0
- package/dist/src/api/v2/models/instant-withdraw-transaction.js +14 -0
- package/dist/src/api/v2/models/instant-withdraw-via-swap-transaction.d.ts +74 -0
- package/dist/src/api/v2/models/instant-withdraw-via-swap-transaction.js +14 -0
- package/dist/src/api/v2/models/supported-ember-vault.d.ts +42 -0
- package/dist/src/api/v2/models/supported-ember-vault.js +14 -0
- package/dist/src/api/v2/models/vault-detail.d.ts +11 -0
- package/dist/src/api/v2/models/vault-detail.js +4 -0
- package/dist/src/atomic/instant-withdraw.d.ts +125 -0
- package/dist/src/atomic/instant-withdraw.js +122 -0
- package/dist/src/ember-vaults.d.ts +2 -1
- package/dist/src/evm-vaults/on-chain-calls/atomic-liquidity.d.ts +98 -0
- package/dist/src/evm-vaults/on-chain-calls/atomic-liquidity.js +212 -0
- package/dist/src/evm-vaults/on-chain-calls/index.d.ts +1 -0
- package/dist/src/evm-vaults/on-chain-calls/index.js +1 -0
- package/dist/src/evm-vaults/on-chain-calls/operator.d.ts +10 -0
- package/dist/src/evm-vaults/on-chain-calls/operator.js +28 -0
- package/dist/src/evm-vaults/on-chain-calls/tx-builder.d.ts +109 -0
- package/dist/src/evm-vaults/on-chain-calls/tx-builder.js +281 -0
- package/dist/src/evm-vaults/on-chain-calls/user.d.ts +50 -0
- package/dist/src/evm-vaults/on-chain-calls/user.js +75 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-admin.d.ts +55 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-admin.js +122 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-reader.d.ts +6 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-reader.js +9 -0
- package/dist/src/evm-vaults/utils/deployment-parser.d.ts +8 -0
- package/dist/src/evm-vaults/utils/deployment-parser.js +11 -0
- package/dist/src/sui-vaults/interfaces/index.d.ts +15 -0
- package/dist/src/sui-vaults/on-chain-calls/admin.d.ts +37 -1
- package/dist/src/sui-vaults/on-chain-calls/admin.js +56 -0
- package/dist/src/sui-vaults/on-chain-calls/atomic-liquidity.d.ts +62 -0
- package/dist/src/sui-vaults/on-chain-calls/atomic-liquidity.js +174 -0
- package/dist/src/sui-vaults/on-chain-calls/index.d.ts +1 -0
- package/dist/src/sui-vaults/on-chain-calls/index.js +1 -0
- package/dist/src/sui-vaults/on-chain-calls/onchain-calls.d.ts +2 -1
- package/dist/src/sui-vaults/on-chain-calls/operator.d.ts +129 -1
- package/dist/src/sui-vaults/on-chain-calls/operator.js +210 -0
- package/dist/src/sui-vaults/on-chain-calls/tx-builder.d.ts +482 -0
- package/dist/src/sui-vaults/on-chain-calls/tx-builder.js +1430 -0
- package/dist/src/sui-vaults/on-chain-calls/user.d.ts +107 -1
- package/dist/src/sui-vaults/on-chain-calls/user.js +190 -0
- package/dist/src/sui-vaults/on-chain-calls/vault-admin.d.ts +229 -1
- package/dist/src/sui-vaults/on-chain-calls/vault-admin.js +391 -0
- package/dist/src/sui-vaults/on-chain-calls/vault.d.ts +2 -1
- package/dist/src/sui-vaults/utils/common.d.ts +2 -1
- package/dist/src/sui-vaults/utils/deployment-parser.d.ts +12 -0
- package/dist/src/sui-vaults/utils/deployment-parser.js +24 -0
- package/package.json +3 -2
|
@@ -177,4 +177,214 @@ export class OperatorCalls extends OnChainCalls {
|
|
|
177
177
|
});
|
|
178
178
|
return this.execCall(txb, options);
|
|
179
179
|
}
|
|
180
|
+
// ============================================================================
|
|
181
|
+
// Atomic Liquidity Vault (BFE-818) — operator / rate-manager methods
|
|
182
|
+
// ============================================================================
|
|
183
|
+
/**
|
|
184
|
+
* Process pending withdrawal requests of an atomic vault
|
|
185
|
+
* @param vaultId The id of the atomic vault
|
|
186
|
+
* @param maxRequests The maximum number of withdrawal requests to process
|
|
187
|
+
* @param options Optional tx execution params
|
|
188
|
+
* @returns OnChainCallResponse
|
|
189
|
+
*/
|
|
190
|
+
async atomicProcessWithdrawalRequests(vaultId, maxRequests, options) {
|
|
191
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
192
|
+
this.txBuilder.atomicProcessWithdrawalRequests(vaultId, maxRequests, {
|
|
193
|
+
...options,
|
|
194
|
+
txBlock: txb
|
|
195
|
+
});
|
|
196
|
+
return this.execCall(txb, options);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Process pending withdrawal requests of an atomic vault up to a timestamp
|
|
200
|
+
* @param vaultId The id of the atomic vault
|
|
201
|
+
* @param timestamp The timestamp to process withdrawal requests up to
|
|
202
|
+
* @param options Optional tx execution params
|
|
203
|
+
* @returns OnChainCallResponse
|
|
204
|
+
*/
|
|
205
|
+
async atomicProcessWithdrawalRequestsUpToTimestamp(vaultId, timestamp, options) {
|
|
206
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
207
|
+
this.txBuilder.atomicProcessWithdrawalRequestsUpToTimestamp(vaultId, timestamp, {
|
|
208
|
+
...options,
|
|
209
|
+
txBlock: txb
|
|
210
|
+
});
|
|
211
|
+
return this.execCall(txb, options);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Collect the platform fee of an atomic vault
|
|
215
|
+
* @param vaultId The id of the atomic vault
|
|
216
|
+
* @param loss The reported loss amount
|
|
217
|
+
* @param options Optional tx execution params
|
|
218
|
+
* @returns OnChainCallResponse
|
|
219
|
+
*/
|
|
220
|
+
async atomicCollectPlatformFee(vaultId, loss, options) {
|
|
221
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
222
|
+
this.txBuilder.atomicCollectPlatformFee(vaultId, loss, {
|
|
223
|
+
...options,
|
|
224
|
+
txBlock: txb
|
|
225
|
+
});
|
|
226
|
+
return this.execCall(txb, options);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Supply collateral from an atomic vault into the Suilend strategy
|
|
230
|
+
* @param vaultId The id of the atomic vault
|
|
231
|
+
* @param poolCoinType The Suilend pool coin type (P)
|
|
232
|
+
* @param lendingMarketId Object id of the Suilend LendingMarket<P>
|
|
233
|
+
* @param amount The amount to supply
|
|
234
|
+
* @param options Optional tx execution params
|
|
235
|
+
* @returns OnChainCallResponse
|
|
236
|
+
*/
|
|
237
|
+
async atomicSupplyToSuilendStrategy(vaultId, poolCoinType, lendingMarketId, amount, options) {
|
|
238
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
239
|
+
this.txBuilder.atomicSupplyToSuilendStrategy(vaultId, poolCoinType, lendingMarketId, amount, { ...options, txBlock: txb });
|
|
240
|
+
return this.execCall(txb, options);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Supply collateral from an atomic vault into the AlphaLend strategy
|
|
244
|
+
* @param vaultId The id of the atomic vault
|
|
245
|
+
* @param lendingProtocolId Object id of the AlphaLend LendingProtocol
|
|
246
|
+
* @param amount The amount to supply
|
|
247
|
+
* @param options Optional tx execution params
|
|
248
|
+
* @returns OnChainCallResponse
|
|
249
|
+
*/
|
|
250
|
+
async atomicSupplyToAlphalendStrategy(vaultId, lendingProtocolId, amount, options) {
|
|
251
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
252
|
+
this.txBuilder.atomicSupplyToAlphalendStrategy(vaultId, lendingProtocolId, amount, {
|
|
253
|
+
...options,
|
|
254
|
+
txBlock: txb
|
|
255
|
+
});
|
|
256
|
+
return this.execCall(txb, options);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Withdraw collateral from the Suilend strategy back into an atomic vault
|
|
260
|
+
* @param vaultId The id of the atomic vault
|
|
261
|
+
* @param poolCoinType The Suilend pool coin type (P)
|
|
262
|
+
* @param lendingMarketId Object id of the Suilend LendingMarket<P>
|
|
263
|
+
* @param amount The amount to withdraw
|
|
264
|
+
* @param options Optional tx execution params
|
|
265
|
+
* @returns OnChainCallResponse
|
|
266
|
+
*/
|
|
267
|
+
async atomicWithdrawFromSuilendStrategy(vaultId, poolCoinType, lendingMarketId, amount, options) {
|
|
268
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
269
|
+
this.txBuilder.atomicWithdrawFromSuilendStrategy(vaultId, poolCoinType, lendingMarketId, amount, { ...options, txBlock: txb });
|
|
270
|
+
return this.execCall(txb, options);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Withdraw collateral from the AlphaLend strategy back into an atomic vault
|
|
274
|
+
* @param vaultId The id of the atomic vault
|
|
275
|
+
* @param lendingProtocolId Object id of the AlphaLend LendingProtocol
|
|
276
|
+
* @param amount The amount to withdraw
|
|
277
|
+
* @param options Optional tx execution params
|
|
278
|
+
* @returns OnChainCallResponse
|
|
279
|
+
*/
|
|
280
|
+
async atomicWithdrawFromAlphalendStrategy(vaultId, lendingProtocolId, amount, options) {
|
|
281
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
282
|
+
this.txBuilder.atomicWithdrawFromAlphalendStrategy(vaultId, lendingProtocolId, amount, { ...options, txBlock: txb });
|
|
283
|
+
return this.execCall(txb, options);
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Supply collateral from an atomic vault to one of its sub accounts
|
|
287
|
+
* @param vaultId The id of the atomic vault
|
|
288
|
+
* @param subAccount The sub account address
|
|
289
|
+
* @param amount The amount to supply
|
|
290
|
+
* @param options Optional tx execution params
|
|
291
|
+
* @returns OnChainCallResponse
|
|
292
|
+
*/
|
|
293
|
+
async atomicSupplyToSubAccount(vaultId, subAccount, amount, options) {
|
|
294
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
295
|
+
this.txBuilder.atomicSupplyToSubAccount(vaultId, subAccount, amount, {
|
|
296
|
+
...options,
|
|
297
|
+
txBlock: txb
|
|
298
|
+
});
|
|
299
|
+
return this.execCall(txb, options);
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Deposit collateral back into an atomic vault from a sub account
|
|
303
|
+
* @param vaultId The id of the atomic vault
|
|
304
|
+
* @param tokenId Object id of the Receiving<Coin<T>> payment to claim
|
|
305
|
+
* @param subAccount The sub account address
|
|
306
|
+
* @param options Optional tx execution params
|
|
307
|
+
* @returns OnChainCallResponse
|
|
308
|
+
*/
|
|
309
|
+
async atomicDepositFromSubAccount(vaultId, tokenId, subAccount, options) {
|
|
310
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
311
|
+
this.txBuilder.atomicDepositFromSubAccount(vaultId, tokenId, subAccount, {
|
|
312
|
+
...options,
|
|
313
|
+
txBlock: txb
|
|
314
|
+
});
|
|
315
|
+
return this.execCall(txb, options);
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Redeem collected ember shares from an atomic vault against a source vault
|
|
319
|
+
* @param vaultId The id of the atomic vault
|
|
320
|
+
* @param sourceReceiptType The receipt coin type of the source vault (R)
|
|
321
|
+
* @param sourceVaultId Object id of the source Vault<T, R>
|
|
322
|
+
* @param amount The amount of shares to redeem
|
|
323
|
+
* @param options Optional tx execution params
|
|
324
|
+
* @returns OnChainCallResponse
|
|
325
|
+
*/
|
|
326
|
+
async atomicRedeemCollectedEmberShares(vaultId, sourceReceiptType, sourceVaultId, amount, options) {
|
|
327
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
328
|
+
this.txBuilder.atomicRedeemCollectedEmberShares(vaultId, sourceReceiptType, sourceVaultId, amount, { ...options, txBlock: txb });
|
|
329
|
+
return this.execCall(txb, options);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Release users' holdback for an ember share source vault
|
|
333
|
+
* @param vaultId The id of the atomic vault
|
|
334
|
+
* @param shareVaultId Id of the source ember share vault
|
|
335
|
+
* @param unwindingPercentage The unwinding percentage
|
|
336
|
+
* @param maxEntries The max entries to process
|
|
337
|
+
* @param options Optional tx execution params
|
|
338
|
+
* @returns OnChainCallResponse
|
|
339
|
+
*/
|
|
340
|
+
async atomicReleaseUsersHoldback(vaultId, shareVaultId, unwindingPercentage, maxEntries, options) {
|
|
341
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
342
|
+
this.txBuilder.atomicReleaseUsersHoldback(vaultId, shareVaultId, unwindingPercentage, maxEntries, { ...options, txBlock: txb });
|
|
343
|
+
return this.execCall(txb, options);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Claim received collateral (a Receiving<Coin<T>>) for an atomic vault
|
|
347
|
+
* @param vaultId The id of the atomic vault
|
|
348
|
+
* @param tokenId Object id of the Receiving<Coin<T>> payment to claim
|
|
349
|
+
* @param options Optional tx execution params
|
|
350
|
+
* @returns OnChainCallResponse
|
|
351
|
+
*/
|
|
352
|
+
async atomicClaimReceivedCollateral(vaultId, tokenId, options) {
|
|
353
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
354
|
+
this.txBuilder.atomicClaimReceivedCollateral(vaultId, tokenId, {
|
|
355
|
+
...options,
|
|
356
|
+
txBlock: txb
|
|
357
|
+
});
|
|
358
|
+
return this.execCall(txb, options);
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Claim returned ember shares (a Receiving<Coin<R>>) for an atomic vault
|
|
362
|
+
* @param vaultId The id of the atomic vault
|
|
363
|
+
* @param sourceReceiptType The receipt coin type of the source vault (R)
|
|
364
|
+
* @param sourceVaultId Id of the source vault the shares belong to
|
|
365
|
+
* @param tokenId Object id of the Receiving<Coin<R>> payment to claim
|
|
366
|
+
* @param options Optional tx execution params
|
|
367
|
+
* @returns OnChainCallResponse
|
|
368
|
+
*/
|
|
369
|
+
async atomicClaimReturnedEmberShares(vaultId, sourceReceiptType, sourceVaultId, tokenId, options) {
|
|
370
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
371
|
+
this.txBuilder.atomicClaimReturnedEmberShares(vaultId, sourceReceiptType, sourceVaultId, tokenId, { ...options, txBlock: txb });
|
|
372
|
+
return this.execCall(txb, options);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Update the rate of an atomic vault (rate manager role; uses operator class
|
|
376
|
+
* to mirror the receipt-vault `updateVaultRate` placement)
|
|
377
|
+
* @param vaultId The id of the atomic vault
|
|
378
|
+
* @param newRate The new rate to set for the vault
|
|
379
|
+
* @param options Optional tx execution params
|
|
380
|
+
* @returns OnChainCallResponse
|
|
381
|
+
*/
|
|
382
|
+
async atomicUpdateVaultRate(vaultId, newRate, options) {
|
|
383
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
384
|
+
this.txBuilder.atomicUpdateVaultRate(vaultId, newRate, {
|
|
385
|
+
...options,
|
|
386
|
+
txBlock: txb
|
|
387
|
+
});
|
|
388
|
+
return this.execCall(txb, options);
|
|
389
|
+
}
|
|
180
390
|
}
|