@typus/typus-sdk 1.0.26 → 1.0.28
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/constants.d.ts +0 -15
- package/lib/constants.js +1 -29
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/authorized-entry.js +7 -7
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/manager-entry.js +18 -18
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/portfolio-vault.d.ts +2 -2
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/portfolio-vault.js +2 -2
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/user-entry.js +9 -9
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/view-function.d.ts +4 -2
- package/lib/utils/{portfolio/multiple-collateral/user-share.js → typus-dov-double/view-function.js} +50 -3
- package/lib/utils/{portfolio/single-collateral → typus-dov-single}/portfolio-vault.d.ts +2 -2
- package/lib/utils/{portfolio/single-collateral → typus-dov-single}/portfolio-vault.js +2 -2
- package/lib/utils/{portfolio/single-collateral → typus-dov-single}/user-entry.js +8 -8
- package/lib/utils/{portfolio/single-collateral → typus-dov-single}/view-function.d.ts +2 -1
- package/lib/utils/{portfolio/single-collateral/user-share.js → typus-dov-single/view-function.js} +60 -3
- package/package.json +2 -2
- package/lib/config.json +0 -33
- package/lib/utils/portfolio/multiple-collateral/user-share.d.ts +0 -9
- package/lib/utils/portfolio/multiple-collateral/view-function.js +0 -88
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedAddPortfolioVaultAuthorizedUserTx.d.ts +0 -5
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedAddPortfolioVaultAuthorizedUserTx.js +0 -61
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedDeliveryTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedDeliveryTx.js +0 -63
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedNewPortfolioVaultTx.d.ts +0 -39
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedNewPortfolioVaultTx.js +0 -118
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedRemovePortfolioVaultAuthorizedUserTx.d.ts +0 -5
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedRemovePortfolioVaultAuthorizedUserTx.js +0 -61
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateCapacityTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateCapacityTx.js +0 -58
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateUpcomingVaultConfigTx.d.ts +0 -5
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateUpcomingVaultConfigTx.js +0 -72
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateWarmupVaultConfigTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateWarmupVaultConfigTx.js +0 -66
- package/lib/utils/portfolio/single-collateral/manager/getAddAuthorizedUserTx.d.ts +0 -9
- package/lib/utils/portfolio/single-collateral/manager/getAddAuthorizedUserTx.js +0 -65
- package/lib/utils/portfolio/single-collateral/manager/getAddPortfolioVaultAuthorizedUserTx.d.ts +0 -11
- package/lib/utils/portfolio/single-collateral/manager/getAddPortfolioVaultAuthorizedUserTx.js +0 -67
- package/lib/utils/portfolio/single-collateral/manager/getCloseAuctionTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/manager/getCloseAuctionTx.js +0 -64
- package/lib/utils/portfolio/single-collateral/manager/getCloseVaultTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/manager/getCloseVaultTx.js +0 -58
- package/lib/utils/portfolio/single-collateral/manager/getDeliveryTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/manager/getDeliveryTx.js +0 -64
- package/lib/utils/portfolio/single-collateral/manager/getEvolutionTx.d.ts +0 -16
- package/lib/utils/portfolio/single-collateral/manager/getEvolutionTx.js +0 -80
- package/lib/utils/portfolio/single-collateral/manager/getNewManagerTx.d.ts +0 -9
- package/lib/utils/portfolio/single-collateral/manager/getNewManagerTx.js +0 -65
- package/lib/utils/portfolio/single-collateral/manager/getNewPortfolioVaultTx.d.ts +0 -39
- package/lib/utils/portfolio/single-collateral/manager/getNewPortfolioVaultTx.js +0 -118
- package/lib/utils/portfolio/single-collateral/manager/getRemoveAuthorizedUserTx.d.ts +0 -9
- package/lib/utils/portfolio/single-collateral/manager/getRemoveAuthorizedUserTx.js +0 -65
- package/lib/utils/portfolio/single-collateral/manager/getRemoveManagerTx.d.ts +0 -7
- package/lib/utils/portfolio/single-collateral/manager/getRemoveManagerTx.js +0 -63
- package/lib/utils/portfolio/single-collateral/manager/getRemovePortfolioVaultAuthorizedUserTx.d.ts +0 -11
- package/lib/utils/portfolio/single-collateral/manager/getRemovePortfolioVaultAuthorizedUserTx.js +0 -67
- package/lib/utils/portfolio/single-collateral/manager/getUpdateCapacityTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/manager/getUpdateCapacityTx.js +0 -58
- package/lib/utils/portfolio/single-collateral/user-share.d.ts +0 -8
- package/lib/utils/portfolio/single-collateral/view-function.js +0 -98
- /package/lib/utils/{portfolio/leader-board.d.ts → leader-board.d.ts} +0 -0
- /package/lib/utils/{portfolio/leader-board.js → leader-board.js} +0 -0
- /package/lib/utils/{portfolio/mint.d.ts → mint.d.ts} +0 -0
- /package/lib/utils/{portfolio/mint.js → mint.js} +0 -0
- /package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/authorized-entry.d.ts +0 -0
- /package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/manager-entry.d.ts +0 -0
- /package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/user-entry.d.ts +0 -0
- /package/lib/utils/{portfolio/single-collateral → typus-dov-single}/user-entry.d.ts +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
exports.getAuthorizedUpdateCapacityTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
function getAuthorizedUpdateCapacityTx(gasBudget, packageId, typeArguments, registry, index, capacity) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
-
var tx, target, txArguments;
|
|
44
|
-
return __generator(this, function (_a) {
|
|
45
|
-
tx = new sui_js_1.TransactionBlock();
|
|
46
|
-
target = "".concat(packageId, "::").concat(module, "::authorized_update_capacity");
|
|
47
|
-
txArguments = [tx.pure(registry), tx.pure(index), tx.pure(capacity)];
|
|
48
|
-
tx.moveCall({
|
|
49
|
-
target: target,
|
|
50
|
-
typeArguments: [],
|
|
51
|
-
arguments: txArguments,
|
|
52
|
-
});
|
|
53
|
-
tx.setGasBudget(gasBudget);
|
|
54
|
-
return [2 /*return*/, tx];
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
exports.getAuthorizedUpdateCapacityTx = getAuthorizedUpdateCapacityTx;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
export declare function getAuthorizedUpdateUpcomingVaultConfigTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string, strikePct: string[], // vector<u64>
|
|
3
|
-
weight: string[], // vector<u64>
|
|
4
|
-
isBuyer: boolean[], // vector<bool>
|
|
5
|
-
strikeIncrement: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string): Promise<TransactionBlock>;
|
package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateUpcomingVaultConfigTx.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
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
|
-
exports.getAuthorizedUpdateUpcomingVaultConfigTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
function getAuthorizedUpdateUpcomingVaultConfigTx(gasBudget, packageId, registry, typeArguments, index, strikePct, // vector<u64>
|
|
42
|
-
weight, // vector<u64>
|
|
43
|
-
isBuyer, // vector<bool>
|
|
44
|
-
strikeIncrement, decaySpeed, initialPrice, finalPrice, auctionDurationInMs) {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
46
|
-
var tx, target, txArguments;
|
|
47
|
-
return __generator(this, function (_a) {
|
|
48
|
-
tx = new sui_js_1.TransactionBlock();
|
|
49
|
-
target = "".concat(packageId, "::").concat(module, "::authorized_update_upcoming_vault_config");
|
|
50
|
-
txArguments = [
|
|
51
|
-
tx.pure(registry),
|
|
52
|
-
tx.pure(index),
|
|
53
|
-
tx.pure(strikePct),
|
|
54
|
-
tx.pure(weight),
|
|
55
|
-
tx.pure(isBuyer),
|
|
56
|
-
tx.pure(strikeIncrement),
|
|
57
|
-
tx.pure(decaySpeed),
|
|
58
|
-
tx.pure(initialPrice),
|
|
59
|
-
tx.pure(finalPrice),
|
|
60
|
-
tx.pure(auctionDurationInMs),
|
|
61
|
-
];
|
|
62
|
-
tx.moveCall({
|
|
63
|
-
target: target,
|
|
64
|
-
typeArguments: typeArguments,
|
|
65
|
-
arguments: txArguments,
|
|
66
|
-
});
|
|
67
|
-
tx.setGasBudget(gasBudget);
|
|
68
|
-
return [2 /*return*/, tx];
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
exports.getAuthorizedUpdateUpcomingVaultConfigTx = getAuthorizedUpdateUpcomingVaultConfigTx;
|
package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateWarmupVaultConfigTx.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
export declare function getAuthorizedUpdateWarmupVaultConfigTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string, strikeIncrement: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string): Promise<TransactionBlock>;
|
package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateWarmupVaultConfigTx.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
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
|
-
exports.getAuthorizedUpdateWarmupVaultConfigTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
function getAuthorizedUpdateWarmupVaultConfigTx(gasBudget, packageId, typeArguments, registry, index, strikeIncrement, decaySpeed, initialPrice, finalPrice, auctionDurationInMs) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
-
var tx, target, txArguments;
|
|
44
|
-
return __generator(this, function (_a) {
|
|
45
|
-
tx = new sui_js_1.TransactionBlock();
|
|
46
|
-
target = "".concat(packageId, "::").concat(module, "::authorized_update_warmup_vault_config");
|
|
47
|
-
txArguments = [
|
|
48
|
-
tx.pure(registry),
|
|
49
|
-
tx.pure(index),
|
|
50
|
-
tx.pure(strikeIncrement),
|
|
51
|
-
tx.pure(decaySpeed),
|
|
52
|
-
tx.pure(initialPrice),
|
|
53
|
-
tx.pure(finalPrice),
|
|
54
|
-
tx.pure(auctionDurationInMs),
|
|
55
|
-
];
|
|
56
|
-
tx.moveCall({
|
|
57
|
-
target: target,
|
|
58
|
-
typeArguments: typeArguments,
|
|
59
|
-
arguments: txArguments,
|
|
60
|
-
});
|
|
61
|
-
tx.setGasBudget(gasBudget);
|
|
62
|
-
return [2 /*return*/, tx];
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
exports.getAuthorizedUpdateWarmupVaultConfigTx = getAuthorizedUpdateWarmupVaultConfigTx;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
/**
|
|
3
|
-
public(friend) entry fun add_authorized_user(
|
|
4
|
-
manager_cap: & ManagerCap,
|
|
5
|
-
registry: & mut Registry,
|
|
6
|
-
user_addresses: vector<address>,
|
|
7
|
-
)
|
|
8
|
-
*/
|
|
9
|
-
export declare function getAddAuthorizedUserTx(gasBudget: number, packageId: string, module: string, managerCap: string, registry: string, userAddresses: string[]): Promise<TransactionBlock>;
|
|
@@ -1,65 +0,0 @@
|
|
|
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
|
-
exports.getAddAuthorizedUserTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
/**
|
|
42
|
-
public(friend) entry fun add_authorized_user(
|
|
43
|
-
manager_cap: & ManagerCap,
|
|
44
|
-
registry: & mut Registry,
|
|
45
|
-
user_addresses: vector<address>,
|
|
46
|
-
)
|
|
47
|
-
*/
|
|
48
|
-
function getAddAuthorizedUserTx(gasBudget, packageId, module, managerCap, registry, userAddresses) {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
-
var tx, target, txArguments;
|
|
51
|
-
return __generator(this, function (_a) {
|
|
52
|
-
tx = new sui_js_1.TransactionBlock();
|
|
53
|
-
target = "".concat(packageId, "::").concat(module, "::add_authorized_user");
|
|
54
|
-
txArguments = [tx.pure(managerCap), tx.pure(registry), tx.pure(userAddresses)];
|
|
55
|
-
tx.moveCall({
|
|
56
|
-
target: target,
|
|
57
|
-
typeArguments: [],
|
|
58
|
-
arguments: txArguments,
|
|
59
|
-
});
|
|
60
|
-
tx.setGasBudget(gasBudget);
|
|
61
|
-
return [2 /*return*/, tx];
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
exports.getAddAuthorizedUserTx = getAddAuthorizedUserTx;
|
package/lib/utils/portfolio/single-collateral/manager/getAddPortfolioVaultAuthorizedUserTx.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
/**
|
|
3
|
-
public(friend) entry fun add_portfolio_vault_authorized_user<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
4
|
-
manager_cap: &ManagerCap,
|
|
5
|
-
registry: &mut Registry,
|
|
6
|
-
index: u64,
|
|
7
|
-
users: vector<address>,
|
|
8
|
-
)
|
|
9
|
-
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
10
|
-
*/
|
|
11
|
-
export declare function getAddPortfolioVaultAuthorizedUserTx(gasBudget: number, packageId: string, managerCap: string, registry: string, typeArguments: string[], index: string, users: string[]): Promise<TransactionBlock>;
|
package/lib/utils/portfolio/single-collateral/manager/getAddPortfolioVaultAuthorizedUserTx.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
exports.getAddPortfolioVaultAuthorizedUserTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
/**
|
|
42
|
-
public(friend) entry fun add_portfolio_vault_authorized_user<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
43
|
-
manager_cap: &ManagerCap,
|
|
44
|
-
registry: &mut Registry,
|
|
45
|
-
index: u64,
|
|
46
|
-
users: vector<address>,
|
|
47
|
-
)
|
|
48
|
-
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
49
|
-
*/
|
|
50
|
-
function getAddPortfolioVaultAuthorizedUserTx(gasBudget, packageId, managerCap, registry, typeArguments, index, users) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
var tx, target, txArguments;
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
tx = new sui_js_1.TransactionBlock();
|
|
55
|
-
target = "".concat(packageId, "::").concat(module, "::add_portfolio_vault_authorized_user");
|
|
56
|
-
txArguments = [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(users)];
|
|
57
|
-
tx.moveCall({
|
|
58
|
-
target: target,
|
|
59
|
-
typeArguments: typeArguments,
|
|
60
|
-
arguments: txArguments,
|
|
61
|
-
});
|
|
62
|
-
tx.setGasBudget(gasBudget);
|
|
63
|
-
return [2 /*return*/, tx];
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
exports.getAddPortfolioVaultAuthorizedUserTx = getAddPortfolioVaultAuthorizedUserTx;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
export declare function getCloseAuctionTx(gasBudget: number, packageId: string, managerCap: string, typeArguments: string[], registry: string, index: string, priceOracle: string, timeOracle: string): Promise<TransactionBlock>;
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
-
exports.getCloseAuctionTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
function getCloseAuctionTx(gasBudget, packageId, managerCap, typeArguments, registry, index, priceOracle, timeOracle) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
-
var tx, target, txArguments;
|
|
44
|
-
return __generator(this, function (_a) {
|
|
45
|
-
tx = new sui_js_1.TransactionBlock();
|
|
46
|
-
target = "".concat(packageId, "::").concat(module, "::close_auction");
|
|
47
|
-
txArguments = [
|
|
48
|
-
tx.pure(managerCap),
|
|
49
|
-
tx.pure(registry),
|
|
50
|
-
tx.pure(index),
|
|
51
|
-
tx.pure(priceOracle),
|
|
52
|
-
tx.pure(timeOracle),
|
|
53
|
-
];
|
|
54
|
-
tx.moveCall({
|
|
55
|
-
target: target,
|
|
56
|
-
typeArguments: typeArguments,
|
|
57
|
-
arguments: txArguments,
|
|
58
|
-
});
|
|
59
|
-
tx.setGasBudget(gasBudget);
|
|
60
|
-
return [2 /*return*/, tx];
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
exports.getCloseAuctionTx = getCloseAuctionTx;
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
exports.getCloseVaultTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
function getCloseVaultTx(gasBudget, packageId, managerCap, typeArguments, registry, index) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
-
var tx, target, txArguments;
|
|
44
|
-
return __generator(this, function (_a) {
|
|
45
|
-
tx = new sui_js_1.TransactionBlock();
|
|
46
|
-
target = "".concat(packageId, "::").concat(module, "::close_vault");
|
|
47
|
-
txArguments = [tx.pure(managerCap), tx.pure(registry), tx.pure(index)];
|
|
48
|
-
tx.moveCall({
|
|
49
|
-
target: target,
|
|
50
|
-
typeArguments: typeArguments,
|
|
51
|
-
arguments: txArguments,
|
|
52
|
-
});
|
|
53
|
-
tx.setGasBudget(gasBudget);
|
|
54
|
-
return [2 /*return*/, tx];
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
exports.getCloseVaultTx = getCloseVaultTx;
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
-
exports.getDeliveryTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
function getDeliveryTx(gasBudget, packageId, managerCap, registry, typeArguments, index, priceOracle, timeOracle) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
-
var tx, target, txArguments;
|
|
44
|
-
return __generator(this, function (_a) {
|
|
45
|
-
tx = new sui_js_1.TransactionBlock();
|
|
46
|
-
target = "".concat(packageId, "::").concat(module, "::delivery");
|
|
47
|
-
txArguments = [
|
|
48
|
-
tx.pure(managerCap),
|
|
49
|
-
tx.pure(registry),
|
|
50
|
-
tx.pure(index),
|
|
51
|
-
tx.pure(priceOracle),
|
|
52
|
-
tx.pure(timeOracle),
|
|
53
|
-
];
|
|
54
|
-
tx.moveCall({
|
|
55
|
-
target: target,
|
|
56
|
-
typeArguments: typeArguments,
|
|
57
|
-
arguments: txArguments,
|
|
58
|
-
});
|
|
59
|
-
tx.setGasBudget(gasBudget);
|
|
60
|
-
return [2 /*return*/, tx];
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
exports.getDeliveryTx = getDeliveryTx;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
/**
|
|
3
|
-
public(friend) entry fun evolution<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
4
|
-
manager_cap: & ManagerCap,
|
|
5
|
-
registry: & mut Registry,
|
|
6
|
-
index: u64,
|
|
7
|
-
price_oracle: & Oracle<O_TOKEN>,
|
|
8
|
-
time_oracle: & Time,
|
|
9
|
-
activation_ts_ms: Option<u64>,
|
|
10
|
-
expiration_ts_ms: Option<u64>,
|
|
11
|
-
ctx: & mut TxContext,
|
|
12
|
-
)
|
|
13
|
-
* @param activationTsMs if has_next gives ['<number>'], if not gives []
|
|
14
|
-
* @param expirationTsMs if has_next gives ['<number>'], if not gives []
|
|
15
|
-
*/
|
|
16
|
-
export declare function getEvolutionTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], managerCap: string, index: string, priceOracle: string, timeOracle: string, activationTsMs: string[], expirationTsMs: string[]): Promise<TransactionBlock>;
|