@mysten/deepbook-v3 2.0.0 → 2.0.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/contracts/deepbook/account.d.mts +18 -18
  3. package/dist/contracts/deepbook/balance_manager.mjs.map +1 -1
  4. package/dist/contracts/deepbook/balances.d.mts +4 -4
  5. package/dist/contracts/deepbook/balances.d.mts.map +1 -1
  6. package/dist/contracts/deepbook/deep_price.d.mts +3 -3
  7. package/dist/contracts/deepbook/order.d.mts +12 -12
  8. package/dist/contracts/deepbook/pool.mjs.map +1 -1
  9. package/dist/contracts/deepbook/registry.mjs.map +1 -1
  10. package/dist/contracts/deepbook_margin/margin_manager.mjs.map +1 -1
  11. package/dist/contracts/deepbook_margin/margin_manager_upgraded.mjs.map +1 -1
  12. package/dist/contracts/deepbook_margin/margin_pool.mjs.map +1 -1
  13. package/dist/contracts/deepbook_margin/margin_registry.mjs.map +1 -1
  14. package/dist/contracts/deepbook_margin/pool_proxy.mjs.map +1 -1
  15. package/dist/contracts/deepbook_margin/protocol_config.mjs.map +1 -1
  16. package/dist/contracts/deepbook_margin/tpsl.mjs.map +1 -1
  17. package/dist/contracts/margin_liquidation/liquidation_vault.mjs.map +1 -1
  18. package/dist/transactions/balanceManager.d.mts +12 -12
  19. package/dist/transactions/balanceManager.d.mts.map +1 -1
  20. package/dist/transactions/deepbook.d.mts +20 -20
  21. package/dist/transactions/deepbook.d.mts.map +1 -1
  22. package/dist/transactions/deepbookAdmin.d.mts +4 -4
  23. package/dist/transactions/deepbookAdmin.d.mts.map +1 -1
  24. package/dist/transactions/marginAdmin.d.mts +7 -7
  25. package/dist/transactions/marginMaintainer.d.mts +5 -5
  26. package/dist/transactions/marginPool.d.mts +18 -18
  27. package/dist/transactions/marginTPSL.d.mts +10 -10
  28. package/dist/types/index.d.mts.map +1 -1
  29. package/dist/types/index.mjs.map +1 -1
  30. package/dist/utils/constants.d.mts.map +1 -1
  31. package/dist/utils/constants.mjs +1 -1
  32. package/dist/utils/constants.mjs.map +1 -1
  33. package/package.json +10 -10
  34. package/src/contracts/deepbook/balance_manager.ts +1 -2
  35. package/src/contracts/deepbook/pool.ts +12 -24
  36. package/src/contracts/deepbook/registry.ts +1 -2
  37. package/src/contracts/deepbook_margin/margin_manager.ts +9 -18
  38. package/src/contracts/deepbook_margin/margin_manager_upgraded.ts +5 -10
  39. package/src/contracts/deepbook_margin/margin_pool.ts +2 -4
  40. package/src/contracts/deepbook_margin/margin_registry.ts +3 -6
  41. package/src/contracts/deepbook_margin/pool_proxy.ts +3 -6
  42. package/src/contracts/deepbook_margin/protocol_config.ts +1 -2
  43. package/src/contracts/deepbook_margin/tpsl.ts +1 -2
  44. package/src/contracts/margin_liquidation/liquidation_vault.ts +2 -4
  45. package/src/contracts/pyth/pyth.ts +2 -4
  46. package/src/types/index.ts +1 -2
  47. package/src/utils/constants.ts +1 -7
