@typus/typus-sdk 0.6.3 → 1.0.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/config.json +17 -20
- package/lib/constants.d.ts +8 -6
- package/lib/constants.js +9 -7
- package/lib/scripts/sui.js +1 -2
- package/lib/test/authorized/testAuthorizedNewPortfolioVault.js +82 -0
- package/lib/test/{testClaim.js → authorized/testAuthorizedUpdateUpcomingVaultConfig.js} +19 -30
- package/lib/test/authorized/testAuthorizedUpdateWarmupVaultConfig.js +68 -0
- package/lib/test/getBidData.js +1 -1
- package/lib/test/getVaultData.js +2 -2
- package/lib/test/getWhiteListFromRegistry.js +2 -2
- package/lib/test/helper/getAuctionMaxSize.js +76 -0
- package/lib/test/helper/getUserStatus.js +75 -0
- package/lib/test/testMint.js +1 -1
- package/lib/test/testSubscribeEvent.js +1 -1
- package/lib/test/{testWithdraw.js → user/testClaim.js} +14 -17
- package/lib/test/{getMakersShares.js → user/testCompound.js} +21 -7
- package/lib/test/{testUnsubscribe.js → user/testDeposit.js} +28 -37
- package/lib/test/{getUsersShares.js → user/testHarvest.js} +21 -7
- package/lib/test/user/testNewBid.js +77 -0
- package/lib/test/user/testUnsubscribe.d.ts +1 -0
- package/lib/test/user/testUnsubscribe.js +69 -0
- package/lib/test/user/testWithdraw.d.ts +1 -0
- package/lib/test/{testDeposit.js → user/testWithdraw.js} +15 -19
- package/lib/utils/auction/getBid.js +0 -1
- package/lib/utils/fetchData.d.ts +72 -61
- package/lib/utils/fetchData.js +27 -198
- package/lib/utils/getTypeArgumentFromToken.js +0 -1
- package/lib/utils/getVaultData.d.ts +2 -2
- package/lib/utils/getVaultData.js +123 -162
- package/lib/utils/getWhiteListFromRegistry.js +0 -1
- package/lib/utils/portfolio/authorized/getAuthorizedAddPortfolioVaultAuthorizedUserTx.d.ts +1 -1
- package/lib/utils/portfolio/authorized/getAuthorizedAddPortfolioVaultAuthorizedUserTx.js +2 -2
- package/lib/utils/portfolio/authorized/getAuthorizedNewPortfolioVaultTx.d.ts +4 -3
- package/lib/utils/portfolio/authorized/getAuthorizedNewPortfolioVaultTx.js +5 -3
- package/lib/utils/portfolio/authorized/getAuthorizedRemovePortfolioVaultAuthorizedUserTx.d.ts +1 -1
- package/lib/utils/portfolio/authorized/getAuthorizedRemovePortfolioVaultAuthorizedUserTx.js +2 -2
- package/lib/utils/portfolio/authorized/getAuthorizedUpdateUpcomingVaultConfigTx.d.ts +4 -0
- package/lib/utils/portfolio/authorized/{getAuthorizedUpdateNextVaultConfigTx.js → getAuthorizedUpdateUpcomingVaultConfigTx.js} +5 -5
- package/lib/utils/portfolio/authorized/getAuthorizedUpdateWarmupVaultConfigTx.d.ts +1 -0
- package/lib/utils/portfolio/{manager/getUpdateVaultConfigTx.js → authorized/getAuthorizedUpdateWarmupVaultConfigTx.js} +4 -5
- package/lib/utils/portfolio/helper/getAuctionMaxSize.d.ts +8 -0
- package/lib/utils/portfolio/{manager/getLastEvolutionTx.js → helper/getAuctionMaxSize.js} +11 -7
- package/lib/utils/portfolio/helper/getUserStatus.d.ts +29 -0
- package/lib/utils/portfolio/{authorized/getAuthorizedEvolutionTx.js → helper/getUserStatus.js} +50 -9
- package/lib/utils/portfolio/manager/getAddAuthorizedUserTx.d.ts +8 -1
- package/lib/utils/portfolio/manager/getAddAuthorizedUserTx.js +9 -2
- package/lib/utils/portfolio/manager/getAddPortfolioVaultAuthorizedUserTx.d.ts +6 -0
- package/lib/utils/portfolio/manager/getAddPortfolioVaultAuthorizedUserTx.js +6 -0
- package/lib/utils/portfolio/manager/getEvolutionTx.d.ts +15 -1
- package/lib/utils/portfolio/manager/getEvolutionTx.js +14 -0
- package/lib/utils/portfolio/manager/getNewManagerTx.d.ts +8 -1
- package/lib/utils/portfolio/manager/getNewManagerTx.js +9 -2
- package/lib/utils/portfolio/manager/getNewPortfolioVaultTx.d.ts +5 -5
- package/lib/utils/portfolio/manager/getNewPortfolioVaultTx.js +5 -5
- package/lib/utils/portfolio/manager/getRemoveAuthorizedUserTx.d.ts +7 -0
- package/lib/utils/portfolio/manager/getRemoveAuthorizedUserTx.js +7 -0
- package/lib/utils/portfolio/manager/getRemoveManagerTx.d.ts +5 -0
- package/lib/utils/portfolio/manager/getRemoveManagerTx.js +5 -0
- package/lib/utils/portfolio/manager/getRemovePortfolioVaultAuthorizedUserTx.d.ts +7 -1
- package/lib/utils/portfolio/manager/getRemovePortfolioVaultAuthorizedUserTx.js +7 -1
- package/lib/utils/portfolio/user/getClaimAndHarvestTx.d.ts +9 -1
- package/lib/utils/portfolio/user/getClaimAndHarvestTx.js +11 -3
- package/lib/utils/portfolio/user/getClaimTx.d.ts +9 -1
- package/lib/utils/portfolio/user/getClaimTx.js +8 -0
- package/lib/utils/portfolio/user/getCompoundTx.d.ts +9 -0
- package/lib/utils/portfolio/{authorized/getAuthorizedLastEvolutionTx.js → user/getCompoundTx.js} +12 -6
- package/lib/utils/portfolio/user/getDepositTx.d.ts +10 -0
- package/lib/utils/portfolio/user/getDepositTx.js +10 -0
- package/lib/utils/portfolio/user/getHarvestTx.d.ts +9 -1
- package/lib/utils/portfolio/user/getHarvestTx.js +8 -0
- package/lib/utils/portfolio/user/getNewBidTx.d.ts +13 -1
- package/lib/utils/portfolio/user/getNewBidTx.js +12 -0
- package/lib/utils/portfolio/user/getUnsubscribeTx.d.ts +10 -1
- package/lib/utils/portfolio/user/getUnsubscribeTx.js +9 -0
- package/lib/utils/portfolio/user/getWithdrawTx.d.ts +10 -1
- package/lib/utils/portfolio/user/getWithdrawTx.js +9 -0
- package/package.json +2 -2
- package/lib/test/eventListener.d.ts +0 -5
- package/lib/test/eventListener.js +0 -397
- package/lib/test/testDepositV2.d.ts +0 -0
- package/lib/test/testDepositV2.js +0 -64
- package/lib/test/testNewAuction.js +0 -94
- package/lib/test/testNewVault.js +0 -153
- package/lib/test/testOracle.js +0 -94
- package/lib/test/testSettle.js +0 -590
- package/lib/utils/authorized/getAuthorizedAddAuthorizedUserTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedAddAuthorizedUserTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedAddCoveredCallVaultAuthorizedUserTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedAddCoveredCallVaultAuthorizedUserTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedDeliveryTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedDeliveryTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedEvolutionTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedEvolutionTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedLastEvolutionTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedLastEvolutionTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedNewAuctionTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedNewAuctionTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedNewCoveredCallVaultTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedNewCoveredCallVaultTx.js +0 -76
- package/lib/utils/authorized/getAuthorizedRemoveAuthorizedUserTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedRemoveAuthorizedUserTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedRemoveCoveredCallVaultAuthorizedUserTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedRemoveCoveredCallVaultAuthorizedUserTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedSettleTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedSettleTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedUpdateCapacityTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedUpdateCapacityTx.js +0 -56
- package/lib/utils/authorized/getAuthorizedUpdateNextVaultConfigTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedUpdateNextVaultConfigTx.js +0 -65
- package/lib/utils/authorized/getAuthorizedUpdateVaultConfigTx.d.ts +0 -1
- package/lib/utils/authorized/getAuthorizedUpdateVaultConfigTx.js +0 -64
- package/lib/utils/coveredCall/createPriceOracle.d.ts +0 -1
- package/lib/utils/coveredCall/createPriceOracle.js +0 -93
- package/lib/utils/coveredCall/createTimeOracle.d.ts +0 -1
- package/lib/utils/coveredCall/createTimeOracle.js +0 -92
- package/lib/utils/coveredCall/getAddCoveredCallVaultAuthorizedUserTx.d.ts +0 -1
- package/lib/utils/coveredCall/getAddCoveredCallVaultAuthorizedUserTx.js +0 -61
- package/lib/utils/coveredCall/getClaimAllTx.d.ts +0 -1
- package/lib/utils/coveredCall/getClaimAllTx.js +0 -59
- package/lib/utils/coveredCall/getClaimTx.d.ts +0 -1
- package/lib/utils/coveredCall/getClaimTx.js +0 -59
- package/lib/utils/coveredCall/getCloseAuctionTx.d.ts +0 -1
- package/lib/utils/coveredCall/getCloseAuctionTx.js +0 -61
- package/lib/utils/coveredCall/getCloseVaultTx.d.ts +0 -1
- package/lib/utils/coveredCall/getCloseVaultTx.js +0 -60
- package/lib/utils/coveredCall/getDeliveryTx.d.ts +0 -1
- package/lib/utils/coveredCall/getDeliveryTx.js +0 -61
- package/lib/utils/coveredCall/getDepositTx.d.ts +0 -1
- package/lib/utils/coveredCall/getDepositTx.js +0 -65
- package/lib/utils/coveredCall/getEvolutionTx.d.ts +0 -1
- package/lib/utils/coveredCall/getEvolutionTx.js +0 -64
- package/lib/utils/coveredCall/getLastEvolutionTx.d.ts +0 -1
- package/lib/utils/coveredCall/getLastEvolutionTx.js +0 -63
- package/lib/utils/coveredCall/getMakerClaimAllTx.d.ts +0 -1
- package/lib/utils/coveredCall/getMakerClaimAllTx.js +0 -59
- package/lib/utils/coveredCall/getMakerClaimTx.d.ts +0 -1
- package/lib/utils/coveredCall/getMakerClaimTx.js +0 -59
- package/lib/utils/coveredCall/getNewAuctionTx.d.ts +0 -1
- package/lib/utils/coveredCall/getNewAuctionTx.js +0 -66
- package/lib/utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.d.ts +0 -1
- package/lib/utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.js +0 -64
- package/lib/utils/coveredCall/getNewBidTx.d.ts +0 -1
- package/lib/utils/coveredCall/getNewBidTx.js +0 -62
- package/lib/utils/coveredCall/getNewCoveredCallVaultTx.d.ts +0 -1
- package/lib/utils/coveredCall/getNewCoveredCallVaultTx.js +0 -77
- package/lib/utils/coveredCall/getNewManagerTx.d.ts +0 -1
- package/lib/utils/coveredCall/getNewManagerTx.js +0 -59
- package/lib/utils/coveredCall/getRefundTx.d.ts +0 -1
- package/lib/utils/coveredCall/getRefundTx.js +0 -59
- package/lib/utils/coveredCall/getRemoveBidTx.d.ts +0 -1
- package/lib/utils/coveredCall/getRemoveBidTx.js +0 -60
- package/lib/utils/coveredCall/getRemoveCoveredCallVaultAuthorizedUserTx.d.ts +0 -1
- package/lib/utils/coveredCall/getRemoveCoveredCallVaultAuthorizedUserTx.js +0 -61
- package/lib/utils/coveredCall/getRemoveManagerTx.d.ts +0 -1
- package/lib/utils/coveredCall/getRemoveManagerTx.js +0 -58
- package/lib/utils/coveredCall/getRollOverTx.d.ts +0 -1
- package/lib/utils/coveredCall/getRollOverTx.js +0 -60
- package/lib/utils/coveredCall/getSettleTx.d.ts +0 -1
- package/lib/utils/coveredCall/getSettleTx.js +0 -62
- package/lib/utils/coveredCall/getSettleWithRollOverTx.d.ts +0 -1
- package/lib/utils/coveredCall/getSettleWithRollOverTx.js +0 -62
- package/lib/utils/coveredCall/getSubscribeTx.d.ts +0 -1
- package/lib/utils/coveredCall/getSubscribeTx.js +0 -60
- package/lib/utils/coveredCall/getUnsubscribeTx.d.ts +0 -1
- package/lib/utils/coveredCall/getUnsubscribeTx.js +0 -63
- package/lib/utils/coveredCall/getUpdateCapacityTx.d.ts +0 -1
- package/lib/utils/coveredCall/getUpdateCapacityTx.js +0 -61
- package/lib/utils/coveredCall/getUpdateNextVaultConfigTx.d.ts +0 -1
- package/lib/utils/coveredCall/getUpdateNextVaultConfigTx.js +0 -66
- package/lib/utils/coveredCall/getUpdatePayoffConfigTx.d.ts +0 -1
- package/lib/utils/coveredCall/getUpdatePayoffConfigTx.js +0 -62
- package/lib/utils/coveredCall/getUpdateVaultConfigTx.d.ts +0 -1
- package/lib/utils/coveredCall/getUpdateVaultConfigTx.js +0 -65
- package/lib/utils/coveredCall/getWithdrawTx.d.ts +0 -1
- package/lib/utils/coveredCall/getWithdrawTx.js +0 -60
- package/lib/utils/fetchPortfolioData.d.ts +0 -93
- package/lib/utils/fetchPortfolioData.js +0 -205
- package/lib/utils/getCreateTokenRegistryTx.d.ts +0 -1
- package/lib/utils/getCreateTokenRegistryTx.js +0 -59
- package/lib/utils/getMakersShares.d.ts +0 -8
- package/lib/utils/getMakersShares.js +0 -145
- package/lib/utils/getNewOracleTx.d.ts +0 -1
- package/lib/utils/getNewOracleTx.js +0 -59
- package/lib/utils/getNewTimeOracleTx.d.ts +0 -1
- package/lib/utils/getNewTimeOracleTx.js +0 -56
- package/lib/utils/getUpdateOracleTx.d.ts +0 -1
- package/lib/utils/getUpdateOracleTx.js +0 -64
- package/lib/utils/getUpdateTimeOracleTx.d.ts +0 -1
- package/lib/utils/getUpdateTimeOracleTx.js +0 -60
- package/lib/utils/getUsersShares.d.ts +0 -9
- package/lib/utils/getUsersShares.js +0 -148
- package/lib/utils/getVaultIndexInRegistry.d.ts +0 -1
- package/lib/utils/getVaultIndexInRegistry.js +0 -61
- package/lib/utils/isObjAvailable.d.ts +0 -0
- package/lib/utils/isObjAvailable.js +0 -14
- package/lib/utils/loadUsersDepositData.d.ts +0 -8
- package/lib/utils/loadUsersDepositData.js +0 -160
- package/lib/utils/portfolio/authorized/getAuthorizedEvolutionTx.d.ts +0 -1
- package/lib/utils/portfolio/authorized/getAuthorizedLastEvolutionTx.d.ts +0 -1
- package/lib/utils/portfolio/authorized/getAuthorizedUpdateNextVaultConfigTx.d.ts +0 -4
- package/lib/utils/portfolio/authorized/getAuthorizedUpdateVaultConfigTx.d.ts +0 -1
- package/lib/utils/portfolio/authorized/getAuthorizedUpdateVaultConfigTx.js +0 -64
- package/lib/utils/portfolio/manager/getLastEvolutionTx.d.ts +0 -1
- package/lib/utils/portfolio/manager/getUpdateNextVaultConfigTx.d.ts +0 -4
- package/lib/utils/portfolio/manager/getUpdateNextVaultConfigTx.js +0 -71
- package/lib/utils/portfolio/manager/getUpdateVaultConfigTx.d.ts +0 -1
- package/lib/utils/portfolio/user/getCompoundPremiumTx.d.ts +0 -1
- package/lib/utils/portfolio/user/getCompoundPremiumTx.js +0 -60
- /package/lib/test/{getMakersShares.d.ts → authorized/testAuthorizedNewPortfolioVault.d.ts} +0 -0
- /package/lib/test/{getUsersShares.d.ts → authorized/testAuthorizedUpdateUpcomingVaultConfig.d.ts} +0 -0
- /package/lib/test/{testClaim.d.ts → authorized/testAuthorizedUpdateWarmupVaultConfig.d.ts} +0 -0
- /package/lib/test/{testDeposit.d.ts → helper/getAuctionMaxSize.d.ts} +0 -0
- /package/lib/test/{testNewAuction.d.ts → helper/getUserStatus.d.ts} +0 -0
- /package/lib/test/{testNewVault.d.ts → user/testClaim.d.ts} +0 -0
- /package/lib/test/{testOracle.d.ts → user/testCompound.d.ts} +0 -0
- /package/lib/test/{testSettle.d.ts → user/testDeposit.d.ts} +0 -0
- /package/lib/test/{testUnsubscribe.d.ts → user/testHarvest.d.ts} +0 -0
- /package/lib/test/{testWithdraw.d.ts → user/testNewBid.d.ts} +0 -0
|
@@ -1,60 +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.getSubscribeTx = void 0;
|
|
40
|
-
function getSubscribeTx(gasBudget, packageId, registry, typeArgument, index, share) {
|
|
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: 'subscribe',
|
|
48
|
-
typeArguments: [typeArgument],
|
|
49
|
-
arguments: [
|
|
50
|
-
registry,
|
|
51
|
-
index,
|
|
52
|
-
share,
|
|
53
|
-
],
|
|
54
|
-
gasBudget: gasBudget,
|
|
55
|
-
};
|
|
56
|
-
return [2 /*return*/, tx];
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
exports.getSubscribeTx = getSubscribeTx;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getUnsubscribeTx(gasBudget: number, packageId: string, registry: string, typeArgument: string, index: string, share: string): Promise<any>;
|
|
@@ -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.getUnsubscribeTx = void 0;
|
|
40
|
-
function getUnsubscribeTx(gasBudget, packageId, registry, typeArgument, index, share) {
|
|
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: 'unsubscribe',
|
|
48
|
-
typeArguments: [typeArgument],
|
|
49
|
-
arguments: [
|
|
50
|
-
registry,
|
|
51
|
-
index,
|
|
52
|
-
share,
|
|
53
|
-
],
|
|
54
|
-
gasBudget: gasBudget,
|
|
55
|
-
};
|
|
56
|
-
return [2 /*return*/, tx];
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
exports.getUnsubscribeTx = getUnsubscribeTx;
|
|
61
|
-
/*
|
|
62
|
-
sui client call --package 0x1543511bdce9ea3c401c4939126cea518adee965 --module covered_call --function unsubscribe --type-args 0x2::sui::SUI --args 0xb02452d0bbef3cbdc7840ea5bad27bcdd4031675 0 --gas-budget 100000
|
|
63
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getUpdateCapacityTx(gasBudget: number, packageId: string, managerCap: string, typeArgument: string, registry: string, index: string, capacity: string): Promise<any>;
|
|
@@ -1,61 +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
|
-
function getUpdateCapacityTx(gasBudget, 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: gasBudget,
|
|
56
|
-
};
|
|
57
|
-
return [2 /*return*/, tx];
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
exports.getUpdateCapacityTx = getUpdateCapacityTx;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getUpdateNextVaultConfigTx(gasBudget: number, packageId: string, managerCap: string, registry: string, typeArgument: string, index: string, strikeOtmPct: string, strikeIncrement: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string): Promise<any>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getUpdateNextVaultConfigTx = void 0;
|
|
40
|
-
function getUpdateNextVaultConfigTx(gasBudget, packageId, managerCap, registry, typeArgument, index, strikeOtmPct, 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_next_vault_config',
|
|
48
|
-
typeArguments: [typeArgument],
|
|
49
|
-
arguments: [
|
|
50
|
-
managerCap,
|
|
51
|
-
registry,
|
|
52
|
-
index,
|
|
53
|
-
strikeOtmPct,
|
|
54
|
-
strikeIncrement,
|
|
55
|
-
decaySpeed,
|
|
56
|
-
initialPrice,
|
|
57
|
-
finalPrice,
|
|
58
|
-
auctionDurationInMs,
|
|
59
|
-
],
|
|
60
|
-
gasBudget: gasBudget,
|
|
61
|
-
};
|
|
62
|
-
return [2 /*return*/, tx];
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
exports.getUpdateNextVaultConfigTx = getUpdateNextVaultConfigTx;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getUpdatePayoffConfigTx(gasBudget: number, packageId: string, registry: string, typeArgument: string, managerCap: string, index: string, roi: string, exposureRatio: string): Promise<any>;
|
|
@@ -1,62 +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.getUpdatePayoffConfigTx = void 0;
|
|
40
|
-
function getUpdatePayoffConfigTx(gasBudget, packageId, registry, typeArgument, managerCap, index, roi, exposureRatio) {
|
|
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_payoff_config',
|
|
48
|
-
typeArguments: [typeArgument],
|
|
49
|
-
arguments: [
|
|
50
|
-
managerCap,
|
|
51
|
-
registry,
|
|
52
|
-
index,
|
|
53
|
-
roi,
|
|
54
|
-
exposureRatio,
|
|
55
|
-
],
|
|
56
|
-
gasBudget: gasBudget,
|
|
57
|
-
};
|
|
58
|
-
return [2 /*return*/, tx];
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
exports.getUpdatePayoffConfigTx = getUpdatePayoffConfigTx;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getUpdateVaultConfigTx(gasBudget: number, packageId: string, managerCap: string, typeArgument: string, registry: string, index: string, strikeIncrement: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string): Promise<any>;
|
|
@@ -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.getUpdateVaultConfigTx = void 0;
|
|
40
|
-
function getUpdateVaultConfigTx(gasBudget, 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: gasBudget,
|
|
60
|
-
};
|
|
61
|
-
return [2 /*return*/, tx];
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
exports.getUpdateVaultConfigTx = getUpdateVaultConfigTx;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getWithdrawTx(gasBudget: number, packageId: string, registry: string, typeArgument: string, vaultIndex: string, share: string): Promise<any>;
|
|
@@ -1,60 +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.getWithdrawTx = void 0;
|
|
40
|
-
function getWithdrawTx(gasBudget, packageId, registry, typeArgument, vaultIndex, share) {
|
|
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: 'withdraw',
|
|
48
|
-
typeArguments: [typeArgument],
|
|
49
|
-
arguments: [
|
|
50
|
-
registry,
|
|
51
|
-
vaultIndex,
|
|
52
|
-
share,
|
|
53
|
-
],
|
|
54
|
-
gasBudget: gasBudget,
|
|
55
|
-
};
|
|
56
|
-
return [2 /*return*/, tx];
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
exports.getWithdrawTx = getWithdrawTx;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
export interface SubVaults {
|
|
2
|
-
rolling: string;
|
|
3
|
-
maker: string;
|
|
4
|
-
regular: string;
|
|
5
|
-
}
|
|
6
|
-
export interface PortfolioVault {
|
|
7
|
-
vaultId: string;
|
|
8
|
-
vaultIdx: string;
|
|
9
|
-
asset: string;
|
|
10
|
-
optionType: string;
|
|
11
|
-
config: Config;
|
|
12
|
-
depositorVault: DVault;
|
|
13
|
-
bidderVault: BVault;
|
|
14
|
-
auction: Auction;
|
|
15
|
-
prev: string;
|
|
16
|
-
next: string;
|
|
17
|
-
totalBidSize: string;
|
|
18
|
-
deliveryInfo: DeliveryInfo;
|
|
19
|
-
owner: string;
|
|
20
|
-
tvl: string;
|
|
21
|
-
vaultBidPrice: string;
|
|
22
|
-
}
|
|
23
|
-
export interface Config {
|
|
24
|
-
period: string;
|
|
25
|
-
activationTsMs: string;
|
|
26
|
-
expirationTsMs: string;
|
|
27
|
-
dTokenDecimal: string;
|
|
28
|
-
bTokenDecimal: string;
|
|
29
|
-
oTokenDecimal: string;
|
|
30
|
-
capacity: string;
|
|
31
|
-
leverage: string;
|
|
32
|
-
vaultConfig: VaultConfig;
|
|
33
|
-
nextVaultConfig: VaultConfig;
|
|
34
|
-
}
|
|
35
|
-
export interface PayoffConfig {
|
|
36
|
-
strikePct: string;
|
|
37
|
-
weight: string;
|
|
38
|
-
isBuyer: string;
|
|
39
|
-
strike: string;
|
|
40
|
-
}
|
|
41
|
-
export interface VaultConfig {
|
|
42
|
-
payoffConfig: PayoffConfig[];
|
|
43
|
-
strikeIncrement: string;
|
|
44
|
-
lotSize: string;
|
|
45
|
-
decaySpeed: string;
|
|
46
|
-
initialPrice: string;
|
|
47
|
-
finalPrice: string;
|
|
48
|
-
auctionDurationInMs: string;
|
|
49
|
-
}
|
|
50
|
-
export interface DeliveryInfo {
|
|
51
|
-
deliveryPrice: string;
|
|
52
|
-
deliverySize: string;
|
|
53
|
-
}
|
|
54
|
-
export interface DVault {
|
|
55
|
-
ableToDeposit: boolean;
|
|
56
|
-
ableToWithdraw: boolean;
|
|
57
|
-
regularSubVault: SubVault;
|
|
58
|
-
rollingSubVault: SubVault;
|
|
59
|
-
refundSubVault: SubVault;
|
|
60
|
-
}
|
|
61
|
-
export interface BVault {
|
|
62
|
-
bidder_sub_vault: SubVault;
|
|
63
|
-
premium_sub_vault: SubVault;
|
|
64
|
-
performance_fee_sub_vault: SubVault;
|
|
65
|
-
}
|
|
66
|
-
export interface SubVault {
|
|
67
|
-
balance: string;
|
|
68
|
-
shareSupply: string;
|
|
69
|
-
}
|
|
70
|
-
export interface Auction {
|
|
71
|
-
startTsMs: string;
|
|
72
|
-
endTsMs: string;
|
|
73
|
-
priceConfig: PriceConfig;
|
|
74
|
-
index: string;
|
|
75
|
-
}
|
|
76
|
-
export interface PriceConfig {
|
|
77
|
-
decaySpeed: string;
|
|
78
|
-
initialPrice: string;
|
|
79
|
-
finalPrice: string;
|
|
80
|
-
}
|
|
81
|
-
export interface Bid {
|
|
82
|
-
price: string;
|
|
83
|
-
size: string;
|
|
84
|
-
tsMs: string;
|
|
85
|
-
tokenBalance: string;
|
|
86
|
-
ownerAddress: string;
|
|
87
|
-
}
|
|
88
|
-
export declare function getCoveredCallVaultsFromRegistry(registry: string): Promise<any>;
|
|
89
|
-
export declare function getTableFromCoveredCallVault(coveredCallVault: string): Promise<any>;
|
|
90
|
-
export declare function getSubVaultsFromTable(tableUnderCoveredCallVault: string): Promise<SubVaults>;
|
|
91
|
-
export declare function getTableUnderSubVault(subVault: string): Promise<string>;
|
|
92
|
-
export declare function getLinkedListNodesFromTable(table: string): Promise<any[]>;
|
|
93
|
-
export declare function getUserDataFromLinkedListNode(linkedListNode: string): Promise<any>;
|