@typus/typus-sdk 1.0.2 → 1.0.3

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 (116) hide show
  1. package/lib/config.json +20 -0
  2. package/lib/constants.d.ts +26 -0
  3. package/lib/constants.js +37 -0
  4. package/lib/scripts/getSubVault.d.ts +0 -0
  5. package/lib/scripts/getSubVault.js +6 -0
  6. package/lib/scripts/sui.d.ts +1 -0
  7. package/lib/scripts/sui.js +174 -0
  8. package/lib/test/authorized/testAuthorizedNewPortfolioVault.d.ts +1 -0
  9. package/lib/test/authorized/testAuthorizedNewPortfolioVault.js +82 -0
  10. package/lib/test/authorized/testAuthorizedUpdateUpcomingVaultConfig.d.ts +1 -0
  11. package/lib/test/authorized/testAuthorizedUpdateUpcomingVaultConfig.js +71 -0
  12. package/lib/test/authorized/testAuthorizedUpdateWarmupVaultConfig.d.ts +1 -0
  13. package/lib/test/authorized/testAuthorizedUpdateWarmupVaultConfig.js +68 -0
  14. package/lib/test/getBidData.d.ts +1 -0
  15. package/lib/test/getBidData.js +55 -0
  16. package/lib/test/getVaultData.d.ts +1 -0
  17. package/lib/test/getVaultData.js +55 -0
  18. package/lib/test/getWhiteListFromRegistry.d.ts +1 -0
  19. package/lib/test/getWhiteListFromRegistry.js +55 -0
  20. package/lib/test/helper/getAuctionMaxSize.d.ts +1 -0
  21. package/lib/test/helper/getAuctionMaxSize.js +76 -0
  22. package/lib/test/helper/getUserStatus.d.ts +1 -0
  23. package/lib/test/helper/getUserStatus.js +83 -0
  24. package/lib/test/testCrypto.d.ts +1 -0
  25. package/lib/test/testCrypto.js +54 -0
  26. package/lib/test/testMint.d.ts +1 -0
  27. package/lib/test/testMint.js +137 -0
  28. package/lib/test/testSubscribeEvent.d.ts +1 -0
  29. package/lib/test/testSubscribeEvent.js +97 -0
  30. package/lib/test/user/testClaim.d.ts +1 -0
  31. package/lib/test/user/testClaim.js +68 -0
  32. package/lib/test/user/testCompound.d.ts +1 -0
  33. package/lib/test/user/testCompound.js +68 -0
  34. package/lib/test/user/testDeposit.d.ts +1 -0
  35. package/lib/test/user/testDeposit.js +79 -0
  36. package/lib/test/user/testHarvest.d.ts +1 -0
  37. package/lib/test/user/testHarvest.js +68 -0
  38. package/lib/test/user/testNewBid.d.ts +1 -0
  39. package/lib/test/user/testNewBid.js +77 -0
  40. package/lib/test/user/testUnsubscribe.d.ts +1 -0
  41. package/lib/test/user/testUnsubscribe.js +69 -0
  42. package/lib/test/user/testWithdraw.d.ts +1 -0
  43. package/lib/test/user/testWithdraw.js +70 -0
  44. package/lib/utils/auction/getBid.d.ts +3 -0
  45. package/lib/utils/auction/getBid.js +77 -0
  46. package/lib/utils/auction/sealedAuction.d.ts +33 -0
  47. package/lib/utils/auction/sealedAuction.js +64 -0
  48. package/lib/utils/fetchData.d.ts +96 -0
  49. package/lib/utils/fetchData.js +34 -0
  50. package/lib/utils/getMintTx.d.ts +1 -0
  51. package/lib/utils/getMintTx.js +62 -0
  52. package/lib/utils/getTypeArgumentFromToken.d.ts +2 -0
  53. package/lib/utils/getTypeArgumentFromToken.js +68 -0
  54. package/lib/utils/getVaultData.d.ts +5 -0
  55. package/lib/utils/getVaultData.js +242 -0
  56. package/lib/utils/getWhiteListFromRegistry.d.ts +2 -0
  57. package/lib/utils/getWhiteListFromRegistry.js +70 -0
  58. package/lib/utils/portfolio/authorized/getAuthorizedAddPortfolioVaultAuthorizedUserTx.d.ts +4 -0
  59. package/lib/utils/portfolio/authorized/getAuthorizedAddPortfolioVaultAuthorizedUserTx.js +63 -0
  60. package/lib/utils/portfolio/authorized/getAuthorizedDeliveryTx.d.ts +1 -0
  61. package/lib/utils/portfolio/authorized/getAuthorizedDeliveryTx.js +61 -0
  62. package/lib/utils/portfolio/authorized/getAuthorizedNewPortfolioVaultTx.d.ts +38 -0
  63. package/lib/utils/portfolio/authorized/getAuthorizedNewPortfolioVaultTx.js +116 -0
  64. package/lib/utils/portfolio/authorized/getAuthorizedRemovePortfolioVaultAuthorizedUserTx.d.ts +4 -0
  65. package/lib/utils/portfolio/authorized/getAuthorizedRemovePortfolioVaultAuthorizedUserTx.js +63 -0
  66. package/lib/utils/portfolio/authorized/getAuthorizedUpdateCapacityTx.d.ts +1 -0
  67. package/lib/utils/portfolio/authorized/getAuthorizedUpdateCapacityTx.js +60 -0
  68. package/lib/utils/portfolio/authorized/getAuthorizedUpdateUpcomingVaultConfigTx.d.ts +4 -0
  69. package/lib/utils/portfolio/authorized/getAuthorizedUpdateUpcomingVaultConfigTx.js +70 -0
  70. package/lib/utils/portfolio/authorized/getAuthorizedUpdateWarmupVaultConfigTx.d.ts +1 -0
  71. package/lib/utils/portfolio/authorized/getAuthorizedUpdateWarmupVaultConfigTx.js +64 -0
  72. package/lib/utils/portfolio/helper/getAuctionMaxSize.d.ts +8 -0
  73. package/lib/utils/portfolio/helper/getAuctionMaxSize.js +66 -0
  74. package/lib/utils/portfolio/helper/getUserStatus.d.ts +29 -0
  75. package/lib/utils/portfolio/helper/getUserStatus.js +102 -0
  76. package/lib/utils/portfolio/manager/getAddAuthorizedUserTx.d.ts +8 -0
  77. package/lib/utils/portfolio/manager/getAddAuthorizedUserTx.js +67 -0
  78. package/lib/utils/portfolio/manager/getAddPortfolioVaultAuthorizedUserTx.d.ts +10 -0
  79. package/lib/utils/portfolio/manager/getAddPortfolioVaultAuthorizedUserTx.js +70 -0
  80. package/lib/utils/portfolio/manager/getCloseAuctionTx.d.ts +1 -0
  81. package/lib/utils/portfolio/manager/getCloseAuctionTx.js +62 -0
  82. package/lib/utils/portfolio/manager/getCloseVaultTx.d.ts +1 -0
  83. package/lib/utils/portfolio/manager/getCloseVaultTx.js +60 -0
  84. package/lib/utils/portfolio/manager/getDeliveryTx.d.ts +1 -0
  85. package/lib/utils/portfolio/manager/getDeliveryTx.js +62 -0
  86. package/lib/utils/portfolio/manager/getEvolutionTx.d.ts +15 -0
  87. package/lib/utils/portfolio/manager/getEvolutionTx.js +78 -0
  88. package/lib/utils/portfolio/manager/getNewManagerTx.d.ts +8 -0
  89. package/lib/utils/portfolio/manager/getNewManagerTx.js +66 -0
  90. package/lib/utils/portfolio/manager/getNewPortfolioVaultTx.d.ts +38 -0
  91. package/lib/utils/portfolio/manager/getNewPortfolioVaultTx.js +116 -0
  92. package/lib/utils/portfolio/manager/getRemoveAuthorizedUserTx.d.ts +8 -0
  93. package/lib/utils/portfolio/manager/getRemoveAuthorizedUserTx.js +67 -0
  94. package/lib/utils/portfolio/manager/getRemoveManagerTx.d.ts +6 -0
  95. package/lib/utils/portfolio/manager/getRemoveManagerTx.js +63 -0
  96. package/lib/utils/portfolio/manager/getRemovePortfolioVaultAuthorizedUserTx.d.ts +10 -0
  97. package/lib/utils/portfolio/manager/getRemovePortfolioVaultAuthorizedUserTx.js +70 -0
  98. package/lib/utils/portfolio/manager/getUpdateCapacityTx.d.ts +1 -0
  99. package/lib/utils/portfolio/manager/getUpdateCapacityTx.js +61 -0
  100. package/lib/utils/portfolio/user/getClaimAndHarvestTx.d.ts +9 -0
  101. package/lib/utils/portfolio/user/getClaimAndHarvestTx.js +67 -0
  102. package/lib/utils/portfolio/user/getClaimTx.d.ts +9 -0
  103. package/lib/utils/portfolio/user/getClaimTx.js +67 -0
  104. package/lib/utils/portfolio/user/getCompoundTx.d.ts +9 -0
  105. package/lib/utils/portfolio/user/getCompoundTx.js +67 -0
  106. package/lib/utils/portfolio/user/getDepositTx.d.ts +11 -0
  107. package/lib/utils/portfolio/user/getDepositTx.js +71 -0
  108. package/lib/utils/portfolio/user/getHarvestTx.d.ts +9 -0
  109. package/lib/utils/portfolio/user/getHarvestTx.js +67 -0
  110. package/lib/utils/portfolio/user/getNewBidTx.d.ts +13 -0
  111. package/lib/utils/portfolio/user/getNewBidTx.js +75 -0
  112. package/lib/utils/portfolio/user/getUnsubscribeTx.d.ts +10 -0
  113. package/lib/utils/portfolio/user/getUnsubscribeTx.js +69 -0
  114. package/lib/utils/portfolio/user/getWithdrawTx.d.ts +10 -0
  115. package/lib/utils/portfolio/user/getWithdrawTx.js +69 -0
  116. package/package.json +1 -1