@@ -573,8 +573,7 @@ export interface SwapExactQuantityOptions {
573
573
  export function swapExactQuantity(options: SwapExactQuantityOptions) {
574
574
  const packageAddress = options.package ?? '@deepbook/core';
575
575
  const argumentsTypes = [null, null, null, null, 'u64', '0x2::clock::Clock'] satisfies (
576
- | string
577
- | null
576
+ string | null
578
577
  )[];
579
578
  const parameterNames = ['self', 'baseIn', 'quoteIn', 'deepIn', 'minOut'];
580
579
  return (tx: Transaction) =>
@@ -676,8 +675,7 @@ export interface ModifyOrderOptions {
676
675
  export function modifyOrder(options: ModifyOrderOptions) {
677
676
  const packageAddress = options.package ?? '@deepbook/core';
678
677
  const argumentsTypes = [null, null, null, 'u128', 'u64', '0x2::clock::Clock'] satisfies (
679
- | string
680
- | null
678
+ string | null
681
679
  )[];
682
680
  const parameterNames = ['self', 'balanceManager', 'tradeProof', 'orderId', 'newQuantity'];
683
681
  return (tx: Transaction) =>
@@ -716,8 +714,7 @@ export interface CancelOrderOptions {
716
714
  export function cancelOrder(options: CancelOrderOptions) {
717
715
  const packageAddress = options.package ?? '@deepbook/core';
718
716
  const argumentsTypes = [null, null, null, 'u128', '0x2::clock::Clock'] satisfies (
719
- | string
720
- | null
717
+ string | null
721
718
  )[];
722
719
  const parameterNames = ['self', 'balanceManager', 'tradeProof', 'orderId'];
723
720
  return (tx: Transaction) =>
@@ -756,8 +753,7 @@ export interface CancelOrdersOptions {
756
753
  export function cancelOrders(options: CancelOrdersOptions) {
757
754
  const packageAddress = options.package ?? '@deepbook/core';
758
755
  const argumentsTypes = [null, null, null, 'vector<u128>', '0x2::clock::Clock'] satisfies (
759
- | string
760
- | null
756
+ string | null
761
757
  )[];
762
758
  const parameterNames = ['self', 'balanceManager', 'tradeProof', 'orderIds'];
763
759
  return (tx: Transaction) =>
@@ -797,8 +793,7 @@ export interface CancelLiveOrderOptions {
797
793
  export function cancelLiveOrder(options: CancelLiveOrderOptions) {
798
794
  const packageAddress = options.package ?? '@deepbook/core';
799
795
  const argumentsTypes = [null, null, null, 'u128', '0x2::clock::Clock'] satisfies (
800
- | string
801
- | null
796
+ string | null
802
797
  )[];
803
798
  const parameterNames = ['self', 'balanceManager', 'tradeProof', 'orderId'];
804
799
  return (tx: Transaction) =>
@@ -839,8 +834,7 @@ export interface CancelLiveOrdersOptions {
839
834
  export function cancelLiveOrders(options: CancelLiveOrdersOptions) {
840
835
  const packageAddress = options.package ?? '@deepbook/core';
841
836
  const argumentsTypes = [null, null, null, 'vector<u128>', '0x2::clock::Clock'] satisfies (
842
- | string
843
- | null
837
+ string | null
844
838
  )[];
845
839
  const parameterNames = ['self', 'balanceManager', 'tradeProof', 'orderIds'];
846
840
  return (tx: Transaction) =>
@@ -1495,8 +1489,7 @@ export interface CreatePoolAdminOptions {
1495
1489
  export function createPoolAdmin(options: CreatePoolAdminOptions) {
1496
1490
  const packageAddress = options.package ?? '@deepbook/core';
1497
1491
  const argumentsTypes = [null, 'u64', 'u64', 'u64', 'bool', 'bool', null] satisfies (
1498
- | string
1499
- | null
1492
+ string | null
1500
1493
  )[];
1501
1494
  const parameterNames = [
1502
1495
  'registry',
@@ -1663,8 +1656,7 @@ export interface AdjustMinLotSizeAdminOptions {
1663
1656
  export function adjustMinLotSizeAdmin(options: AdjustMinLotSizeAdminOptions) {
1664
1657
  const packageAddress = options.package ?? '@deepbook/core';
1665
1658
  const argumentsTypes = [null, 'u64', 'u64', null, '0x2::clock::Clock'] satisfies (
1666
- | string
1667
- | null
1659
+ string | null
1668
1660
  )[];
1669
1661
  const parameterNames = ['self', 'newLotSize', 'newMinSize', 'Cap'];
1670
1662
  return (tx: Transaction) =>
@@ -1733,8 +1725,7 @@ export interface SetEwmaParamsOptions {
1733
1725
  export function setEwmaParams(options: SetEwmaParamsOptions) {
1734
1726
  const packageAddress = options.package ?? '@deepbook/core';
1735
1727
  const argumentsTypes = [null, null, 'u64', 'u64', 'u64', '0x2::clock::Clock'] satisfies (
1736
- | string
1737
- | null
1728
+ string | null
1738
1729
  )[];
1739
1730
  const parameterNames = ['self', 'Cap', 'alpha', 'zScoreThreshold', 'additionalTakerFee'];
1740
1731
  return (tx: Transaction) =>
@@ -2194,8 +2185,7 @@ export interface GetLevel2RangeOptions {
2194
2185
  export function getLevel2Range(options: GetLevel2RangeOptions) {
2195
2186
  const packageAddress = options.package ?? '@deepbook/core';
2196
2187
  const argumentsTypes = [null, 'u64', 'u64', 'bool', '0x2::clock::Clock'] satisfies (
2197
- | string
2198
- | null
2188
+ string | null
2199
2189
  )[];
2200
2190
  const parameterNames = ['self', 'priceLow', 'priceHigh', 'isBid'];
2201
2191
  return (tx: Transaction) =>
@@ -2532,8 +2522,7 @@ export interface CanPlaceMarketOrderOptions {
2532
2522
  export function canPlaceMarketOrder(options: CanPlaceMarketOrderOptions) {
2533
2523
  const packageAddress = options.package ?? '@deepbook/core';
2534
2524
  const argumentsTypes = [null, null, 'u64', 'bool', 'bool', '0x2::clock::Clock'] satisfies (
2535
- | string
2536
- | null
2525
+ string | null
2537
2526
  )[];
2538
2527
  const parameterNames = ['self', 'balanceManager', 'quantity', 'isBid', 'payWithDeep'];
2539
2528
  return (tx: Transaction) =>
@@ -2598,8 +2587,7 @@ export interface CheckLimitOrderParamsOptions {
2598
2587
  export function checkLimitOrderParams(options: CheckLimitOrderParamsOptions) {
2599
2588
  const packageAddress = options.package ?? '@deepbook/core';
2600
2589
  const argumentsTypes = [null, 'u64', 'u64', 'u64', '0x2::clock::Clock'] satisfies (
2601
- | string
2602
- | null
2590
+ string | null
2603
2591
  )[];
2604
2592
  const parameterNames = ['self', 'price', 'quantity', 'expireTimestamp'];
2605
2593
  return (tx: Transaction) =>
@@ -470,8 +470,7 @@ export interface IsStablecoinArguments {
470
470
  export interface IsStablecoinOptions {
471
471
  package?: string;
472
472
  arguments:
473
- | IsStablecoinArguments
474
- | [self: RawTransactionArgument<string>, stableType: TransactionArgument];
473
+ IsStablecoinArguments | [self: RawTransactionArgument<string>, stableType: TransactionArgument];
475
474
  }
476
475
  /** Returns whether the given coin is whitelisted */
477
476
  export function isStablecoin(options: IsStablecoinOptions) {
@@ -274,8 +274,7 @@ export interface ExecuteConditionalOrdersOptions {
274
274
  export function executeConditionalOrders(options: ExecuteConditionalOrdersOptions) {
275
275
  const packageAddress = options.package ?? '@deepbook/margin';
276
276
  const argumentsTypes = [null, null, null, null, null, 'u64', '0x2::clock::Clock'] satisfies (
277
- | string
278
- | null
277
+ string | null
279
278
  )[];
280
279
  const parameterNames = [
281
280
  'Self',
@@ -503,8 +502,7 @@ export interface ShareArguments {
503
502
  export interface ShareOptions {
504
503
  package?: string;
505
504
  arguments:
506
- | ShareArguments
507
- | [manager: RawTransactionArgument<string>, initializer: TransactionArgument];
505
+ ShareArguments | [manager: RawTransactionArgument<string>, initializer: TransactionArgument];
508
506
  typeArguments: [string, string];
509
507
  }
510
508
  /** Shares the margin manager. The initializer is dropped in the process. */
@@ -703,8 +701,7 @@ export interface DepositOptions {
703
701
  export function deposit(options: DepositOptions) {
704
702
  const packageAddress = options.package ?? '@deepbook/margin';
705
703
  const argumentsTypes = [null, null, null, null, null, '0x2::clock::Clock'] satisfies (
706
- | string
707
- | null
704
+ string | null
708
705
  )[];
709
706
  const parameterNames = ['self', 'registry', 'baseOracle', 'quoteOracle', 'coin'];
710
707
  return (tx: Transaction) =>
@@ -1006,8 +1003,7 @@ export interface LiquidateOptions {
1006
1003
  export function liquidate(options: LiquidateOptions) {
1007
1004
  const packageAddress = options.package ?? '@deepbook/margin';
1008
1005
  const argumentsTypes = [null, null, null, null, null, null, null, '0x2::clock::Clock'] satisfies (
1009
- | string
1010
- | null
1006
+ string | null
1011
1007
  )[];
1012
1008
  const parameterNames = [
1013
1009
  'self',
@@ -1055,8 +1051,7 @@ export interface RiskRatioOptions {
1055
1051
  export function riskRatio(options: RiskRatioOptions) {
1056
1052
  const packageAddress = options.package ?? '@deepbook/margin';
1057
1053
  const argumentsTypes = [null, null, null, null, null, null, null, '0x2::clock::Clock'] satisfies (
1058
- | string
1059
- | null
1054
+ string | null
1060
1055
  )[];
1061
1056
  const parameterNames = [
1062
1057
  'self',
@@ -1109,8 +1104,7 @@ export interface RiskRatioUnsafeOptions {
1109
1104
  export function riskRatioUnsafe(options: RiskRatioUnsafeOptions) {
1110
1105
  const packageAddress = options.package ?? '@deepbook/margin';
1111
1106
  const argumentsTypes = [null, null, null, null, null, null, null, '0x2::clock::Clock'] satisfies (
1112
- | string
1113
- | null
1107
+ string | null
1114
1108
  )[];
1115
1109
  const parameterNames = [
1116
1110
  'self',
@@ -1298,8 +1292,7 @@ export interface ManagerStateOptions {
1298
1292
  export function managerState(options: ManagerStateOptions) {
1299
1293
  const packageAddress = options.package ?? '@deepbook/margin';
1300
1294
  const argumentsTypes = [null, null, null, null, null, null, null, '0x2::clock::Clock'] satisfies (
1301
- | string
1302
- | null
1295
+ string | null
1303
1296
  )[];
1304
1297
  const parameterNames = [
1305
1298
  'self',
@@ -1793,8 +1786,7 @@ export interface AccountArguments {
1793
1786
  export interface AccountOptions {
1794
1787
  package?: string;
1795
1788
  arguments:
1796
- | AccountArguments
1797
- | [self: RawTransactionArgument<string>, pool: RawTransactionArgument<string>];
1789
+ AccountArguments | [self: RawTransactionArgument<string>, pool: RawTransactionArgument<string>];
1798
1790
  typeArguments: [string, string];
1799
1791
  }
1800
1792
  export function account(options: AccountOptions) {
@@ -1887,8 +1879,7 @@ export interface CanPlaceMarketOrderOptions {
1887
1879
  export function canPlaceMarketOrder(options: CanPlaceMarketOrderOptions) {
1888
1880
  const packageAddress = options.package ?? '@deepbook/margin';
1889
1881
  const argumentsTypes = [null, null, 'u64', 'bool', 'bool', '0x2::clock::Clock'] satisfies (
1890
- | string
1891
- | null
1882
+ string | null
1892
1883
  )[];
1893
1884
  const parameterNames = ['self', 'pool', 'quantity', 'isBid', 'payWithDeep'];
1894
1885
  return (tx: Transaction) =>
@@ -216,8 +216,7 @@ export interface DepositOptions {
216
216
  export function deposit(options: DepositOptions) {
217
217
  const packageAddress = options.package ?? '@deepbook/margin';
218
218
  const argumentsTypes = [null, null, null, null, null, '0x2::clock::Clock'] satisfies (
219
- | string
220
- | null
219
+ string | null
221
220
  )[];
222
221
  const parameterNames = ['self', 'registry', 'baseOracle', 'quoteOracle', 'coin'];
223
222
  return (tx: Transaction) =>
@@ -426,8 +425,7 @@ export interface LiquidateOptions {
426
425
  export function liquidate(options: LiquidateOptions) {
427
426
  const packageAddress = options.package ?? '@deepbook/margin';
428
427
  const argumentsTypes = [null, null, null, null, null, null, null, '0x2::clock::Clock'] satisfies (
429
- | string
430
- | null
428
+ string | null
431
429
  )[];
432
430
  const parameterNames = [
433
431
  'self',
@@ -475,8 +473,7 @@ export interface RiskRatioOptions {
475
473
  export function riskRatio(options: RiskRatioOptions) {
476
474
  const packageAddress = options.package ?? '@deepbook/margin';
477
475
  const argumentsTypes = [null, null, null, null, null, null, null, '0x2::clock::Clock'] satisfies (
478
- | string
479
- | null
476
+ string | null
480
477
  )[];
481
478
  const parameterNames = [
482
479
  'self',
@@ -524,8 +521,7 @@ export interface RiskRatioUnsafeOptions {
524
521
  export function riskRatioUnsafe(options: RiskRatioUnsafeOptions) {
525
522
  const packageAddress = options.package ?? '@deepbook/margin';
526
523
  const argumentsTypes = [null, null, null, null, null, null, null, '0x2::clock::Clock'] satisfies (
527
- | string
528
- | null
524
+ string | null
529
525
  )[];
530
526
  const parameterNames = [
531
527
  'self',
@@ -573,8 +569,7 @@ export interface ManagerStateOptions {
573
569
  export function managerState(options: ManagerStateOptions) {
574
570
  const packageAddress = options.package ?? '@deepbook/margin';
575
571
  const argumentsTypes = [null, null, null, null, null, null, null, '0x2::clock::Clock'] satisfies (
576
- | string
577
- | null
572
+ string | null
578
573
  )[];
579
574
  const parameterNames = [
580
575
  'self',
@@ -183,8 +183,7 @@ export interface EnableDeepbookPoolForLoanOptions {
183
183
  export function enableDeepbookPoolForLoan(options: EnableDeepbookPoolForLoanOptions) {
184
184
  const packageAddress = options.package ?? '@deepbook/margin';
185
185
  const argumentsTypes = [null, null, '0x2::object::ID', null, '0x2::clock::Clock'] satisfies (
186
- | string
187
- | null
186
+ string | null
188
187
  )[];
189
188
  const parameterNames = ['self', 'registry', 'deepbookPoolId', 'marginPoolCap'];
190
189
  return (tx: Transaction) =>
@@ -221,8 +220,7 @@ export interface DisableDeepbookPoolForLoanOptions {
221
220
  export function disableDeepbookPoolForLoan(options: DisableDeepbookPoolForLoanOptions) {
222
221
  const packageAddress = options.package ?? '@deepbook/margin';
223
222
  const argumentsTypes = [null, null, '0x2::object::ID', null, '0x2::clock::Clock'] satisfies (
224
- | string
225
- | null
223
+ string | null
226
224
  )[];
227
225
  const parameterNames = ['self', 'registry', 'deepbookPoolId', 'marginPoolCap'];
228
226
  return (tx: Transaction) =>
@@ -245,8 +245,7 @@ export interface RevokeMaintainerCapOptions {
245
245
  export function revokeMaintainerCap(options: RevokeMaintainerCapOptions) {
246
246
  const packageAddress = options.package ?? '@deepbook/margin';
247
247
  const argumentsTypes = [null, null, '0x2::object::ID', '0x2::clock::Clock'] satisfies (
248
- | string
249
- | null
248
+ string | null
250
249
  )[];
251
250
  const parameterNames = ['self', 'AdminCap', 'maintainerCapId'];
252
251
  return (tx: Transaction) =>
@@ -580,8 +579,7 @@ export interface RevokePauseCapOptions {
580
579
  export function revokePauseCap(options: RevokePauseCapOptions) {
581
580
  const packageAddress = options.package ?? '@deepbook/margin';
582
581
  const argumentsTypes = [null, null, '0x2::clock::Clock', '0x2::object::ID'] satisfies (
583
- | string
584
- | null
582
+ string | null
585
583
  )[];
586
584
  const parameterNames = ['self', 'AdminCap', 'pauseCapId'];
587
585
  return (tx: Transaction) =>
@@ -771,8 +769,7 @@ export interface NewPoolConfigOptions {
771
769
  export function newPoolConfig(options: NewPoolConfigOptions) {
772
770
  const packageAddress = options.package ?? '@deepbook/margin';
773
771
  const argumentsTypes = [null, 'u64', 'u64', 'u64', 'u64', 'u64', 'u64'] satisfies (
774
- | string
775
- | null
772
+ string | null
776
773
  )[];
777
774
  const parameterNames = [
778
775
  'self',
@@ -333,8 +333,7 @@ export interface ModifyOrderOptions {
333
333
  export function modifyOrder(options: ModifyOrderOptions) {
334
334
  const packageAddress = options.package ?? '@deepbook/margin';
335
335
  const argumentsTypes = [null, null, null, 'u128', 'u64', '0x2::clock::Clock'] satisfies (
336
- | string
337
- | null
336
+ string | null
338
337
  )[];
339
338
  const parameterNames = ['registry', 'marginManager', 'pool', 'orderId', 'newQuantity'];
340
339
  return (tx: Transaction) =>
@@ -368,8 +367,7 @@ export interface CancelOrderOptions {
368
367
  export function cancelOrder(options: CancelOrderOptions) {
369
368
  const packageAddress = options.package ?? '@deepbook/margin';
370
369
  const argumentsTypes = [null, null, null, 'u128', '0x2::clock::Clock'] satisfies (
371
- | string
372
- | null
370
+ string | null
373
371
  )[];
374
372
  const parameterNames = ['registry', 'marginManager', 'pool', 'orderId'];
375
373
  return (tx: Transaction) =>
@@ -403,8 +401,7 @@ export interface CancelOrdersOptions {
403
401
  export function cancelOrders(options: CancelOrdersOptions) {
404
402
  const packageAddress = options.package ?? '@deepbook/margin';
405
403
  const argumentsTypes = [null, null, null, 'vector<u128>', '0x2::clock::Clock'] satisfies (
406
- | string
407
- | null
404
+ string | null
408
405
  )[];
409
406
  const parameterNames = ['registry', 'marginManager', 'pool', 'orderIds'];
410
407
  return (tx: Transaction) =>
@@ -112,8 +112,7 @@ export interface NewMarginPoolConfigWithRateLimitOptions {
112
112
  export function newMarginPoolConfigWithRateLimit(options: NewMarginPoolConfigWithRateLimitOptions) {
113
113
  const packageAddress = options.package ?? '@deepbook/margin';
114
114
  const argumentsTypes = ['u64', 'u64', 'u64', 'u64', 'u64', 'u64', 'bool'] satisfies (
115
- | string
116
- | null
115
+ string | null
117
116
  )[];
118
117
  const parameterNames = [
119
118
  'supplyCap',
@@ -153,8 +153,7 @@ export interface NewPendingLimitOrderOptions {
153
153
  export function newPendingLimitOrder(options: NewPendingLimitOrderOptions) {
154
154
  const packageAddress = options.package ?? '@deepbook/margin';
155
155
  const argumentsTypes = ['u64', 'u8', 'u8', 'u64', 'u64', 'bool', 'bool', 'u64'] satisfies (
156
- | string
157
- | null
156
+ string | null
158
157
  )[];
159
158
  const parameterNames = [
160
159
  'clientOrderId',
@@ -205,8 +205,7 @@ export interface SwapBaseToQuoteOptions {
205
205
  export function swapBaseToQuote(options: SwapBaseToQuoteOptions) {
206
206
  const packageAddress = options.package ?? '@deepbook/margin-liquidation';
207
207
  const argumentsTypes = [null, null, 'u64', 'u64', 'u64', '0x2::clock::Clock'] satisfies (
208
- | string
209
- | null
208
+ string | null
210
209
  )[];
211
210
  const parameterNames = ['self', 'pool', 'baseIn', 'deepIn', 'minQuoteOut'];
212
211
  return (tx: Transaction) =>
@@ -241,8 +240,7 @@ export interface SwapQuoteToBaseOptions {
241
240
  export function swapQuoteToBase(options: SwapQuoteToBaseOptions) {
242
241
  const packageAddress = options.package ?? '@deepbook/margin-liquidation';
243
242
  const argumentsTypes = [null, null, 'u64', 'u64', 'u64', '0x2::clock::Clock'] satisfies (
244
- | string
245
- | null
243
+ string | null
246
244
  )[];
247
245
  const parameterNames = ['self', 'pool', 'quoteIn', 'deepIn', 'minBaseOut'];
248
246
  return (tx: Transaction) =>
@@ -49,8 +49,7 @@ export function createPriceFeedsUsingAccumulator(options: CreatePriceFeedsUsingA
49
49
  const packageAddress =
50
50
  options.package ?? '0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837';
51
51
  const argumentsTypes = [null, 'vector<u8>', null, '0x2::clock::Clock'] satisfies (
52
- | string
53
- | null
52
+ string | null
54
53
  )[];
55
54
  return (tx: Transaction) =>
56
55
  tx.moveCall({
@@ -90,8 +89,7 @@ export function createAuthenticatedPriceInfosUsingAccumulator(
90
89
  const packageAddress =
91
90
  options.package ?? '0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837';
92
91
  const argumentsTypes = [null, 'vector<u8>', null, '0x2::clock::Clock'] satisfies (
93
- | string
94
- | null
92
+ string | null
95
93
  )[];
96
94
  return (tx: Transaction) =>
97
95
  tx.moveCall({
@@ -303,8 +303,7 @@ export interface PoolBookParams {
303
303
  minSize: number;
304
304
  }
305
305
  export type PoolDeepPrice =
306
- | { asset_is_base: true; deep_per_base: number }
307
- | { asset_is_base: false; deep_per_quote: number };
306
+ { asset_is_base: true; deep_per_base: number } | { asset_is_base: false; deep_per_quote: number };
308
307
 
309
308
  // Quantity calculations
310
309
  export interface QuoteQuantityOut {
@@ -39,13 +39,7 @@ export const mainnetPackageIds = {
39
39
  MARGIN_PACKAGE_ID: '0x55ee8099674e46266df2bf0ffed9569e1511aa269f2a9b8c63a2c72f16404e72',
40
40
  MARGIN_V1: '0x97d9473771b01f77b0940c589484184b49f6444627ec121314fae6a6d36fb86b',
41
41
  MARGIN_REGISTRY_ID: '0x0e40998b359a9ccbab22a98ed21bd4346abf19158bc7980c8291908086b3a742',
42
- // margin_liquidation v4 — the latest mainnet publication, and it predates the upgraded
43
- // entrypoints: its `liquidation_vault` exposes only `liquidate_base`/`liquidate_quote`.
44
- // `MarginLiquidationsContract` targets the `_upgraded` pair, so those two builders have
45
- // no mainnet target until `margin_liquidation` is upgraded there. Every other vault
46
- // entrypoint (deposit, withdraw, balance, swaps, trader authorization) takes no oracle
47
- // and works against this id today.
48
- LIQUIDATION_PACKAGE_ID: '0xf17bff1bf21e9587acc5708714e520aa967f82f256f626938a33c4109b08adb9',
42
+ LIQUIDATION_PACKAGE_ID: '0xba2b39c026650fef52038c93c526fc5314a4286318a0d2a7054b65815178fb74',
49
43
  } satisfies DeepbookPackageIds;
50
44
 
51
45
  /**