@typus/typus-perp-sdk 1.0.67 → 1.0.69

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.
@@ -104,7 +104,7 @@ function getTradingVolumeFromSentio(fromTimestamp, interval, toTimestamp) {
104
104
  requestData = {
105
105
  timeRange: {
106
106
  start: "".concat(fromTimestamp),
107
- end: "".concat(toTimestamp !== null && toTimestamp !== void 0 ? toTimestamp : "now"),
107
+ end: "".concat(toTimestamp !== null && toTimestamp !== void 0 ? toTimestamp : Date.now()),
108
108
  step: 3600 * interval,
109
109
  },
110
110
  limit: 30 * 24,
@@ -180,7 +180,7 @@ function getTlpFeeFromSentio(fromTimestamp, toTimestamp) {
180
180
  requestData = {
181
181
  timeRange: {
182
182
  start: "".concat(fromTimestamp),
183
- end: "".concat(toTimestamp !== null && toTimestamp !== void 0 ? toTimestamp : "now"),
183
+ end: "".concat(toTimestamp !== null && toTimestamp !== void 0 ? toTimestamp : Date.now()),
184
184
  step: 3600,
185
185
  },
186
186
  limit: 20,
@@ -234,7 +234,7 @@ function getTotalVolumeFromSentio(fromTimestamp, toTimestamp) {
234
234
  requestData = {
235
235
  timeRange: {
236
236
  start: "".concat(fromTimestamp),
237
- end: "".concat(toTimestamp !== null && toTimestamp !== void 0 ? toTimestamp : "now"),
237
+ end: "".concat(toTimestamp !== null && toTimestamp !== void 0 ? toTimestamp : Date.now()),
238
238
  step: 3600,
239
239
  },
240
240
  limit: 1,
@@ -288,7 +288,7 @@ function getAccumulatedUser() {
288
288
  requestData = {
289
289
  timeRange: {
290
290
  start: "now-1h",
291
- end: "now",
291
+ end: Date.now(),
292
292
  step: 3600,
293
293
  timezone: "Asia/Taipei",
294
294
  },
@@ -356,7 +356,7 @@ function getTlpPriceFromSentio(fromTimestamp, toTimestamp) {
356
356
  requestData = {
357
357
  timeRange: {
358
358
  start: "".concat(fromTimestamp),
359
- end: "".concat(toTimestamp !== null && toTimestamp !== void 0 ? toTimestamp : "now"),
359
+ end: "".concat(toTimestamp !== null && toTimestamp !== void 0 ? toTimestamp : Date.now()),
360
360
  step: 3600,
361
361
  },
362
362
  limit: 30 * 24,
@@ -399,6 +399,6 @@ function getTlpPriceFromSentio(fromTimestamp, toTimestamp) {
399
399
  // getVolumeFromSentio();
400
400
  // getAccumulatedUser();
401
401
  // getTradingVolumeFromSentio(1747008000, 1, 1747011600);
402
- // getTotalVolumeFromSentio(1748995200);
403
- // getTlpPriceFromSentio(1748995200);
404
- // getTlpFeeFromSentio(1748995200);
402
+ // getTlpPriceFromSentio(0);
403
+ // getTotalVolumeFromSentio(0).then((x) => console.log(x));
404
+ // getTlpFeeFromSentio(0).then((x) => console.log(x));
@@ -1,9 +1,10 @@
1
1
  import { Markets, SymbolMarket } from "./typus_perp/trading/structs";
2
- import { LiquidityPool } from "./typus_perp/lp-pool/structs";
2
+ import { DeactivatingShares, LiquidityPool } from "./typus_perp/lp-pool/structs";
3
3
  import { TradingOrder, Position } from "./typus_perp/position/structs";
4
4
  import { LpUserShare, StakePool } from "./typus_stake_pool/stake-pool/structs";
5
5
  import { TOKEN } from "@typus/typus-sdk/dist/src/constants";
6
6
  import { PythClient, TypusConfig } from "@typus/typus-sdk/dist/src/utils";
7
+ import { TLP_TOKEN } from ".";
7
8
  import { TypusBidReceipt } from "./_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs";
8
9
  export declare function getLpPools(config: TypusConfig): Promise<LiquidityPool[]>;
9
10
  export declare function getLpPool(config: TypusConfig, objectId?: string): Promise<LiquidityPool>;
@@ -20,9 +21,9 @@ export declare function getUserOrders(config: TypusConfig, user: string): Promis
20
21
  export declare function getUserPositions(config: TypusConfig, user: string): Promise<Position[]>;
21
22
  export declare function parseOptionBidReceipts(positions: Position[]): (TypusBidReceipt | null)[];
22
23
  /**
23
- * @returns [lpShare, incentives]
24
+ * @returns [[lpShare, incentives][], deactivatingShares[]]
24
25
  */
25
- export declare function getUserStake(config: TypusConfig, user: string): Promise<[LpUserShare, string[]][]>;
26
+ export declare function getUserStake(config: TypusConfig, user: string): Promise<[[LpUserShare, string[]][], DeactivatingShares<typeof TLP_TOKEN>[]]>;
26
27
  /**
27
28
  * @returns [liquidationPrice, pnl(in USD)]
28
29
  */
package/dist/src/fetch.js CHANGED
@@ -74,6 +74,7 @@ var utils_1 = require("@typus/typus-sdk/dist/src/utils");
74
74
  var _1 = require(".");
75
75
  var structs_5 = require("./_dependencies/source/0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274/vault/structs");
76
76
  var typus_perp_1 = require("./typus_perp");
77
+ var functions_3 = require("./typus_perp/lp-pool/functions");
77
78
  function getLpPools(config) {
78
79
  return __awaiter(this, void 0, void 0, function () {
79
80
  var provider, dynamicFields, lpPools, _a, _b, field, lpPool, e_1_1;
@@ -349,11 +350,11 @@ function parseOptionBidReceipts(positions) {
349
350
  });
350
351
  }
351
352
  /**
352
- * @returns [lpShare, incentives]
353
+ * @returns [[lpShare, incentives][], deactivatingShares[]]
353
354
  */
354
355
  function getUserStake(config, user) {
355
356
  return __awaiter(this, void 0, void 0, function () {
356
- var provider, tx, res, returnValues, reader, lpShares_1;
357
+ var provider, tx, res, returnValues, reader, lpShares_1, returnValues, reader, deactivatingShares_1;
357
358
  return __generator(this, function (_a) {
358
359
  switch (_a.label) {
359
360
  case 0:
@@ -370,6 +371,11 @@ function getUserStake(config, user) {
370
371
  index: BigInt(0),
371
372
  user: user,
372
373
  });
374
+ (0, functions_3.getUserDeactivatingShares)(tx, _1.TLP_TOKEN, {
375
+ registry: _1.LP_POOL,
376
+ index: BigInt(0),
377
+ user: user,
378
+ });
373
379
  return [4 /*yield*/, provider.devInspectTransactionBlock({ sender: user, transactionBlock: tx })];
374
380
  case 1:
375
381
  res = _a.sent();
@@ -388,14 +394,20 @@ function getUserStake(config, user) {
388
394
  });
389
395
  lpShares_1.push([lpShare, incentives]);
390
396
  });
391
- // let lpShares: LpUserShare[] = readVecShares(Uint8Array.from(returnValues));
392
- // console.log(lpShares);
393
- // console.log(lpShares[0].deactivatingShares);
394
- // console.log(lpShares[0].lastIncentivePriceIndex);
395
- return [2 /*return*/, lpShares_1];
397
+ returnValues = res.results[2].returnValues[0][0];
398
+ reader = new bcs_1.BcsReader(new Uint8Array(returnValues));
399
+ deactivatingShares_1 = [];
400
+ reader.readVec(function (reader) {
401
+ var length = reader.readULEB();
402
+ var lpShare = structs_2.DeactivatingShares.bcs.read(reader);
403
+ // @ts-ignore
404
+ deactivatingShares_1.push(lpShare);
405
+ });
406
+ // console.log(deactivatingShares);
407
+ return [2 /*return*/, [lpShares_1, deactivatingShares_1]];
396
408
  }
397
409
  else {
398
- return [2 /*return*/, []];
410
+ return [2 /*return*/, [[], []]];
399
411
  }
400
412
  return [2 /*return*/];
401
413
  }
@@ -536,7 +548,7 @@ function getPositionCount(config, input) {
536
548
  }
537
549
  function getAllPositions(config, input) {
538
550
  return __awaiter(this, void 0, void 0, function () {
539
- var provider, tx, res, raw, withoutMaxPage, buffer, view, reader, userPositionsLen, positions, i, bytes, pos;
551
+ var provider, tx, res, raw, withoutMaxPage, reader, userPositionsLen, positions, i, fields, pos;
540
552
  var _a, _b, _c, _d;
541
553
  return __generator(this, function (_e) {
542
554
  switch (_e.label) {
@@ -564,32 +576,16 @@ function getAllPositions(config, input) {
564
576
  if (raw.length < 8)
565
577
  return [2 /*return*/, []];
566
578
  withoutMaxPage = raw.slice(0, raw.length - 8);
567
- console.log("Data without max page length:", withoutMaxPage.length);
568
- buffer = new ArrayBuffer(withoutMaxPage.length);
569
- view = new Uint8Array(buffer);
570
- view.set(withoutMaxPage);
571
- reader = new bcs_1.BcsReader(view);
572
- try {
573
- userPositionsLen = reader.read8() - 1;
574
- positions = [];
575
- for (i = 0; i < userPositionsLen; i++) {
576
- try {
577
- bytes = reader.readBytes(reader.readULEB());
578
- pos = structs_3.Position.fromBcs(Uint8Array.from(Array.from(bytes)));
579
- positions.push(pos);
580
- }
581
- catch (e) {
582
- console.error("Error parsing position ".concat(i, ":"), e);
583
- break;
584
- }
585
- }
586
- return [2 /*return*/, positions];
587
- }
588
- catch (e) {
589
- console.error("Error parsing positions:", e);
590
- return [2 /*return*/, []];
579
+ reader = new bcs_1.BcsReader(withoutMaxPage);
580
+ userPositionsLen = reader.read8() - 1;
581
+ positions = [];
582
+ for (i = 0; i < userPositionsLen; i++) {
583
+ reader.read16();
584
+ fields = structs_3.Position.bcs.read(reader);
585
+ pos = structs_3.Position.fromFields(fields);
586
+ positions.push(pos);
591
587
  }
592
- return [2 /*return*/];
588
+ return [2 /*return*/, positions];
593
589
  }
594
590
  });
595
591
  });
package/dist/src/index.js CHANGED
@@ -27,12 +27,16 @@ dotenv_1.default.config();
27
27
  exports.NETWORK = process.env.NEXT_PUBLIC_CLUSTER == "testnet" ? "TESTNET" : "MAINNET";
28
28
  // console.log(`Load .env NEXT_PUBLIC_CLUSTER: ${process.env.NEXT_PUBLIC_CLUSTER}`);
29
29
  console.log("Initializing Typus Perp SDK for ".concat(exports.NETWORK));
30
+ /** Register the MVR plugin globally */
31
+ var transactions_1 = require("@mysten/sui/transactions");
32
+ var mvrPlugin = exports.NETWORK == "MAINNET" ? "https://mainnet.mvr.mystenlabs.com" : "https://testnet.mvr.mystenlabs.com";
33
+ var plugin = (0, transactions_1.namedPackagesPlugin)({ url: mvrPlugin });
34
+ /** Register the MVR plugin globally (once) for our PTB construction */
35
+ transactions_1.Transaction.registerGlobalSerializationPlugin("namedPackagesPlugin", plugin);
30
36
  exports.PERP_PACKAGE_ID = exports.NETWORK == "MAINNET"
31
37
  ? "0xe27969a70f93034de9ce16e6ad661b480324574e68d15a64b513fd90eb2423e5"
32
38
  : "0x585924f160f83ef16f8927ec117e4d740abb6f4e571ecfa89ff3e973042cb1b9";
33
- exports.PERP_PUBLISHED_AT = exports.NETWORK == "MAINNET"
34
- ? "0xb7e4416296bb3629547b5a0ab24dec17851760eca393c58fb62edbab71c76fa2"
35
- : "0x15844f80fb085bb8fd7cc688ade6282cd6991209eae78934ca001dced8b1b7de";
39
+ exports.PERP_PUBLISHED_AT = exports.NETWORK == "MAINNET" ? "0xaf238f806cef5e86018f9b7243f46b960af84d32a90edb551cb81437b00c1927" : "@typus/perp";
36
40
  exports.PERP_PKG_V1 = exports.NETWORK == "MAINNET"
37
41
  ? "0xe27969a70f93034de9ce16e6ad661b480324574e68d15a64b513fd90eb2423e5"
38
42
  : "0x585924f160f83ef16f8927ec117e4d740abb6f4e571ecfa89ff3e973042cb1b9";
@@ -40,8 +44,8 @@ exports.STAKE_PACKAGE_ID = exports.NETWORK == "MAINNET"
40
44
  ? "0xc427209145715a00a93d7e674a95c556a7147d79fda1bbaeb1a1cac5f9923966"
41
45
  : "0x220e7ba8923c0c30b57c0baab3bc15d781a39bb294cf7af318c0fc816b5cf7e6";
42
46
  exports.STAKE_PUBLISHED_AT = exports.NETWORK == "MAINNET"
43
- ? "0x758c5a79d4f788364303cc547f44a46a1622318073006937451e817c0e682c00"
44
- : "0x34ba6bf1893409b1a7494350189e060ee79cc2aba6f0c5e4045af9372d96fe85";
47
+ ? "0xf980a07d67e379e8d2fa4cfcb24a765df0fc2c09b70be12ff681dcfd6b2b56ac"
48
+ : "0xf8fa4a303118328de2fb53f49a043fa5bf58b84f372db0d1e7cf7b1f1a47d10e";
45
49
  exports.STAKE_PKG_V1 = exports.NETWORK == "MAINNET"
46
50
  ? "0xc427209145715a00a93d7e674a95c556a7147d79fda1bbaeb1a1cac5f9923966"
47
51
  : "0x220e7ba8923c0c30b57c0baab3bc15d781a39bb294cf7af318c0fc816b5cf7e6";
@@ -59,6 +63,7 @@ exports.LIQUIDITY_POOL_0 = exports.NETWORK == "MAINNET"
59
63
  exports.MARKET = exports.NETWORK == "MAINNET"
60
64
  ? "0xc969d946a2b6b917a83b5fb71765793c4a52149e50d2c8cf5c01d7421fc7cd73"
61
65
  : "0xed48f046dc88c49eb01d59669e29eb3006173b66445facb88de277bec2913687";
66
+ // MARKET_0 = 0x442cc2c27cadaf287a5f4413967b4dacc6532bc9063875efbc7b178e5add3e4e
62
67
  exports.PERP_VERSION = exports.NETWORK == "MAINNET"
63
68
  ? "0xa12c282a068328833ec4a9109fc77803ec1f523f8da1bb0f82bac8450335f0c9"
64
69
  : "0x80f739d013b365055540346d3b081b19369d6ba83d1ed6291be7a066e0a3c25f";
@@ -82,4 +87,6 @@ exports.STAKE_POOL_0 = exports.NETWORK == "MAINNET"
82
87
  exports.STAKE_POOL_VERSION = exports.NETWORK == "MAINNET"
83
88
  ? "0xdf3ed1599218b2415b2cd7fa06296f7f647676019b2873ec18e55a626c584f1b"
84
89
  : "0xafb81680b9ac3d627eb733154c43d34e3ec758cf8e00a55c384df2c8150f7881";
85
- exports.COMPETITION_CONFIG = exports.NETWORK == "MAINNET" ? "0x36056abf9adde86f81667dad680a8ac98868c9fc1cb4d519fd2222d5d4522906" : "";
90
+ exports.COMPETITION_CONFIG = exports.NETWORK == "MAINNET"
91
+ ? "0x36056abf9adde86f81667dad680a8ac98868c9fc1cb4d519fd2222d5d4522906"
92
+ : "0xbc3914cd777d009afc05e81cd6d006428ce742569c795b0bac493c1b0ef58559";
@@ -12,6 +12,7 @@ export declare function bidReceiptNotExpired(tx: Transaction, published_at?: str
12
12
  export declare function bidReceiptNotItm(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
13
13
  export declare function bidTokenMismatched(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
14
14
  export declare function collateralTokenTypeMismatched(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
15
+ export declare function deactivatingSharesAlreadyExisted(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
15
16
  export declare function depositAmountInsufficient(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
16
17
  export declare function depositTokenMismatched(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
17
18
  export declare function exceedMaxLeverage(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
@@ -65,6 +66,7 @@ export declare function tvlNotYetUpdated(tx: Transaction, published_at?: string)
65
66
  export declare function unauthorized(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
66
67
  export declare function unsupportedOrderTypeTag(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
67
68
  export declare function unsupportedProcessStatusCode(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
69
+ export declare function userDeactivatingSharesNotExisted(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
68
70
  export declare function userMismatched(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
69
71
  export declare function wrongCollateralType(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
70
72
  export declare function zeroPrice(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
@@ -13,6 +13,7 @@ exports.bidReceiptNotExpired = bidReceiptNotExpired;
13
13
  exports.bidReceiptNotItm = bidReceiptNotItm;
14
14
  exports.bidTokenMismatched = bidTokenMismatched;
15
15
  exports.collateralTokenTypeMismatched = collateralTokenTypeMismatched;
16
+ exports.deactivatingSharesAlreadyExisted = deactivatingSharesAlreadyExisted;
16
17
  exports.depositAmountInsufficient = depositAmountInsufficient;
17
18
  exports.depositTokenMismatched = depositTokenMismatched;
18
19
  exports.exceedMaxLeverage = exceedMaxLeverage;
@@ -66,6 +67,7 @@ exports.tvlNotYetUpdated = tvlNotYetUpdated;
66
67
  exports.unauthorized = unauthorized;
67
68
  exports.unsupportedOrderTypeTag = unsupportedOrderTypeTag;
68
69
  exports.unsupportedProcessStatusCode = unsupportedProcessStatusCode;
70
+ exports.userDeactivatingSharesNotExisted = userDeactivatingSharesNotExisted;
69
71
  exports.userMismatched = userMismatched;
70
72
  exports.wrongCollateralType = wrongCollateralType;
71
73
  exports.zeroPrice = zeroPrice;
@@ -123,6 +125,10 @@ function collateralTokenTypeMismatched(tx, published_at) {
123
125
  if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
124
126
  return tx.moveCall({ target: "".concat(published_at, "::error::collateral_token_type_mismatched"), arguments: [] });
125
127
  }
128
+ function deactivatingSharesAlreadyExisted(tx, published_at) {
129
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
130
+ return tx.moveCall({ target: "".concat(published_at, "::error::deactivating_shares_already_existed"), arguments: [] });
131
+ }
126
132
  function depositAmountInsufficient(tx, published_at) {
127
133
  if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
128
134
  return tx.moveCall({ target: "".concat(published_at, "::error::deposit_amount_insufficient"), arguments: [] });
@@ -335,6 +341,10 @@ function unsupportedProcessStatusCode(tx, published_at) {
335
341
  if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
336
342
  return tx.moveCall({ target: "".concat(published_at, "::error::unsupported_process_status_code"), arguments: [] });
337
343
  }
344
+ function userDeactivatingSharesNotExisted(tx, published_at) {
345
+ if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
346
+ return tx.moveCall({ target: "".concat(published_at, "::error::user_deactivating_shares_not_existed"), arguments: [] });
347
+ }
338
348
  function userMismatched(tx, published_at) {
339
349
  if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
340
350
  return tx.moveCall({ target: "".concat(published_at, "::error::user_mismatched"), arguments: [] });
@@ -35,6 +35,16 @@ export interface BurnLpArgs {
35
35
  clock: TransactionObjectInput;
36
36
  }
37
37
  export declare function burnLp(tx: Transaction, typeArgs: [string, string], args: BurnLpArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
38
+ export interface BurnLp_Args {
39
+ version: TransactionObjectInput;
40
+ registry: TransactionObjectInput;
41
+ index: bigint | TransactionArgument;
42
+ treasuryCaps: TransactionObjectInput;
43
+ oracle: TransactionObjectInput;
44
+ burnLpBalance: TransactionObjectInput;
45
+ clock: TransactionObjectInput;
46
+ }
47
+ export declare function burnLp_(tx: Transaction, typeArgs: [string, string], args: BurnLp_Args, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
38
48
  export interface CalculateBurnLpArgs {
39
49
  registry: TransactionObjectInput;
40
50
  index: bigint | TransactionArgument;
@@ -91,6 +101,15 @@ export interface CheckTvlUpdatedArgs {
91
101
  clock: TransactionObjectInput;
92
102
  }
93
103
  export declare function checkTvlUpdated(tx: Transaction, args: CheckTvlUpdatedArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
104
+ export interface ClaimArgs {
105
+ version: TransactionObjectInput;
106
+ registry: TransactionObjectInput;
107
+ index: bigint | TransactionArgument;
108
+ treasuryCaps: TransactionObjectInput;
109
+ oracle: TransactionObjectInput;
110
+ clock: TransactionObjectInput;
111
+ }
112
+ export declare function claim(tx: Transaction, typeArgs: [string, string], args: ClaimArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
94
113
  export interface CompleteRemoveLiquidityTokenProcessArgs {
95
114
  version: TransactionObjectInput;
96
115
  registry: TransactionObjectInput;
@@ -98,14 +117,13 @@ export interface CompleteRemoveLiquidityTokenProcessArgs {
98
117
  process: TransactionObjectInput;
99
118
  }
100
119
  export declare function completeRemoveLiquidityTokenProcess(tx: Transaction, typeArg: string, args: CompleteRemoveLiquidityTokenProcessArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
101
- export interface DepositScallopBasicArgs {
102
- liquidityPool: TransactionObjectInput;
103
- scallopVersion: TransactionObjectInput;
104
- scallopMarket: TransactionObjectInput;
105
- clock: TransactionObjectInput;
106
- depositAmount: bigint | TransactionArgument;
120
+ export interface CreateDeactivatingSharesArgs {
121
+ version: TransactionObjectInput;
122
+ registry: TransactionObjectInput;
123
+ index: bigint | TransactionArgument;
107
124
  }
108
- export declare function depositScallopBasic(tx: Transaction, typeArg: string, args: DepositScallopBasicArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
125
+ export declare function createDeactivatingShares(tx: Transaction, typeArg: string, args: CreateDeactivatingSharesArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
126
+ export declare function deprecated(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
109
127
  export declare function getBorrowRateDecimal(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
110
128
  export interface GetCumulativeBorrowRateArgs {
111
129
  liquidityPool: TransactionObjectInput;
@@ -172,17 +190,27 @@ export interface GetTokenPoolStateArgs {
172
190
  }
173
191
  export declare function getTokenPoolState(tx: Transaction, args: GetTokenPoolStateArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
174
192
  export declare function getTvlUsd(tx: Transaction, liquidityPool: TransactionObjectInput, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
193
+ export interface GetUserDeactivatingSharesArgs {
194
+ registry: TransactionObjectInput;
195
+ index: bigint | TransactionArgument;
196
+ user: string | TransactionArgument;
197
+ }
198
+ export declare function getUserDeactivatingShares(tx: Transaction, typeArg: string, args: GetUserDeactivatingSharesArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
175
199
  export declare function init(tx: Transaction, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
176
- export interface ManagerDepositScallopArgs {
200
+ export interface ManagerEmergencyDepositArgs {
177
201
  version: TransactionObjectInput;
178
202
  registry: TransactionObjectInput;
179
203
  index: bigint | TransactionArgument;
180
- scallopVersion: TransactionObjectInput;
181
- scallopMarket: TransactionObjectInput;
182
- clock: TransactionObjectInput;
183
- lendingAmount: bigint | TransactionArgument | TransactionArgument | null;
204
+ coin: TransactionObjectInput;
184
205
  }
185
- export declare function managerDepositScallop(tx: Transaction, typeArg: string, args: ManagerDepositScallopArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
206
+ export declare function managerEmergencyDeposit(tx: Transaction, typeArgs: [string, string], args: ManagerEmergencyDepositArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
207
+ export interface ManagerEmergencyWithdrawArgs {
208
+ version: TransactionObjectInput;
209
+ registry: TransactionObjectInput;
210
+ index: bigint | TransactionArgument;
211
+ receipt: TransactionObjectInput;
212
+ }
213
+ export declare function managerEmergencyWithdraw(tx: Transaction, typeArgs: [string, string], args: ManagerEmergencyWithdrawArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
186
214
  export interface ManagerFlashRemoveLiquidityArgs {
187
215
  version: TransactionObjectInput;
188
216
  registry: TransactionObjectInput;
@@ -202,16 +230,14 @@ export interface ManagerFlashRepayLiquidityArgs {
202
230
  clock: TransactionObjectInput;
203
231
  }
204
232
  export declare function managerFlashRepayLiquidity(tx: Transaction, typeArg: string, args: ManagerFlashRepayLiquidityArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
205
- export interface ManagerWithdrawScallopArgs {
233
+ export interface ManagerHotfixBurnLpArgs {
206
234
  version: TransactionObjectInput;
207
235
  registry: TransactionObjectInput;
208
236
  index: bigint | TransactionArgument;
209
- scallopVersion: TransactionObjectInput;
210
- scallopMarket: TransactionObjectInput;
237
+ oracle: TransactionObjectInput;
211
238
  clock: TransactionObjectInput;
212
- withdrawAmount: bigint | TransactionArgument | TransactionArgument | null;
213
239
  }
214
- export declare function managerWithdrawScallop(tx: Transaction, typeArg: string, args: ManagerWithdrawScallopArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
240
+ export declare function managerHotfixBurnLp(tx: Transaction, typeArg: string, args: ManagerHotfixBurnLpArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
215
241
  export interface MintLpArgs {
216
242
  version: TransactionObjectInput;
217
243
  registry: TransactionObjectInput;
@@ -226,6 +252,7 @@ export interface NewLiquidityPoolArgs {
226
252
  version: TransactionObjectInput;
227
253
  registry: TransactionObjectInput;
228
254
  lpTokenDecimal: bigint | TransactionArgument;
255
+ unlockCountdownTsMs: bigint | TransactionArgument;
229
256
  }
230
257
  export declare function newLiquidityPool(tx: Transaction, typeArg: string, args: NewLiquidityPoolArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
231
258
  export interface OracleMatchedArgs {
@@ -253,6 +280,14 @@ export interface PutReceiptCollateralsArgs {
253
280
  unsettledBidReceipts: Array<TransactionObjectInput> | TransactionArgument;
254
281
  }
255
282
  export declare function putReceiptCollaterals(tx: Transaction, args: PutReceiptCollateralsArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
283
+ export interface RedeemArgs {
284
+ version: TransactionObjectInput;
285
+ registry: TransactionObjectInput;
286
+ index: bigint | TransactionArgument;
287
+ balance: TransactionObjectInput;
288
+ clock: TransactionObjectInput;
289
+ }
290
+ export declare function redeem(tx: Transaction, typeArg: string, args: RedeemArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
256
291
  export interface RequestCollateralArgs {
257
292
  liquidityPool: TransactionObjectInput;
258
293
  collateralAmount: bigint | TransactionArgument;
@@ -372,6 +407,13 @@ export interface UpdateTvlArgs {
372
407
  clock: TransactionObjectInput;
373
408
  }
374
409
  export declare function updateTvl(tx: Transaction, args: UpdateTvlArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
410
+ export interface UpdateUnlockCountdownTsMsArgs {
411
+ version: TransactionObjectInput;
412
+ registry: TransactionObjectInput;
413
+ index: bigint | TransactionArgument;
414
+ unlockCountdownTsMs: bigint | TransactionArgument;
415
+ }
416
+ export declare function updateUnlockCountdownTsMs(tx: Transaction, args: UpdateUnlockCountdownTsMsArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
375
417
  export interface ViewSwapResultArgs {
376
418
  version: TransactionObjectInput;
377
419
  registry: TransactionObjectInput;
@@ -382,12 +424,3 @@ export interface ViewSwapResultArgs {
382
424
  clock: TransactionObjectInput;
383
425
  }
384
426
  export declare function viewSwapResult(tx: Transaction, typeArgs: [string, string], args: ViewSwapResultArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;
385
- export interface WithdrawScallopBasicArgs {
386
- version: TransactionObjectInput;
387
- liquidityPool: TransactionObjectInput;
388
- scallopVersion: TransactionObjectInput;
389
- scallopMarket: TransactionObjectInput;
390
- clock: TransactionObjectInput;
391
- withdrawAmount: bigint | TransactionArgument;
392
- }
393
- export declare function withdrawScallopBasic(tx: Transaction, typeArg: string, args: WithdrawScallopBasicArgs, published_at?: string): import("@mysten/sui/transactions").TransactionResult;