@cetusprotocol/deepbook-utils 1.3.0 → 1.3.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/index.d.ts +12 -6
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SuiTransactionBlockResponse, SuiClient, SuiEventFilter, SuiObjectResponseQuery, SuiObjectDataOptions, CoinBalance, SuiObjectResponse, SuiObjectData, SuiObjectRef, OwnedObjectRef, SuiMoveObject, ObjectOwner, DisplayFieldsResponse, SuiParsedData } from '@mysten/sui/client';
|
|
2
2
|
import { SuiGraphQLClient } from '@mysten/sui/graphql';
|
|
3
|
-
import * as
|
|
3
|
+
import * as _mysten_sui_dist_cjs_transactions from '@mysten/sui/dist/cjs/transactions';
|
|
4
4
|
import { TransactionArgument, Transaction, TransactionResult, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
5
5
|
import { SuiPriceServiceConnection, SuiPythClient } from '@pythnetwork/pyth-sui-js';
|
|
6
6
|
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
|
|
@@ -424,7 +424,7 @@ declare class DeepbookUtilsModule implements IModule {
|
|
|
424
424
|
amountToWithdraw: string;
|
|
425
425
|
returnAssets?: boolean;
|
|
426
426
|
txb?: Transaction;
|
|
427
|
-
}): Transaction |
|
|
427
|
+
}): Transaction | _mysten_sui_dist_cjs_transactions.TransactionResult;
|
|
428
428
|
/**
|
|
429
429
|
* Withdraws free balances from multiple managers into the owner account.
|
|
430
430
|
*/
|
|
@@ -849,7 +849,10 @@ declare class MarginUtilsModule implements IModule {
|
|
|
849
849
|
* @returns {Promise<any[]>} Array of margin manager information
|
|
850
850
|
* @throws {Error} If account is invalid or query fails
|
|
851
851
|
*/
|
|
852
|
-
getMarginManagerByAccount(account: string): Promise<
|
|
852
|
+
getMarginManagerByAccount(account: string): Promise<never[] | {
|
|
853
|
+
finalResult: any[];
|
|
854
|
+
referralMap: Map<string, any>;
|
|
855
|
+
}>;
|
|
853
856
|
/**
|
|
854
857
|
* Gets the base coin balance for a margin manager.
|
|
855
858
|
*
|
|
@@ -1185,6 +1188,7 @@ declare class MarginUtilsModule implements IModule {
|
|
|
1185
1188
|
isBase: boolean;
|
|
1186
1189
|
amount?: string;
|
|
1187
1190
|
}, tx?: Transaction): Promise<Transaction>;
|
|
1191
|
+
removeReferralKey: (marginManager: string | TransactionArgument, poolId: string, baseCoinType: string, quoteCoinType: string, tx?: Transaction) => TransactionResult;
|
|
1188
1192
|
/**
|
|
1189
1193
|
* Places a market order for margin trading.
|
|
1190
1194
|
* Market orders are executed immediately at the current market price.
|
|
@@ -1200,7 +1204,7 @@ declare class MarginUtilsModule implements IModule {
|
|
|
1200
1204
|
* @returns {Promise<Transaction>} The transaction object with market order operation
|
|
1201
1205
|
* @throws {Error} If parameters are invalid or decimals are missing
|
|
1202
1206
|
*/
|
|
1203
|
-
placeMarginMarketOrder({ marginManager, poolInfo, selfMatchingOption, quantity, amountLimit, isBid, payWithDeep, exactBase, }: {
|
|
1207
|
+
placeMarginMarketOrder({ marginManager, poolInfo, selfMatchingOption, quantity, amountLimit, isBid, payWithDeep, exactBase, referralKey, }: {
|
|
1204
1208
|
marginManager: string | TransactionArgument;
|
|
1205
1209
|
poolInfo: MarginPoolInfo;
|
|
1206
1210
|
selfMatchingOption: SelfMatchingOption;
|
|
@@ -1209,6 +1213,7 @@ declare class MarginUtilsModule implements IModule {
|
|
|
1209
1213
|
isBid: boolean;
|
|
1210
1214
|
payWithDeep: boolean;
|
|
1211
1215
|
exactBase?: boolean;
|
|
1216
|
+
referralKey?: string;
|
|
1212
1217
|
}, tx?: Transaction): Promise<Transaction>;
|
|
1213
1218
|
/**
|
|
1214
1219
|
* Places a limit order for margin trading.
|
|
@@ -1228,7 +1233,7 @@ declare class MarginUtilsModule implements IModule {
|
|
|
1228
1233
|
* @returns {Promise<Transaction>} The transaction object with limit order operation
|
|
1229
1234
|
* @throws {Error} If parameters are invalid or decimals are missing
|
|
1230
1235
|
*/
|
|
1231
|
-
placeMarginLimitOrder({ marginManager, poolInfo, orderType, selfMatchingOption, priceInput, quantity, isBid, payWithDeep, expirationTimestamp, }: {
|
|
1236
|
+
placeMarginLimitOrder({ marginManager, poolInfo, orderType, selfMatchingOption, priceInput, quantity, isBid, payWithDeep, expirationTimestamp, referralKey, }: {
|
|
1232
1237
|
marginManager: string;
|
|
1233
1238
|
poolInfo: MarginPoolInfo;
|
|
1234
1239
|
orderType: OrderType;
|
|
@@ -1238,6 +1243,7 @@ declare class MarginUtilsModule implements IModule {
|
|
|
1238
1243
|
isBid: boolean;
|
|
1239
1244
|
payWithDeep: boolean;
|
|
1240
1245
|
expirationTimestamp?: number;
|
|
1246
|
+
referralKey?: string;
|
|
1241
1247
|
}, tx?: Transaction): Promise<Transaction>;
|
|
1242
1248
|
/**
|
|
1243
1249
|
* Modifies an existing margin order by updating its quantity.
|
|
@@ -1790,7 +1796,7 @@ declare class TransactionUtil {
|
|
|
1790
1796
|
private static buildCoin;
|
|
1791
1797
|
private static buildZeroValueCoin;
|
|
1792
1798
|
static buildCoinForAmountInterval(tx: Transaction, allCoins: CoinAsset[], amounts: CoinInputInterval, coinType: string, buildVector?: boolean): BuildCoinResult;
|
|
1793
|
-
static callMintZeroValueCoin: (txb: Transaction, coinType: string) =>
|
|
1799
|
+
static callMintZeroValueCoin: (txb: Transaction, coinType: string) => _mysten_sui_dist_cjs_transactions.TransactionResult;
|
|
1794
1800
|
static buildCoinTypePair(coinTypes: string[], partitionQuantities: number[]): string[][];
|
|
1795
1801
|
}
|
|
1796
1802
|
|