@cetusprotocol/deepbook-utils 1.4.8 → 1.4.9

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 CHANGED
@@ -1262,6 +1262,8 @@ declare class MarginUtilsModule implements IModule {
1262
1262
  * @param {Object} params - Parameters object
1263
1263
  * @param {string} params.marginManager - The margin manager object ID
1264
1264
  * @param {MarginPoolInfo} params.poolInfo - Pool information
1265
+ * @param {string} params.baseMarginPool - Base asset MarginPool shared object id
1266
+ * @param {string} params.quoteMarginPool - Quote asset MarginPool shared object id
1265
1267
  * @param {SelfMatchingOption} params.selfMatchingOption - Self-matching behavior option
1266
1268
  * @param {string} params.quantity - Order quantity
1267
1269
  * @param {boolean} params.isBid - Whether this is a buy order (true) or sell order (false)
@@ -1270,9 +1272,11 @@ declare class MarginUtilsModule implements IModule {
1270
1272
  * @returns {Promise<Transaction>} The transaction object with market order operation
1271
1273
  * @throws {Error} If parameters are invalid or decimals are missing
1272
1274
  */
1273
- placeMarginMarketOrder({ marginManager, poolInfo, selfMatchingOption, quantity, amountLimit, isBid, payWithDeep, exactBase, referralKey, }: {
1275
+ placeMarginMarketOrder({ marginManager, poolInfo, baseMarginPool, quoteMarginPool, selfMatchingOption, quantity, amountLimit, isBid, payWithDeep, exactBase, referralKey, }: {
1274
1276
  marginManager: string | TransactionArgument;
1275
1277
  poolInfo: MarginPoolInfo;
1278
+ baseMarginPool: string;
1279
+ quoteMarginPool: string;
1276
1280
  selfMatchingOption: SelfMatchingOption;
1277
1281
  quantity: string;
1278
1282
  amountLimit: string;
@@ -1288,6 +1292,8 @@ declare class MarginUtilsModule implements IModule {
1288
1292
  * @param {Object} params - Parameters object
1289
1293
  * @param {string} params.marginManager - The margin manager object ID
1290
1294
  * @param {MarginPoolInfo} params.poolInfo - Pool information
1295
+ * @param {string} params.baseMarginPool - Base asset MarginPool shared object id
1296
+ * @param {string} params.quoteMarginPool - Quote asset MarginPool shared object id
1291
1297
  * @param {OrderType} params.orderType - Order type (0=NO_RESTRICTION, 1=IMMEDIATE_OR_CANCEL, 2=FILL_OR_KILL, 3=POST_ONLY)
1292
1298
  * @param {SelfMatchingOption} params.selfMatchingOption - Self-matching behavior option (0=SELF_MATCHING_ALLOWED, 1=CANCEL_TAKER, 2=CANCEL_MAKER)
1293
1299
  * @param {string} params.priceInput - Limit price as a string
@@ -1299,9 +1305,11 @@ declare class MarginUtilsModule implements IModule {
1299
1305
  * @returns {Promise<Transaction>} The transaction object with limit order operation
1300
1306
  * @throws {Error} If parameters are invalid or decimals are missing
1301
1307
  */
1302
- placeMarginLimitOrder({ marginManager, poolInfo, orderType, selfMatchingOption, priceInput, quantity, isBid, payWithDeep, expirationTimestamp, referralKey, }: {
1308
+ placeMarginLimitOrder({ marginManager, poolInfo, baseMarginPool, quoteMarginPool, orderType, selfMatchingOption, priceInput, quantity, isBid, payWithDeep, expirationTimestamp, referralKey, }: {
1303
1309
  marginManager: string;
1304
1310
  poolInfo: MarginPoolInfo;
1311
+ baseMarginPool: string;
1312
+ quoteMarginPool: string;
1305
1313
  orderType: OrderType;
1306
1314
  selfMatchingOption: SelfMatchingOption;
1307
1315
  priceInput: string;
@@ -1359,29 +1367,38 @@ declare class MarginUtilsModule implements IModule {
1359
1367
  marginManager: string;
1360
1368
  poolInfo: MarginPoolInfo;
1361
1369
  }, tx?: Transaction): Transaction;
1362
- placeReduceOnlyLimitOrder({ marginManager, poolInfo, marginPoolId, orderType, selfMatchingOption, priceInput, quantity, isBid, payWithDeep, expirationTimestamp, }: {
1370
+ /**
1371
+ * Places a reduce-only limit order (`place_reduce_only_limit_order_v2<Base, Quote>`).
1372
+ * DebtAsset generic removed; single `margin_pool<Debt>` replaced by base/quote MarginPools + oracles.
1373
+ */
1374
+ placeReduceOnlyLimitOrder({ marginManager, poolInfo, baseMarginPool, quoteMarginPool, orderType, selfMatchingOption, priceInput, quantity, isBid, payWithDeep, expirationTimestamp, }: {
1363
1375
  marginManager: string;
1364
1376
  poolInfo: MarginPoolInfo;
1365
- marginPoolId: string;
1377
+ baseMarginPool: string;
1378
+ quoteMarginPool: string;
1366
1379
  orderType: OrderType;
1367
1380
  selfMatchingOption: SelfMatchingOption;
1368
1381
  priceInput: string;
1369
1382
  quantity: string;
1370
1383
  isBid: boolean;
1371
1384
  payWithDeep: boolean;
1372
- expirationTimestamp: number;
1373
- }, tx?: Transaction): Transaction;
1374
- placeReduceOnlyMarketOrder({ marginManager, poolInfo, marginPoolId, selfMatchingOption, quantity, isBid, payWithDeep, }: {
1385
+ expirationTimestamp?: number;
1386
+ }, tx?: Transaction): Promise<Transaction>;
1387
+ /**
1388
+ * Places a reduce-only market order (`place_reduce_only_market_order_v2<Base, Quote>`).
1389
+ * DebtAsset generic removed; single `margin_pool<Debt>` replaced by base/quote MarginPools + oracles.
1390
+ */
1391
+ placeReduceOnlyMarketOrder({ marginManager, poolInfo, baseMarginPool, quoteMarginPool, selfMatchingOption, quantity, amountLimit, isBid, payWithDeep, }: {
1375
1392
  marginManager: string;
1376
1393
  poolInfo: MarginPoolInfo;
1377
- marginPoolId: string;
1378
- orderType: OrderType;
1394
+ baseMarginPool: string;
1395
+ quoteMarginPool: string;
1379
1396
  selfMatchingOption: SelfMatchingOption;
1380
1397
  quantity: string;
1398
+ amountLimit: string;
1381
1399
  isBid: boolean;
1382
1400
  payWithDeep: boolean;
1383
- expirationTimestamp: number;
1384
- }, tx?: Transaction): Transaction;
1401
+ }, tx?: Transaction): Promise<Transaction>;
1385
1402
  getOpenOrder(poolInfo: any, account: string, balanceManager: string | TransactionArgument, orders?: string[], isMargin?: boolean, tx?: Transaction): Promise<any>;
1386
1403
  getAccountOpenOrders({ poolInfo, marginManager }: {
1387
1404
  poolInfo: PoolInfo;