@ember-finance/sdk 2.6.0 → 2.8.0
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/api/v2/models/vault-detail.d.ts +12 -0
- package/dist/src/sui-vaults/on-chain-calls/operator.d.ts +12 -0
- package/dist/src/sui-vaults/on-chain-calls/operator.js +19 -0
- package/dist/src/sui-vaults/on-chain-calls/tx-builder.d.ts +16 -0
- package/dist/src/sui-vaults/on-chain-calls/tx-builder.js +36 -0
- package/package.json +1 -1
|
@@ -30,6 +30,12 @@ export interface VaultDetail {
|
|
|
30
30
|
* @memberof VaultDetail
|
|
31
31
|
*/
|
|
32
32
|
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* General-purpose reference to another vault: its offchain UUID, the same identifier this schema exposes as `id`. What the reference means is conveyed by the vault\'s `tags`, not by this field. Null when the vault references no other vault.
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof VaultDetail
|
|
37
|
+
*/
|
|
38
|
+
referenceVaultId?: string | null;
|
|
33
39
|
/**
|
|
34
40
|
* Vault flavor at the parent (root) level. TOKENIZED vaults mint a transferable receipt token. ATOMIC (atomic-liquidity) vaults use non-transferable internal shares and have no real receipt token. Defaults to TOKENIZED for backward compatibility.
|
|
35
41
|
* @type {string}
|
|
@@ -236,6 +242,12 @@ export interface VaultDetail {
|
|
|
236
242
|
* @memberof VaultDetail
|
|
237
243
|
*/
|
|
238
244
|
redemptionPriceE9?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Free-form display text for the \"Price Updates\" row of the vault details panel, describing how often this vault\'s share price is updated (e.g. \"Updated Biweekly\"). Rendered verbatim by the frontend — it is display copy, not a machine-readable cadence. Absent when not configured for the vault, in which case the frontend falls back to its own default.
|
|
247
|
+
* @type {string}
|
|
248
|
+
* @memberof VaultDetail
|
|
249
|
+
*/
|
|
250
|
+
priceUpdatesFrequencyRemarks?: string;
|
|
239
251
|
/**
|
|
240
252
|
* The DeFi app integrations associated with the vault (shown on the vault details page)
|
|
241
253
|
* @type {Array<DefiIntegration>}
|
|
@@ -66,6 +66,18 @@ export declare class OperatorCalls extends OnChainCalls {
|
|
|
66
66
|
depositToVaultWithoutMintingSharesV2(vaultId: string, subAccount: string, coinId: string, options?: IVaultOptionalParams & {
|
|
67
67
|
coinId?: string;
|
|
68
68
|
} & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Deposit to vault without minting shares v3, sourcing the funds from the
|
|
71
|
+
* vault's accumulator (address) balance instead of a coin object. Use this
|
|
72
|
+
* when the vault holds an `addressBalance` but no coin objects, which is
|
|
73
|
+
* how funds sent via `send_funds` arrive.
|
|
74
|
+
* @param vaultId The id of the vault to deposit to
|
|
75
|
+
* @param subAccount The sub account to deposit from
|
|
76
|
+
* @param amount The amount to redeem from the vault's accumulator balance
|
|
77
|
+
* @param options Optional tx execution params
|
|
78
|
+
* @returns OnChainCallResponse
|
|
79
|
+
*/
|
|
80
|
+
depositToVaultWithoutMintingSharesV3(vaultId: string, subAccount: string, amount: NumStr, options?: IVaultOptionalParams & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
|
|
69
81
|
/**
|
|
70
82
|
* Update vault rate
|
|
71
83
|
* @param vaultId The id of the vault to update the rate for
|
|
@@ -117,6 +117,25 @@ export class OperatorCalls extends OnChainCalls {
|
|
|
117
117
|
});
|
|
118
118
|
return this.execCall(txb, options);
|
|
119
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Deposit to vault without minting shares v3, sourcing the funds from the
|
|
122
|
+
* vault's accumulator (address) balance instead of a coin object. Use this
|
|
123
|
+
* when the vault holds an `addressBalance` but no coin objects, which is
|
|
124
|
+
* how funds sent via `send_funds` arrive.
|
|
125
|
+
* @param vaultId The id of the vault to deposit to
|
|
126
|
+
* @param subAccount The sub account to deposit from
|
|
127
|
+
* @param amount The amount to redeem from the vault's accumulator balance
|
|
128
|
+
* @param options Optional tx execution params
|
|
129
|
+
* @returns OnChainCallResponse
|
|
130
|
+
*/
|
|
131
|
+
async depositToVaultWithoutMintingSharesV3(vaultId, subAccount, amount, options) {
|
|
132
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
133
|
+
this.txBuilder.depositToVaultWithoutMintingSharesV3(vaultId, subAccount, amount, {
|
|
134
|
+
...options,
|
|
135
|
+
txBlock: txb
|
|
136
|
+
});
|
|
137
|
+
return this.execCall(txb, options);
|
|
138
|
+
}
|
|
120
139
|
/**
|
|
121
140
|
* Update vault rate
|
|
122
141
|
* @param vaultId The id of the vault to update the rate for
|
|
@@ -231,6 +231,22 @@ export declare class TxBuilder {
|
|
|
231
231
|
* @returns TransactionBlock
|
|
232
232
|
*/
|
|
233
233
|
depositToVaultWithoutMintingSharesV2(vaultId: string, subAccount: string, coinId: string, options?: ITxBuilderOptionalParams): TransactionBlock;
|
|
234
|
+
/**
|
|
235
|
+
* Deposit to vault without minting shares v3, sourcing the funds from the
|
|
236
|
+
* vault's accumulator (address) balance instead of a coin object.
|
|
237
|
+
*
|
|
238
|
+
* Funds sent with `balance::send_funds`/`coin::send_funds` merge into the
|
|
239
|
+
* recipient's accumulator and never become coin objects, so they are
|
|
240
|
+
* invisible to v1/v2 and to coin enumeration. There is no redeem-all
|
|
241
|
+
* primitive on chain, so `amount` is explicit — read the settled balance
|
|
242
|
+
* first (`getBalance().addressBalance`).
|
|
243
|
+
* @param vaultId Id of the vault
|
|
244
|
+
* @param subAccount Sub account of the vault
|
|
245
|
+
* @param amount Amount to redeem from the vault's accumulator balance
|
|
246
|
+
* @param options Optional tx building params
|
|
247
|
+
* @returns TransactionBlock
|
|
248
|
+
*/
|
|
249
|
+
depositToVaultWithoutMintingSharesV3(vaultId: string, subAccount: string, amount: NumStr, options?: ITxBuilderOptionalParams): TransactionBlock;
|
|
234
250
|
/**
|
|
235
251
|
* Withdraw from vault without redeeming shares
|
|
236
252
|
* @param vaultId Id of the vault
|
|
@@ -726,6 +726,42 @@ export class TxBuilder {
|
|
|
726
726
|
txb.setSenderIfNotSet(options.sender);
|
|
727
727
|
return txb;
|
|
728
728
|
}
|
|
729
|
+
/**
|
|
730
|
+
* Deposit to vault without minting shares v3, sourcing the funds from the
|
|
731
|
+
* vault's accumulator (address) balance instead of a coin object.
|
|
732
|
+
*
|
|
733
|
+
* Funds sent with `balance::send_funds`/`coin::send_funds` merge into the
|
|
734
|
+
* recipient's accumulator and never become coin objects, so they are
|
|
735
|
+
* invisible to v1/v2 and to coin enumeration. There is no redeem-all
|
|
736
|
+
* primitive on chain, so `amount` is explicit — read the settled balance
|
|
737
|
+
* first (`getBalance().addressBalance`).
|
|
738
|
+
* @param vaultId Id of the vault
|
|
739
|
+
* @param subAccount Sub account of the vault
|
|
740
|
+
* @param amount Amount to redeem from the vault's accumulator balance
|
|
741
|
+
* @param options Optional tx building params
|
|
742
|
+
* @returns TransactionBlock
|
|
743
|
+
*/
|
|
744
|
+
depositToVaultWithoutMintingSharesV3(vaultId, subAccount, amount, options) {
|
|
745
|
+
const txb = options?.txBlock || new TransactionBlock();
|
|
746
|
+
txb.moveCall({
|
|
747
|
+
arguments: [
|
|
748
|
+
txb.object(vaultId),
|
|
749
|
+
txb.object(this.parser.getProtocolConfig()),
|
|
750
|
+
txb.pure.address(subAccount),
|
|
751
|
+
txb.pure.u64(amount)
|
|
752
|
+
],
|
|
753
|
+
typeArguments: [
|
|
754
|
+
this.parser.getDepositCoinType(vaultId),
|
|
755
|
+
this.parser.getReceiptCoinType(vaultId)
|
|
756
|
+
],
|
|
757
|
+
target: `${this.parser.getPackageId()}::gateway::deposit_to_vault_without_minting_shares_v3`
|
|
758
|
+
});
|
|
759
|
+
if (options?.gasBudget)
|
|
760
|
+
txb.setGasBudget(options.gasBudget);
|
|
761
|
+
if (options?.sender)
|
|
762
|
+
txb.setSenderIfNotSet(options.sender);
|
|
763
|
+
return txb;
|
|
764
|
+
}
|
|
729
765
|
/**
|
|
730
766
|
* Withdraw from vault without redeeming shares
|
|
731
767
|
* @param vaultId Id of the vault
|