@typus/typus-sdk 1.2.68 → 1.2.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config.json +14 -14
- package/lib/utils/airdrop/authority-entry.d.ts +22 -0
- package/lib/utils/airdrop/authority-entry.js +138 -0
- package/lib/utils/airdrop/user-entry.d.ts +10 -0
- package/lib/utils/airdrop/user-entry.js +21 -0
- package/lib/utils/airdrop/view-functions.d.ts +10 -0
- package/lib/utils/airdrop/view-functions.js +72 -0
- package/lib/utils/leaderboard/authority-entry.d.ts +22 -0
- package/lib/utils/leaderboard/authority-entry.js +91 -0
- package/lib/utils/leaderboard/view-function.d.ts +21 -0
- package/lib/utils/leaderboard/view-function.js +92 -0
- package/lib/utils/typus-dov-single-v2/mfud-user-entry.d.ts +4 -0
- package/lib/utils/typus-dov-single-v2/mfud-user-entry.js +5 -1
- package/lib/utils/typus-dov-single-v2/user-entry.d.ts +4 -0
- package/lib/utils/typus-dov-single-v2/user-entry.js +10 -2
- package/lib/utils/user/view-functions.d.ts +9 -0
- package/lib/utils/user/view-functions.js +71 -0
- package/package.json +1 -1
- package/lib/utils/typus-dov-double/authorized-entry.d.ts +0 -102
- package/lib/utils/typus-dov-double/authorized-entry.js +0 -295
- package/lib/utils/typus-dov-double/manager-entry.d.ts +0 -219
- package/lib/utils/typus-dov-double/manager-entry.js +0 -584
- package/lib/utils/typus-dov-double/portfolio-vault.d.ts +0 -68
- package/lib/utils/typus-dov-double/portfolio-vault.js +0 -303
- package/lib/utils/typus-dov-double/user-entry.d.ts +0 -93
- package/lib/utils/typus-dov-double/user-entry.js +0 -280
- package/lib/utils/typus-dov-double/view-function.d.ts +0 -11
- package/lib/utils/typus-dov-double/view-function.js +0 -213
- package/lib/utils/typus-dov-single/db-data.d.ts +0 -19
- package/lib/utils/typus-dov-single/db-data.js +0 -226
- package/lib/utils/typus-dov-single/portfolio-vault.d.ts +0 -63
- package/lib/utils/typus-dov-single/portfolio-vault.js +0 -284
- package/lib/utils/typus-dov-single/registry.d.ts +0 -14
- package/lib/utils/typus-dov-single/registry.js +0 -126
- package/lib/utils/typus-dov-single/user-entry.d.ts +0 -103
- package/lib/utils/typus-dov-single/user-entry.js +0 -388
- package/lib/utils/typus-dov-single/user-history.d.ts +0 -17
- package/lib/utils/typus-dov-single/user-history.js +0 -146
- package/lib/utils/typus-dov-single/view-function.d.ts +0 -50
- package/lib/utils/typus-dov-single/view-function.js +0 -444
|
@@ -0,0 +1,71 @@
|
|
|
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.getAirdrop = exports.SENDER = void 0;
|
|
40
|
+
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
41
|
+
var bcs_1 = require("@mysten/bcs");
|
|
42
|
+
exports.SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
|
43
|
+
function getAirdrop(input) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
45
|
+
var transactionBlock, results, bytes, reader;
|
|
46
|
+
return __generator(this, function (_a) {
|
|
47
|
+
switch (_a.label) {
|
|
48
|
+
case 0:
|
|
49
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
50
|
+
transactionBlock.moveCall({
|
|
51
|
+
target: "".concat(input.typusPackageId, "::user::get_user_metadata"),
|
|
52
|
+
typeArguments: [],
|
|
53
|
+
arguments: [
|
|
54
|
+
transactionBlock.pure(input.typusEcosystemVersion),
|
|
55
|
+
transactionBlock.pure(input.typusUserRegistry),
|
|
56
|
+
transactionBlock.pure(input.user),
|
|
57
|
+
],
|
|
58
|
+
});
|
|
59
|
+
return [4 /*yield*/, input.provider.devInspectTransactionBlock({ sender: exports.SENDER, transactionBlock: transactionBlock })];
|
|
60
|
+
case 1:
|
|
61
|
+
results = (_a.sent()).results;
|
|
62
|
+
bytes = results[results.length - 1].returnValues[0][0];
|
|
63
|
+
reader = new bcs_1.BcsReader(new Uint8Array(bytes));
|
|
64
|
+
return [2 /*return*/, reader.readVec(function (reader) {
|
|
65
|
+
return reader.read64();
|
|
66
|
+
})];
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
exports.getAirdrop = getAirdrop;
|
package/package.json
CHANGED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
2
|
-
/**
|
|
3
|
-
public(friend) entry fun authorized_add_portfolio_vault_authorized_user<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
4
|
-
registry: &mut Registry,
|
|
5
|
-
index: u64,
|
|
6
|
-
users: vector<address>,
|
|
7
|
-
ctx: &mut TxContext,
|
|
8
|
-
)
|
|
9
|
-
*/
|
|
10
|
-
export declare function getAuthorizedAddPortfolioVaultAuthorizedUserTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string, users: string[]): Promise<TransactionBlock>;
|
|
11
|
-
/**
|
|
12
|
-
public(friend) entry fun authorized_remove_portfolio_vault_authorized_user<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
13
|
-
registry: &mut Registry,
|
|
14
|
-
index: u64,
|
|
15
|
-
users: vector<address>,
|
|
16
|
-
ctx: &mut TxContext,
|
|
17
|
-
)
|
|
18
|
-
*/
|
|
19
|
-
export declare function getAuthorizedRemovePortfolioVaultAuthorizedUserTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string, users: string[]): Promise<TransactionBlock>;
|
|
20
|
-
/**
|
|
21
|
-
public(friend) entry fun authorized_new_portfolio_vault<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
22
|
-
registry: &mut Registry,
|
|
23
|
-
price_oracle: &Oracle<O_TOKEN>,
|
|
24
|
-
clock: &Clock,
|
|
25
|
-
strategy_name: String,
|
|
26
|
-
period: u8,
|
|
27
|
-
activation_ts_ms: u64,
|
|
28
|
-
expiration_ts_ms: u64,
|
|
29
|
-
o_token_decimal: u64,
|
|
30
|
-
u_token_decimal: u64,
|
|
31
|
-
b_token_decimal: u64,
|
|
32
|
-
capacity: u64,
|
|
33
|
-
call_strike_pct: vector<u64>,
|
|
34
|
-
call_weight: vector<u64>,
|
|
35
|
-
call_is_buyer: vector<bool>,
|
|
36
|
-
put_strike_pct: vector<u64>,
|
|
37
|
-
put_weight: vector<u64>,
|
|
38
|
-
put_is_buyer: vector<bool>,
|
|
39
|
-
strike_increment: u64,
|
|
40
|
-
lot_size: u64,
|
|
41
|
-
decay_speed: u64,
|
|
42
|
-
initial_price: u64,
|
|
43
|
-
final_price: u64,
|
|
44
|
-
auction_duration_in_ms: u64,
|
|
45
|
-
leverage: u64,
|
|
46
|
-
has_next: bool,
|
|
47
|
-
whitelist: vector<address>,
|
|
48
|
-
ctx: &mut TxContext
|
|
49
|
-
)
|
|
50
|
-
*/
|
|
51
|
-
export declare function getAuthorizedNewPortfolioVaultTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, priceOracle: string, strategy_name: String, period: string, activation_ts_ms: string, expiration_ts_ms: string, o_token_decimal: string, u_token_decimal: string, b_token_decimal: string, capacity: string, call_strike_pct: string[], call_weight: string[], call_is_buyer: boolean[], put_strike_pct: string[], put_weight: string[], put_is_buyer: boolean[], strike_increment: string, lot_size: string, decay_speed: string, initial_price: string, final_price: string, auction_duration_in_ms: string, leverage: string, has_next: boolean, whitelist: string[]): Promise<TransactionBlock>;
|
|
52
|
-
/**
|
|
53
|
-
public(friend) entry fun authorized_update_capacity<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
54
|
-
registry: &mut Registry,
|
|
55
|
-
index: u64,
|
|
56
|
-
capacity: u64,
|
|
57
|
-
ctx: &mut TxContext,
|
|
58
|
-
)
|
|
59
|
-
*/
|
|
60
|
-
export declare function getAuthorizedUpdateCapacityTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string, capacity: string): Promise<TransactionBlock>;
|
|
61
|
-
/**
|
|
62
|
-
public(friend) entry fun authorized_update_warmup_vault_config<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
63
|
-
registry: &mut Registry,
|
|
64
|
-
index: u64,
|
|
65
|
-
strike_increment: u64,
|
|
66
|
-
decay_speed: u64,
|
|
67
|
-
initial_price: u64,
|
|
68
|
-
final_price: u64,
|
|
69
|
-
auction_duration_in_ms: u64,
|
|
70
|
-
ctx: &mut TxContext,
|
|
71
|
-
)
|
|
72
|
-
*/
|
|
73
|
-
export declare function getAuthorizedUpdateWarmupVaultConfigTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string, strike_increment: string, decay_speed: string, initial_price: string, final_price: string, auction_duration_in_ms: string): Promise<TransactionBlock>;
|
|
74
|
-
/**
|
|
75
|
-
public(friend) entry fun authorized_update_upcoming_vault_config<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
76
|
-
registry: &mut Registry,
|
|
77
|
-
index: u64,
|
|
78
|
-
call_strike_pct: vector<u64>,
|
|
79
|
-
call_weight: vector<u64>,
|
|
80
|
-
call_is_buyer: vector<bool>,
|
|
81
|
-
put_strike_pct: vector<u64>,
|
|
82
|
-
put_weight: vector<u64>,
|
|
83
|
-
put_is_buyer: vector<bool>,
|
|
84
|
-
strike_increment: u64,
|
|
85
|
-
decay_speed: u64,
|
|
86
|
-
initial_price: u64,
|
|
87
|
-
final_price: u64,
|
|
88
|
-
auction_duration_in_ms: u64,
|
|
89
|
-
ctx: &mut TxContext,
|
|
90
|
-
)
|
|
91
|
-
*/
|
|
92
|
-
export declare function getAuthorizedUpdateUpcomingVaultConfigTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string, call_strike_pct: string[], call_weight: string[], call_is_buyer: boolean[], put_strike_pct: string[], put_weight: string[], put_is_buyer: boolean[], strike_increment: string, decay_speed: string, initial_price: string, final_price: string, auction_duration_in_ms: string): Promise<TransactionBlock>;
|
|
93
|
-
/**
|
|
94
|
-
public(friend) entry fun authorized_delivery<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
95
|
-
registry: &mut Registry,
|
|
96
|
-
index: u64,
|
|
97
|
-
price_oracle: &Oracle<O_TOKEN>,
|
|
98
|
-
clock: &Clock,
|
|
99
|
-
ctx: &mut TxContext
|
|
100
|
-
)
|
|
101
|
-
*/
|
|
102
|
-
export declare function getAuthorizedDeliveryTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, index: string, priceOracle: string): Promise<TransactionBlock>;
|
|
@@ -1,295 +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.getAuthorizedDeliveryTx = exports.getAuthorizedUpdateUpcomingVaultConfigTx = exports.getAuthorizedUpdateWarmupVaultConfigTx = exports.getAuthorizedUpdateCapacityTx = exports.getAuthorizedNewPortfolioVaultTx = exports.getAuthorizedRemovePortfolioVaultAuthorizedUserTx = exports.getAuthorizedAddPortfolioVaultAuthorizedUserTx = void 0;
|
|
40
|
-
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
41
|
-
/**
|
|
42
|
-
public(friend) entry fun authorized_add_portfolio_vault_authorized_user<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
43
|
-
registry: &mut Registry,
|
|
44
|
-
index: u64,
|
|
45
|
-
users: vector<address>,
|
|
46
|
-
ctx: &mut TxContext,
|
|
47
|
-
)
|
|
48
|
-
*/
|
|
49
|
-
function getAuthorizedAddPortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArguments, registry, index, users) {
|
|
50
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
-
var tx;
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
tx = new transactions_1.TransactionBlock();
|
|
54
|
-
tx.moveCall({
|
|
55
|
-
target: "".concat(packageId, "::typus_dov_double::authorized_add_portfolio_vault_authorized_user"),
|
|
56
|
-
typeArguments: typeArguments,
|
|
57
|
-
arguments: [tx.pure(registry), tx.pure(index), tx.pure(users)],
|
|
58
|
-
});
|
|
59
|
-
tx.setGasBudget(gasBudget);
|
|
60
|
-
return [2 /*return*/, tx];
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
exports.getAuthorizedAddPortfolioVaultAuthorizedUserTx = getAuthorizedAddPortfolioVaultAuthorizedUserTx;
|
|
65
|
-
/**
|
|
66
|
-
public(friend) entry fun authorized_remove_portfolio_vault_authorized_user<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
67
|
-
registry: &mut Registry,
|
|
68
|
-
index: u64,
|
|
69
|
-
users: vector<address>,
|
|
70
|
-
ctx: &mut TxContext,
|
|
71
|
-
)
|
|
72
|
-
*/
|
|
73
|
-
function getAuthorizedRemovePortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArguments, registry, index, users) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
75
|
-
var tx;
|
|
76
|
-
return __generator(this, function (_a) {
|
|
77
|
-
tx = new transactions_1.TransactionBlock();
|
|
78
|
-
tx.moveCall({
|
|
79
|
-
target: "".concat(packageId, "::typus_dov_double::authorized_remove_portfolio_vault_authorized_user"),
|
|
80
|
-
typeArguments: typeArguments,
|
|
81
|
-
arguments: [tx.pure(registry), tx.pure(index), tx.pure(users)],
|
|
82
|
-
});
|
|
83
|
-
tx.setGasBudget(gasBudget);
|
|
84
|
-
return [2 /*return*/, tx];
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
exports.getAuthorizedRemovePortfolioVaultAuthorizedUserTx = getAuthorizedRemovePortfolioVaultAuthorizedUserTx;
|
|
89
|
-
/**
|
|
90
|
-
public(friend) entry fun authorized_new_portfolio_vault<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
91
|
-
registry: &mut Registry,
|
|
92
|
-
price_oracle: &Oracle<O_TOKEN>,
|
|
93
|
-
clock: &Clock,
|
|
94
|
-
strategy_name: String,
|
|
95
|
-
period: u8,
|
|
96
|
-
activation_ts_ms: u64,
|
|
97
|
-
expiration_ts_ms: u64,
|
|
98
|
-
o_token_decimal: u64,
|
|
99
|
-
u_token_decimal: u64,
|
|
100
|
-
b_token_decimal: u64,
|
|
101
|
-
capacity: u64,
|
|
102
|
-
call_strike_pct: vector<u64>,
|
|
103
|
-
call_weight: vector<u64>,
|
|
104
|
-
call_is_buyer: vector<bool>,
|
|
105
|
-
put_strike_pct: vector<u64>,
|
|
106
|
-
put_weight: vector<u64>,
|
|
107
|
-
put_is_buyer: vector<bool>,
|
|
108
|
-
strike_increment: u64,
|
|
109
|
-
lot_size: u64,
|
|
110
|
-
decay_speed: u64,
|
|
111
|
-
initial_price: u64,
|
|
112
|
-
final_price: u64,
|
|
113
|
-
auction_duration_in_ms: u64,
|
|
114
|
-
leverage: u64,
|
|
115
|
-
has_next: bool,
|
|
116
|
-
whitelist: vector<address>,
|
|
117
|
-
ctx: &mut TxContext
|
|
118
|
-
)
|
|
119
|
-
*/
|
|
120
|
-
function getAuthorizedNewPortfolioVaultTx(gasBudget, packageId, typeArguments, registry, priceOracle, strategy_name, period, activation_ts_ms, expiration_ts_ms, o_token_decimal, u_token_decimal, b_token_decimal, capacity, call_strike_pct, call_weight, call_is_buyer, put_strike_pct, put_weight, put_is_buyer, strike_increment, lot_size, decay_speed, initial_price, final_price, auction_duration_in_ms, leverage, has_next, whitelist) {
|
|
121
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
-
var tx;
|
|
123
|
-
return __generator(this, function (_a) {
|
|
124
|
-
tx = new transactions_1.TransactionBlock();
|
|
125
|
-
tx.moveCall({
|
|
126
|
-
target: "".concat(packageId, "::typus_dov_double::authorized_new_portfolio_vault"),
|
|
127
|
-
typeArguments: typeArguments,
|
|
128
|
-
arguments: [
|
|
129
|
-
tx.pure(registry),
|
|
130
|
-
tx.pure(priceOracle),
|
|
131
|
-
tx.pure("0x6"),
|
|
132
|
-
tx.pure(strategy_name),
|
|
133
|
-
tx.pure(period),
|
|
134
|
-
tx.pure(activation_ts_ms),
|
|
135
|
-
tx.pure(expiration_ts_ms),
|
|
136
|
-
tx.pure(o_token_decimal),
|
|
137
|
-
tx.pure(u_token_decimal),
|
|
138
|
-
tx.pure(b_token_decimal),
|
|
139
|
-
tx.pure(capacity),
|
|
140
|
-
tx.pure(call_strike_pct),
|
|
141
|
-
tx.pure(call_weight),
|
|
142
|
-
tx.pure(call_is_buyer),
|
|
143
|
-
tx.pure(put_strike_pct),
|
|
144
|
-
tx.pure(put_weight),
|
|
145
|
-
tx.pure(put_is_buyer),
|
|
146
|
-
tx.pure(strike_increment),
|
|
147
|
-
tx.pure(lot_size),
|
|
148
|
-
tx.pure(decay_speed),
|
|
149
|
-
tx.pure(initial_price),
|
|
150
|
-
tx.pure(final_price),
|
|
151
|
-
tx.pure(auction_duration_in_ms),
|
|
152
|
-
tx.pure(leverage),
|
|
153
|
-
tx.pure(has_next),
|
|
154
|
-
tx.pure(whitelist),
|
|
155
|
-
],
|
|
156
|
-
});
|
|
157
|
-
tx.setGasBudget(gasBudget);
|
|
158
|
-
return [2 /*return*/, tx];
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
exports.getAuthorizedNewPortfolioVaultTx = getAuthorizedNewPortfolioVaultTx;
|
|
163
|
-
/**
|
|
164
|
-
public(friend) entry fun authorized_update_capacity<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
165
|
-
registry: &mut Registry,
|
|
166
|
-
index: u64,
|
|
167
|
-
capacity: u64,
|
|
168
|
-
ctx: &mut TxContext,
|
|
169
|
-
)
|
|
170
|
-
*/
|
|
171
|
-
function getAuthorizedUpdateCapacityTx(gasBudget, packageId, typeArguments, registry, index, capacity) {
|
|
172
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
173
|
-
var tx;
|
|
174
|
-
return __generator(this, function (_a) {
|
|
175
|
-
tx = new transactions_1.TransactionBlock();
|
|
176
|
-
tx.moveCall({
|
|
177
|
-
target: "".concat(packageId, "::typus_dov_double::authorized_update_capacity"),
|
|
178
|
-
typeArguments: typeArguments,
|
|
179
|
-
arguments: [tx.pure(registry), tx.pure(index), tx.pure(capacity)],
|
|
180
|
-
});
|
|
181
|
-
tx.setGasBudget(gasBudget);
|
|
182
|
-
return [2 /*return*/, tx];
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
exports.getAuthorizedUpdateCapacityTx = getAuthorizedUpdateCapacityTx;
|
|
187
|
-
/**
|
|
188
|
-
public(friend) entry fun authorized_update_warmup_vault_config<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
189
|
-
registry: &mut Registry,
|
|
190
|
-
index: u64,
|
|
191
|
-
strike_increment: u64,
|
|
192
|
-
decay_speed: u64,
|
|
193
|
-
initial_price: u64,
|
|
194
|
-
final_price: u64,
|
|
195
|
-
auction_duration_in_ms: u64,
|
|
196
|
-
ctx: &mut TxContext,
|
|
197
|
-
)
|
|
198
|
-
*/
|
|
199
|
-
function getAuthorizedUpdateWarmupVaultConfigTx(gasBudget, packageId, typeArguments, registry, index, strike_increment, decay_speed, initial_price, final_price, auction_duration_in_ms) {
|
|
200
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
201
|
-
var tx;
|
|
202
|
-
return __generator(this, function (_a) {
|
|
203
|
-
tx = new transactions_1.TransactionBlock();
|
|
204
|
-
tx.moveCall({
|
|
205
|
-
target: "".concat(packageId, "::typus_dov_double::authorized_update_warmup_vault_config"),
|
|
206
|
-
typeArguments: typeArguments,
|
|
207
|
-
arguments: [
|
|
208
|
-
tx.pure(registry),
|
|
209
|
-
tx.pure(index),
|
|
210
|
-
tx.pure(strike_increment),
|
|
211
|
-
tx.pure(decay_speed),
|
|
212
|
-
tx.pure(initial_price),
|
|
213
|
-
tx.pure(final_price),
|
|
214
|
-
tx.pure(auction_duration_in_ms),
|
|
215
|
-
],
|
|
216
|
-
});
|
|
217
|
-
tx.setGasBudget(gasBudget);
|
|
218
|
-
return [2 /*return*/, tx];
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
exports.getAuthorizedUpdateWarmupVaultConfigTx = getAuthorizedUpdateWarmupVaultConfigTx;
|
|
223
|
-
/**
|
|
224
|
-
public(friend) entry fun authorized_update_upcoming_vault_config<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
225
|
-
registry: &mut Registry,
|
|
226
|
-
index: u64,
|
|
227
|
-
call_strike_pct: vector<u64>,
|
|
228
|
-
call_weight: vector<u64>,
|
|
229
|
-
call_is_buyer: vector<bool>,
|
|
230
|
-
put_strike_pct: vector<u64>,
|
|
231
|
-
put_weight: vector<u64>,
|
|
232
|
-
put_is_buyer: vector<bool>,
|
|
233
|
-
strike_increment: u64,
|
|
234
|
-
decay_speed: u64,
|
|
235
|
-
initial_price: u64,
|
|
236
|
-
final_price: u64,
|
|
237
|
-
auction_duration_in_ms: u64,
|
|
238
|
-
ctx: &mut TxContext,
|
|
239
|
-
)
|
|
240
|
-
*/
|
|
241
|
-
function getAuthorizedUpdateUpcomingVaultConfigTx(gasBudget, packageId, typeArguments, registry, index, call_strike_pct, call_weight, call_is_buyer, put_strike_pct, put_weight, put_is_buyer, strike_increment, decay_speed, initial_price, final_price, auction_duration_in_ms) {
|
|
242
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
243
|
-
var tx;
|
|
244
|
-
return __generator(this, function (_a) {
|
|
245
|
-
tx = new transactions_1.TransactionBlock();
|
|
246
|
-
tx.moveCall({
|
|
247
|
-
target: "".concat(packageId, "::typus_dov_double::authorized_update_upcoming_vault_config"),
|
|
248
|
-
typeArguments: typeArguments,
|
|
249
|
-
arguments: [
|
|
250
|
-
tx.pure(registry),
|
|
251
|
-
tx.pure(index),
|
|
252
|
-
tx.pure(call_strike_pct),
|
|
253
|
-
tx.pure(call_weight),
|
|
254
|
-
tx.pure(call_is_buyer),
|
|
255
|
-
tx.pure(put_strike_pct),
|
|
256
|
-
tx.pure(put_weight),
|
|
257
|
-
tx.pure(put_is_buyer),
|
|
258
|
-
tx.pure(strike_increment),
|
|
259
|
-
tx.pure(decay_speed),
|
|
260
|
-
tx.pure(initial_price),
|
|
261
|
-
tx.pure(final_price),
|
|
262
|
-
tx.pure(auction_duration_in_ms),
|
|
263
|
-
],
|
|
264
|
-
});
|
|
265
|
-
tx.setGasBudget(gasBudget);
|
|
266
|
-
return [2 /*return*/, tx];
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
exports.getAuthorizedUpdateUpcomingVaultConfigTx = getAuthorizedUpdateUpcomingVaultConfigTx;
|
|
271
|
-
/**
|
|
272
|
-
public(friend) entry fun authorized_delivery<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
273
|
-
registry: &mut Registry,
|
|
274
|
-
index: u64,
|
|
275
|
-
price_oracle: &Oracle<O_TOKEN>,
|
|
276
|
-
clock: &Clock,
|
|
277
|
-
ctx: &mut TxContext
|
|
278
|
-
)
|
|
279
|
-
*/
|
|
280
|
-
function getAuthorizedDeliveryTx(gasBudget, packageId, typeArguments, registry, index, priceOracle) {
|
|
281
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
282
|
-
var tx;
|
|
283
|
-
return __generator(this, function (_a) {
|
|
284
|
-
tx = new transactions_1.TransactionBlock();
|
|
285
|
-
tx.moveCall({
|
|
286
|
-
target: "".concat(packageId, "::typus_dov_double::authorized_delivery"),
|
|
287
|
-
typeArguments: typeArguments,
|
|
288
|
-
arguments: [tx.pure(registry), tx.pure(index), tx.pure(priceOracle), tx.pure("0x6")],
|
|
289
|
-
});
|
|
290
|
-
tx.setGasBudget(gasBudget);
|
|
291
|
-
return [2 /*return*/, tx];
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
exports.getAuthorizedDeliveryTx = getAuthorizedDeliveryTx;
|