@typus/typus-sdk 1.0.27 → 1.0.29
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/package.json +2 -2
- package/lib/constants.d.ts +0 -22
- package/lib/constants.js +0 -35
- package/lib/utils/auction/sealedAuction.d.ts +0 -33
- package/lib/utils/auction/sealedAuction.js +0 -64
- package/lib/utils/portfolio/leader-board.d.ts +0 -7
- package/lib/utils/portfolio/leader-board.js +0 -197
- package/lib/utils/portfolio/mint.d.ts +0 -2
- package/lib/utils/portfolio/mint.js +0 -58
- package/lib/utils/portfolio/multiple-collateral/authorized-entry.d.ts +0 -102
- package/lib/utils/portfolio/multiple-collateral/authorized-entry.js +0 -295
- package/lib/utils/portfolio/multiple-collateral/manager-entry.d.ts +0 -219
- package/lib/utils/portfolio/multiple-collateral/manager-entry.js +0 -584
- package/lib/utils/portfolio/multiple-collateral/portfolio-vault.d.ts +0 -68
- package/lib/utils/portfolio/multiple-collateral/portfolio-vault.js +0 -296
- package/lib/utils/portfolio/multiple-collateral/user-entry.d.ts +0 -93
- package/lib/utils/portfolio/multiple-collateral/user-entry.js +0 -280
- package/lib/utils/portfolio/multiple-collateral/user-share.d.ts +0 -9
- package/lib/utils/portfolio/multiple-collateral/user-share.js +0 -166
- package/lib/utils/portfolio/multiple-collateral/view-function.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/portfolio-vault.d.ts +0 -61
- package/lib/utils/portfolio/single-collateral/portfolio-vault.js +0 -241
- package/lib/utils/portfolio/single-collateral/user-entry.d.ts +0 -81
- package/lib/utils/portfolio/single-collateral/user-entry.js +0 -247
- package/lib/utils/portfolio/single-collateral/user-share.d.ts +0 -8
- package/lib/utils/portfolio/single-collateral/user-share.js +0 -139
- package/lib/utils/portfolio/single-collateral/view-function.d.ts +0 -11
- package/lib/utils/portfolio/single-collateral/view-function.js +0 -99
- package/lib/utils/tools.d.ts +0 -1
- package/lib/utils/tools.js +0 -12
- package/lib/utils/typus-framework/dutch.d.ts +0 -25
- package/lib/utils/typus-framework/dutch.js +0 -84
- package/lib/utils/typus-framework/vault.d.ts +0 -32
- package/lib/utils/typus-framework/vault.js +0 -32
|
@@ -1,80 +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.getEvolutionTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
/**
|
|
42
|
-
public(friend) entry fun evolution<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
43
|
-
manager_cap: & ManagerCap,
|
|
44
|
-
registry: & mut Registry,
|
|
45
|
-
index: u64,
|
|
46
|
-
price_oracle: & Oracle<O_TOKEN>,
|
|
47
|
-
time_oracle: & Time,
|
|
48
|
-
activation_ts_ms: Option<u64>,
|
|
49
|
-
expiration_ts_ms: Option<u64>,
|
|
50
|
-
ctx: & mut TxContext,
|
|
51
|
-
)
|
|
52
|
-
* @param activationTsMs if has_next gives ['<number>'], if not gives []
|
|
53
|
-
* @param expirationTsMs if has_next gives ['<number>'], if not gives []
|
|
54
|
-
*/
|
|
55
|
-
function getEvolutionTx(gasBudget, packageId, registry, typeArguments, managerCap, index, priceOracle, timeOracle, activationTsMs, expirationTsMs) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
57
|
-
var tx, target, txArguments;
|
|
58
|
-
return __generator(this, function (_a) {
|
|
59
|
-
tx = new sui_js_1.TransactionBlock();
|
|
60
|
-
target = "".concat(packageId, "::").concat(module, "::evolution");
|
|
61
|
-
txArguments = [
|
|
62
|
-
tx.pure(managerCap),
|
|
63
|
-
tx.pure(registry),
|
|
64
|
-
tx.pure(index),
|
|
65
|
-
tx.pure(priceOracle),
|
|
66
|
-
tx.pure(timeOracle),
|
|
67
|
-
tx.pure(activationTsMs),
|
|
68
|
-
tx.pure(expirationTsMs),
|
|
69
|
-
];
|
|
70
|
-
tx.moveCall({
|
|
71
|
-
target: target,
|
|
72
|
-
typeArguments: typeArguments,
|
|
73
|
-
arguments: txArguments,
|
|
74
|
-
});
|
|
75
|
-
tx.setGasBudget(gasBudget);
|
|
76
|
-
return [2 /*return*/, tx];
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
exports.getEvolutionTx = getEvolutionTx;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
/**
|
|
3
|
-
public(friend) entry fun new_manager(
|
|
4
|
-
_manager_cap: &ManagerCap,
|
|
5
|
-
users: vector<address>,
|
|
6
|
-
ctx: &mut TxContext
|
|
7
|
-
)
|
|
8
|
-
*/
|
|
9
|
-
export declare function getNewManagerTx(gasBudget: number, packageId: string, managerCap: string, addresses: 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.getNewManagerTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
/**
|
|
42
|
-
public(friend) entry fun new_manager(
|
|
43
|
-
_manager_cap: &ManagerCap,
|
|
44
|
-
users: vector<address>,
|
|
45
|
-
ctx: &mut TxContext
|
|
46
|
-
)
|
|
47
|
-
*/
|
|
48
|
-
function getNewManagerTx(gasBudget, packageId, managerCap, addresses) {
|
|
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, "::new_manager");
|
|
54
|
-
txArguments = [tx.pure(managerCap), tx.pure(addresses)];
|
|
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.getNewManagerTx = getNewManagerTx;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
/**
|
|
3
|
-
manager_cap: &ManagerCap,
|
|
4
|
-
registry: &mut Registry,
|
|
5
|
-
time_oracle: &Time,
|
|
6
|
-
option_type: u64,
|
|
7
|
-
period: u8,
|
|
8
|
-
activation_ts_ms: u64,
|
|
9
|
-
expiration_ts_ms: u64,
|
|
10
|
-
d_token_decimal: u64,
|
|
11
|
-
b_token_decimal: u64,
|
|
12
|
-
o_token_decimal: u64,
|
|
13
|
-
capacity: u64,
|
|
14
|
-
strike_pct: vector<u64>,
|
|
15
|
-
weight: vector<u64>,
|
|
16
|
-
is_buyer: vector<bool>,
|
|
17
|
-
strike_increment: u64,
|
|
18
|
-
lot_size: u64,
|
|
19
|
-
decay_speed: u64,
|
|
20
|
-
initial_price: u64,
|
|
21
|
-
final_price: u64,
|
|
22
|
-
auction_duration_in_ms: u64,
|
|
23
|
-
leverage: u64,
|
|
24
|
-
whitelist: vector<address>,
|
|
25
|
-
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
26
|
-
*/
|
|
27
|
-
export declare function getNewPortfolioVaultTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], managerCap: string, timeOracle: string, optionType: string, // u64
|
|
28
|
-
period: string, // u8
|
|
29
|
-
activationTsMs: string, // u64
|
|
30
|
-
expirationTsMs: string, // u64
|
|
31
|
-
dTokenDecimal: string, // u64
|
|
32
|
-
bTokenDecimal: string, // u64
|
|
33
|
-
oTokenDecimal: string, // u64
|
|
34
|
-
capacity: string, // u64
|
|
35
|
-
strikePct: string[], // vector<u64>
|
|
36
|
-
weight: string[], // vector<u64>
|
|
37
|
-
isBuyer: boolean[], // vector<bool>
|
|
38
|
-
strikeIncrement: string, // u64
|
|
39
|
-
lotSize: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string, whitelist: string[], leverage: string): Promise<TransactionBlock>;
|
|
@@ -1,118 +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.getNewPortfolioVaultTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
/**
|
|
42
|
-
manager_cap: &ManagerCap,
|
|
43
|
-
registry: &mut Registry,
|
|
44
|
-
time_oracle: &Time,
|
|
45
|
-
option_type: u64,
|
|
46
|
-
period: u8,
|
|
47
|
-
activation_ts_ms: u64,
|
|
48
|
-
expiration_ts_ms: u64,
|
|
49
|
-
d_token_decimal: u64,
|
|
50
|
-
b_token_decimal: u64,
|
|
51
|
-
o_token_decimal: u64,
|
|
52
|
-
capacity: u64,
|
|
53
|
-
strike_pct: vector<u64>,
|
|
54
|
-
weight: vector<u64>,
|
|
55
|
-
is_buyer: vector<bool>,
|
|
56
|
-
strike_increment: u64,
|
|
57
|
-
lot_size: u64,
|
|
58
|
-
decay_speed: u64,
|
|
59
|
-
initial_price: u64,
|
|
60
|
-
final_price: u64,
|
|
61
|
-
auction_duration_in_ms: u64,
|
|
62
|
-
leverage: u64,
|
|
63
|
-
whitelist: vector<address>,
|
|
64
|
-
* @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
|
|
65
|
-
*/
|
|
66
|
-
function getNewPortfolioVaultTx(gasBudget, packageId, registry, typeArguments, managerCap, timeOracle, optionType, // u64
|
|
67
|
-
period, // u8
|
|
68
|
-
activationTsMs, // u64
|
|
69
|
-
expirationTsMs, // u64
|
|
70
|
-
dTokenDecimal, // u64
|
|
71
|
-
bTokenDecimal, // u64
|
|
72
|
-
oTokenDecimal, // u64
|
|
73
|
-
capacity, // u64
|
|
74
|
-
strikePct, // vector<u64>
|
|
75
|
-
weight, // vector<u64>
|
|
76
|
-
isBuyer, // vector<bool>
|
|
77
|
-
strikeIncrement, // u64
|
|
78
|
-
lotSize, decaySpeed, initialPrice, finalPrice, auctionDurationInMs, whitelist, leverage) {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
80
|
-
var tx, target, txArguments;
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
tx = new sui_js_1.TransactionBlock();
|
|
83
|
-
target = "".concat(packageId, "::").concat(module, "::new_portfolio_vault");
|
|
84
|
-
txArguments = [
|
|
85
|
-
tx.pure(managerCap),
|
|
86
|
-
tx.pure(registry),
|
|
87
|
-
tx.pure(timeOracle),
|
|
88
|
-
tx.pure(optionType),
|
|
89
|
-
tx.pure(period),
|
|
90
|
-
tx.pure(activationTsMs),
|
|
91
|
-
tx.pure(expirationTsMs),
|
|
92
|
-
tx.pure(dTokenDecimal),
|
|
93
|
-
tx.pure(bTokenDecimal),
|
|
94
|
-
tx.pure(oTokenDecimal),
|
|
95
|
-
tx.pure(capacity),
|
|
96
|
-
tx.pure(strikePct),
|
|
97
|
-
tx.pure(weight),
|
|
98
|
-
tx.pure(isBuyer),
|
|
99
|
-
tx.pure(strikeIncrement),
|
|
100
|
-
tx.pure(lotSize),
|
|
101
|
-
tx.pure(decaySpeed),
|
|
102
|
-
tx.pure(initialPrice),
|
|
103
|
-
tx.pure(finalPrice),
|
|
104
|
-
tx.pure(auctionDurationInMs),
|
|
105
|
-
tx.pure(leverage),
|
|
106
|
-
tx.pure(whitelist),
|
|
107
|
-
];
|
|
108
|
-
tx.moveCall({
|
|
109
|
-
target: target,
|
|
110
|
-
typeArguments: typeArguments,
|
|
111
|
-
arguments: txArguments,
|
|
112
|
-
});
|
|
113
|
-
tx.setGasBudget(gasBudget);
|
|
114
|
-
return [2 /*return*/, tx];
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
exports.getNewPortfolioVaultTx = getNewPortfolioVaultTx;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
/**
|
|
3
|
-
public(friend) entry fun remove_authorized_user(
|
|
4
|
-
manager_cap: &ManagerCap,
|
|
5
|
-
registry: &mut Registry,
|
|
6
|
-
user_address: address,
|
|
7
|
-
)
|
|
8
|
-
*/
|
|
9
|
-
export declare function getRemoveAuthorizedUserTx(gasBudget: number, packageId: string, managerCap: string, registry: string, address: 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.getRemoveAuthorizedUserTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
/**
|
|
42
|
-
public(friend) entry fun remove_authorized_user(
|
|
43
|
-
manager_cap: &ManagerCap,
|
|
44
|
-
registry: &mut Registry,
|
|
45
|
-
user_address: address,
|
|
46
|
-
)
|
|
47
|
-
*/
|
|
48
|
-
function getRemoveAuthorizedUserTx(gasBudget, packageId, managerCap, registry, address) {
|
|
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, "::remove_authorized_user");
|
|
54
|
-
txArguments = [tx.pure(managerCap), tx.pure(registry), tx.pure(address)];
|
|
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.getRemoveAuthorizedUserTx = getRemoveAuthorizedUserTx;
|
|
@@ -1,63 +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.getRemoveManagerTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
/**
|
|
42
|
-
public(friend) entry fun remove_manager(
|
|
43
|
-
manager_cap: ManagerCap,
|
|
44
|
-
)
|
|
45
|
-
*/
|
|
46
|
-
function getRemoveManagerTx(gasBudget, packageId, managerCap) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var tx, target, txArguments;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
tx = new sui_js_1.TransactionBlock();
|
|
51
|
-
target = "".concat(packageId, "::").concat(module, "::remove_manager");
|
|
52
|
-
txArguments = [tx.pure(managerCap)];
|
|
53
|
-
tx.moveCall({
|
|
54
|
-
target: target,
|
|
55
|
-
typeArguments: [],
|
|
56
|
-
arguments: txArguments,
|
|
57
|
-
});
|
|
58
|
-
tx.setGasBudget(gasBudget);
|
|
59
|
-
return [2 /*return*/, tx];
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
exports.getRemoveManagerTx = getRemoveManagerTx;
|
package/lib/utils/portfolio/single-collateral/manager/getRemovePortfolioVaultAuthorizedUserTx.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
2
|
-
/**
|
|
3
|
-
public(friend) entry fun remove_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 getRemovePortfolioVaultAuthorizedUserTx(gasBudget: number, packageId: string, managerCap: string, registry: string, typeArguments: string[], index: string, users: string[]): Promise<TransactionBlock>;
|
package/lib/utils/portfolio/single-collateral/manager/getRemovePortfolioVaultAuthorizedUserTx.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.getRemovePortfolioVaultAuthorizedUserTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
/**
|
|
42
|
-
public(friend) entry fun remove_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 getRemovePortfolioVaultAuthorizedUserTx(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, "::remove_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.getRemovePortfolioVaultAuthorizedUserTx = getRemovePortfolioVaultAuthorizedUserTx;
|
|
@@ -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.getUpdateCapacityTx = void 0;
|
|
40
|
-
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
-
function getUpdateCapacityTx(gasBudget, packageId, managerCap, 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, "::update_capacity");
|
|
47
|
-
txArguments = [tx.pure(managerCap), 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.getUpdateCapacityTx = getUpdateCapacityTx;
|