@ember-finance/sdk 1.0.7 → 1.0.8
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.
|
@@ -54,6 +54,17 @@ export declare class OperatorCalls extends OnChainCalls {
|
|
|
54
54
|
depositToVaultWithoutMintingShares(vaultId: string, subAccount: string, amount: NumStr, options?: IVaultOptionalParams & {
|
|
55
55
|
coinId?: string;
|
|
56
56
|
} & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Deposit to vault without minting shares v2
|
|
59
|
+
* @param vaultId The id of the vault to deposit to
|
|
60
|
+
* @param subAccount The sub account to deposit from
|
|
61
|
+
* @param coinId The id of the coin to deposit
|
|
62
|
+
* @param options Optional tx execution params
|
|
63
|
+
* @returns OnChainCallResponse
|
|
64
|
+
*/
|
|
65
|
+
depositToVaultWithoutMintingSharesV2(vaultId: string, subAccount: string, coinId: string, options?: IVaultOptionalParams & {
|
|
66
|
+
coinId?: string;
|
|
67
|
+
} & SuiTransactionBlockResponseOptions): Promise<OnChainCallResponse>;
|
|
57
68
|
/**
|
|
58
69
|
* Update vault rate
|
|
59
70
|
* @param vaultId The id of the vault to update the rate for
|
|
@@ -104,6 +104,22 @@ class OperatorCalls extends onchain_calls_1.OnChainCalls {
|
|
|
104
104
|
}
|
|
105
105
|
return this.execCall(txb, options);
|
|
106
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Deposit to vault without minting shares v2
|
|
109
|
+
* @param vaultId The id of the vault to deposit to
|
|
110
|
+
* @param subAccount The sub account to deposit from
|
|
111
|
+
* @param coinId The id of the coin to deposit
|
|
112
|
+
* @param options Optional tx execution params
|
|
113
|
+
* @returns OnChainCallResponse
|
|
114
|
+
*/
|
|
115
|
+
async depositToVaultWithoutMintingSharesV2(vaultId, subAccount, coinId, options) {
|
|
116
|
+
const txb = options?.txBlock || new library_sui_1.TransactionBlock();
|
|
117
|
+
this.txBuilder.depositToVaultWithoutMintingSharesV2(vaultId, subAccount, coinId, {
|
|
118
|
+
...options,
|
|
119
|
+
txBlock: txb
|
|
120
|
+
});
|
|
121
|
+
return this.execCall(txb, options);
|
|
122
|
+
}
|
|
107
123
|
/**
|
|
108
124
|
* Update vault rate
|
|
109
125
|
* @param vaultId The id of the vault to update the rate for
|
|
@@ -180,6 +180,15 @@ export declare class TxBuilder {
|
|
|
180
180
|
* @returns TransactionBlock
|
|
181
181
|
*/
|
|
182
182
|
depositToVaultWithoutMintingShares(vaultId: string, subAccount: string, coinId: string, options?: ITxBuilderOptionalParams): TransactionBlock;
|
|
183
|
+
/**
|
|
184
|
+
* Deposit to vault without minting shares v2
|
|
185
|
+
* @param vaultId Id of the vault
|
|
186
|
+
* @param subAccount Sub account of the vault
|
|
187
|
+
* @param coinId Id of the coin
|
|
188
|
+
* @param options Optional tx building params
|
|
189
|
+
* @returns TransactionBlock
|
|
190
|
+
*/
|
|
191
|
+
depositToVaultWithoutMintingSharesV2(vaultId: string, subAccount: string, coinId: string, options?: ITxBuilderOptionalParams): TransactionBlock;
|
|
183
192
|
/**
|
|
184
193
|
* Withdraw from vault without redeeming shares
|
|
185
194
|
* @param vaultId Id of the vault
|
|
@@ -560,6 +560,35 @@ class TxBuilder {
|
|
|
560
560
|
txb.setSenderIfNotSet(options.sender);
|
|
561
561
|
return txb;
|
|
562
562
|
}
|
|
563
|
+
/**
|
|
564
|
+
* Deposit to vault without minting shares v2
|
|
565
|
+
* @param vaultId Id of the vault
|
|
566
|
+
* @param subAccount Sub account of the vault
|
|
567
|
+
* @param coinId Id of the coin
|
|
568
|
+
* @param options Optional tx building params
|
|
569
|
+
* @returns TransactionBlock
|
|
570
|
+
*/
|
|
571
|
+
depositToVaultWithoutMintingSharesV2(vaultId, subAccount, coinId, options) {
|
|
572
|
+
const txb = options?.txBlock || new library_sui_1.TransactionBlock();
|
|
573
|
+
txb.moveCall({
|
|
574
|
+
arguments: [
|
|
575
|
+
txb.object(vaultId),
|
|
576
|
+
txb.object(this.parser.getProtocolConfig()),
|
|
577
|
+
txb.pure.address(subAccount),
|
|
578
|
+
txb.object(coinId)
|
|
579
|
+
],
|
|
580
|
+
typeArguments: [
|
|
581
|
+
this.parser.getDepositCoinType(vaultId),
|
|
582
|
+
this.parser.getReceiptCoinType(vaultId)
|
|
583
|
+
],
|
|
584
|
+
target: `${this.parser.getPackageId()}::gateway::deposit_to_vault_without_minting_shares_v2`
|
|
585
|
+
});
|
|
586
|
+
if (options?.gasBudget)
|
|
587
|
+
txb.setGasBudget(options.gasBudget);
|
|
588
|
+
if (options?.sender)
|
|
589
|
+
txb.setSenderIfNotSet(options.sender);
|
|
590
|
+
return txb;
|
|
591
|
+
}
|
|
563
592
|
/**
|
|
564
593
|
* Withdraw from vault without redeeming shares
|
|
565
594
|
* @param vaultId Id of the vault
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-finance/sdk",
|
|
3
3
|
"description": "Ember Protocol SDK",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.8",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -80,4 +80,4 @@
|
|
|
80
80
|
"files": [
|
|
81
81
|
"dist"
|
|
82
82
|
]
|
|
83
|
-
}
|
|
83
|
+
}
|