@typus/typus-perp-sdk 1.0.67 → 1.0.68
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/src/fetch.d.ts +4 -3
- package/dist/src/fetch.js +30 -34
- package/dist/src/index.js +13 -6
- package/dist/src/typus_perp/error/functions.d.ts +2 -0
- package/dist/src/typus_perp/error/functions.js +10 -0
- package/dist/src/typus_perp/lp-pool/functions.d.ts +60 -27
- package/dist/src/typus_perp/lp-pool/functions.js +92 -52
- package/dist/src/typus_perp/lp-pool/structs.d.ts +161 -210
- package/dist/src/typus_perp/lp-pool/structs.js +384 -284
- package/dist/src/typus_perp/trading/functions.d.ts +6 -0
- package/dist/src/typus_perp/trading/functions.js +9 -0
- package/dist/src/typus_stake_pool/stake-pool/functions.d.ts +9 -0
- package/dist/src/typus_stake_pool/stake-pool/functions.js +20 -0
- package/dist/src/user/tlp.d.ts +23 -9
- package/dist/src/user/tlp.js +148 -61
- package/package.json +2 -2
package/dist/src/fetch.d.ts
CHANGED
|
@@ -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
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
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,
|
|
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
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
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
|
-
? "
|
|
44
|
-
: "
|
|
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"
|
|
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
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
|
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
|
|
200
|
+
export interface ManagerEmergencyDepositArgs {
|
|
177
201
|
version: TransactionObjectInput;
|
|
178
202
|
registry: TransactionObjectInput;
|
|
179
203
|
index: bigint | TransactionArgument;
|
|
180
|
-
|
|
181
|
-
scallopMarket: TransactionObjectInput;
|
|
182
|
-
clock: TransactionObjectInput;
|
|
183
|
-
lendingAmount: bigint | TransactionArgument | TransactionArgument | null;
|
|
204
|
+
coin: TransactionObjectInput;
|
|
184
205
|
}
|
|
185
|
-
export declare function
|
|
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
|
|
233
|
+
export interface ManagerHotfixBurnLpArgs {
|
|
206
234
|
version: TransactionObjectInput;
|
|
207
235
|
registry: TransactionObjectInput;
|
|
208
236
|
index: bigint | TransactionArgument;
|
|
209
|
-
|
|
210
|
-
scallopMarket: TransactionObjectInput;
|
|
237
|
+
oracle: TransactionObjectInput;
|
|
211
238
|
clock: TransactionObjectInput;
|
|
212
|
-
withdrawAmount: bigint | TransactionArgument | TransactionArgument | null;
|
|
213
239
|
}
|
|
214
|
-
export declare function
|
|
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;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addLiquidityToken = addLiquidityToken;
|
|
4
4
|
exports.burnLp = burnLp;
|
|
5
|
+
exports.burnLp_ = burnLp_;
|
|
5
6
|
exports.calculateBurnLp = calculateBurnLp;
|
|
6
7
|
exports.calculateLpFee = calculateLpFee;
|
|
7
8
|
exports.calculateMintLp = calculateMintLp;
|
|
@@ -10,8 +11,10 @@ exports.checkRemoveLiquidityTokenProcessStatus = checkRemoveLiquidityTokenProces
|
|
|
10
11
|
exports.checkTokenPoolStatus = checkTokenPoolStatus;
|
|
11
12
|
exports.checkTradingOrderSizeValid = checkTradingOrderSizeValid;
|
|
12
13
|
exports.checkTvlUpdated = checkTvlUpdated;
|
|
14
|
+
exports.claim = claim;
|
|
13
15
|
exports.completeRemoveLiquidityTokenProcess = completeRemoveLiquidityTokenProcess;
|
|
14
|
-
exports.
|
|
16
|
+
exports.createDeactivatingShares = createDeactivatingShares;
|
|
17
|
+
exports.deprecated = deprecated;
|
|
15
18
|
exports.getBorrowRateDecimal = getBorrowRateDecimal;
|
|
16
19
|
exports.getCumulativeBorrowRate = getCumulativeBorrowRate;
|
|
17
20
|
exports.getExpiredReceiptCollateralBcs = getExpiredReceiptCollateralBcs;
|
|
@@ -27,17 +30,20 @@ exports.getRemoveLiquidityTokenProcessToken = getRemoveLiquidityTokenProcessToke
|
|
|
27
30
|
exports.getTokenPool = getTokenPool;
|
|
28
31
|
exports.getTokenPoolState = getTokenPoolState;
|
|
29
32
|
exports.getTvlUsd = getTvlUsd;
|
|
33
|
+
exports.getUserDeactivatingShares = getUserDeactivatingShares;
|
|
30
34
|
exports.init = init;
|
|
31
|
-
exports.
|
|
35
|
+
exports.managerEmergencyDeposit = managerEmergencyDeposit;
|
|
36
|
+
exports.managerEmergencyWithdraw = managerEmergencyWithdraw;
|
|
32
37
|
exports.managerFlashRemoveLiquidity = managerFlashRemoveLiquidity;
|
|
33
38
|
exports.managerFlashRepayLiquidity = managerFlashRepayLiquidity;
|
|
34
|
-
exports.
|
|
39
|
+
exports.managerHotfixBurnLp = managerHotfixBurnLp;
|
|
35
40
|
exports.mintLp = mintLp;
|
|
36
41
|
exports.newLiquidityPool = newLiquidityPool;
|
|
37
42
|
exports.oracleMatched = oracleMatched;
|
|
38
43
|
exports.orderFilled = orderFilled;
|
|
39
44
|
exports.putCollateral = putCollateral;
|
|
40
45
|
exports.putReceiptCollaterals = putReceiptCollaterals;
|
|
46
|
+
exports.redeem = redeem;
|
|
41
47
|
exports.requestCollateral = requestCollateral;
|
|
42
48
|
exports.resumePool = resumePool;
|
|
43
49
|
exports.resumeTokenPool = resumeTokenPool;
|
|
@@ -55,8 +61,8 @@ exports.updateRemoveLiquidityTokenProcessToken = updateRemoveLiquidityTokenProce
|
|
|
55
61
|
exports.updateReserveAmount = updateReserveAmount;
|
|
56
62
|
exports.updateSpotConfig = updateSpotConfig;
|
|
57
63
|
exports.updateTvl = updateTvl;
|
|
64
|
+
exports.updateUnlockCountdownTsMs = updateUnlockCountdownTsMs;
|
|
58
65
|
exports.viewSwapResult = viewSwapResult;
|
|
59
|
-
exports.withdrawScallopBasic = withdrawScallopBasic;
|
|
60
66
|
var __1 = require("..");
|
|
61
67
|
var structs_1 = require("../../_dependencies/source/0x1/option/structs");
|
|
62
68
|
var util_1 = require("../../_framework/util");
|
|
@@ -109,6 +115,22 @@ function burnLp(tx, typeArgs, args, published_at) {
|
|
|
109
115
|
],
|
|
110
116
|
});
|
|
111
117
|
}
|
|
118
|
+
function burnLp_(tx, typeArgs, args, published_at) {
|
|
119
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
120
|
+
return tx.moveCall({
|
|
121
|
+
target: "".concat(published_at, "::lp_pool::burn_lp_"),
|
|
122
|
+
typeArguments: typeArgs,
|
|
123
|
+
arguments: [
|
|
124
|
+
(0, util_1.obj)(tx, args.version),
|
|
125
|
+
(0, util_1.obj)(tx, args.registry),
|
|
126
|
+
(0, util_1.pure)(tx, args.index, "u64"),
|
|
127
|
+
(0, util_1.obj)(tx, args.treasuryCaps),
|
|
128
|
+
(0, util_1.obj)(tx, args.oracle),
|
|
129
|
+
(0, util_1.obj)(tx, args.burnLpBalance),
|
|
130
|
+
(0, util_1.obj)(tx, args.clock),
|
|
131
|
+
],
|
|
132
|
+
});
|
|
133
|
+
}
|
|
112
134
|
function calculateBurnLp(tx, args, published_at) {
|
|
113
135
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
114
136
|
return tx.moveCall({
|
|
@@ -192,6 +214,21 @@ function checkTvlUpdated(tx, args, published_at) {
|
|
|
192
214
|
arguments: [(0, util_1.obj)(tx, args.liquidityPool), (0, util_1.obj)(tx, args.clock)],
|
|
193
215
|
});
|
|
194
216
|
}
|
|
217
|
+
function claim(tx, typeArgs, args, published_at) {
|
|
218
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
219
|
+
return tx.moveCall({
|
|
220
|
+
target: "".concat(published_at, "::lp_pool::claim"),
|
|
221
|
+
typeArguments: typeArgs,
|
|
222
|
+
arguments: [
|
|
223
|
+
(0, util_1.obj)(tx, args.version),
|
|
224
|
+
(0, util_1.obj)(tx, args.registry),
|
|
225
|
+
(0, util_1.pure)(tx, args.index, "u64"),
|
|
226
|
+
(0, util_1.obj)(tx, args.treasuryCaps),
|
|
227
|
+
(0, util_1.obj)(tx, args.oracle),
|
|
228
|
+
(0, util_1.obj)(tx, args.clock),
|
|
229
|
+
],
|
|
230
|
+
});
|
|
231
|
+
}
|
|
195
232
|
function completeRemoveLiquidityTokenProcess(tx, typeArg, args, published_at) {
|
|
196
233
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
197
234
|
return tx.moveCall({
|
|
@@ -200,20 +237,18 @@ function completeRemoveLiquidityTokenProcess(tx, typeArg, args, published_at) {
|
|
|
200
237
|
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.registry), (0, util_1.pure)(tx, args.index, "u64"), (0, util_1.obj)(tx, args.process)],
|
|
201
238
|
});
|
|
202
239
|
}
|
|
203
|
-
function
|
|
240
|
+
function createDeactivatingShares(tx, typeArg, args, published_at) {
|
|
204
241
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
205
242
|
return tx.moveCall({
|
|
206
|
-
target: "".concat(published_at, "::lp_pool::
|
|
243
|
+
target: "".concat(published_at, "::lp_pool::create_deactivating_shares"),
|
|
207
244
|
typeArguments: [typeArg],
|
|
208
|
-
arguments: [
|
|
209
|
-
(0, util_1.obj)(tx, args.liquidityPool),
|
|
210
|
-
(0, util_1.obj)(tx, args.scallopVersion),
|
|
211
|
-
(0, util_1.obj)(tx, args.scallopMarket),
|
|
212
|
-
(0, util_1.obj)(tx, args.clock),
|
|
213
|
-
(0, util_1.pure)(tx, args.depositAmount, "u64"),
|
|
214
|
-
],
|
|
245
|
+
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.registry), (0, util_1.pure)(tx, args.index, "u64")],
|
|
215
246
|
});
|
|
216
247
|
}
|
|
248
|
+
function deprecated(tx, published_at) {
|
|
249
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
250
|
+
return tx.moveCall({ target: "".concat(published_at, "::lp_pool::deprecated"), arguments: [] });
|
|
251
|
+
}
|
|
217
252
|
function getBorrowRateDecimal(tx, published_at) {
|
|
218
253
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
219
254
|
return tx.moveCall({ target: "".concat(published_at, "::lp_pool::get_borrow_rate_decimal"), arguments: [] });
|
|
@@ -310,24 +345,32 @@ function getTvlUsd(tx, liquidityPool, published_at) {
|
|
|
310
345
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
311
346
|
return tx.moveCall({ target: "".concat(published_at, "::lp_pool::get_tvl_usd"), arguments: [(0, util_1.obj)(tx, liquidityPool)] });
|
|
312
347
|
}
|
|
348
|
+
function getUserDeactivatingShares(tx, typeArg, args, published_at) {
|
|
349
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
350
|
+
return tx.moveCall({
|
|
351
|
+
target: "".concat(published_at, "::lp_pool::get_user_deactivating_shares"),
|
|
352
|
+
typeArguments: [typeArg],
|
|
353
|
+
arguments: [(0, util_1.obj)(tx, args.registry), (0, util_1.pure)(tx, args.index, "u64"), (0, util_1.pure)(tx, args.user, "address")],
|
|
354
|
+
});
|
|
355
|
+
}
|
|
313
356
|
function init(tx, published_at) {
|
|
314
357
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
315
358
|
return tx.moveCall({ target: "".concat(published_at, "::lp_pool::init"), arguments: [] });
|
|
316
359
|
}
|
|
317
|
-
function
|
|
360
|
+
function managerEmergencyDeposit(tx, typeArgs, args, published_at) {
|
|
318
361
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
319
362
|
return tx.moveCall({
|
|
320
|
-
target: "".concat(published_at, "::lp_pool::
|
|
321
|
-
typeArguments:
|
|
322
|
-
arguments: [
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
],
|
|
363
|
+
target: "".concat(published_at, "::lp_pool::manager_emergency_deposit"),
|
|
364
|
+
typeArguments: typeArgs,
|
|
365
|
+
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.registry), (0, util_1.pure)(tx, args.index, "u64"), (0, util_1.obj)(tx, args.coin)],
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
function managerEmergencyWithdraw(tx, typeArgs, args, published_at) {
|
|
369
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
370
|
+
return tx.moveCall({
|
|
371
|
+
target: "".concat(published_at, "::lp_pool::manager_emergency_withdraw"),
|
|
372
|
+
typeArguments: typeArgs,
|
|
373
|
+
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.registry), (0, util_1.pure)(tx, args.index, "u64"), (0, util_1.obj)(tx, args.receipt)],
|
|
331
374
|
});
|
|
332
375
|
}
|
|
333
376
|
function managerFlashRemoveLiquidity(tx, typeArg, args, published_at) {
|
|
@@ -361,20 +404,12 @@ function managerFlashRepayLiquidity(tx, typeArg, args, published_at) {
|
|
|
361
404
|
],
|
|
362
405
|
});
|
|
363
406
|
}
|
|
364
|
-
function
|
|
407
|
+
function managerHotfixBurnLp(tx, typeArg, args, published_at) {
|
|
365
408
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
366
409
|
return tx.moveCall({
|
|
367
|
-
target: "".concat(published_at, "::lp_pool::
|
|
410
|
+
target: "".concat(published_at, "::lp_pool::manager_hotfix_burn_lp"),
|
|
368
411
|
typeArguments: [typeArg],
|
|
369
|
-
arguments: [
|
|
370
|
-
(0, util_1.obj)(tx, args.version),
|
|
371
|
-
(0, util_1.obj)(tx, args.registry),
|
|
372
|
-
(0, util_1.pure)(tx, args.index, "u64"),
|
|
373
|
-
(0, util_1.obj)(tx, args.scallopVersion),
|
|
374
|
-
(0, util_1.obj)(tx, args.scallopMarket),
|
|
375
|
-
(0, util_1.obj)(tx, args.clock),
|
|
376
|
-
(0, util_1.pure)(tx, args.withdrawAmount, "".concat(structs_1.Option.$typeName, "<u64>")),
|
|
377
|
-
],
|
|
412
|
+
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.registry), (0, util_1.pure)(tx, args.index, "u64"), (0, util_1.obj)(tx, args.oracle), (0, util_1.obj)(tx, args.clock)],
|
|
378
413
|
});
|
|
379
414
|
}
|
|
380
415
|
function mintLp(tx, typeArgs, args, published_at) {
|
|
@@ -398,7 +433,12 @@ function newLiquidityPool(tx, typeArg, args, published_at) {
|
|
|
398
433
|
return tx.moveCall({
|
|
399
434
|
target: "".concat(published_at, "::lp_pool::new_liquidity_pool"),
|
|
400
435
|
typeArguments: [typeArg],
|
|
401
|
-
arguments: [
|
|
436
|
+
arguments: [
|
|
437
|
+
(0, util_1.obj)(tx, args.version),
|
|
438
|
+
(0, util_1.obj)(tx, args.registry),
|
|
439
|
+
(0, util_1.pure)(tx, args.lpTokenDecimal, "u64"),
|
|
440
|
+
(0, util_1.pure)(tx, args.unlockCountdownTsMs, "u64"),
|
|
441
|
+
],
|
|
402
442
|
});
|
|
403
443
|
}
|
|
404
444
|
function oracleMatched(tx, args, published_at) {
|
|
@@ -441,6 +481,14 @@ function putReceiptCollaterals(tx, args, published_at) {
|
|
|
441
481
|
arguments: [(0, util_1.obj)(tx, args.liquidityPool), (0, util_1.vector)(tx, "".concat(structs_2.UnsettledBidReceipt.$typeName), args.unsettledBidReceipts)],
|
|
442
482
|
});
|
|
443
483
|
}
|
|
484
|
+
function redeem(tx, typeArg, args, published_at) {
|
|
485
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
486
|
+
return tx.moveCall({
|
|
487
|
+
target: "".concat(published_at, "::lp_pool::redeem"),
|
|
488
|
+
typeArguments: [typeArg],
|
|
489
|
+
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.registry), (0, util_1.pure)(tx, args.index, "u64"), (0, util_1.obj)(tx, args.balance), (0, util_1.obj)(tx, args.clock)],
|
|
490
|
+
});
|
|
491
|
+
}
|
|
444
492
|
function requestCollateral(tx, typeArg, args, published_at) {
|
|
445
493
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
446
494
|
return tx.moveCall({
|
|
@@ -603,6 +651,13 @@ function updateTvl(tx, args, published_at) {
|
|
|
603
651
|
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.liquidityPool), (0, util_1.obj)(tx, args.tokenType), (0, util_1.obj)(tx, args.oracle), (0, util_1.obj)(tx, args.clock)],
|
|
604
652
|
});
|
|
605
653
|
}
|
|
654
|
+
function updateUnlockCountdownTsMs(tx, args, published_at) {
|
|
655
|
+
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
656
|
+
return tx.moveCall({
|
|
657
|
+
target: "".concat(published_at, "::lp_pool::update_unlock_countdown_ts_ms"),
|
|
658
|
+
arguments: [(0, util_1.obj)(tx, args.version), (0, util_1.obj)(tx, args.registry), (0, util_1.pure)(tx, args.index, "u64"), (0, util_1.pure)(tx, args.unlockCountdownTsMs, "u64")],
|
|
659
|
+
});
|
|
660
|
+
}
|
|
606
661
|
function viewSwapResult(tx, typeArgs, args, published_at) {
|
|
607
662
|
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
608
663
|
return tx.moveCall({
|
|
@@ -619,18 +674,3 @@ function viewSwapResult(tx, typeArgs, args, published_at) {
|
|
|
619
674
|
],
|
|
620
675
|
});
|
|
621
676
|
}
|
|
622
|
-
function withdrawScallopBasic(tx, typeArg, args, published_at) {
|
|
623
|
-
if (published_at === void 0) { published_at = __1.PUBLISHED_AT; }
|
|
624
|
-
return tx.moveCall({
|
|
625
|
-
target: "".concat(published_at, "::lp_pool::withdraw_scallop_basic"),
|
|
626
|
-
typeArguments: [typeArg],
|
|
627
|
-
arguments: [
|
|
628
|
-
(0, util_1.obj)(tx, args.version),
|
|
629
|
-
(0, util_1.obj)(tx, args.liquidityPool),
|
|
630
|
-
(0, util_1.obj)(tx, args.scallopVersion),
|
|
631
|
-
(0, util_1.obj)(tx, args.scallopMarket),
|
|
632
|
-
(0, util_1.obj)(tx, args.clock),
|
|
633
|
-
(0, util_1.pure)(tx, args.withdrawAmount, "u64"),
|
|
634
|
-
],
|
|
635
|
-
});
|
|
636
|
-
}
|