@typus/typus-sdk 1.0.3 → 1.0.5
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/lib/config.json +15 -17
- package/lib/constants.d.ts +1 -1
- package/lib/constants.js +1 -1
- package/lib/test/getBidData.js +1 -1
- package/lib/test/testSDK.d.ts +1 -0
- package/lib/test/testSDK.js +74 -0
- package/lib/utils/auction/getBid.js +2 -2
- package/lib/utils/fetchData.d.ts +1 -2
- package/lib/utils/fetchData.js +6 -2
- package/lib/utils/getMintTx.d.ts +2 -1
- package/lib/utils/getMintTx.js +11 -13
- package/lib/utils/getTypeArgumentFromToken.d.ts +1 -1
- package/lib/utils/getTypeArgumentFromToken.js +12 -6
- package/lib/utils/getVaultData.d.ts +2 -3
- package/lib/utils/getVaultData.js +83 -96
- package/lib/utils/getWhiteListFromRegistry.d.ts +2 -2
- package/lib/utils/getWhiteListFromRegistry.js +24 -19
- package/lib/utils/portfolio/helper/getAuctionMaxSize.d.ts +1 -1
- package/lib/utils/portfolio/helper/getAuctionMaxSize.js +10 -12
- package/lib/utils/portfolio/helper/getUserStatus.d.ts +3 -2
- package/lib/utils/portfolio/helper/getUserStatus.js +11 -13
- package/lib/utils/portfolio/user/getClaimAndHarvestTx.d.ts +2 -1
- package/lib/utils/portfolio/user/getClaimAndHarvestTx.js +11 -12
- package/lib/utils/portfolio/user/getClaimTx.d.ts +2 -1
- package/lib/utils/portfolio/user/getClaimTx.js +11 -12
- package/lib/utils/portfolio/user/getCompoundTx.d.ts +1 -1
- package/lib/utils/portfolio/user/getCompoundTx.js +11 -12
- package/lib/utils/portfolio/user/getDepositTx.d.ts +2 -1
- package/lib/utils/portfolio/user/getDepositTx.js +16 -14
- package/lib/utils/portfolio/user/getHarvestTx.d.ts +2 -1
- package/lib/utils/portfolio/user/getHarvestTx.js +11 -12
- package/lib/utils/portfolio/user/getNewBidTx.d.ts +2 -1
- package/lib/utils/portfolio/user/getNewBidTx.js +18 -16
- package/lib/utils/portfolio/user/getUnsubscribeTx.d.ts +2 -2
- package/lib/utils/portfolio/user/getUnsubscribeTx.js +11 -14
- package/lib/utils/portfolio/user/getWithdrawTx.d.ts +1 -1
- package/lib/utils/portfolio/user/getWithdrawTx.js +11 -13
- package/package.json +2 -2
package/lib/config.json
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"RPC_ENDPOINT": "https://fullnode.devnet.sui.io:443",
|
|
3
|
-
"PORTFOLIO_PACKAGE": "
|
|
4
|
-
"REGISTRY": "
|
|
5
|
-
"MANAGER_CAP": "
|
|
6
|
-
"TOKEN_PACKAGE": "
|
|
7
|
-
"ORACLE_PACKAGE": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"DOGE_ORACLE": "0x48ab076f16e2bc3fdfb9be44990976dadcc30128",
|
|
19
|
-
"DOGE_ORACLE_KEY": "0x7942367add64cd9196ce283741acb01578fa249a"
|
|
3
|
+
"PORTFOLIO_PACKAGE": "0xca767e24d77798642a1a5985824247282b1b11532cd3e77c9d54a394568301d0",
|
|
4
|
+
"REGISTRY": "0xcfeb92f91aabe41c760b408018beaa315cf1bd91a5b22e1182742161fd468548",
|
|
5
|
+
"MANAGER_CAP": "0x433f41a88e79aa53d9401205ed176b78fd0da2b7d5e7d3da7368162c363e3b47",
|
|
6
|
+
"TOKEN_PACKAGE": "0x29fc31d3927124688cc9abee4431b6dec9611beb4677b4e55cebca58641854b6",
|
|
7
|
+
"ORACLE_PACKAGE": "0xca767e24d77798642a1a5985824247282b1b11532cd3e77c9d54a394568301d0",
|
|
8
|
+
"BTC_ORACLE": "0x88eb5fa06f6d6c3f92d9bce7d6bef8120402c86217d92fad16f0d76a0651a7cf",
|
|
9
|
+
"BTC_ORACLE_KEY": "0x4576ce52df78971f2663c36ec5bf13414a4a1914679498cb37d2d5b4c390bc02",
|
|
10
|
+
"ETH_ORACLE": "0x8ac6fc5dc66502f4ab5b699c1a96d75e97092c4a9c8d17f8146542cc07bddd13",
|
|
11
|
+
"ETH_ORACLE_KEY": "0x5e5887ecfe6503d35d9be2f91f7a17bf182d608a1cbf2639a344b0f571ed0785",
|
|
12
|
+
"SUI_ORACLE": "0x3d9230144ea3784fff955d6903702034d01aa41b23e86cf0f1a9871a2a6edadc",
|
|
13
|
+
"SUI_ORACLE_KEY": "0xaf2ee26f199b090dbf635899d108b0439f1aa4871c87b3359754638135e6af9c",
|
|
14
|
+
"APT_ORACLE": "0xb03f175c578f238a9bd601e8d5814f4fe10670d3b1d910952c1fde430a04c108",
|
|
15
|
+
"APT_ORACLE_KEY": "0xd8d1caa7e8b9204fd1d5f25126914f12795e0249db51ba4e5c8f75b4351b0559",
|
|
16
|
+
"DOGE_ORACLE": "0xd0329d3af90d21544cae0b040b23fd32609d834279e88a2ca4e9f8f238383bcb",
|
|
17
|
+
"DOGE_ORACLE_KEY": "0xc1dfb8734e952be2e573f7b5d61ae6fd41c2a8d917411da48731dde322e52ebf"
|
|
20
18
|
}
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const TOKEN_PACKAGE: string;
|
|
2
2
|
export declare const TOKEN_REGISTRY_SUI = "0x3b87b3f0403f527d28fd1301074a12446f43817a";
|
|
3
3
|
export declare const ORACLE_PACKAGE: string;
|
|
4
|
-
export declare const TIME_ORACLE
|
|
4
|
+
export declare const TIME_ORACLE = "0x6";
|
|
5
5
|
export declare const BTC_ORACLE: string;
|
|
6
6
|
export declare const ETH_ORACLE: string;
|
|
7
7
|
export declare const SUI_ORACLE: string;
|
package/lib/constants.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.TOKEN_PACKAGE = config_json_1.default.TOKEN_PACKAGE;
|
|
|
10
10
|
exports.TOKEN_REGISTRY_SUI = "0x3b87b3f0403f527d28fd1301074a12446f43817a";
|
|
11
11
|
//publish from typus-oracle
|
|
12
12
|
exports.ORACLE_PACKAGE = config_json_1.default.ORACLE_PACKAGE;
|
|
13
|
-
exports.TIME_ORACLE =
|
|
13
|
+
exports.TIME_ORACLE = "0x6";
|
|
14
14
|
exports.BTC_ORACLE = config_json_1.default.BTC_ORACLE;
|
|
15
15
|
exports.ETH_ORACLE = config_json_1.default.ETH_ORACLE;
|
|
16
16
|
exports.SUI_ORACLE = config_json_1.default.SUI_ORACLE;
|
package/lib/test/getBidData.js
CHANGED
|
@@ -44,7 +44,7 @@ var provider = new sui_js_1.JsonRpcProvider(sui_js_1.devnetConnection); //for re
|
|
|
44
44
|
return __generator(this, function (_a) {
|
|
45
45
|
switch (_a.label) {
|
|
46
46
|
case 0:
|
|
47
|
-
vault = "
|
|
47
|
+
vault = "0x0ba9a1e3b6389e412c609feef563b1407a63272a";
|
|
48
48
|
return [4 /*yield*/, (0, getBid_1.getBid)(vault, provider)];
|
|
49
49
|
case 1:
|
|
50
50
|
bid = _a.sent();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
|
+
var constants_1 = require("../constants");
|
|
41
|
+
var keypair = sui_js_1.Ed25519Keypair.deriveKeypair(constants_1.TEST_MNEMONIC);
|
|
42
|
+
var provider = new sui_js_1.JsonRpcProvider(new sui_js_1.Connection({
|
|
43
|
+
fullnode: "wss://node.shinami.com:443/ws/v1/sui_devnet_cfbd006037ff239969283dca8229432d",
|
|
44
|
+
})); //for read only operations
|
|
45
|
+
var signer = new sui_js_1.RawSigner(keypair, provider);
|
|
46
|
+
var packageAddress = "0xca767e24d77798642a1a5985824247282b1b11532cd3e77c9d54a394568301d0";
|
|
47
|
+
var registry = "0xcfeb92f91aabe41c760b408018beaa315cf1bd91a5b22e1182742161fd468548";
|
|
48
|
+
var BTC = "0x01b9cf11792b0d5f044aad0b02b62ead616dda2449976b9b7b3a29b979beae07";
|
|
49
|
+
var typeArgs = [
|
|
50
|
+
"0x29fc31d3927124688cc9abee4431b6dec9611beb4677b4e55cebca58641854b6::sui::SUI",
|
|
51
|
+
"0x29fc31d3927124688cc9abee4431b6dec9611beb4677b4e55cebca58641854b6::sui::SUI",
|
|
52
|
+
"0x29fc31d3927124688cc9abee4431b6dec9611beb4677b4e55cebca58641854b6::sui::SUI",
|
|
53
|
+
];
|
|
54
|
+
var test = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
var subscriptionId;
|
|
56
|
+
return __generator(this, function (_a) {
|
|
57
|
+
switch (_a.label) {
|
|
58
|
+
case 0: return [4 /*yield*/, provider.subscribeEvent({
|
|
59
|
+
filter: {
|
|
60
|
+
Sender: "0x6c6d47e87f44c3d738113a6b7a7320ce49d0664b4b130b601f8176e706c1cc7e",
|
|
61
|
+
},
|
|
62
|
+
onMessage: function (event) {
|
|
63
|
+
// handle subscription notification message here. This function is called once per subscription message.
|
|
64
|
+
console.log(event);
|
|
65
|
+
},
|
|
66
|
+
})];
|
|
67
|
+
case 1:
|
|
68
|
+
subscriptionId = _a.sent();
|
|
69
|
+
console.log(subscriptionId);
|
|
70
|
+
return [2 /*return*/];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}); };
|
|
74
|
+
test();
|
|
@@ -64,8 +64,8 @@ function getBid(vault, provider) {
|
|
|
64
64
|
price: (bidData.price),
|
|
65
65
|
size: Number(bidData.size / (Math.pow(10, constants_1.TOKEN_DECIMAL))).toString(),
|
|
66
66
|
tsMs: (bidData.ts_ms),
|
|
67
|
-
tokenBalance: (bidData.
|
|
68
|
-
ownerAddress: bidData.
|
|
67
|
+
tokenBalance: (bidData.balance),
|
|
68
|
+
ownerAddress: bidData.bidder,
|
|
69
69
|
};
|
|
70
70
|
return res;
|
|
71
71
|
});
|
package/lib/utils/fetchData.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export interface PortfolioVault {
|
|
|
9
9
|
auction: Auction;
|
|
10
10
|
authority: string[];
|
|
11
11
|
tvl: string;
|
|
12
|
-
vaultBidPrice: string;
|
|
13
12
|
}
|
|
14
13
|
export interface Info {
|
|
15
14
|
index: string;
|
|
@@ -20,7 +19,7 @@ export interface Info {
|
|
|
20
19
|
}
|
|
21
20
|
export interface Config {
|
|
22
21
|
optionType: string;
|
|
23
|
-
period:
|
|
22
|
+
period: number;
|
|
24
23
|
activationTsMs: string;
|
|
25
24
|
expirationTsMs: string;
|
|
26
25
|
dTokenDecimal: string;
|
package/lib/utils/fetchData.js
CHANGED
|
@@ -3,9 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.parseSubVault = exports.parsePayoffConfig = exports.parseVaultConfig = void 0;
|
|
4
4
|
var sui_js_1 = require("@mysten/sui.js");
|
|
5
5
|
var provider = new sui_js_1.JsonRpcProvider(sui_js_1.devnetConnection); //for read only operations
|
|
6
|
-
var decode = function (str) {
|
|
6
|
+
var decode = function (str) {
|
|
7
|
+
return Buffer.from(str, "base64").toString("binary");
|
|
8
|
+
};
|
|
7
9
|
function parseVaultConfig(vaultConfigF) {
|
|
8
|
-
var payoffConfigs = vaultConfigF.payoff_configs.map(function (x) {
|
|
10
|
+
var payoffConfigs = vaultConfigF.payoff_configs.map(function (x) {
|
|
11
|
+
return parsePayoffConfig(x.fields);
|
|
12
|
+
});
|
|
9
13
|
return {
|
|
10
14
|
payoffConfigs: payoffConfigs,
|
|
11
15
|
strikeIncrement: vaultConfigF.strike_increment,
|
package/lib/utils/getMintTx.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
+
export declare function getMintTx(gasBudget: number, packageId: string, registry: string, moduleName: string, amount: number): Promise<TransactionBlock>;
|
package/lib/utils/getMintTx.js
CHANGED
|
@@ -37,21 +37,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getMintTx = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
function getMintTx(gasBudget, packageId, registry, moduleName, amount) {
|
|
41
42
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
-
var tx;
|
|
43
|
+
var tx, target, txArguments;
|
|
43
44
|
return __generator(this, function (_a) {
|
|
44
|
-
tx =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
arguments:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
],
|
|
53
|
-
gasBudget: gasBudget,
|
|
54
|
-
};
|
|
45
|
+
tx = new sui_js_1.TransactionBlock();
|
|
46
|
+
target = "".concat(packageId, "::").concat(moduleName, "::mint");
|
|
47
|
+
txArguments = [tx.pure(registry), tx.pure(amount)];
|
|
48
|
+
tx.moveCall({
|
|
49
|
+
target: target,
|
|
50
|
+
arguments: txArguments,
|
|
51
|
+
});
|
|
52
|
+
tx.setGasBudget(gasBudget);
|
|
55
53
|
return [2 /*return*/, tx];
|
|
56
54
|
});
|
|
57
55
|
});
|
|
@@ -59,4 +57,4 @@ function getMintTx(gasBudget, packageId, registry, moduleName, amount) {
|
|
|
59
57
|
exports.getMintTx = getMintTx;
|
|
60
58
|
/*
|
|
61
59
|
sui client call --gas-budget 10000 --package 0xe879e96fb90a8559127091f1176a2d10bb67c6ff --module "token_btc" --function "mint" --args 0x5dce92f67eeda471369b734deac0d540b751cea6 10000
|
|
62
|
-
*/
|
|
60
|
+
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JsonRpcProvider } from
|
|
1
|
+
import { JsonRpcProvider } from "@mysten/sui.js";
|
|
2
2
|
export declare function getTypeArgumentFromToken(token: string, provider: JsonRpcProvider): Promise<any>;
|
|
@@ -39,20 +39,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.getTypeArgumentFromToken = void 0;
|
|
40
40
|
function getTypeArgumentFromToken(token, provider) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
-
var
|
|
42
|
+
var tokenInfo, typeArgument, e_1;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
44
44
|
switch (_a.label) {
|
|
45
45
|
case 0:
|
|
46
46
|
_a.trys.push([0, 2, , 3]);
|
|
47
|
-
return [4 /*yield*/, provider.getObject(
|
|
47
|
+
return [4 /*yield*/, provider.getObject({
|
|
48
|
+
id: token,
|
|
49
|
+
options: { showContent: true },
|
|
50
|
+
})];
|
|
48
51
|
case 1:
|
|
49
|
-
|
|
50
|
-
if (
|
|
52
|
+
tokenInfo = _a.sent();
|
|
53
|
+
if (tokenInfo.error !== undefined) {
|
|
51
54
|
console.log("obj not exists, but is:");
|
|
52
|
-
console.log(
|
|
55
|
+
console.log(tokenInfo.error.tag);
|
|
53
56
|
return [2 /*return*/];
|
|
54
57
|
}
|
|
55
|
-
|
|
58
|
+
1;
|
|
59
|
+
console.log(tokenInfo);
|
|
60
|
+
typeArgument = tokenInfo.data.content.type;
|
|
61
|
+
console.log(typeArgument);
|
|
56
62
|
typeArgument = typeArgument.split("<")[1];
|
|
57
63
|
typeArgument = typeArgument.split(">")[0];
|
|
58
64
|
return [2 /*return*/, typeArgument];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { JsonRpcProvider } from
|
|
2
|
-
import { PortfolioVault
|
|
1
|
+
import { JsonRpcProvider } from "@mysten/sui.js";
|
|
2
|
+
import { PortfolioVault } from "./fetchData";
|
|
3
3
|
export declare function getVaultDataFromRegistry(registry: string, provider: JsonRpcProvider): Promise<PortfolioVault[]>;
|
|
4
|
-
export declare function getVaultBidPrice(auction: Auction): Promise<number>;
|
|
5
4
|
export declare function getNodesKeyFromLinkedList(linkedList: string, provider: JsonRpcProvider): Promise<string[]>;
|
|
@@ -47,44 +47,53 @@ var __values = (this && this.__values) || function(o) {
|
|
|
47
47
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.getNodesKeyFromLinkedList = exports.
|
|
50
|
+
exports.getNodesKeyFromLinkedList = exports.getVaultDataFromRegistry = void 0;
|
|
51
51
|
var fetchData_1 = require("./fetchData");
|
|
52
52
|
function getVaultDataFromRegistry(registry, provider) {
|
|
53
53
|
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
-
var coveredCallVaults, coveredCallVaultsId, objsInfo,
|
|
54
|
+
var vaults, coveredCallVaults, coveredCallVaultsId, objsInfo, objsInfo_1, objsInfo_1_1, objInfo, vaultId, type, typeArgs, assets, infoFields, deliveryInfo, fields, info, config, configRes, depositVaultField, depositVault, bidVaultField, bidVault, auctionField, auctionRes, auction, priceConfig, priceConfigRes, tvl, authorityId, authority, portfolioVaults, e_1_1;
|
|
55
55
|
var e_1, _a;
|
|
56
56
|
return __generator(this, function (_b) {
|
|
57
57
|
switch (_b.label) {
|
|
58
|
-
case 0:
|
|
58
|
+
case 0:
|
|
59
|
+
vaults = [];
|
|
60
|
+
return [4 /*yield*/, provider.getDynamicFields({
|
|
61
|
+
parentId: registry,
|
|
62
|
+
})];
|
|
59
63
|
case 1:
|
|
60
64
|
coveredCallVaults = (_b.sent()).data;
|
|
61
65
|
coveredCallVaultsId = coveredCallVaults.map(function (e) { return e.objectId; });
|
|
62
|
-
return [4 /*yield*/, provider.
|
|
66
|
+
return [4 /*yield*/, provider.multiGetObjects({
|
|
67
|
+
ids: coveredCallVaultsId,
|
|
68
|
+
options: { showContent: true },
|
|
69
|
+
})];
|
|
63
70
|
case 2:
|
|
64
71
|
objsInfo = _b.sent();
|
|
65
|
-
vaults = [];
|
|
66
72
|
_b.label = 3;
|
|
67
73
|
case 3:
|
|
68
|
-
_b.trys.push([3,
|
|
74
|
+
_b.trys.push([3, 8, 9, 10]);
|
|
69
75
|
objsInfo_1 = __values(objsInfo), objsInfo_1_1 = objsInfo_1.next();
|
|
70
76
|
_b.label = 4;
|
|
71
77
|
case 4:
|
|
72
|
-
if (!!objsInfo_1_1.done) return [3 /*break*/,
|
|
78
|
+
if (!!objsInfo_1_1.done) return [3 /*break*/, 7];
|
|
73
79
|
objInfo = objsInfo_1_1.value;
|
|
74
|
-
if (objInfo.
|
|
80
|
+
if (objInfo.error !== undefined) {
|
|
75
81
|
console.log("obj not exist");
|
|
76
|
-
return [3 /*break*/,
|
|
82
|
+
return [3 /*break*/, 6];
|
|
77
83
|
}
|
|
78
|
-
vaultId = objInfo.
|
|
79
|
-
type = objInfo.
|
|
84
|
+
vaultId = objInfo.data.content.fields.id.id;
|
|
85
|
+
type = objInfo.data.content.fields.value.type;
|
|
80
86
|
type = type.split("<")[1];
|
|
81
87
|
type = type.split(">")[0];
|
|
82
88
|
typeArgs = type.split(", ");
|
|
83
89
|
assets = typeArgs.map(function (x) { return x.split("::")[2]; });
|
|
90
|
+
infoFields = objInfo.data.content.fields.value.fields.info.fields;
|
|
84
91
|
deliveryInfo = void 0;
|
|
85
92
|
//@ts-ignore
|
|
86
|
-
if (
|
|
87
|
-
fields =
|
|
93
|
+
if (infoFields.delivery_info) {
|
|
94
|
+
fields =
|
|
95
|
+
//@ts-ignore
|
|
96
|
+
infoFields.delivery_info.fields;
|
|
88
97
|
deliveryInfo = {
|
|
89
98
|
round: fields.round,
|
|
90
99
|
price: fields.price,
|
|
@@ -96,15 +105,14 @@ function getVaultDataFromRegistry(registry, provider) {
|
|
|
96
105
|
else {
|
|
97
106
|
deliveryInfo = {};
|
|
98
107
|
}
|
|
99
|
-
infoF = objInfo.details.data.fields.value.fields.info.fields;
|
|
100
108
|
info = {
|
|
101
|
-
index:
|
|
102
|
-
creator:
|
|
103
|
-
createTsMs:
|
|
104
|
-
round:
|
|
105
|
-
deliveryInfo: deliveryInfo
|
|
109
|
+
index: infoFields.index,
|
|
110
|
+
creator: infoFields.creator,
|
|
111
|
+
createTsMs: infoFields.create_ts_ms,
|
|
112
|
+
round: infoFields.round,
|
|
113
|
+
deliveryInfo: deliveryInfo,
|
|
106
114
|
};
|
|
107
|
-
config = objInfo.
|
|
115
|
+
config = objInfo.data.content.fields.value.fields.config.fields;
|
|
108
116
|
configRes = {
|
|
109
117
|
optionType: config.option_type,
|
|
110
118
|
period: config.period,
|
|
@@ -114,62 +122,64 @@ function getVaultDataFromRegistry(registry, provider) {
|
|
|
114
122
|
bTokenDecimal: config.b_token_decimal,
|
|
115
123
|
oTokenDecimal: config.o_token_decimal,
|
|
116
124
|
lotSize: config.lot_size,
|
|
117
|
-
capacity: (Number(config.capacity) /
|
|
125
|
+
capacity: (Number(config.capacity) /
|
|
126
|
+
Math.pow(10, config.d_token_decimal)).toString(),
|
|
118
127
|
leverage: config.leverage,
|
|
119
128
|
hasNext: config.has_next,
|
|
120
129
|
activeVaultConfig: (0, fetchData_1.parseVaultConfig)(config.active_vault_config.fields),
|
|
121
130
|
warmupVaultConfig: (0, fetchData_1.parseVaultConfig)(config.warmup_vault_config.fields),
|
|
122
131
|
upcomingVaultConfig: (0, fetchData_1.parseVaultConfig)(config.upcoming_vault_config.fields),
|
|
123
132
|
};
|
|
124
|
-
|
|
133
|
+
depositVaultField =
|
|
134
|
+
//@ts-ignore
|
|
135
|
+
objInfo.data.content.fields.value.fields.deposit_vault.fields;
|
|
125
136
|
depositVault = {
|
|
126
|
-
activeSubVault: (0, fetchData_1.parseSubVault)(
|
|
127
|
-
deactivatingSubVault: (0, fetchData_1.parseSubVault)(
|
|
128
|
-
inactiveSubVault: (0, fetchData_1.parseSubVault)(
|
|
129
|
-
warmupSubVault: (0, fetchData_1.parseSubVault)(
|
|
130
|
-
hasNext:
|
|
137
|
+
activeSubVault: (0, fetchData_1.parseSubVault)(depositVaultField.active_sub_vault.fields),
|
|
138
|
+
deactivatingSubVault: (0, fetchData_1.parseSubVault)(depositVaultField.deactivating_sub_vault.fields),
|
|
139
|
+
inactiveSubVault: (0, fetchData_1.parseSubVault)(depositVaultField.inactive_sub_vault.fields),
|
|
140
|
+
warmupSubVault: (0, fetchData_1.parseSubVault)(depositVaultField.warmup_sub_vault.fields),
|
|
141
|
+
hasNext: depositVaultField.has_next,
|
|
131
142
|
};
|
|
132
|
-
|
|
143
|
+
bidVaultField =
|
|
144
|
+
//@ts-ignore
|
|
145
|
+
objInfo.data.content.fields.value.fields.bid_vault.fields;
|
|
133
146
|
bidVault = {
|
|
134
|
-
bidderSubVault: (0, fetchData_1.parseSubVault)(
|
|
135
|
-
premiumSubVault: (0, fetchData_1.parseSubVault)(
|
|
136
|
-
performanceFeeSubVault: (0, fetchData_1.parseSubVault)(
|
|
147
|
+
bidderSubVault: (0, fetchData_1.parseSubVault)(bidVaultField.bidder_sub_vault.fields),
|
|
148
|
+
premiumSubVault: (0, fetchData_1.parseSubVault)(bidVaultField.premium_sub_vault.fields),
|
|
149
|
+
performanceFeeSubVault: (0, fetchData_1.parseSubVault)(bidVaultField.performance_fee_sub_vault.fields),
|
|
137
150
|
};
|
|
151
|
+
auctionField = objInfo.data.content.fields.value.fields.auction;
|
|
138
152
|
auctionRes = void 0;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
153
|
+
if (auctionField) {
|
|
154
|
+
auction = auctionField.fields;
|
|
155
|
+
priceConfig = auction.price_config.fields;
|
|
156
|
+
priceConfigRes = {
|
|
157
|
+
decaySpeed: priceConfig.decay_speed,
|
|
158
|
+
initialPrice: priceConfig.initial_price,
|
|
159
|
+
finalPrice: priceConfig.final_price,
|
|
160
|
+
};
|
|
161
|
+
auctionRes = {
|
|
162
|
+
startTsMs: auction.start_ts_ms,
|
|
163
|
+
endTsMs: auction.end_ts_ms,
|
|
164
|
+
priceConfig: priceConfigRes,
|
|
165
|
+
index: auction.index,
|
|
166
|
+
totalBidSize: auction.total_bid_size,
|
|
167
|
+
ableToRemoveBid: auction.able_to_remove_bid,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
auctionRes = {};
|
|
172
|
+
}
|
|
173
|
+
tvl = Number(depositVault.activeSubVault.balance) +
|
|
174
|
+
Number(depositVault.warmupSubVault.balance);
|
|
175
|
+
authorityId =
|
|
176
|
+
// @ts-ignore
|
|
177
|
+
objInfo.data.content.fields.value.fields.authority.fields.whitelist.fields
|
|
178
|
+
.id.id;
|
|
179
|
+
return [4 /*yield*/, getNodesKeyFromLinkedList(authorityId, provider)];
|
|
159
180
|
case 5:
|
|
160
|
-
vaultBidPrice = _b.sent();
|
|
161
|
-
return [3 /*break*/, 7];
|
|
162
|
-
case 6:
|
|
163
|
-
// console.log("No auction " + vaultId)
|
|
164
|
-
auctionRes = {};
|
|
165
|
-
vaultBidPrice = 0;
|
|
166
|
-
_b.label = 7;
|
|
167
|
-
case 7:
|
|
168
|
-
tvl = Number(depositVault.activeSubVault.balance) + Number(depositVault.warmupSubVault.balance);
|
|
169
|
-
return [4 /*yield*/, getNodesKeyFromLinkedList(objInfo.details.data.fields.value.fields.authority, provider)];
|
|
170
|
-
case 8:
|
|
171
181
|
authority = _b.sent();
|
|
172
|
-
|
|
182
|
+
portfolioVaults = {
|
|
173
183
|
vaultId: vaultId,
|
|
174
184
|
typeArgs: typeArgs,
|
|
175
185
|
assets: assets,
|
|
@@ -180,60 +190,37 @@ function getVaultDataFromRegistry(registry, provider) {
|
|
|
180
190
|
auction: auctionRes,
|
|
181
191
|
authority: authority,
|
|
182
192
|
tvl: tvl.toString(),
|
|
183
|
-
vaultBidPrice: vaultBidPrice.toString(),
|
|
184
193
|
};
|
|
185
|
-
vaults.push(
|
|
186
|
-
_b.label =
|
|
187
|
-
case
|
|
194
|
+
vaults.push(portfolioVaults);
|
|
195
|
+
_b.label = 6;
|
|
196
|
+
case 6:
|
|
188
197
|
objsInfo_1_1 = objsInfo_1.next();
|
|
189
198
|
return [3 /*break*/, 4];
|
|
190
|
-
case
|
|
191
|
-
case
|
|
199
|
+
case 7: return [3 /*break*/, 10];
|
|
200
|
+
case 8:
|
|
192
201
|
e_1_1 = _b.sent();
|
|
193
202
|
e_1 = { error: e_1_1 };
|
|
194
|
-
return [3 /*break*/,
|
|
195
|
-
case
|
|
203
|
+
return [3 /*break*/, 10];
|
|
204
|
+
case 9:
|
|
196
205
|
try {
|
|
197
206
|
if (objsInfo_1_1 && !objsInfo_1_1.done && (_a = objsInfo_1.return)) _a.call(objsInfo_1);
|
|
198
207
|
}
|
|
199
208
|
finally { if (e_1) throw e_1.error; }
|
|
200
209
|
return [7 /*endfinally*/];
|
|
201
|
-
case
|
|
210
|
+
case 10: return [2 /*return*/, vaults];
|
|
202
211
|
}
|
|
203
212
|
});
|
|
204
213
|
});
|
|
205
214
|
}
|
|
206
215
|
exports.getVaultDataFromRegistry = getVaultDataFromRegistry;
|
|
207
|
-
function getVaultBidPrice(auction) {
|
|
208
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
209
|
-
var current, initialPrice, finalPrice, decaySpeed, start, end;
|
|
210
|
-
return __generator(this, function (_a) {
|
|
211
|
-
current = Date.now();
|
|
212
|
-
initialPrice = Number(auction.priceConfig.initialPrice);
|
|
213
|
-
finalPrice = Number(auction.priceConfig.finalPrice);
|
|
214
|
-
decaySpeed = Number(auction.priceConfig.decaySpeed);
|
|
215
|
-
start = Number(auction.startTsMs);
|
|
216
|
-
end = Number(auction.endTsMs);
|
|
217
|
-
/// decayed_price =
|
|
218
|
-
/// initial_price -
|
|
219
|
-
/// (initial_price - final_price) *
|
|
220
|
-
/// (1 - remaining_time / auction_duration) ^ decay_speed
|
|
221
|
-
// 1 - remaining_time / auction_duration => 1 - (end - current) / (end - start) => (current - start) / (end - start)
|
|
222
|
-
return [2 /*return*/, initialPrice -
|
|
223
|
-
(initialPrice - finalPrice) *
|
|
224
|
-
(((current - start) / (end - start)) ^ decaySpeed)];
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
exports.getVaultBidPrice = getVaultBidPrice;
|
|
229
216
|
function getNodesKeyFromLinkedList(linkedList, provider) {
|
|
230
217
|
return __awaiter(this, void 0, void 0, function () {
|
|
231
218
|
var linkedListNodes;
|
|
232
219
|
return __generator(this, function (_a) {
|
|
233
220
|
switch (_a.label) {
|
|
234
|
-
case 0: return [4 /*yield*/, provider.getDynamicFields(linkedList
|
|
221
|
+
case 0: return [4 /*yield*/, provider.getDynamicFields({ parentId: linkedList })];
|
|
235
222
|
case 1:
|
|
236
|
-
linkedListNodes = (_a.sent()).data.map(function (d) { return d.name; });
|
|
223
|
+
linkedListNodes = (_a.sent()).data.map(function (d) { return d.name.value; });
|
|
237
224
|
return [2 /*return*/, linkedListNodes];
|
|
238
225
|
}
|
|
239
226
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JsonRpcProvider } from
|
|
2
|
-
export declare function getWhiteListFromRegistry(registry: string, provider: JsonRpcProvider): Promise<
|
|
1
|
+
import { JsonRpcProvider } from "@mysten/sui.js";
|
|
2
|
+
export declare function getWhiteListFromRegistry(registry: string, provider: JsonRpcProvider): Promise<void>;
|
|
@@ -38,31 +38,36 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getWhiteListFromRegistry = void 0;
|
|
40
40
|
function getWhiteListFromRegistry(registry, provider) {
|
|
41
|
+
var _a;
|
|
41
42
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
-
var whiteLists,
|
|
43
|
-
return __generator(this, function (
|
|
44
|
-
switch (
|
|
43
|
+
var whiteLists, registryInfo, whiteListsTable, whiteListsNodes, whiteListsTablesId, whiteListsTableAddress;
|
|
44
|
+
return __generator(this, function (_b) {
|
|
45
|
+
switch (_b.label) {
|
|
45
46
|
case 0:
|
|
46
|
-
console.log("registry: " + registry);
|
|
47
47
|
whiteLists = [];
|
|
48
|
-
return [4 /*yield*/, provider.getObject(
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
return [4 /*yield*/, provider.getObject({
|
|
49
|
+
id: registry,
|
|
50
|
+
options: { showContent: true },
|
|
51
|
+
})];
|
|
51
52
|
case 1:
|
|
52
|
-
|
|
53
|
-
whiteListsTable =
|
|
54
|
-
|
|
53
|
+
registryInfo = _b.sent();
|
|
54
|
+
whiteListsTable =
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
(_a = registryInfo.data) === null || _a === void 0 ? void 0 : _a.content.fields.authority.fields.whitelist.fields.id.id;
|
|
57
|
+
return [4 /*yield*/, provider.getDynamicFields({ parentId: whiteListsTable })];
|
|
55
58
|
case 2:
|
|
56
|
-
whiteListsNodes = (
|
|
57
|
-
|
|
58
|
-
return [4 /*yield*/, provider.
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
whiteListsNodes = (_b.sent()).data;
|
|
60
|
+
whiteListsTablesId = whiteListsNodes.map(function (e) { return e.objectId; });
|
|
61
|
+
return [4 /*yield*/, provider.multiGetObjects({
|
|
62
|
+
ids: whiteListsTablesId,
|
|
63
|
+
options: {
|
|
64
|
+
showContent: true,
|
|
65
|
+
},
|
|
66
|
+
})];
|
|
61
67
|
case 3:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return [2 /*return*/, whiteLists];
|
|
68
|
+
whiteListsTableAddress = _b.sent();
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
return [2 /*return*/, whiteListsTableAddress.map(function (w) { var _a; return (_a = w.data) === null || _a === void 0 ? void 0 : _a.content.fields.name; })];
|
|
66
71
|
}
|
|
67
72
|
});
|
|
68
73
|
});
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
price_oracle: &Oracle<O_TOKEN>,
|
|
6
6
|
): u64
|
|
7
7
|
*/
|
|
8
|
-
export declare function getAuctionMaxSize(packageId: string, typeArguments: string[], registry: string, index: string, priceOracle: string): Promise<any>;
|
|
8
|
+
export declare function getAuctionMaxSize(packageId: string, module: string, typeArguments: string[], registry: string, index: string, priceOracle: string): Promise<any>;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getAuctionMaxSize = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
public fun get_auction_max_size<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
42
43
|
registry: &Registry,
|
|
@@ -44,21 +45,18 @@ exports.getAuctionMaxSize = void 0;
|
|
|
44
45
|
price_oracle: &Oracle<O_TOKEN>,
|
|
45
46
|
): u64
|
|
46
47
|
*/
|
|
47
|
-
function getAuctionMaxSize(packageId, typeArguments, registry, index, priceOracle) {
|
|
48
|
+
function getAuctionMaxSize(packageId, module, typeArguments, registry, index, priceOracle) {
|
|
48
49
|
return __awaiter(this, void 0, void 0, function () {
|
|
49
|
-
var tx;
|
|
50
|
+
var tx, target, txArguments;
|
|
50
51
|
return __generator(this, function (_a) {
|
|
51
|
-
tx =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
tx = new sui_js_1.TransactionBlock();
|
|
53
|
+
target = "".concat(packageId, "::").concat(module, "::get_auction_max_size");
|
|
54
|
+
txArguments = [tx.pure(registry), tx.pure(index), tx.pure(priceOracle)];
|
|
55
|
+
tx.moveCall({
|
|
56
|
+
target: target,
|
|
55
57
|
typeArguments: typeArguments,
|
|
56
|
-
arguments:
|
|
57
|
-
|
|
58
|
-
index,
|
|
59
|
-
priceOracle,
|
|
60
|
-
],
|
|
61
|
-
};
|
|
58
|
+
arguments: txArguments,
|
|
59
|
+
});
|
|
62
60
|
return [2 /*return*/, tx];
|
|
63
61
|
});
|
|
64
62
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionBlock } from "@mysten/sui.js";
|
|
1
2
|
/**
|
|
2
3
|
struct GetUserStatusResult has copy, drop {
|
|
3
4
|
active: u64,
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
user: address,
|
|
15
16
|
): GetUserStatusResult
|
|
16
17
|
*/
|
|
17
|
-
export declare function getUserStatus(packageId: string, typeArguments: string[], registry: string, index: string, userAddress: string): Promise<
|
|
18
|
+
export declare function getUserStatus(packageId: string, module: string, typeArguments: string[], registry: string, index: string, userAddress: string): Promise<TransactionBlock>;
|
|
18
19
|
interface GetUserStatusResult {
|
|
19
20
|
active: bigint;
|
|
20
21
|
deactivating: bigint;
|
|
@@ -22,7 +23,7 @@ interface GetUserStatusResult {
|
|
|
22
23
|
warmup: bigint;
|
|
23
24
|
bidder: bigint;
|
|
24
25
|
premium: bigint;
|
|
25
|
-
|
|
26
|
+
performanceFee: bigint;
|
|
26
27
|
}
|
|
27
28
|
export declare function parseUserStatusResult(rawData: Uint8Array): GetUserStatusResult;
|
|
28
29
|
export declare function U64FromBytes(x: any): bigint;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.U64FromBytes = exports.parseUserStatusResult = exports.getUserStatus = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
struct GetUserStatusResult has copy, drop {
|
|
42
43
|
active: u64,
|
|
@@ -53,21 +54,18 @@ exports.U64FromBytes = exports.parseUserStatusResult = exports.getUserStatus = v
|
|
|
53
54
|
user: address,
|
|
54
55
|
): GetUserStatusResult
|
|
55
56
|
*/
|
|
56
|
-
function getUserStatus(packageId, typeArguments, registry, index, userAddress) {
|
|
57
|
+
function getUserStatus(packageId, module, typeArguments, registry, index, userAddress) {
|
|
57
58
|
return __awaiter(this, void 0, void 0, function () {
|
|
58
|
-
var tx;
|
|
59
|
+
var tx, target, txArguments;
|
|
59
60
|
return __generator(this, function (_a) {
|
|
60
|
-
tx =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
tx = new sui_js_1.TransactionBlock();
|
|
62
|
+
target = "".concat(packageId, "::").concat(module, "::get_user_status");
|
|
63
|
+
txArguments = [tx.pure(registry), tx.pure(index), tx.pure(userAddress)];
|
|
64
|
+
tx.moveCall({
|
|
65
|
+
target: target,
|
|
64
66
|
typeArguments: typeArguments,
|
|
65
|
-
arguments:
|
|
66
|
-
|
|
67
|
-
index,
|
|
68
|
-
userAddress,
|
|
69
|
-
],
|
|
70
|
-
};
|
|
67
|
+
arguments: txArguments,
|
|
68
|
+
});
|
|
71
69
|
return [2 /*return*/, tx];
|
|
72
70
|
});
|
|
73
71
|
});
|
|
@@ -86,7 +84,7 @@ function parseUserStatusResult(rawData) {
|
|
|
86
84
|
warmup: temp[3],
|
|
87
85
|
bidder: temp[4],
|
|
88
86
|
premium: temp[5],
|
|
89
|
-
|
|
87
|
+
performanceFee: temp[6],
|
|
90
88
|
};
|
|
91
89
|
return userStatusResult;
|
|
92
90
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionBlock } from "@mysten/sui.js";
|
|
1
2
|
/**
|
|
2
3
|
public(friend) entry fun claim_and_harvest<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
3
4
|
registry: &mut Registry,
|
|
@@ -6,4 +7,4 @@
|
|
|
6
7
|
)
|
|
7
8
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
8
9
|
*/
|
|
9
|
-
export declare function getClaimAndHarvestTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string): Promise<
|
|
10
|
+
export declare function getClaimAndHarvestTx(gasBudget: number, packageId: string, module: string, registry: string, typeArguments: string[], index: string): Promise<TransactionBlock>;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getClaimAndHarvestTx = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
public(friend) entry fun claim_and_harvest<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
42
43
|
registry: &mut Registry,
|
|
@@ -45,21 +46,19 @@ exports.getClaimAndHarvestTx = void 0;
|
|
|
45
46
|
)
|
|
46
47
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
47
48
|
*/
|
|
48
|
-
function getClaimAndHarvestTx(gasBudget, packageId, registry, typeArguments, index) {
|
|
49
|
+
function getClaimAndHarvestTx(gasBudget, packageId, module, registry, typeArguments, index) {
|
|
49
50
|
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
var tx;
|
|
51
|
+
var tx, target, txArguments;
|
|
51
52
|
return __generator(this, function (_a) {
|
|
52
|
-
tx =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
tx = new sui_js_1.TransactionBlock();
|
|
54
|
+
target = "".concat(packageId, "::").concat(module, "::claim_and_harvest");
|
|
55
|
+
txArguments = [tx.pure(registry), tx.pure(index)];
|
|
56
|
+
tx.moveCall({
|
|
57
|
+
target: target,
|
|
56
58
|
typeArguments: typeArguments,
|
|
57
|
-
arguments:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
],
|
|
61
|
-
gasBudget: gasBudget,
|
|
62
|
-
};
|
|
59
|
+
arguments: txArguments,
|
|
60
|
+
});
|
|
61
|
+
tx.setGasBudget(gasBudget);
|
|
63
62
|
return [2 /*return*/, tx];
|
|
64
63
|
});
|
|
65
64
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionBlock } from "@mysten/sui.js";
|
|
1
2
|
/**
|
|
2
3
|
public(friend) entry fun claim<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
3
4
|
registry: &mut Registry,
|
|
@@ -6,4 +7,4 @@
|
|
|
6
7
|
)
|
|
7
8
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
8
9
|
*/
|
|
9
|
-
export declare function getClaimTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string): Promise<
|
|
10
|
+
export declare function getClaimTx(gasBudget: number, packageId: string, module: string, registry: string, typeArguments: string[], index: string): Promise<TransactionBlock>;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getClaimTx = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
public(friend) entry fun claim<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
42
43
|
registry: &mut Registry,
|
|
@@ -45,21 +46,19 @@ exports.getClaimTx = void 0;
|
|
|
45
46
|
)
|
|
46
47
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
47
48
|
*/
|
|
48
|
-
function getClaimTx(gasBudget, packageId, registry, typeArguments, index) {
|
|
49
|
+
function getClaimTx(gasBudget, packageId, module, registry, typeArguments, index) {
|
|
49
50
|
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
var tx;
|
|
51
|
+
var tx, target, txArguments;
|
|
51
52
|
return __generator(this, function (_a) {
|
|
52
|
-
tx =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
tx = new sui_js_1.TransactionBlock();
|
|
54
|
+
target = "".concat(packageId, "::").concat(module, "::claim");
|
|
55
|
+
txArguments = [tx.pure(registry), tx.pure(index)];
|
|
56
|
+
tx.moveCall({
|
|
57
|
+
target: target,
|
|
56
58
|
typeArguments: typeArguments,
|
|
57
|
-
arguments:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
],
|
|
61
|
-
gasBudget: gasBudget,
|
|
62
|
-
};
|
|
59
|
+
arguments: txArguments,
|
|
60
|
+
});
|
|
61
|
+
tx.setGasBudget(gasBudget);
|
|
63
62
|
return [2 /*return*/, tx];
|
|
64
63
|
});
|
|
65
64
|
});
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
)
|
|
7
7
|
* @param typeArguments [TOKEN, O_TOKEN]
|
|
8
8
|
*/
|
|
9
|
-
export declare function getCompoundTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string): Promise<any>;
|
|
9
|
+
export declare function getCompoundTx(gasBudget: number, packageId: string, module: string, registry: string, typeArguments: string[], index: string): Promise<any>;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getCompoundTx = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
public entry fun compound<TOKEN, O_TOKEN>(
|
|
42
43
|
registry: &mut Registry,
|
|
@@ -45,21 +46,19 @@ exports.getCompoundTx = void 0;
|
|
|
45
46
|
)
|
|
46
47
|
* @param typeArguments [TOKEN, O_TOKEN]
|
|
47
48
|
*/
|
|
48
|
-
function getCompoundTx(gasBudget, packageId, registry, typeArguments, index) {
|
|
49
|
+
function getCompoundTx(gasBudget, packageId, module, registry, typeArguments, index) {
|
|
49
50
|
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
var tx;
|
|
51
|
+
var tx, target, txArguments;
|
|
51
52
|
return __generator(this, function (_a) {
|
|
52
|
-
tx =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
tx = new sui_js_1.TransactionBlock();
|
|
54
|
+
target = "".concat(packageId, "::").concat(module, "::compound");
|
|
55
|
+
txArguments = [tx.pure(registry), tx.pure(index)];
|
|
56
|
+
tx.moveCall({
|
|
57
|
+
target: target,
|
|
56
58
|
typeArguments: typeArguments,
|
|
57
|
-
arguments:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
],
|
|
61
|
-
gasBudget: gasBudget,
|
|
62
|
-
};
|
|
59
|
+
arguments: txArguments,
|
|
60
|
+
});
|
|
61
|
+
tx.setGasBudget(gasBudget);
|
|
63
62
|
return [2 /*return*/, tx];
|
|
64
63
|
});
|
|
65
64
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionBlock } from "@mysten/sui.js";
|
|
1
2
|
/**
|
|
2
3
|
public(friend) entry fun deposit<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
3
4
|
registry: &mut Registry,
|
|
@@ -8,4 +9,4 @@
|
|
|
8
9
|
)
|
|
9
10
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
10
11
|
*/
|
|
11
|
-
export declare function getDepositTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], vaultIndex: string, coins: string[], amount: string): Promise<
|
|
12
|
+
export declare function getDepositTx(gasBudget: number, packageId: string, module: string, registry: string, typeArguments: string[], vaultIndex: string, coins: string[], amount: string): Promise<TransactionBlock>;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getDepositTx = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
public(friend) entry fun deposit<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
42
43
|
registry: &mut Registry,
|
|
@@ -47,23 +48,24 @@ exports.getDepositTx = void 0;
|
|
|
47
48
|
)
|
|
48
49
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
49
50
|
*/
|
|
50
|
-
function getDepositTx(gasBudget, packageId, registry, typeArguments, vaultIndex, coins, amount) {
|
|
51
|
+
function getDepositTx(gasBudget, packageId, module, registry, typeArguments, vaultIndex, coins, amount) {
|
|
51
52
|
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
var tx;
|
|
53
|
+
var tx, target, txArguments;
|
|
53
54
|
return __generator(this, function (_a) {
|
|
54
|
-
tx =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
tx = new sui_js_1.TransactionBlock();
|
|
56
|
+
target = "".concat(packageId, "::").concat(module, "::deposit");
|
|
57
|
+
txArguments = [
|
|
58
|
+
tx.pure(registry),
|
|
59
|
+
tx.pure(vaultIndex),
|
|
60
|
+
tx.pure(coins),
|
|
61
|
+
tx.pure(amount),
|
|
62
|
+
];
|
|
63
|
+
tx.moveCall({
|
|
64
|
+
target: target,
|
|
58
65
|
typeArguments: typeArguments,
|
|
59
|
-
arguments:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
coins,
|
|
63
|
-
amount,
|
|
64
|
-
],
|
|
65
|
-
gasBudget: gasBudget,
|
|
66
|
-
};
|
|
66
|
+
arguments: txArguments,
|
|
67
|
+
});
|
|
68
|
+
tx.setGasBudget(gasBudget);
|
|
67
69
|
return [2 /*return*/, tx];
|
|
68
70
|
});
|
|
69
71
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionBlock } from "@mysten/sui.js";
|
|
1
2
|
/**
|
|
2
3
|
public(friend) entry fun harvest<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
3
4
|
registry: &mut Registry,
|
|
@@ -6,4 +7,4 @@
|
|
|
6
7
|
)
|
|
7
8
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
8
9
|
*/
|
|
9
|
-
export declare function getHarvestTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string): Promise<
|
|
10
|
+
export declare function getHarvestTx(gasBudget: number, packageId: string, module: string, registry: string, typeArguments: string[], index: string): Promise<TransactionBlock>;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getHarvestTx = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
public(friend) entry fun harvest<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
42
43
|
registry: &mut Registry,
|
|
@@ -45,21 +46,19 @@ exports.getHarvestTx = void 0;
|
|
|
45
46
|
)
|
|
46
47
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
47
48
|
*/
|
|
48
|
-
function getHarvestTx(gasBudget, packageId, registry, typeArguments, index) {
|
|
49
|
+
function getHarvestTx(gasBudget, packageId, module, registry, typeArguments, index) {
|
|
49
50
|
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
var tx;
|
|
51
|
+
var tx, target, txArguments;
|
|
51
52
|
return __generator(this, function (_a) {
|
|
52
|
-
tx =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
tx = new sui_js_1.TransactionBlock();
|
|
54
|
+
target = "".concat(packageId, "::").concat(module, "::harvest");
|
|
55
|
+
txArguments = [tx.pure(registry), tx.pure(index)];
|
|
56
|
+
tx.moveCall({
|
|
57
|
+
target: target,
|
|
56
58
|
typeArguments: typeArguments,
|
|
57
|
-
arguments:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
],
|
|
61
|
-
gasBudget: gasBudget,
|
|
62
|
-
};
|
|
59
|
+
arguments: txArguments,
|
|
60
|
+
});
|
|
61
|
+
tx.setGasBudget(gasBudget);
|
|
63
62
|
return [2 /*return*/, tx];
|
|
64
63
|
});
|
|
65
64
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionBlock } from "@mysten/sui.js";
|
|
1
2
|
/**
|
|
2
3
|
public(friend) entry fun new_bid<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
3
4
|
registry: &mut Registry,
|
|
@@ -10,4 +11,4 @@
|
|
|
10
11
|
)
|
|
11
12
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
12
13
|
*/
|
|
13
|
-
export declare function getNewBidTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string, priceOracle: string, timeOracle: string, coins: string[], size: string): Promise<
|
|
14
|
+
export declare function getNewBidTx(gasBudget: number, packageId: string, module: string, registry: string, typeArguments: string[], index: string, priceOracle: string, timeOracle: string, coins: string[], size: string): Promise<TransactionBlock>;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getNewBidTx = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
public(friend) entry fun new_bid<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
42
43
|
registry: &mut Registry,
|
|
@@ -49,25 +50,26 @@ exports.getNewBidTx = void 0;
|
|
|
49
50
|
)
|
|
50
51
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
51
52
|
*/
|
|
52
|
-
function getNewBidTx(gasBudget, packageId, registry, typeArguments, index, priceOracle, timeOracle, coins, size) {
|
|
53
|
+
function getNewBidTx(gasBudget, packageId, module, registry, typeArguments, index, priceOracle, timeOracle, coins, size) {
|
|
53
54
|
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
-
var tx;
|
|
55
|
+
var tx, target, txArguments;
|
|
55
56
|
return __generator(this, function (_a) {
|
|
56
|
-
tx =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
tx = new sui_js_1.TransactionBlock();
|
|
58
|
+
target = "".concat(packageId, "::").concat(module, "::new_bid");
|
|
59
|
+
txArguments = [
|
|
60
|
+
tx.pure(registry),
|
|
61
|
+
tx.pure(index),
|
|
62
|
+
tx.pure(priceOracle),
|
|
63
|
+
tx.pure(timeOracle),
|
|
64
|
+
tx.pure(coins),
|
|
65
|
+
tx.pure(size),
|
|
66
|
+
];
|
|
67
|
+
tx.moveCall({
|
|
68
|
+
target: target,
|
|
60
69
|
typeArguments: typeArguments,
|
|
61
|
-
arguments:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
priceOracle,
|
|
65
|
-
timeOracle,
|
|
66
|
-
coins,
|
|
67
|
-
size
|
|
68
|
-
],
|
|
69
|
-
gasBudget: gasBudget,
|
|
70
|
-
};
|
|
70
|
+
arguments: txArguments,
|
|
71
|
+
});
|
|
72
|
+
tx.setGasBudget(gasBudget);
|
|
71
73
|
return [2 /*return*/, tx];
|
|
72
74
|
});
|
|
73
75
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
import { TransactionBlock } from "@mysten/sui.js"; /**
|
|
2
2
|
public(friend) entry fun unsubscribe<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
3
3
|
registry: &mut Registry,
|
|
4
4
|
index: u64,
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
)
|
|
8
8
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
9
9
|
*/
|
|
10
|
-
export declare function getUnsubscribeTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string, share: string[]): Promise<
|
|
10
|
+
export declare function getUnsubscribeTx(gasBudget: number, packageId: string, module: string, registry: string, typeArguments: string[], index: string, share: string[]): Promise<TransactionBlock>;
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getUnsubscribeTx = void 0;
|
|
40
|
-
/**
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js"); /**
|
|
41
41
|
public(friend) entry fun unsubscribe<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
42
42
|
registry: &mut Registry,
|
|
43
43
|
index: u64,
|
|
@@ -46,22 +46,19 @@ exports.getUnsubscribeTx = void 0;
|
|
|
46
46
|
)
|
|
47
47
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
48
48
|
*/
|
|
49
|
-
function getUnsubscribeTx(gasBudget, packageId, registry, typeArguments, index, share) {
|
|
49
|
+
function getUnsubscribeTx(gasBudget, packageId, module, registry, typeArguments, index, share) {
|
|
50
50
|
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
-
var tx;
|
|
51
|
+
var tx, target, txArguments;
|
|
52
52
|
return __generator(this, function (_a) {
|
|
53
|
-
tx =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
tx = new sui_js_1.TransactionBlock();
|
|
54
|
+
target = "".concat(packageId, "::").concat(module, "::unsubscribe");
|
|
55
|
+
txArguments = [tx.pure(registry), tx.pure(index), tx.pure(share)];
|
|
56
|
+
tx.moveCall({
|
|
57
|
+
target: target,
|
|
57
58
|
typeArguments: typeArguments,
|
|
58
|
-
arguments:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
share
|
|
62
|
-
],
|
|
63
|
-
gasBudget: gasBudget,
|
|
64
|
-
};
|
|
59
|
+
arguments: txArguments,
|
|
60
|
+
});
|
|
61
|
+
tx.setGasBudget(gasBudget);
|
|
65
62
|
return [2 /*return*/, tx];
|
|
66
63
|
});
|
|
67
64
|
});
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
)
|
|
8
8
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
9
9
|
*/
|
|
10
|
-
export declare function getWithdrawTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], vaultIndex: string, share: string[]): Promise<any>;
|
|
10
|
+
export declare function getWithdrawTx(gasBudget: number, packageId: string, module: string, registry: string, typeArguments: string[], vaultIndex: string, share: string[]): Promise<any>;
|
|
@@ -37,6 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getWithdrawTx = void 0;
|
|
40
|
+
var sui_js_1 = require("@mysten/sui.js");
|
|
40
41
|
/**
|
|
41
42
|
public(friend) entry fun withdraw<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
42
43
|
registry: &mut Registry,
|
|
@@ -46,22 +47,19 @@ exports.getWithdrawTx = void 0;
|
|
|
46
47
|
)
|
|
47
48
|
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
48
49
|
*/
|
|
49
|
-
function getWithdrawTx(gasBudget, packageId, registry, typeArguments, vaultIndex, share) {
|
|
50
|
+
function getWithdrawTx(gasBudget, packageId, module, registry, typeArguments, vaultIndex, share) {
|
|
50
51
|
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
-
var tx;
|
|
52
|
+
var tx, target, txArguments;
|
|
52
53
|
return __generator(this, function (_a) {
|
|
53
|
-
tx =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
tx = new sui_js_1.TransactionBlock();
|
|
55
|
+
target = "".concat(packageId, "::").concat(module, "::withdraw");
|
|
56
|
+
txArguments = [tx.pure(registry), tx.pure(vaultIndex), tx.pure(share)];
|
|
57
|
+
tx.moveCall({
|
|
58
|
+
target: target,
|
|
57
59
|
typeArguments: typeArguments,
|
|
58
|
-
arguments:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
share,
|
|
62
|
-
],
|
|
63
|
-
gasBudget: gasBudget,
|
|
64
|
-
};
|
|
60
|
+
arguments: txArguments,
|
|
61
|
+
});
|
|
62
|
+
tx.setGasBudget(gasBudget);
|
|
65
63
|
return [2 /*return*/, tx];
|
|
66
64
|
});
|
|
67
65
|
});
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@typus/typus-sdk",
|
|
3
3
|
"author": "Typus",
|
|
4
4
|
"description": "typus sdk",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.5",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@mysten/sui.js": "^0.
|
|
7
|
+
"@mysten/sui.js": "^0.31.0",
|
|
8
8
|
"@types/node": "^17.0.0",
|
|
9
9
|
"bignumber.js": "^9.1.1",
|
|
10
10
|
"bs58": "^4.0.1",
|