@typus/typus-sdk 0.5.5 → 0.5.7
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/scripts/sui.js +4 -4
- package/lib/test/eventListener.js +1 -1
- package/lib/test/getBidData.js +1 -1
- package/lib/test/getMakersShares.js +1 -1
- package/lib/test/getUsersShares.js +1 -1
- package/lib/test/getVaultData.js +1 -1
- package/lib/test/testClaim.js +5 -4
- package/lib/test/testCrypto.js +1 -1
- package/lib/test/testDeposit.js +4 -3
- package/lib/test/testDepositV2.js +4 -2
- package/lib/test/testMint.js +4 -3
- package/lib/test/testNewAuction.js +4 -3
- package/lib/test/testNewVault.js +4 -3
- package/lib/test/testOracle.js +5 -4
- package/lib/test/testSettle.js +11 -10
- package/lib/test/testSubscribeEvent.js +1 -1
- package/lib/test/testUnsubscribe.js +4 -3
- package/lib/test/testWithdraw.js +4 -3
- package/lib/utils/auction/getBid.js +1 -1
- package/lib/utils/authorized/getAuthorizedAddAuthorizedUserTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedAddAuthorizedUserTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedAddCoveredCallVaultAuthorizedUserTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedAddCoveredCallVaultAuthorizedUserTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedDeliveryTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedDeliveryTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedEvolutionTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedEvolutionTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedLastEvolutionTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedLastEvolutionTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedNewAuctionTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedNewAuctionTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedNewCoveredCallVaultTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedNewCoveredCallVaultTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedRemoveAuthorizedUserTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedRemoveAuthorizedUserTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedRemoveCoveredCallVaultAuthorizedUserTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedRemoveCoveredCallVaultAuthorizedUserTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedSettleTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedSettleTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedUpdateCapacityTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedUpdateCapacityTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedUpdateNextVaultConfigTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedUpdateNextVaultConfigTx.js +3 -3
- package/lib/utils/authorized/getAuthorizedUpdateVaultConfigTx.d.ts +1 -1
- package/lib/utils/authorized/getAuthorizedUpdateVaultConfigTx.js +3 -3
- package/lib/utils/coveredCall/createPriceOracle.js +4 -3
- package/lib/utils/coveredCall/createTimeOracle.js +4 -3
- package/lib/utils/coveredCall/getAddCoveredCallVaultAuthorizedUserTx.d.ts +1 -1
- package/lib/utils/coveredCall/getAddCoveredCallVaultAuthorizedUserTx.js +3 -3
- package/lib/utils/coveredCall/getClaimAllTx.d.ts +1 -1
- package/lib/utils/coveredCall/getClaimAllTx.js +3 -3
- package/lib/utils/coveredCall/getClaimTx.d.ts +1 -1
- package/lib/utils/coveredCall/getClaimTx.js +3 -3
- package/lib/utils/coveredCall/getCloseAuctionTx.d.ts +1 -1
- package/lib/utils/coveredCall/getCloseAuctionTx.js +3 -3
- package/lib/utils/coveredCall/getCloseVaultTx.d.ts +1 -1
- package/lib/utils/coveredCall/getCloseVaultTx.js +3 -3
- package/lib/utils/coveredCall/getDeliveryTx.d.ts +1 -1
- package/lib/utils/coveredCall/getDeliveryTx.js +3 -3
- package/lib/utils/coveredCall/getDepositTx.d.ts +1 -1
- package/lib/utils/coveredCall/getDepositTx.js +3 -3
- package/lib/utils/coveredCall/getEvolutionTx.d.ts +1 -1
- package/lib/utils/coveredCall/getEvolutionTx.js +3 -3
- package/lib/utils/coveredCall/getLastEvolutionTx.d.ts +1 -1
- package/lib/utils/coveredCall/getLastEvolutionTx.js +3 -3
- package/lib/utils/coveredCall/getMakerClaimAllTx.d.ts +1 -1
- package/lib/utils/coveredCall/getMakerClaimAllTx.js +3 -3
- package/lib/utils/coveredCall/getMakerClaimTx.d.ts +1 -1
- package/lib/utils/coveredCall/getMakerClaimTx.js +3 -3
- package/lib/utils/coveredCall/getNewAuctionTx.d.ts +1 -1
- package/lib/utils/coveredCall/getNewAuctionTx.js +3 -3
- package/lib/utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.d.ts +1 -1
- package/lib/utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.js +3 -3
- package/lib/utils/coveredCall/getNewBidTx.d.ts +1 -1
- package/lib/utils/coveredCall/getNewBidTx.js +3 -3
- package/lib/utils/coveredCall/getNewCoveredCallVaultTx.d.ts +1 -1
- package/lib/utils/coveredCall/getNewCoveredCallVaultTx.js +3 -3
- package/lib/utils/coveredCall/getNewManagerTx.d.ts +1 -1
- package/lib/utils/coveredCall/getNewManagerTx.js +3 -3
- package/lib/utils/coveredCall/getRefundTx.d.ts +1 -1
- package/lib/utils/coveredCall/getRefundTx.js +3 -3
- package/lib/utils/coveredCall/getRemoveBidTx.d.ts +1 -1
- package/lib/utils/coveredCall/getRemoveBidTx.js +3 -3
- package/lib/utils/coveredCall/getRemoveCoveredCallVaultAuthorizedUserTx.d.ts +1 -1
- package/lib/utils/coveredCall/getRemoveCoveredCallVaultAuthorizedUserTx.js +3 -3
- package/lib/utils/coveredCall/getRemoveManagerTx.d.ts +1 -1
- package/lib/utils/coveredCall/getRemoveManagerTx.js +3 -3
- package/lib/utils/coveredCall/getRollOverTx.d.ts +1 -1
- package/lib/utils/coveredCall/getRollOverTx.js +3 -3
- package/lib/utils/coveredCall/getSettleTx.d.ts +1 -1
- package/lib/utils/coveredCall/getSettleTx.js +3 -3
- package/lib/utils/coveredCall/getSettleWithRollOverTx.d.ts +1 -1
- package/lib/utils/coveredCall/getSettleWithRollOverTx.js +3 -3
- package/lib/utils/coveredCall/getSubscribeTx.d.ts +1 -1
- package/lib/utils/coveredCall/getSubscribeTx.js +3 -3
- package/lib/utils/coveredCall/getUnsubscribeTx.d.ts +1 -1
- package/lib/utils/coveredCall/getUnsubscribeTx.js +3 -3
- package/lib/utils/coveredCall/getUpdateCapacityTx.d.ts +1 -1
- package/lib/utils/coveredCall/getUpdateCapacityTx.js +3 -3
- package/lib/utils/coveredCall/getUpdateNextVaultConfigTx.d.ts +1 -1
- package/lib/utils/coveredCall/getUpdateNextVaultConfigTx.js +3 -3
- package/lib/utils/coveredCall/getUpdatePayoffConfigTx.d.ts +1 -1
- package/lib/utils/coveredCall/getUpdatePayoffConfigTx.js +3 -3
- package/lib/utils/coveredCall/getUpdateVaultConfigTx.d.ts +1 -1
- package/lib/utils/coveredCall/getUpdateVaultConfigTx.js +3 -3
- package/lib/utils/coveredCall/getWithdrawTx.d.ts +1 -1
- package/lib/utils/coveredCall/getWithdrawTx.js +3 -3
- package/lib/utils/fetchData.js +1 -1
- package/lib/utils/getCreateTokenRegistryTx.d.ts +1 -1
- package/lib/utils/getCreateTokenRegistryTx.js +3 -3
- package/lib/utils/getMakersShares.js +1 -1
- package/lib/utils/getMintTx.d.ts +1 -1
- package/lib/utils/getMintTx.js +3 -3
- package/lib/utils/getNewOracleTx.d.ts +1 -1
- package/lib/utils/getNewOracleTx.js +3 -3
- package/lib/utils/getNewTimeOracleTx.d.ts +1 -1
- package/lib/utils/getNewTimeOracleTx.js +3 -3
- package/lib/utils/getTypeArgumentFromToken.js +1 -1
- package/lib/utils/getUpdateOracleTx.d.ts +1 -1
- package/lib/utils/getUpdateOracleTx.js +3 -3
- package/lib/utils/getUpdateTimeOracleTx.d.ts +1 -1
- package/lib/utils/getUpdateTimeOracleTx.js +3 -3
- package/lib/utils/getUsersShares.js +1 -1
- package/lib/utils/getVaultData.js +1 -1
- package/lib/utils/getVaultIndexInRegistry.js +1 -1
- package/lib/utils/loadUsersDepositData.js +28 -31
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getUpdateNextVaultConfigTx = void 0;
|
|
40
|
-
function getUpdateNextVaultConfigTx(packageId, managerCap, registry, typeArgument, index, strikeOtmPct, strikeIncrement, decaySpeed, initialPrice, finalPrice, auctionDurationInMs) {
|
|
40
|
+
function getUpdateNextVaultConfigTx(gasBudget, packageId, managerCap, registry, typeArgument, index, strikeOtmPct, strikeIncrement, decaySpeed, initialPrice, finalPrice, auctionDurationInMs) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -57,7 +57,7 @@ function getUpdateNextVaultConfigTx(packageId, managerCap, registry, typeArgumen
|
|
|
57
57
|
finalPrice,
|
|
58
58
|
auctionDurationInMs,
|
|
59
59
|
],
|
|
60
|
-
gasBudget:
|
|
60
|
+
gasBudget: gasBudget,
|
|
61
61
|
};
|
|
62
62
|
return [2 /*return*/, tx];
|
|
63
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getUpdatePayoffConfigTx(packageId: string, registry: string, typeArgument: string, managerCap: string, index: string, roi: string, exposureRatio: string): Promise<any>;
|
|
1
|
+
export declare function getUpdatePayoffConfigTx(gasBudget: string, packageId: string, registry: string, typeArgument: string, managerCap: string, index: string, roi: string, exposureRatio: string): Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getUpdatePayoffConfigTx = void 0;
|
|
40
|
-
function getUpdatePayoffConfigTx(packageId, registry, typeArgument, managerCap, index, roi, exposureRatio) {
|
|
40
|
+
function getUpdatePayoffConfigTx(gasBudget, packageId, registry, typeArgument, managerCap, index, roi, exposureRatio) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -53,7 +53,7 @@ function getUpdatePayoffConfigTx(packageId, registry, typeArgument, managerCap,
|
|
|
53
53
|
roi,
|
|
54
54
|
exposureRatio,
|
|
55
55
|
],
|
|
56
|
-
gasBudget:
|
|
56
|
+
gasBudget: gasBudget,
|
|
57
57
|
};
|
|
58
58
|
return [2 /*return*/, tx];
|
|
59
59
|
});
|
|
@@ -1 +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>;
|
|
1
|
+
export declare function getUpdateVaultConfigTx(gasBudget: string, packageId: string, managerCap: string, typeArgument: string, registry: string, index: string, strikeIncrement: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string): Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getUpdateVaultConfigTx = void 0;
|
|
40
|
-
function getUpdateVaultConfigTx(packageId, managerCap, typeArgument, registry, index, strikeIncrement, decaySpeed, initialPrice, finalPrice, auctionDurationInMs) {
|
|
40
|
+
function getUpdateVaultConfigTx(gasBudget, packageId, managerCap, typeArgument, registry, index, strikeIncrement, decaySpeed, initialPrice, finalPrice, auctionDurationInMs) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -56,7 +56,7 @@ function getUpdateVaultConfigTx(packageId, managerCap, typeArgument, registry, i
|
|
|
56
56
|
finalPrice,
|
|
57
57
|
auctionDurationInMs,
|
|
58
58
|
],
|
|
59
|
-
gasBudget:
|
|
59
|
+
gasBudget: gasBudget,
|
|
60
60
|
};
|
|
61
61
|
return [2 /*return*/, tx];
|
|
62
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getWithdrawTx(packageId: string, registry: string, typeArgument: string, vaultIndex: string, share: string): Promise<any>;
|
|
1
|
+
export declare function getWithdrawTx(gasBudget: string, packageId: string, registry: string, typeArgument: string, vaultIndex: string, share: string): Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getWithdrawTx = void 0;
|
|
40
|
-
function getWithdrawTx(packageId, registry, typeArgument, vaultIndex, share) {
|
|
40
|
+
function getWithdrawTx(gasBudget, packageId, registry, typeArgument, vaultIndex, share) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -51,7 +51,7 @@ function getWithdrawTx(packageId, registry, typeArgument, vaultIndex, share) {
|
|
|
51
51
|
vaultIndex,
|
|
52
52
|
share,
|
|
53
53
|
],
|
|
54
|
-
gasBudget:
|
|
54
|
+
gasBudget: gasBudget,
|
|
55
55
|
};
|
|
56
56
|
return [2 /*return*/, tx];
|
|
57
57
|
});
|
package/lib/utils/fetchData.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getCreateTokenRegistryTx(packageId: string): Promise<any>;
|
|
1
|
+
export declare function getCreateTokenRegistryTx(gasBudget: string, packageId: string): Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getCreateTokenRegistryTx = void 0;
|
|
40
|
-
function getCreateTokenRegistryTx(packageId) {
|
|
40
|
+
function getCreateTokenRegistryTx(gasBudget, packageId) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -47,7 +47,7 @@ function getCreateTokenRegistryTx(packageId) {
|
|
|
47
47
|
function: 'new',
|
|
48
48
|
typeArguments: [],
|
|
49
49
|
arguments: [],
|
|
50
|
-
gasBudget:
|
|
50
|
+
gasBudget: gasBudget,
|
|
51
51
|
};
|
|
52
52
|
return [2 /*return*/, tx];
|
|
53
53
|
});
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/lib/utils/getMintTx.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getMintTx(packageId: string, registry: string, moduleName: string, amount: number): Promise<any>;
|
|
1
|
+
export declare function getMintTx(gasBudget: string, packageId: string, registry: string, moduleName: string, amount: number): Promise<any>;
|
package/lib/utils/getMintTx.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getMintTx = void 0;
|
|
40
|
-
function getMintTx(packageId, registry, moduleName, amount) {
|
|
40
|
+
function getMintTx(gasBudget, packageId, registry, moduleName, amount) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -50,7 +50,7 @@ function getMintTx(packageId, registry, moduleName, amount) {
|
|
|
50
50
|
registry,
|
|
51
51
|
amount,
|
|
52
52
|
],
|
|
53
|
-
gasBudget:
|
|
53
|
+
gasBudget: gasBudget,
|
|
54
54
|
};
|
|
55
55
|
return [2 /*return*/, tx];
|
|
56
56
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getNewOracleTx(packageId: string, typeArgument: string, decimal: number): Promise<any>;
|
|
1
|
+
export declare function getNewOracleTx(gasBudget: string, packageId: string, typeArgument: string, decimal: number): Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getNewOracleTx = void 0;
|
|
40
|
-
function getNewOracleTx(packageId, typeArgument, decimal) {
|
|
40
|
+
function getNewOracleTx(gasBudget, packageId, typeArgument, decimal) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -47,7 +47,7 @@ function getNewOracleTx(packageId, typeArgument, decimal) {
|
|
|
47
47
|
function: 'new_oracle',
|
|
48
48
|
typeArguments: [typeArgument],
|
|
49
49
|
arguments: [decimal],
|
|
50
|
-
gasBudget:
|
|
50
|
+
gasBudget: gasBudget,
|
|
51
51
|
};
|
|
52
52
|
return [2 /*return*/, tx];
|
|
53
53
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getNewTimeOracleTx(packageId: string): Promise<any>;
|
|
1
|
+
export declare function getNewTimeOracleTx(gasBudget: string, packageId: string): Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getNewTimeOracleTx = void 0;
|
|
40
|
-
function getNewTimeOracleTx(packageId) {
|
|
40
|
+
function getNewTimeOracleTx(gasBudget, packageId) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -47,7 +47,7 @@ function getNewTimeOracleTx(packageId) {
|
|
|
47
47
|
function: 'new_time',
|
|
48
48
|
typeArguments: [],
|
|
49
49
|
arguments: [],
|
|
50
|
-
gasBudget:
|
|
50
|
+
gasBudget: gasBudget,
|
|
51
51
|
};
|
|
52
52
|
return [2 /*return*/, tx];
|
|
53
53
|
});
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getUpdateOracleTx(packageId: string, typeArgument: string, oracle: string, managerCap: string, price: number, unix: number): Promise<any>;
|
|
1
|
+
export declare function getUpdateOracleTx(gasBudget: string, packageId: string, typeArgument: string, oracle: string, managerCap: string, price: number, unix: number): Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getUpdateOracleTx = void 0;
|
|
40
|
-
function getUpdateOracleTx(packageId, typeArgument, oracle, managerCap, price, unix) {
|
|
40
|
+
function getUpdateOracleTx(gasBudget, packageId, typeArgument, oracle, managerCap, price, unix) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -52,7 +52,7 @@ function getUpdateOracleTx(packageId, typeArgument, oracle, managerCap, price, u
|
|
|
52
52
|
price,
|
|
53
53
|
unix
|
|
54
54
|
],
|
|
55
|
-
gasBudget:
|
|
55
|
+
gasBudget: gasBudget,
|
|
56
56
|
};
|
|
57
57
|
return [2 /*return*/, tx];
|
|
58
58
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getUpdateTimeOracleTx(packageId: string, oracle: string, managerCap: string, ts: number): Promise<any>;
|
|
1
|
+
export declare function getUpdateTimeOracleTx(gasBudget: string, packageId: string, oracle: string, managerCap: string, ts: number): Promise<any>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getUpdateTimeOracleTx = void 0;
|
|
40
|
-
function getUpdateTimeOracleTx(packageId, oracle, managerCap, ts) {
|
|
40
|
+
function getUpdateTimeOracleTx(gasBudget, packageId, oracle, managerCap, ts) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
42
|
var tx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
@@ -51,7 +51,7 @@ function getUpdateTimeOracleTx(packageId, oracle, managerCap, ts) {
|
|
|
51
51
|
managerCap,
|
|
52
52
|
ts
|
|
53
53
|
],
|
|
54
|
-
gasBudget:
|
|
54
|
+
gasBudget: gasBudget,
|
|
55
55
|
};
|
|
56
56
|
return [2 /*return*/, tx];
|
|
57
57
|
});
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (
|
|
17
|
+
while (_) try {
|
|
18
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
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -51,20 +51,20 @@ exports.loadUsersDepositData = void 0;
|
|
|
51
51
|
var fetchData_1 = require("./fetchData");
|
|
52
52
|
function loadUsersDepositData(registry) {
|
|
53
53
|
return __awaiter(this, void 0, void 0, function () {
|
|
54
|
-
var usersDepositData, coveredCallVaults, coveredCallVaults_1, coveredCallVaults_1_1, coveredCallVault, tableUnderCoveredCallVault, subVaults, _a, _b,
|
|
55
|
-
var e_2,
|
|
56
|
-
return __generator(this, function (
|
|
57
|
-
switch (
|
|
54
|
+
var usersDepositData, coveredCallVaults, coveredCallVaults_1, coveredCallVaults_1_1, coveredCallVault, tableUnderCoveredCallVault, subVaults, _a, _b, _i, subVaultType, tableUnderSubVault, linkedListNodes, linkedListNodes_1, linkedListNodes_1_1, linkedListNode, userData, userDepositData, userDepositDatas, e_1_1, e_2_1;
|
|
55
|
+
var e_2, _c, e_1, _d;
|
|
56
|
+
return __generator(this, function (_e) {
|
|
57
|
+
switch (_e.label) {
|
|
58
58
|
case 0:
|
|
59
59
|
usersDepositData = new Map();
|
|
60
60
|
return [4 /*yield*/, (0, fetchData_1.getCoveredCallVaultsFromRegistry)(registry)];
|
|
61
61
|
case 1:
|
|
62
|
-
coveredCallVaults =
|
|
63
|
-
|
|
62
|
+
coveredCallVaults = _e.sent();
|
|
63
|
+
_e.label = 2;
|
|
64
64
|
case 2:
|
|
65
|
-
|
|
65
|
+
_e.trys.push([2, 19, 20, 21]);
|
|
66
66
|
coveredCallVaults_1 = __values(coveredCallVaults), coveredCallVaults_1_1 = coveredCallVaults_1.next();
|
|
67
|
-
|
|
67
|
+
_e.label = 3;
|
|
68
68
|
case 3:
|
|
69
69
|
if (!!coveredCallVaults_1_1.done) return [3 /*break*/, 18];
|
|
70
70
|
coveredCallVault = coveredCallVaults_1_1.value;
|
|
@@ -72,44 +72,41 @@ function loadUsersDepositData(registry) {
|
|
|
72
72
|
//from table find sub vault
|
|
73
73
|
];
|
|
74
74
|
case 4:
|
|
75
|
-
tableUnderCoveredCallVault =
|
|
75
|
+
tableUnderCoveredCallVault = _e.sent();
|
|
76
76
|
return [4 /*yield*/, (0, fetchData_1.getSubVaultsFromTable)(tableUnderCoveredCallVault)
|
|
77
77
|
//from sub vault find table
|
|
78
78
|
];
|
|
79
79
|
case 5:
|
|
80
|
-
subVaults =
|
|
81
|
-
_a =
|
|
82
|
-
_b
|
|
83
|
-
|
|
84
|
-
_b.push(_c);
|
|
80
|
+
subVaults = _e.sent();
|
|
81
|
+
_a = [];
|
|
82
|
+
for (_b in subVaults)
|
|
83
|
+
_a.push(_b);
|
|
85
84
|
_i = 0;
|
|
86
|
-
|
|
85
|
+
_e.label = 6;
|
|
87
86
|
case 6:
|
|
88
|
-
if (!(_i <
|
|
89
|
-
|
|
90
|
-
if (!(_c in _a)) return [3 /*break*/, 16];
|
|
91
|
-
subVaultType = _c;
|
|
87
|
+
if (!(_i < _a.length)) return [3 /*break*/, 17];
|
|
88
|
+
subVaultType = _a[_i];
|
|
92
89
|
return [4 /*yield*/, (0, fetchData_1.getTableUnderSubVault)(subVaults[subVaultType])
|
|
93
90
|
//from table find linked list node
|
|
94
91
|
];
|
|
95
92
|
case 7:
|
|
96
|
-
tableUnderSubVault =
|
|
93
|
+
tableUnderSubVault = _e.sent();
|
|
97
94
|
return [4 /*yield*/, (0, fetchData_1.getLinkedListNodesFromTable)(tableUnderSubVault)
|
|
98
95
|
//from linkedListNode find user data
|
|
99
96
|
];
|
|
100
97
|
case 8:
|
|
101
|
-
linkedListNodes =
|
|
102
|
-
|
|
98
|
+
linkedListNodes = _e.sent();
|
|
99
|
+
_e.label = 9;
|
|
103
100
|
case 9:
|
|
104
|
-
|
|
101
|
+
_e.trys.push([9, 14, 15, 16]);
|
|
105
102
|
linkedListNodes_1 = (e_1 = void 0, __values(linkedListNodes)), linkedListNodes_1_1 = linkedListNodes_1.next();
|
|
106
|
-
|
|
103
|
+
_e.label = 10;
|
|
107
104
|
case 10:
|
|
108
105
|
if (!!linkedListNodes_1_1.done) return [3 /*break*/, 13];
|
|
109
106
|
linkedListNode = linkedListNodes_1_1.value;
|
|
110
107
|
return [4 /*yield*/, (0, fetchData_1.getUserDataFromLinkedListNode)(linkedListNode.objectId)];
|
|
111
108
|
case 11:
|
|
112
|
-
userData =
|
|
109
|
+
userData = _e.sent();
|
|
113
110
|
userDepositData = {
|
|
114
111
|
coveredCallVault: coveredCallVault.objectId,
|
|
115
112
|
subVault: subVaults[subVaultType],
|
|
@@ -120,18 +117,18 @@ function loadUsersDepositData(registry) {
|
|
|
120
117
|
userDepositDatas = (usersDepositData.get(userData.name) == undefined) ? [] : usersDepositData.get(userData.name);
|
|
121
118
|
userDepositDatas.push(userDepositData);
|
|
122
119
|
usersDepositData.set(userData.name, userDepositDatas);
|
|
123
|
-
|
|
120
|
+
_e.label = 12;
|
|
124
121
|
case 12:
|
|
125
122
|
linkedListNodes_1_1 = linkedListNodes_1.next();
|
|
126
123
|
return [3 /*break*/, 10];
|
|
127
124
|
case 13: return [3 /*break*/, 16];
|
|
128
125
|
case 14:
|
|
129
|
-
e_1_1 =
|
|
126
|
+
e_1_1 = _e.sent();
|
|
130
127
|
e_1 = { error: e_1_1 };
|
|
131
128
|
return [3 /*break*/, 16];
|
|
132
129
|
case 15:
|
|
133
130
|
try {
|
|
134
|
-
if (linkedListNodes_1_1 && !linkedListNodes_1_1.done && (
|
|
131
|
+
if (linkedListNodes_1_1 && !linkedListNodes_1_1.done && (_d = linkedListNodes_1.return)) _d.call(linkedListNodes_1);
|
|
135
132
|
}
|
|
136
133
|
finally { if (e_1) throw e_1.error; }
|
|
137
134
|
return [7 /*endfinally*/];
|
|
@@ -143,12 +140,12 @@ function loadUsersDepositData(registry) {
|
|
|
143
140
|
return [3 /*break*/, 3];
|
|
144
141
|
case 18: return [3 /*break*/, 21];
|
|
145
142
|
case 19:
|
|
146
|
-
e_2_1 =
|
|
143
|
+
e_2_1 = _e.sent();
|
|
147
144
|
e_2 = { error: e_2_1 };
|
|
148
145
|
return [3 /*break*/, 21];
|
|
149
146
|
case 20:
|
|
150
147
|
try {
|
|
151
|
-
if (coveredCallVaults_1_1 && !coveredCallVaults_1_1.done && (
|
|
148
|
+
if (coveredCallVaults_1_1 && !coveredCallVaults_1_1.done && (_c = coveredCallVaults_1.return)) _c.call(coveredCallVaults_1);
|
|
152
149
|
}
|
|
153
150
|
finally { if (e_2) throw e_2.error; }
|
|
154
151
|
return [7 /*endfinally*/];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typus/typus-sdk",
|
|
3
3
|
"author": "Typus",
|
|
4
4
|
"description": "typus sdk",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.7",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@mysten/bcs": "^0.5.0",
|
|
8
8
|
"@mysten/sui.js": "^0.26.1",
|
|
@@ -81,4 +81,4 @@
|
|
|
81
81
|
"url": "https://github.com/Typus-Lab/typus-sdk/issues"
|
|
82
82
|
},
|
|
83
83
|
"homepage": "https://github.com/Typus-Lab/typus-sdk#readme"
|
|
84
|
-
}
|
|
84
|
+
}
|