@typus/typus-sdk 0.4.9 → 0.5.1
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 +1 -1
- package/lib/constants.js +26 -26
- package/lib/utils/authorized/getAuthorizedLastEvolutionTx.js +1 -1
- package/lib/utils/authorized/getAuthorizedUpdateCapacityTx.d.ts +1 -0
- package/lib/utils/authorized/getAuthorizedUpdateCapacityTx.js +60 -0
- package/lib/utils/authorized/getAuthorizedUpdateVaultConfigTx.d.ts +1 -0
- package/lib/utils/authorized/getAuthorizedUpdateVaultConfigTx.js +64 -0
- package/lib/utils/coveredCall/getCloseAuctionTx.d.ts +1 -0
- package/lib/utils/coveredCall/getCloseAuctionTx.js +61 -0
- package/lib/utils/coveredCall/getCloseVaultTx.d.ts +1 -0
- package/lib/utils/coveredCall/getCloseVaultTx.js +60 -0
- package/lib/utils/coveredCall/getUpdateCapacityTx.d.ts +1 -0
- package/lib/utils/coveredCall/getUpdateCapacityTx.js +61 -0
- package/lib/utils/coveredCall/getUpdateVaultConfigTx.d.ts +1 -0
- package/lib/utils/coveredCall/getUpdateVaultConfigTx.js +65 -0
- package/package.json +1 -1
package/lib/constants.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const TOKEN_REGISTRY_APT = "0xf1a947ebc2643942bf3f2ecbd6b583c0f8d
|
|
|
6
6
|
export declare const TOKEN_REGISTRY_DOGE = "0x4dbe73f8a744008bc20d12aaa0d4fc8f01692358";
|
|
7
7
|
export declare const TOKEN_REGISTRY_USDC = "0x82e0a1473c6c4d4f713a0ac5957e0c7a2278ed1e";
|
|
8
8
|
export declare const ORACLE_PACKAGE = "0x0a55a6dfa713f83cb3be5e3ca8a8435ccdbb500d";
|
|
9
|
-
export declare const TIME_ORACLE = "
|
|
9
|
+
export declare const TIME_ORACLE = "0x0119099132458022017849d2351e1c0281047980";
|
|
10
10
|
export declare const COVERED_CALL_PACKAGE = "0x503ac615e4844aa31b5e3ca2feadea0d74e1b8af";
|
|
11
11
|
export declare const COVERED_CALL_REGISTRY = "0xdf5e52550dc82396ea48a97dbbec65322779db77";
|
|
12
12
|
export declare const COVERED_CALL_MANAGER = "0x9be7316b23f19c89073852ad7b8881f8cc89f727";
|
package/lib/constants.js
CHANGED
|
@@ -2,37 +2,37 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TESTNET_RPC_ENDPOINT = exports.TOKEN_NAME_TO_MODULE = exports.TOKEN_NAME = exports.TEST_MNEMONIC = exports.FAKE_TOKEN_TYPE_ARGUMENT = exports.DEFAULT_TYPE_ARGUMENT = exports.TOKEN_DECIMAL = exports.PRICE_DECIMAL = exports.TEST_MINT_TOKEN = exports.DOV_PACKAGE = exports.MAKER_SHARE_TABLE = exports.USER_REFUND_TABLE = exports.USER_SHARE_TABLE = exports.COVERED_CALL_MANAGER = exports.COVERED_CALL_REGISTRY = exports.COVERED_CALL_PACKAGE = exports.TIME_ORACLE = exports.ORACLE_PACKAGE = exports.TOKEN_REGISTRY_USDC = exports.TOKEN_REGISTRY_DOGE = exports.TOKEN_REGISTRY_APT = exports.TOKEN_REGISTRY_SUI = exports.TOKEN_REGISTRY_ETH = exports.TOKEN_REGISTRY_BTC = exports.TOKEN_PACKAGE = void 0;
|
|
4
4
|
//publish from sui-dev-token
|
|
5
|
-
exports.TOKEN_PACKAGE =
|
|
6
|
-
exports.TOKEN_REGISTRY_BTC =
|
|
7
|
-
exports.TOKEN_REGISTRY_ETH =
|
|
8
|
-
exports.TOKEN_REGISTRY_SUI =
|
|
9
|
-
exports.TOKEN_REGISTRY_APT =
|
|
10
|
-
exports.TOKEN_REGISTRY_DOGE =
|
|
11
|
-
exports.TOKEN_REGISTRY_USDC =
|
|
5
|
+
exports.TOKEN_PACKAGE = '0xa1d0cdb1b41c786d53a03d30340ab05718010e04';
|
|
6
|
+
exports.TOKEN_REGISTRY_BTC = '0x7325b75b85ee45e78204a9dcf7800a397259eb3d';
|
|
7
|
+
exports.TOKEN_REGISTRY_ETH = '0x475d3b10d29c03d85dfa707b5479955729216d4d';
|
|
8
|
+
exports.TOKEN_REGISTRY_SUI = '0x3b87b3f0403f527d28fd1301074a12446f43817a';
|
|
9
|
+
exports.TOKEN_REGISTRY_APT = '0xf1a947ebc2643942bf3f2ecbd6b583c0f8dc3baf';
|
|
10
|
+
exports.TOKEN_REGISTRY_DOGE = '0x4dbe73f8a744008bc20d12aaa0d4fc8f01692358';
|
|
11
|
+
exports.TOKEN_REGISTRY_USDC = '0x82e0a1473c6c4d4f713a0ac5957e0c7a2278ed1e';
|
|
12
12
|
//publish from typus-oracle
|
|
13
|
-
exports.ORACLE_PACKAGE =
|
|
14
|
-
exports.TIME_ORACLE = '
|
|
13
|
+
exports.ORACLE_PACKAGE = '0x0a55a6dfa713f83cb3be5e3ca8a8435ccdbb500d';
|
|
14
|
+
exports.TIME_ORACLE = '0x0119099132458022017849d2351e1c0281047980';
|
|
15
15
|
//publish from typus-dov/cover_call
|
|
16
|
-
exports.COVERED_CALL_PACKAGE =
|
|
17
|
-
exports.COVERED_CALL_REGISTRY =
|
|
18
|
-
exports.COVERED_CALL_MANAGER =
|
|
19
|
-
exports.USER_SHARE_TABLE =
|
|
20
|
-
exports.USER_REFUND_TABLE =
|
|
21
|
-
exports.MAKER_SHARE_TABLE =
|
|
16
|
+
exports.COVERED_CALL_PACKAGE = '0x503ac615e4844aa31b5e3ca2feadea0d74e1b8af';
|
|
17
|
+
exports.COVERED_CALL_REGISTRY = '0xdf5e52550dc82396ea48a97dbbec65322779db77';
|
|
18
|
+
exports.COVERED_CALL_MANAGER = '0x9be7316b23f19c89073852ad7b8881f8cc89f727';
|
|
19
|
+
exports.USER_SHARE_TABLE = '0xd41260528fe89a571cbcabeefd9c5bd560f01b07';
|
|
20
|
+
exports.USER_REFUND_TABLE = '0xca101b960ca0f71f5d7c090a912e70a22a7b3587';
|
|
21
|
+
exports.MAKER_SHARE_TABLE = '0xe66a7a0051082bdc728077ac6309a7baee208f57';
|
|
22
22
|
//publish from typus-dov/typus-dov
|
|
23
|
-
exports.DOV_PACKAGE =
|
|
24
|
-
exports.TEST_MINT_TOKEN =
|
|
23
|
+
exports.DOV_PACKAGE = '0x49e71a735dc6bdf7327e6c663d04a3e7f68bafd0';
|
|
24
|
+
exports.TEST_MINT_TOKEN = '0x672612858fcb5c6abf944638253142820c251753';
|
|
25
25
|
exports.PRICE_DECIMAL = 8;
|
|
26
26
|
exports.TOKEN_DECIMAL = 9;
|
|
27
|
-
exports.DEFAULT_TYPE_ARGUMENT =
|
|
28
|
-
exports.FAKE_TOKEN_TYPE_ARGUMENT =
|
|
29
|
-
exports.TEST_MNEMONIC =
|
|
30
|
-
exports.TOKEN_NAME = [
|
|
27
|
+
exports.DEFAULT_TYPE_ARGUMENT = '0x2::sui::SUI';
|
|
28
|
+
exports.FAKE_TOKEN_TYPE_ARGUMENT = '0x27b3674c685046f66cad1d5496d2967894fa5329::token::USDC';
|
|
29
|
+
exports.TEST_MNEMONIC = 'plug grain matter asthma aware critic can lottery blouse uncover sauce speak';
|
|
30
|
+
exports.TOKEN_NAME = ['BTC', 'ETH', 'SUI', 'USDC', 'USDT', 'SUI'];
|
|
31
31
|
exports.TOKEN_NAME_TO_MODULE = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
BTC: 'btc',
|
|
33
|
+
ETH: 'eth',
|
|
34
|
+
SUI: 'sui',
|
|
35
|
+
USDC: 'usdc',
|
|
36
36
|
// "USDT": "token_usdt",
|
|
37
37
|
};
|
|
38
|
-
exports.TESTNET_RPC_ENDPOINT =
|
|
38
|
+
exports.TESTNET_RPC_ENDPOINT = 'https://fullnode.testnet.sui.io:443';
|
|
@@ -44,7 +44,7 @@ function getAuthorizedLastEvolutionTx(packageId, registry, typeArgument, index,
|
|
|
44
44
|
tx = {
|
|
45
45
|
packageObjectId: packageId,
|
|
46
46
|
module: 'covered_call',
|
|
47
|
-
function: '
|
|
47
|
+
function: 'authorized_last_evolution',
|
|
48
48
|
typeArguments: [typeArgument],
|
|
49
49
|
arguments: [
|
|
50
50
|
registry,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getAuthorizedUpdateCapacityTx(packageId: string, typeArgument: string, registry: string, index: string, capacity: string): Promise<any>;
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
function getAuthorizedUpdateCapacityTx(packageId, typeArgument, registry, index, capacity) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
+
var tx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
tx = {
|
|
45
|
+
packageObjectId: packageId,
|
|
46
|
+
module: 'covered_call',
|
|
47
|
+
function: 'authorized_update_capacity',
|
|
48
|
+
typeArguments: [typeArgument],
|
|
49
|
+
arguments: [
|
|
50
|
+
registry,
|
|
51
|
+
index,
|
|
52
|
+
capacity
|
|
53
|
+
],
|
|
54
|
+
gasBudget: 1000,
|
|
55
|
+
};
|
|
56
|
+
return [2 /*return*/, tx];
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
exports.getAuthorizedUpdateCapacityTx = getAuthorizedUpdateCapacityTx;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getAuthorizedUpdateVaultConfigTx(packageId: string, typeArgument: string, registry: string, index: string, strikeIncrement: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string): Promise<any>;
|
|
@@ -0,0 +1,64 @@
|
|
|
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.getAuthorizedUpdateVaultConfigTx = void 0;
|
|
40
|
+
function getAuthorizedUpdateVaultConfigTx(packageId, typeArgument, registry, index, strikeIncrement, decaySpeed, initialPrice, finalPrice, auctionDurationInMs) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
+
var tx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
tx = {
|
|
45
|
+
packageObjectId: packageId,
|
|
46
|
+
module: 'covered_call',
|
|
47
|
+
function: 'authorized_update_vault_config',
|
|
48
|
+
typeArguments: [typeArgument],
|
|
49
|
+
arguments: [
|
|
50
|
+
registry,
|
|
51
|
+
index,
|
|
52
|
+
strikeIncrement,
|
|
53
|
+
decaySpeed,
|
|
54
|
+
initialPrice,
|
|
55
|
+
finalPrice,
|
|
56
|
+
auctionDurationInMs,
|
|
57
|
+
],
|
|
58
|
+
gasBudget: 1000,
|
|
59
|
+
};
|
|
60
|
+
return [2 /*return*/, tx];
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
exports.getAuthorizedUpdateVaultConfigTx = getAuthorizedUpdateVaultConfigTx;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCloseAuctionTx(packageId: string, managerCap: string, typeArgument: string, registry: string, index: string, time: string): Promise<any>;
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
function getCloseAuctionTx(packageId, managerCap, typeArgument, registry, index, time) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
+
var tx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
tx = {
|
|
45
|
+
packageObjectId: packageId,
|
|
46
|
+
module: 'covered_call',
|
|
47
|
+
function: 'close_auction',
|
|
48
|
+
typeArguments: [typeArgument],
|
|
49
|
+
arguments: [
|
|
50
|
+
managerCap,
|
|
51
|
+
registry,
|
|
52
|
+
index,
|
|
53
|
+
time,
|
|
54
|
+
],
|
|
55
|
+
gasBudget: 1000,
|
|
56
|
+
};
|
|
57
|
+
return [2 /*return*/, tx];
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
exports.getCloseAuctionTx = getCloseAuctionTx;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCloseVaultTx(packageId: string, managerCap: string, typeArgument: string, registry: string, index: string): Promise<any>;
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
function getCloseVaultTx(packageId, managerCap, typeArgument, registry, index) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
+
var tx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
tx = {
|
|
45
|
+
packageObjectId: packageId,
|
|
46
|
+
module: 'covered_call',
|
|
47
|
+
function: 'close_vault',
|
|
48
|
+
typeArguments: [typeArgument],
|
|
49
|
+
arguments: [
|
|
50
|
+
managerCap,
|
|
51
|
+
registry,
|
|
52
|
+
index,
|
|
53
|
+
],
|
|
54
|
+
gasBudget: 1000,
|
|
55
|
+
};
|
|
56
|
+
return [2 /*return*/, tx];
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
exports.getCloseVaultTx = getCloseVaultTx;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getUpdateCapacityTx(packageId: string, managerCap: string, typeArgument: string, registry: string, index: string, capacity: string): Promise<any>;
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
function getUpdateCapacityTx(packageId, managerCap, typeArgument, registry, index, capacity) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
+
var tx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
tx = {
|
|
45
|
+
packageObjectId: packageId,
|
|
46
|
+
module: 'covered_call',
|
|
47
|
+
function: 'update_capacity',
|
|
48
|
+
typeArguments: [typeArgument],
|
|
49
|
+
arguments: [
|
|
50
|
+
managerCap,
|
|
51
|
+
registry,
|
|
52
|
+
index,
|
|
53
|
+
capacity
|
|
54
|
+
],
|
|
55
|
+
gasBudget: 1000,
|
|
56
|
+
};
|
|
57
|
+
return [2 /*return*/, tx];
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
exports.getUpdateCapacityTx = getUpdateCapacityTx;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getUpdateVaultConfigTx(packageId: string, managerCap: string, typeArgument: string, registry: string, index: string, strikeIncrement: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string): Promise<any>;
|
|
@@ -0,0 +1,65 @@
|
|
|
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.getUpdateVaultConfigTx = void 0;
|
|
40
|
+
function getUpdateVaultConfigTx(packageId, managerCap, typeArgument, registry, index, strikeIncrement, decaySpeed, initialPrice, finalPrice, auctionDurationInMs) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
+
var tx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
tx = {
|
|
45
|
+
packageObjectId: packageId,
|
|
46
|
+
module: 'covered_call',
|
|
47
|
+
function: 'update_vault_config',
|
|
48
|
+
typeArguments: [typeArgument],
|
|
49
|
+
arguments: [
|
|
50
|
+
managerCap,
|
|
51
|
+
registry,
|
|
52
|
+
index,
|
|
53
|
+
strikeIncrement,
|
|
54
|
+
decaySpeed,
|
|
55
|
+
initialPrice,
|
|
56
|
+
finalPrice,
|
|
57
|
+
auctionDurationInMs,
|
|
58
|
+
],
|
|
59
|
+
gasBudget: 1000,
|
|
60
|
+
};
|
|
61
|
+
return [2 /*return*/, tx];
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
exports.getUpdateVaultConfigTx = getUpdateVaultConfigTx;
|