@@ -0,0 +1,38 @@
1
+ /**
2
+ manager_cap: &ManagerCap,
3
+ registry: &mut Registry,
4
+ time_oracle: &Time,
5
+ option_type: u64,
6
+ period: u8,
7
+ activation_ts_ms: u64,
8
+ expiration_ts_ms: u64,
9
+ d_token_decimal: u64,
10
+ b_token_decimal: u64,
11
+ o_token_decimal: u64,
12
+ capacity: u64,
13
+ strike_pct: vector<u64>,
14
+ weight: vector<u64>,
15
+ is_buyer: vector<bool>,
16
+ strike_increment: u64,
17
+ lot_size: u64,
18
+ decay_speed: u64,
19
+ initial_price: u64,
20
+ final_price: u64,
21
+ auction_duration_in_ms: u64,
22
+ leverage: u64,
23
+ whitelist: vector<address>,
24
+ * @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
25
+ */
26
+ export declare function getNewPortfolioVaultTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], managerCap: string, timeOracle: string, optionType: string, // u64
27
+ period: string, // u8
28
+ activationTsMs: string, // u64
29
+ expirationTsMs: string, // u64
30
+ dTokenDecimal: string, // u64
31
+ bTokenDecimal: string, // u64
32
+ oTokenDecimal: string, // u64
33
+ capacity: string, // u64
34
+ strikePct: string[], // vector<u64>
35
+ weight: string[], // vector<u64>
36
+ isBuyer: boolean[], // vector<bool>
37
+ strikeIncrement: string, // u64
38
+ lotSize: string, decaySpeed: string, initialPrice: string, finalPrice: string, auctionDurationInMs: string, whitelist: string[], leverage: string): Promise<any>;
@@ -0,0 +1,116 @@
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.getNewPortfolioVaultTx = void 0;
40
+ /**
41
+ manager_cap: &ManagerCap,
42
+ registry: &mut Registry,
43
+ time_oracle: &Time,
44
+ option_type: u64,
45
+ period: u8,
46
+ activation_ts_ms: u64,
47
+ expiration_ts_ms: u64,
48
+ d_token_decimal: u64,
49
+ b_token_decimal: u64,
50
+ o_token_decimal: u64,
51
+ capacity: u64,
52
+ strike_pct: vector<u64>,
53
+ weight: vector<u64>,
54
+ is_buyer: vector<bool>,
55
+ strike_increment: u64,
56
+ lot_size: u64,
57
+ decay_speed: u64,
58
+ initial_price: u64,
59
+ final_price: u64,
60
+ auction_duration_in_ms: u64,
61
+ leverage: u64,
62
+ whitelist: vector<address>,
63
+ * @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
64
+ */
65
+ function getNewPortfolioVaultTx(gasBudget, packageId, registry, typeArguments, managerCap, timeOracle, optionType, // u64
66
+ period, // u8
67
+ activationTsMs, // u64
68
+ expirationTsMs, // u64
69
+ dTokenDecimal, // u64
70
+ bTokenDecimal, // u64
71
+ oTokenDecimal, // u64
72
+ capacity, // u64
73
+ strikePct, // vector<u64>
74
+ weight, // vector<u64>
75
+ isBuyer, // vector<bool>
76
+ strikeIncrement, // u64
77
+ lotSize, decaySpeed, initialPrice, finalPrice, auctionDurationInMs, whitelist, leverage) {
78
+ return __awaiter(this, void 0, void 0, function () {
79
+ var tx;
80
+ return __generator(this, function (_a) {
81
+ tx = {
82
+ packageObjectId: packageId,
83
+ module: 'portfolio',
84
+ function: 'new_portfolio_vault',
85
+ typeArguments: typeArguments,
86
+ arguments: [
87
+ managerCap,
88
+ registry,
89
+ timeOracle,
90
+ optionType,
91
+ period,
92
+ activationTsMs,
93
+ expirationTsMs,
94
+ dTokenDecimal,
95
+ bTokenDecimal,
96
+ oTokenDecimal,
97
+ capacity,
98
+ strikePct,
99
+ weight,
100
+ isBuyer,
101
+ strikeIncrement,
102
+ lotSize,
103
+ decaySpeed,
104
+ initialPrice,
105
+ finalPrice,
106
+ auctionDurationInMs,
107
+ leverage,
108
+ whitelist,
109
+ ],
110
+ gasBudget: gasBudget,
111
+ };
112
+ return [2 /*return*/, tx];
113
+ });
114
+ });
115
+ }
116
+ exports.getNewPortfolioVaultTx = getNewPortfolioVaultTx;
@@ -0,0 +1,8 @@
1
+ /**
2
+ public(friend) entry fun remove_authorized_user(
3
+ manager_cap: &ManagerCap,
4
+ registry: &mut Registry,
5
+ user_address: address,
6
+ )
7
+ */
8
+ export declare function getRemoveAuthorizedUserTx(gasBudget: number, packageId: string, managerCap: string, registry: string, address: string): Promise<any>;
@@ -0,0 +1,67 @@
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.getRemoveAuthorizedUserTx = void 0;
40
+ /**
41
+ public(friend) entry fun remove_authorized_user(
42
+ manager_cap: &ManagerCap,
43
+ registry: &mut Registry,
44
+ user_address: address,
45
+ )
46
+ */
47
+ function getRemoveAuthorizedUserTx(gasBudget, packageId, managerCap, registry, address) {
48
+ return __awaiter(this, void 0, void 0, function () {
49
+ var tx;
50
+ return __generator(this, function (_a) {
51
+ tx = {
52
+ packageObjectId: packageId,
53
+ module: 'portfolio',
54
+ function: 'remove_authorized_user',
55
+ typeArguments: [],
56
+ arguments: [
57
+ managerCap,
58
+ registry,
59
+ address,
60
+ ],
61
+ gasBudget: gasBudget,
62
+ };
63
+ return [2 /*return*/, tx];
64
+ });
65
+ });
66
+ }
67
+ exports.getRemoveAuthorizedUserTx = getRemoveAuthorizedUserTx;
@@ -0,0 +1,6 @@
1
+ /**
2
+ public(friend) entry fun remove_manager(
3
+ manager_cap: ManagerCap,
4
+ )
5
+ */
6
+ export declare function getRemoveManagerTx(gasBudget: number, packageId: string, managerCap: string): Promise<any>;
@@ -0,0 +1,63 @@
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.getRemoveManagerTx = void 0;
40
+ /**
41
+ public(friend) entry fun remove_manager(
42
+ manager_cap: ManagerCap,
43
+ )
44
+ */
45
+ function getRemoveManagerTx(gasBudget, packageId, managerCap) {
46
+ return __awaiter(this, void 0, void 0, function () {
47
+ var tx;
48
+ return __generator(this, function (_a) {
49
+ tx = {
50
+ packageObjectId: packageId,
51
+ module: 'portfolio',
52
+ function: 'remove_manager',
53
+ typeArguments: [],
54
+ arguments: [
55
+ managerCap,
56
+ ],
57
+ gasBudget: gasBudget,
58
+ };
59
+ return [2 /*return*/, tx];
60
+ });
61
+ });
62
+ }
63
+ exports.getRemoveManagerTx = getRemoveManagerTx;
@@ -0,0 +1,10 @@
1
+ /**
2
+ public(friend) entry fun remove_portfolio_vault_authorized_user<D_TOKEN, B_TOKEN, O_TOKEN>(
3
+ manager_cap: &ManagerCap,
4
+ registry: &mut Registry,
5
+ index: u64,
6
+ user_address: address,
7
+ )
8
+ * @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
9
+ */
10
+ export declare function getRemovePortfolioVaultAuthorizedUserTx(gasBudget: number, packageId: string, managerCap: string, registry: string, typeArguments: string[], index: string, address: string): Promise<any>;
@@ -0,0 +1,70 @@
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.getRemovePortfolioVaultAuthorizedUserTx = void 0;
40
+ /**
41
+ public(friend) entry fun remove_portfolio_vault_authorized_user<D_TOKEN, B_TOKEN, O_TOKEN>(
42
+ manager_cap: &ManagerCap,
43
+ registry: &mut Registry,
44
+ index: u64,
45
+ user_address: address,
46
+ )
47
+ * @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
48
+ */
49
+ function getRemovePortfolioVaultAuthorizedUserTx(gasBudget, packageId, managerCap, registry, typeArguments, index, address) {
50
+ return __awaiter(this, void 0, void 0, function () {
51
+ var tx;
52
+ return __generator(this, function (_a) {
53
+ tx = {
54
+ packageObjectId: packageId,
55
+ module: 'portfolio',
56
+ function: 'remove_portfolio_vault_authorized_user',
57
+ typeArguments: typeArguments,
58
+ arguments: [
59
+ managerCap,
60
+ registry,
61
+ index,
62
+ address,
63
+ ],
64
+ gasBudget: gasBudget,
65
+ };
66
+ return [2 /*return*/, tx];
67
+ });
68
+ });
69
+ }
70
+ exports.getRemovePortfolioVaultAuthorizedUserTx = getRemovePortfolioVaultAuthorizedUserTx;
@@ -0,0 +1 @@
1
+ export declare function getUpdateCapacityTx(gasBudget: number, packageId: string, managerCap: string, typeArguments: string[], registry: string, index: string, capacity: string): Promise<any>;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.getUpdateCapacityTx = void 0;
40
+ function getUpdateCapacityTx(gasBudget, packageId, managerCap, typeArguments, 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: 'portfolio',
47
+ function: 'update_capacity',
48
+ typeArguments: typeArguments,
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;
@@ -0,0 +1,9 @@
1
+ /**
2
+ public(friend) entry fun claim_and_harvest<D_TOKEN, B_TOKEN, O_TOKEN>(
3
+ registry: &mut Registry,
4
+ index: u64,
5
+ ctx: &mut TxContext
6
+ )
7
+ * @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
8
+ */
9
+ export declare function getClaimAndHarvestTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string): Promise<any>;
@@ -0,0 +1,67 @@
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.getClaimAndHarvestTx = void 0;
40
+ /**
41
+ public(friend) entry fun claim_and_harvest<D_TOKEN, B_TOKEN, O_TOKEN>(
42
+ registry: &mut Registry,
43
+ index: u64,
44
+ ctx: &mut TxContext
45
+ )
46
+ * @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
47
+ */
48
+ function getClaimAndHarvestTx(gasBudget, packageId, registry, typeArguments, index) {
49
+ return __awaiter(this, void 0, void 0, function () {
50
+ var tx;
51
+ return __generator(this, function (_a) {
52
+ tx = {
53
+ packageObjectId: packageId,
54
+ module: 'portfolio',
55
+ function: 'claim_and_harvest',
56
+ typeArguments: typeArguments,
57
+ arguments: [
58
+ registry,
59
+ index,
60
+ ],
61
+ gasBudget: gasBudget,
62
+ };
63
+ return [2 /*return*/, tx];
64
+ });
65
+ });
66
+ }
67
+ exports.getClaimAndHarvestTx = getClaimAndHarvestTx;
@@ -0,0 +1,9 @@
1
+ /**
2
+ public(friend) entry fun claim<D_TOKEN, B_TOKEN, O_TOKEN>(
3
+ registry: &mut Registry,
4
+ index: u64,
5
+ ctx: &mut TxContext
6
+ )
7
+ * @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
8
+ */
9
+ export declare function getClaimTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string): Promise<any>;
@@ -0,0 +1,67 @@
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.getClaimTx = void 0;
40
+ /**
41
+ public(friend) entry fun claim<D_TOKEN, B_TOKEN, O_TOKEN>(
42
+ registry: &mut Registry,
43
+ index: u64,
44
+ ctx: &mut TxContext
45
+ )
46
+ * @param typeArguments [D_TOKEN, B_TOKEN, O_TOKEN]
47
+ */
48
+ function getClaimTx(gasBudget, packageId, registry, typeArguments, index) {
49
+ return __awaiter(this, void 0, void 0, function () {
50
+ var tx;
51
+ return __generator(this, function (_a) {
52
+ tx = {
53
+ packageObjectId: packageId,
54
+ module: 'portfolio',
55
+ function: 'claim',
56
+ typeArguments: typeArguments,
57
+ arguments: [
58
+ registry,
59
+ index,
60
+ ],
61
+ gasBudget: gasBudget,
62
+ };
63
+ return [2 /*return*/, tx];
64
+ });
65
+ });
66
+ }
67
+ exports.getClaimTx = getClaimTx;
@@ -0,0 +1,9 @@
1
+ /**
2
+ public entry fun compound<TOKEN, O_TOKEN>(
3
+ registry: &mut Registry,
4
+ index: u64,
5
+ ctx: &mut TxContext,
6
+ )
7
+ * @param typeArguments [TOKEN, O_TOKEN]
8
+ */
9
+ export declare function getCompoundTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[], index: string): Promise<any>;