@typus/typus-sdk 0.4.6 → 0.4.8

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.
Files changed (151) hide show
  1. package/package.json +3 -3
  2. package/lib/constants.d.ts +0 -30
  3. package/lib/constants.js +0 -38
  4. package/lib/scripts/getSubVault.d.ts +0 -0
  5. package/lib/scripts/getSubVault.js +0 -6
  6. package/lib/scripts/sui.d.ts +0 -1
  7. package/lib/scripts/sui.js +0 -187
  8. package/lib/test/eventListener.d.ts +0 -5
  9. package/lib/test/eventListener.js +0 -277
  10. package/lib/test/getBidData.d.ts +0 -1
  11. package/lib/test/getBidData.js +0 -53
  12. package/lib/test/getMakersShares.d.ts +0 -1
  13. package/lib/test/getMakersShares.js +0 -52
  14. package/lib/test/getUsersShares.d.ts +0 -1
  15. package/lib/test/getUsersShares.js +0 -52
  16. package/lib/test/getVaultData.d.ts +0 -1
  17. package/lib/test/getVaultData.js +0 -53
  18. package/lib/test/testClaim.d.ts +0 -1
  19. package/lib/test/testClaim.js +0 -81
  20. package/lib/test/testCrypto.d.ts +0 -1
  21. package/lib/test/testCrypto.js +0 -54
  22. package/lib/test/testDeposit.d.ts +0 -1
  23. package/lib/test/testDeposit.js +0 -73
  24. package/lib/test/testDepositV2.d.ts +0 -0
  25. package/lib/test/testDepositV2.js +0 -62
  26. package/lib/test/testMint.d.ts +0 -1
  27. package/lib/test/testMint.js +0 -136
  28. package/lib/test/testNewAuction.d.ts +0 -1
  29. package/lib/test/testNewAuction.js +0 -93
  30. package/lib/test/testNewVault.d.ts +0 -1
  31. package/lib/test/testNewVault.js +0 -152
  32. package/lib/test/testOracle.d.ts +0 -1
  33. package/lib/test/testOracle.js +0 -93
  34. package/lib/test/testSettle.d.ts +0 -1
  35. package/lib/test/testSettle.js +0 -589
  36. package/lib/test/testSubscribeEvent.d.ts +0 -1
  37. package/lib/test/testSubscribeEvent.js +0 -97
  38. package/lib/test/testUnsubscribe.d.ts +0 -1
  39. package/lib/test/testUnsubscribe.js +0 -87
  40. package/lib/test/testWithdraw.d.ts +0 -1
  41. package/lib/test/testWithdraw.js +0 -70
  42. package/lib/utils/auction/getBid.d.ts +0 -2
  43. package/lib/utils/auction/getBid.js +0 -79
  44. package/lib/utils/auction/sealedAuction.d.ts +0 -33
  45. package/lib/utils/auction/sealedAuction.js +0 -64
  46. package/lib/utils/authorized/getAuthorizedAddAuthorizedUserTx.d.ts +0 -1
  47. package/lib/utils/authorized/getAuthorizedAddAuthorizedUserTx.js +0 -60
  48. package/lib/utils/authorized/getAuthorizedAddCoveredCallVaultAuthorizedUserTx.d.ts +0 -1
  49. package/lib/utils/authorized/getAuthorizedAddCoveredCallVaultAuthorizedUserTx.js +0 -60
  50. package/lib/utils/authorized/getAuthorizedDeliveryTx.d.ts +0 -1
  51. package/lib/utils/authorized/getAuthorizedDeliveryTx.js +0 -60
  52. package/lib/utils/authorized/getAuthorizedEvolutionTx.d.ts +0 -1
  53. package/lib/utils/authorized/getAuthorizedEvolutionTx.js +0 -63
  54. package/lib/utils/authorized/getAuthorizedLastEvolutionTx.d.ts +0 -1
  55. package/lib/utils/authorized/getAuthorizedLastEvolutionTx.js +0 -62
  56. package/lib/utils/authorized/getAuthorizedNewAuctionTx.d.ts +0 -1
  57. package/lib/utils/authorized/getAuthorizedNewAuctionTx.js +0 -61
  58. package/lib/utils/authorized/getAuthorizedNewCoveredCallVaultTx.d.ts +0 -1
  59. package/lib/utils/authorized/getAuthorizedNewCoveredCallVaultTx.js +0 -77
  60. package/lib/utils/authorized/getAuthorizedRemoveAuthorizedUserTx.d.ts +0 -1
  61. package/lib/utils/authorized/getAuthorizedRemoveAuthorizedUserTx.js +0 -60
  62. package/lib/utils/authorized/getAuthorizedRemoveCoveredCallVaultAuthorizedUserTx.d.ts +0 -1
  63. package/lib/utils/authorized/getAuthorizedRemoveCoveredCallVaultAuthorizedUserTx.js +0 -60
  64. package/lib/utils/authorized/getAuthorizedSettleTx.d.ts +0 -1
  65. package/lib/utils/authorized/getAuthorizedSettleTx.js +0 -61
  66. package/lib/utils/authorized/getAuthorizedUpdateNextVaultConfigTx.d.ts +0 -1
  67. package/lib/utils/authorized/getAuthorizedUpdateNextVaultConfigTx.js +0 -65
  68. package/lib/utils/coveredCall/createPriceOracle.d.ts +0 -1
  69. package/lib/utils/coveredCall/createPriceOracle.js +0 -92
  70. package/lib/utils/coveredCall/createTimeOracle.d.ts +0 -1
  71. package/lib/utils/coveredCall/createTimeOracle.js +0 -91
  72. package/lib/utils/coveredCall/getAddCoveredCallVaultAuthorizedUserTx.d.ts +0 -1
  73. package/lib/utils/coveredCall/getAddCoveredCallVaultAuthorizedUserTx.js +0 -61
  74. package/lib/utils/coveredCall/getClaimAllTx.d.ts +0 -1
  75. package/lib/utils/coveredCall/getClaimAllTx.js +0 -59
  76. package/lib/utils/coveredCall/getClaimTx.d.ts +0 -1
  77. package/lib/utils/coveredCall/getClaimTx.js +0 -59
  78. package/lib/utils/coveredCall/getDeliveryTx.d.ts +0 -1
  79. package/lib/utils/coveredCall/getDeliveryTx.js +0 -61
  80. package/lib/utils/coveredCall/getDepositTx.d.ts +0 -1
  81. package/lib/utils/coveredCall/getDepositTx.js +0 -65
  82. package/lib/utils/coveredCall/getEvolutionTx.d.ts +0 -1
  83. package/lib/utils/coveredCall/getEvolutionTx.js +0 -64
  84. package/lib/utils/coveredCall/getLastEvolutionTx.d.ts +0 -1
  85. package/lib/utils/coveredCall/getLastEvolutionTx.js +0 -63
  86. package/lib/utils/coveredCall/getMakerClaimAllTx.d.ts +0 -1
  87. package/lib/utils/coveredCall/getMakerClaimAllTx.js +0 -59
  88. package/lib/utils/coveredCall/getMakerClaimTx.d.ts +0 -1
  89. package/lib/utils/coveredCall/getMakerClaimTx.js +0 -59
  90. package/lib/utils/coveredCall/getNewAuctionTx.d.ts +0 -1
  91. package/lib/utils/coveredCall/getNewAuctionTx.js +0 -66
  92. package/lib/utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.d.ts +0 -1
  93. package/lib/utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.js +0 -64
  94. package/lib/utils/coveredCall/getNewBidTx.d.ts +0 -1
  95. package/lib/utils/coveredCall/getNewBidTx.js +0 -62
  96. package/lib/utils/coveredCall/getNewCoveredCallVaultTx.d.ts +0 -1
  97. package/lib/utils/coveredCall/getNewCoveredCallVaultTx.js +0 -77
  98. package/lib/utils/coveredCall/getNewManagerTx.d.ts +0 -1
  99. package/lib/utils/coveredCall/getNewManagerTx.js +0 -59
  100. package/lib/utils/coveredCall/getRefundTx.d.ts +0 -1
  101. package/lib/utils/coveredCall/getRefundTx.js +0 -59
  102. package/lib/utils/coveredCall/getRemoveBidTx.d.ts +0 -1
  103. package/lib/utils/coveredCall/getRemoveBidTx.js +0 -60
  104. package/lib/utils/coveredCall/getRemoveCoveredCallVaultAuthorizedUserTx.d.ts +0 -1
  105. package/lib/utils/coveredCall/getRemoveCoveredCallVaultAuthorizedUserTx.js +0 -61
  106. package/lib/utils/coveredCall/getRemoveManagerTx.d.ts +0 -1
  107. package/lib/utils/coveredCall/getRemoveManagerTx.js +0 -58
  108. package/lib/utils/coveredCall/getRollOverTx.d.ts +0 -1
  109. package/lib/utils/coveredCall/getRollOverTx.js +0 -60
  110. package/lib/utils/coveredCall/getSettleTx.d.ts +0 -1
  111. package/lib/utils/coveredCall/getSettleTx.js +0 -62
  112. package/lib/utils/coveredCall/getSettleWithRollOverTx.d.ts +0 -1
  113. package/lib/utils/coveredCall/getSettleWithRollOverTx.js +0 -62
  114. package/lib/utils/coveredCall/getSubscribeTx.d.ts +0 -1
  115. package/lib/utils/coveredCall/getSubscribeTx.js +0 -60
  116. package/lib/utils/coveredCall/getUnsubscribeTx.d.ts +0 -1
  117. package/lib/utils/coveredCall/getUnsubscribeTx.js +0 -63
  118. package/lib/utils/coveredCall/getUpdateNextVaultConfigTx.d.ts +0 -1
  119. package/lib/utils/coveredCall/getUpdateNextVaultConfigTx.js +0 -66
  120. package/lib/utils/coveredCall/getUpdatePayoffConfigTx.d.ts +0 -1
  121. package/lib/utils/coveredCall/getUpdatePayoffConfigTx.js +0 -62
  122. package/lib/utils/coveredCall/getWithdrawTx.d.ts +0 -1
  123. package/lib/utils/coveredCall/getWithdrawTx.js +0 -60
  124. package/lib/utils/fetchData.d.ts +0 -83
  125. package/lib/utils/fetchData.js +0 -206
  126. package/lib/utils/getCreateTokenRegistryTx.d.ts +0 -1
  127. package/lib/utils/getCreateTokenRegistryTx.js +0 -59
  128. package/lib/utils/getMakersShares.d.ts +0 -7
  129. package/lib/utils/getMakersShares.js +0 -148
  130. package/lib/utils/getMintTx.d.ts +0 -1
  131. package/lib/utils/getMintTx.js +0 -62
  132. package/lib/utils/getNewOracleTx.d.ts +0 -1
  133. package/lib/utils/getNewOracleTx.js +0 -59
  134. package/lib/utils/getNewTimeOracleTx.d.ts +0 -1
  135. package/lib/utils/getNewTimeOracleTx.js +0 -56
  136. package/lib/utils/getTypeArgumentFromToken.d.ts +0 -1
  137. package/lib/utils/getTypeArgumentFromToken.js +0 -71
  138. package/lib/utils/getUpdateOracleTx.d.ts +0 -1
  139. package/lib/utils/getUpdateOracleTx.js +0 -64
  140. package/lib/utils/getUpdateTimeOracleTx.d.ts +0 -1
  141. package/lib/utils/getUpdateTimeOracleTx.js +0 -60
  142. package/lib/utils/getUsersShares.d.ts +0 -8
  143. package/lib/utils/getUsersShares.js +0 -147
  144. package/lib/utils/getVaultData.d.ts +0 -3
  145. package/lib/utils/getVaultData.js +0 -262
  146. package/lib/utils/getVaultIndexInRegistry.d.ts +0 -1
  147. package/lib/utils/getVaultIndexInRegistry.js +0 -61
  148. package/lib/utils/isObjAvailable.d.ts +0 -0
  149. package/lib/utils/isObjAvailable.js +0 -14
  150. package/lib/utils/loadUsersDepositData.d.ts +0 -8
  151. package/lib/utils/loadUsersDepositData.js +0 -157
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.getRemoveManagerTx = void 0;
40
- function getRemoveManagerTx(packageId, managerCap) {
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: 'remove_manager',
48
- typeArguments: [],
49
- arguments: [
50
- managerCap,
51
- ],
52
- gasBudget: 1000,
53
- };
54
- return [2 /*return*/, tx];
55
- });
56
- });
57
- }
58
- exports.getRemoveManagerTx = getRemoveManagerTx;
@@ -1 +0,0 @@
1
- export declare function getRollOverTx(packageId: string, registry: string, typeArgument: string, managerCap: string, index: 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 (_) 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.getRollOverTx = void 0;
40
- function getRollOverTx(packageId, registry, typeArgument, managerCap, 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: 'roll_over',
48
- typeArguments: [typeArgument],
49
- arguments: [
50
- managerCap,
51
- registry,
52
- index,
53
- ],
54
- gasBudget: 10000,
55
- };
56
- return [2 /*return*/, tx];
57
- });
58
- });
59
- }
60
- exports.getRollOverTx = getRollOverTx;
@@ -1 +0,0 @@
1
- export declare function getSettleTx(packageId: string, registry: string, typeArgument: string, managerCap: string, index: string, priceOracle: string, timeOracle: 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 (_) 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.getSettleTx = void 0;
40
- function getSettleTx(packageId, registry, typeArgument, managerCap, index, priceOracle, timeOracle) {
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: 'settle',
48
- typeArguments: [typeArgument],
49
- arguments: [
50
- managerCap,
51
- registry,
52
- index,
53
- priceOracle,
54
- timeOracle,
55
- ],
56
- gasBudget: 10000,
57
- };
58
- return [2 /*return*/, tx];
59
- });
60
- });
61
- }
62
- exports.getSettleTx = getSettleTx;
@@ -1 +0,0 @@
1
- export declare function getSettleWithRollOverTx(packageId: string, registry: string, typeArgument: string, managerCap: string, index: string, priceOracle: string, timeOracle: 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 (_) 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.getSettleWithRollOverTx = void 0;
40
- function getSettleWithRollOverTx(packageId, registry, typeArgument, managerCap, index, priceOracle, timeOracle) {
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: 'settle_with_roll_over',
48
- typeArguments: [typeArgument],
49
- arguments: [
50
- managerCap,
51
- registry,
52
- index,
53
- priceOracle,
54
- timeOracle,
55
- ],
56
- gasBudget: 10000,
57
- };
58
- return [2 /*return*/, tx];
59
- });
60
- });
61
- }
62
- exports.getSettleWithRollOverTx = getSettleWithRollOverTx;
@@ -1 +0,0 @@
1
- export declare function getSubscribeTx(packageId: string, registry: string, typeArgument: string, index: 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 (_) 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(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: 10000,
55
- };
56
- return [2 /*return*/, tx];
57
- });
58
- });
59
- }
60
- exports.getSubscribeTx = getSubscribeTx;
@@ -1 +0,0 @@
1
- export declare function getUnsubscribeTx(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 (_) 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(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: 10000,
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 getUpdateNextVaultConfigTx(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 (_) 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(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: 1000,
61
- };
62
- return [2 /*return*/, tx];
63
- });
64
- });
65
- }
66
- exports.getUpdateNextVaultConfigTx = getUpdateNextVaultConfigTx;
@@ -1 +0,0 @@
1
- export declare function getUpdatePayoffConfigTx(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 (_) 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(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: 1000,
57
- };
58
- return [2 /*return*/, tx];
59
- });
60
- });
61
- }
62
- exports.getUpdatePayoffConfigTx = getUpdatePayoffConfigTx;
@@ -1 +0,0 @@
1
- export declare function getWithdrawTx(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 (_) 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(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: 1000,
55
- };
56
- return [2 /*return*/, tx];
57
- });
58
- });
59
- }
60
- exports.getWithdrawTx = getWithdrawTx;