@typus/typus-sdk 1.2.68 → 1.2.70

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 (42) hide show
  1. package/lib/config.json +14 -14
  2. package/lib/utils/airdrop/authority-entry.d.ts +22 -0
  3. package/lib/utils/airdrop/authority-entry.js +138 -0
  4. package/lib/utils/airdrop/user-entry.d.ts +10 -0
  5. package/lib/utils/airdrop/user-entry.js +21 -0
  6. package/lib/utils/airdrop/view-functions.d.ts +10 -0
  7. package/lib/utils/airdrop/view-functions.js +72 -0
  8. package/lib/utils/leaderboard/authority-entry.d.ts +22 -0
  9. package/lib/utils/leaderboard/authority-entry.js +91 -0
  10. package/lib/utils/leaderboard/view-function.d.ts +21 -0
  11. package/lib/utils/leaderboard/view-function.js +92 -0
  12. package/lib/utils/nft-staking/user-entry.d.ts +2 -2
  13. package/lib/utils/nft-staking/user-entry.js +25 -8
  14. package/lib/utils/typus-dov-single-v2/mfud-user-entry.d.ts +4 -0
  15. package/lib/utils/typus-dov-single-v2/mfud-user-entry.js +5 -1
  16. package/lib/utils/typus-dov-single-v2/user-entry.d.ts +4 -0
  17. package/lib/utils/typus-dov-single-v2/user-entry.js +10 -2
  18. package/lib/utils/user/view-functions.d.ts +9 -0
  19. package/lib/utils/user/view-functions.js +71 -0
  20. package/package.json +1 -1
  21. package/lib/utils/typus-dov-double/authorized-entry.d.ts +0 -102
  22. package/lib/utils/typus-dov-double/authorized-entry.js +0 -295
  23. package/lib/utils/typus-dov-double/manager-entry.d.ts +0 -219
  24. package/lib/utils/typus-dov-double/manager-entry.js +0 -584
  25. package/lib/utils/typus-dov-double/portfolio-vault.d.ts +0 -68
  26. package/lib/utils/typus-dov-double/portfolio-vault.js +0 -303
  27. package/lib/utils/typus-dov-double/user-entry.d.ts +0 -93
  28. package/lib/utils/typus-dov-double/user-entry.js +0 -280
  29. package/lib/utils/typus-dov-double/view-function.d.ts +0 -11
  30. package/lib/utils/typus-dov-double/view-function.js +0 -213
  31. package/lib/utils/typus-dov-single/db-data.d.ts +0 -19
  32. package/lib/utils/typus-dov-single/db-data.js +0 -226
  33. package/lib/utils/typus-dov-single/portfolio-vault.d.ts +0 -63
  34. package/lib/utils/typus-dov-single/portfolio-vault.js +0 -284
  35. package/lib/utils/typus-dov-single/registry.d.ts +0 -14
  36. package/lib/utils/typus-dov-single/registry.js +0 -126
  37. package/lib/utils/typus-dov-single/user-entry.d.ts +0 -103
  38. package/lib/utils/typus-dov-single/user-entry.js +0 -388
  39. package/lib/utils/typus-dov-single/user-history.d.ts +0 -17
  40. package/lib/utils/typus-dov-single/user-history.js +0 -146
  41. package/lib/utils/typus-dov-single/view-function.d.ts +0 -50
  42. package/lib/utils/typus-dov-single/view-function.js +0 -444
@@ -1,584 +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.getTerminateAuctionTx = exports.getTerminateVaultTx = exports.getNewAuctionTx = exports.getUpdateActiveVaultConfigTx = exports.getCloseTx = exports.getEvolutionTx = exports.getDeliveryTx = exports.getUpdateUpcomingVaultConfigTx = exports.getUpdateWarmupVaultConfigTx = exports.getUpdateCapacityTx = exports.getNewPortfolioVaultTx = exports.getUpdateRestrictActivationTimePeriodTx = exports.getRemovePortfolioVaultAuthorizedUserTx = exports.getAddPortfolioVaultAuthorizedUserTx = exports.getRemoveAuthorizedUserTx = exports.getAddAuthorizedUserTx = exports.getRemoveManagerTx = exports.getNewManagerTx = void 0;
40
- var transactions_1 = require("@mysten/sui.js/transactions");
41
- /**
42
- public(friend) entry fun new_manager(
43
- _manager_cap: &ManagerCap,
44
- users: vector<address>,
45
- ctx: &mut TxContext
46
- )
47
- */
48
- function getNewManagerTx(gasBudget, packageId, managerCap, users) {
49
- return __awaiter(this, void 0, void 0, function () {
50
- var tx;
51
- return __generator(this, function (_a) {
52
- tx = new transactions_1.TransactionBlock();
53
- tx.moveCall({
54
- target: "".concat(packageId, "::typus_dov_double::new_manager"),
55
- arguments: [tx.pure(managerCap), tx.pure(users)],
56
- });
57
- tx.setGasBudget(gasBudget);
58
- return [2 /*return*/, tx];
59
- });
60
- });
61
- }
62
- exports.getNewManagerTx = getNewManagerTx;
63
- /**
64
- public(friend) entry fun remove_manager(
65
- _manager_cap: &ManagerCap,
66
- users: vector<address>,
67
- ctx: &mut TxContext
68
- )
69
- */
70
- function getRemoveManagerTx(gasBudget, packageId, managerCap) {
71
- return __awaiter(this, void 0, void 0, function () {
72
- var tx;
73
- return __generator(this, function (_a) {
74
- tx = new transactions_1.TransactionBlock();
75
- tx.moveCall({
76
- target: "".concat(packageId, "::typus_dov_double::remove_manager"),
77
- arguments: [tx.pure(managerCap)],
78
- });
79
- tx.setGasBudget(gasBudget);
80
- return [2 /*return*/, tx];
81
- });
82
- });
83
- }
84
- exports.getRemoveManagerTx = getRemoveManagerTx;
85
- /**
86
- public(friend) entry fun add_authorized_user(
87
- manager_cap: &ManagerCap,
88
- registry: &mut Registry,
89
- users: vector<address>,
90
- ctx: &TxContext,
91
- )
92
- */
93
- function getAddAuthorizedUserTx(gasBudget, packageId, managerCap, registry, users) {
94
- return __awaiter(this, void 0, void 0, function () {
95
- var tx;
96
- return __generator(this, function (_a) {
97
- tx = new transactions_1.TransactionBlock();
98
- tx.moveCall({
99
- target: "".concat(packageId, "::typus_dov_double::add_authorized_user"),
100
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(users)],
101
- });
102
- tx.setGasBudget(gasBudget);
103
- return [2 /*return*/, tx];
104
- });
105
- });
106
- }
107
- exports.getAddAuthorizedUserTx = getAddAuthorizedUserTx;
108
- /**
109
- public(friend) entry fun remove_authorized_user(
110
- manager_cap: &ManagerCap,
111
- registry: &mut Registry,
112
- users: vector<address>,
113
- ctx: &TxContext,
114
- )
115
- */
116
- function getRemoveAuthorizedUserTx(gasBudget, packageId, managerCap, registry, users) {
117
- return __awaiter(this, void 0, void 0, function () {
118
- var tx;
119
- return __generator(this, function (_a) {
120
- tx = new transactions_1.TransactionBlock();
121
- tx.moveCall({
122
- target: "".concat(packageId, "::typus_dov_double::remove_authorized_user"),
123
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(users)],
124
- });
125
- tx.setGasBudget(gasBudget);
126
- return [2 /*return*/, tx];
127
- });
128
- });
129
- }
130
- exports.getRemoveAuthorizedUserTx = getRemoveAuthorizedUserTx;
131
- /**
132
- public(friend) entry fun add_portfolio_vault_authorized_user<O_TOKEN, U_TOKEN, B_TOKEN>(
133
- manager_cap: &ManagerCap,
134
- registry: &mut Registry,
135
- index: u64,
136
- users: vector<address>,
137
- ctx: &TxContext,
138
- )
139
- */
140
- function getAddPortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArguments, managerCap, registry, index, users) {
141
- return __awaiter(this, void 0, void 0, function () {
142
- var tx;
143
- return __generator(this, function (_a) {
144
- tx = new transactions_1.TransactionBlock();
145
- tx.moveCall({
146
- target: "".concat(packageId, "::typus_dov_double::add_portfolio_vault_authorized_user"),
147
- typeArguments: typeArguments,
148
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(users)],
149
- });
150
- tx.setGasBudget(gasBudget);
151
- return [2 /*return*/, tx];
152
- });
153
- });
154
- }
155
- exports.getAddPortfolioVaultAuthorizedUserTx = getAddPortfolioVaultAuthorizedUserTx;
156
- /**
157
- public(friend) entry fun remove_portfolio_vault_authorized_user<O_TOKEN, U_TOKEN, B_TOKEN>(
158
- manager_cap: &ManagerCap,
159
- registry: &mut Registry,
160
- index: u64,
161
- users: vector<address>,
162
- ctx: &TxContext,
163
- )
164
- */
165
- function getRemovePortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArguments, managerCap, registry, index, users) {
166
- return __awaiter(this, void 0, void 0, function () {
167
- var tx;
168
- return __generator(this, function (_a) {
169
- tx = new transactions_1.TransactionBlock();
170
- tx.moveCall({
171
- target: "".concat(packageId, "::typus_dov_double::remove_portfolio_vault_authorized_user"),
172
- typeArguments: typeArguments,
173
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(users)],
174
- });
175
- tx.setGasBudget(gasBudget);
176
- return [2 /*return*/, tx];
177
- });
178
- });
179
- }
180
- exports.getRemovePortfolioVaultAuthorizedUserTx = getRemovePortfolioVaultAuthorizedUserTx;
181
- /**
182
- public(friend) entry fun update_restrict_activation_time_period(
183
- _manager_cap: &ManagerCap,
184
- registry: &mut Registry,
185
- from_ts_ms: u64,
186
- to_ts_ms: u64,
187
- ctx: &TxContext,
188
- )
189
- */
190
- function getUpdateRestrictActivationTimePeriodTx(gasBudget, packageId, managerCap, registry, from_ts_ms, to_ts_ms) {
191
- return __awaiter(this, void 0, void 0, function () {
192
- var tx;
193
- return __generator(this, function (_a) {
194
- tx = new transactions_1.TransactionBlock();
195
- tx.moveCall({
196
- target: "".concat(packageId, "::typus_dov_double::update_restrict_activation_time_period"),
197
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(from_ts_ms), tx.pure(to_ts_ms)],
198
- });
199
- tx.setGasBudget(gasBudget);
200
- return [2 /*return*/, tx];
201
- });
202
- });
203
- }
204
- exports.getUpdateRestrictActivationTimePeriodTx = getUpdateRestrictActivationTimePeriodTx;
205
- /**
206
- public(friend) entry fun new_portfolio_vault<O_TOKEN, U_TOKEN, B_TOKEN>(
207
- manager_cap: &ManagerCap,
208
- registry: &mut Registry,
209
- price_oracle: &Oracle<O_TOKEN>,
210
- clock: &Clock,
211
- strategy_name: String,
212
- period: u8,
213
- activation_ts_ms: u64,
214
- expiration_ts_ms: u64,
215
- o_token_decimal: u64,
216
- u_token_decimal: u64,
217
- b_token_decimal: u64,
218
- capacity: u64,
219
- call_strike_pct: vector<u64>,
220
- call_weight: vector<u64>,
221
- call_is_buyer: vector<bool>,
222
- put_strike_pct: vector<u64>,
223
- put_weight: vector<u64>,
224
- put_is_buyer: vector<bool>,
225
- strike_increment: u64,
226
- lot_size: u64,
227
- decay_speed: u64,
228
- initial_price: u64,
229
- final_price: u64,
230
- auction_duration_in_ms: u64,
231
- leverage: u64,
232
- has_next: bool,
233
- whitelist: vector<address>,
234
- ctx: &mut TxContext
235
- )
236
- */
237
- function getNewPortfolioVaultTx(gasBudget, packageId, typeArguments, managerCap, registry, priceOracle, strategy_name, period, activation_ts_ms, expiration_ts_ms, o_token_decimal, u_token_decimal, b_token_decimal, capacity, call_strike_pct, call_weight, call_is_buyer, put_strike_pct, put_weight, put_is_buyer, strike_increment, lot_size, decay_speed, initial_price, final_price, auction_duration_in_ms, leverage, has_next, whitelist) {
238
- return __awaiter(this, void 0, void 0, function () {
239
- var tx;
240
- return __generator(this, function (_a) {
241
- tx = new transactions_1.TransactionBlock();
242
- tx.moveCall({
243
- target: "".concat(packageId, "::typus_dov_double::new_portfolio_vault"),
244
- typeArguments: typeArguments,
245
- arguments: [
246
- tx.pure(managerCap),
247
- tx.pure(registry),
248
- tx.pure(priceOracle),
249
- tx.pure("0x6"),
250
- tx.pure(strategy_name),
251
- tx.pure(period),
252
- tx.pure(activation_ts_ms),
253
- tx.pure(expiration_ts_ms),
254
- tx.pure(o_token_decimal),
255
- tx.pure(u_token_decimal),
256
- tx.pure(b_token_decimal),
257
- tx.pure(capacity),
258
- tx.pure(call_strike_pct),
259
- tx.pure(call_weight),
260
- tx.pure(call_is_buyer),
261
- tx.pure(put_strike_pct),
262
- tx.pure(put_weight),
263
- tx.pure(put_is_buyer),
264
- tx.pure(strike_increment),
265
- tx.pure(lot_size),
266
- tx.pure(decay_speed),
267
- tx.pure(initial_price),
268
- tx.pure(final_price),
269
- tx.pure(auction_duration_in_ms),
270
- tx.pure(leverage),
271
- tx.pure(has_next),
272
- tx.pure(whitelist),
273
- ],
274
- });
275
- tx.setGasBudget(gasBudget);
276
- return [2 /*return*/, tx];
277
- });
278
- });
279
- }
280
- exports.getNewPortfolioVaultTx = getNewPortfolioVaultTx;
281
- /**
282
- public(friend) entry fun update_capacity<O_TOKEN, U_TOKEN, B_TOKEN>(
283
- _manager_cap: &ManagerCap,
284
- registry: &mut Registry,
285
- index: u64,
286
- capacity: u64,
287
- ctx: &TxContext,
288
- )
289
- */
290
- function getUpdateCapacityTx(gasBudget, packageId, typeArguments, managerCap, registry, index, capacity) {
291
- return __awaiter(this, void 0, void 0, function () {
292
- var tx;
293
- return __generator(this, function (_a) {
294
- tx = new transactions_1.TransactionBlock();
295
- tx.moveCall({
296
- target: "".concat(packageId, "::typus_dov_double::update_capacity"),
297
- typeArguments: typeArguments,
298
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(capacity)],
299
- });
300
- tx.setGasBudget(gasBudget);
301
- return [2 /*return*/, tx];
302
- });
303
- });
304
- }
305
- exports.getUpdateCapacityTx = getUpdateCapacityTx;
306
- /**
307
- public(friend) entry fun update_warmup_vault_config<O_TOKEN, U_TOKEN, B_TOKEN>(
308
- _manager_cap: &ManagerCap,
309
- registry: &mut Registry,
310
- index: u64,
311
- strike_increment: u64,
312
- decay_speed: u64,
313
- initial_price: u64,
314
- final_price: u64,
315
- auction_duration_in_ms: u64,
316
- ctx: &TxContext,
317
- )
318
- */
319
- function getUpdateWarmupVaultConfigTx(gasBudget, packageId, typeArguments, managerCap, registry, index, strike_increment, decay_speed, initial_price, final_price, auction_duration_in_ms) {
320
- return __awaiter(this, void 0, void 0, function () {
321
- var tx;
322
- return __generator(this, function (_a) {
323
- tx = new transactions_1.TransactionBlock();
324
- tx.moveCall({
325
- target: "".concat(packageId, "::typus_dov_double::update_warmup_vault_config"),
326
- typeArguments: typeArguments,
327
- arguments: [
328
- tx.pure(managerCap),
329
- tx.pure(registry),
330
- tx.pure(index),
331
- tx.pure(strike_increment),
332
- tx.pure(decay_speed),
333
- tx.pure(initial_price),
334
- tx.pure(final_price),
335
- tx.pure(auction_duration_in_ms),
336
- ],
337
- });
338
- tx.setGasBudget(gasBudget);
339
- return [2 /*return*/, tx];
340
- });
341
- });
342
- }
343
- exports.getUpdateWarmupVaultConfigTx = getUpdateWarmupVaultConfigTx;
344
- /**
345
- public(friend) entry fun update_upcoming_vault_config<O_TOKEN, U_TOKEN, B_TOKEN>(
346
- _manager_cap: &ManagerCap,
347
- registry: &mut Registry,
348
- index: u64,
349
- call_strike_pct: vector<u64>,
350
- call_weight: vector<u64>,
351
- call_is_buyer: vector<bool>,
352
- put_strike_pct: vector<u64>,
353
- put_weight: vector<u64>,
354
- put_is_buyer: vector<bool>,
355
- strike_increment: u64,
356
- decay_speed: u64,
357
- initial_price: u64,
358
- final_price: u64,
359
- auction_duration_in_ms: u64,
360
- ctx: &TxContext,
361
- )
362
- */
363
- function getUpdateUpcomingVaultConfigTx(gasBudget, packageId, typeArguments, managerCap, registry, index, call_strike_pct, call_weight, call_is_buyer, put_strike_pct, put_weight, put_is_buyer, strike_increment, decay_speed, initial_price, final_price, auction_duration_in_ms) {
364
- return __awaiter(this, void 0, void 0, function () {
365
- var tx;
366
- return __generator(this, function (_a) {
367
- tx = new transactions_1.TransactionBlock();
368
- tx.moveCall({
369
- target: "".concat(packageId, "::typus_dov_double::update_upcoming_vault_config"),
370
- typeArguments: typeArguments,
371
- arguments: [
372
- tx.pure(managerCap),
373
- tx.pure(registry),
374
- tx.pure(index),
375
- tx.pure(call_strike_pct),
376
- tx.pure(call_weight),
377
- tx.pure(call_is_buyer),
378
- tx.pure(put_strike_pct),
379
- tx.pure(put_weight),
380
- tx.pure(put_is_buyer),
381
- tx.pure(strike_increment),
382
- tx.pure(decay_speed),
383
- tx.pure(initial_price),
384
- tx.pure(final_price),
385
- tx.pure(auction_duration_in_ms),
386
- ],
387
- });
388
- tx.setGasBudget(gasBudget);
389
- return [2 /*return*/, tx];
390
- });
391
- });
392
- }
393
- exports.getUpdateUpcomingVaultConfigTx = getUpdateUpcomingVaultConfigTx;
394
- /**
395
- public(friend) entry fun delivery<O_TOKEN, U_TOKEN, B_TOKEN>(
396
- manager_cap: &ManagerCap,
397
- registry: &mut Registry,
398
- index: u64,
399
- price_oracle: &Oracle<O_TOKEN>,
400
- clock: &Clock,
401
- ctx: &mut TxContext
402
- )
403
- */
404
- function getDeliveryTx(gasBudget, packageId, typeArguments, managerCap, registry, index, priceOracle) {
405
- return __awaiter(this, void 0, void 0, function () {
406
- var tx;
407
- return __generator(this, function (_a) {
408
- tx = new transactions_1.TransactionBlock();
409
- tx.moveCall({
410
- target: "".concat(packageId, "::typus_dov_double::delivery"),
411
- typeArguments: typeArguments,
412
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(priceOracle), tx.pure("0x6")],
413
- });
414
- tx.setGasBudget(gasBudget);
415
- return [2 /*return*/, tx];
416
- });
417
- });
418
- }
419
- exports.getDeliveryTx = getDeliveryTx;
420
- /**
421
- public(friend) entry fun evolution<O_TOKEN, U_TOKEN, B_TOKEN>(
422
- manager_cap: &ManagerCap,
423
- registry: &mut Registry,
424
- index: u64,
425
- price_oracle: &Oracle<O_TOKEN>,
426
- clock: &Clock,
427
- ctx: &mut TxContext,
428
- )
429
- */
430
- function getEvolutionTx(gasBudget, packageId, typeArguments, managerCap, registry, index, priceOracle) {
431
- return __awaiter(this, void 0, void 0, function () {
432
- var tx;
433
- return __generator(this, function (_a) {
434
- tx = new transactions_1.TransactionBlock();
435
- tx.moveCall({
436
- target: "".concat(packageId, "::typus_dov_double::evolution"),
437
- typeArguments: typeArguments,
438
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(priceOracle), tx.pure("0x6")],
439
- });
440
- tx.setGasBudget(gasBudget);
441
- return [2 /*return*/, tx];
442
- });
443
- });
444
- }
445
- exports.getEvolutionTx = getEvolutionTx;
446
- /**
447
- public(friend) entry fun close<O_TOKEN, U_TOKEN, B_TOKEN>(
448
- _manager_cap: &ManagerCap,
449
- registry: &mut Registry,
450
- index: u64,
451
- ctx: &TxContext,
452
- )
453
- */
454
- function getCloseTx(gasBudget, packageId, typeArguments, managerCap, registry, index) {
455
- return __awaiter(this, void 0, void 0, function () {
456
- var tx;
457
- return __generator(this, function (_a) {
458
- tx = new transactions_1.TransactionBlock();
459
- tx.moveCall({
460
- target: "".concat(packageId, "::typus_dov_double::evolution"),
461
- typeArguments: typeArguments,
462
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index)],
463
- });
464
- tx.setGasBudget(gasBudget);
465
- return [2 /*return*/, tx];
466
- });
467
- });
468
- }
469
- exports.getCloseTx = getCloseTx;
470
- /**
471
- public(friend) entry fun update_active_vault_config<O_TOKEN, U_TOKEN, B_TOKEN>(
472
- _manager_cap: &ManagerCap,
473
- registry: &mut Registry,
474
- index: u64,
475
- strike_increment: u64,
476
- decay_speed: u64,
477
- initial_price: u64,
478
- final_price: u64,
479
- auction_duration_in_ms: u64,
480
- ctx: &TxContext,
481
- )
482
- */
483
- function getUpdateActiveVaultConfigTx(gasBudget, packageId, typeArguments, managerCap, registry, index, strike_increment, decay_speed, initial_price, final_price, auction_duration_in_ms) {
484
- return __awaiter(this, void 0, void 0, function () {
485
- var tx;
486
- return __generator(this, function (_a) {
487
- tx = new transactions_1.TransactionBlock();
488
- tx.moveCall({
489
- target: "".concat(packageId, "::typus_dov_double::update_active_vault_config"),
490
- typeArguments: typeArguments,
491
- arguments: [
492
- tx.pure(managerCap),
493
- tx.pure(registry),
494
- tx.pure(index),
495
- tx.pure(strike_increment),
496
- tx.pure(decay_speed),
497
- tx.pure(initial_price),
498
- tx.pure(final_price),
499
- tx.pure(auction_duration_in_ms),
500
- ],
501
- });
502
- tx.setGasBudget(gasBudget);
503
- return [2 /*return*/, tx];
504
- });
505
- });
506
- }
507
- exports.getUpdateActiveVaultConfigTx = getUpdateActiveVaultConfigTx;
508
- /**
509
- public(friend) entry fun new_auction<O_TOKEN, U_TOKEN, B_TOKEN>(
510
- manager_cap: &ManagerCap,
511
- registry: &mut Registry,
512
- index: u64,
513
- start_ts_ms: u64,
514
- price_oracle: &Oracle<O_TOKEN>,
515
- clock: &Clock,
516
- ctx: &mut TxContext,
517
- )
518
- */
519
- function getNewAuctionTx(gasBudget, packageId, typeArguments, managerCap, registry, index, start_ts_ms, price_oracle) {
520
- return __awaiter(this, void 0, void 0, function () {
521
- var tx;
522
- return __generator(this, function (_a) {
523
- tx = new transactions_1.TransactionBlock();
524
- tx.moveCall({
525
- target: "".concat(packageId, "::typus_dov_double::new_auction"),
526
- typeArguments: typeArguments,
527
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(start_ts_ms), tx.pure(price_oracle), tx.pure("0x6")],
528
- });
529
- tx.setGasBudget(gasBudget);
530
- return [2 /*return*/, tx];
531
- });
532
- });
533
- }
534
- exports.getNewAuctionTx = getNewAuctionTx;
535
- /**
536
- public(friend) entry fun terminate_vault<O_TOKEN, U_TOKEN, B_TOKEN>(
537
- manager_cap: &ManagerCap,
538
- registry: &mut Registry,
539
- index: u64,
540
- clock: &Clock,
541
- ctx: &mut TxContext,
542
- )
543
- */
544
- function getTerminateVaultTx(gasBudget, packageId, typeArguments, managerCap, registry, index) {
545
- return __awaiter(this, void 0, void 0, function () {
546
- var tx;
547
- return __generator(this, function (_a) {
548
- tx = new transactions_1.TransactionBlock();
549
- tx.moveCall({
550
- target: "".concat(packageId, "::typus_dov_double::terminate_vault"),
551
- typeArguments: typeArguments,
552
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure("0x6")],
553
- });
554
- tx.setGasBudget(gasBudget);
555
- return [2 /*return*/, tx];
556
- });
557
- });
558
- }
559
- exports.getTerminateVaultTx = getTerminateVaultTx;
560
- /**
561
- public(friend) entry fun terminate_auction<O_TOKEN, U_TOKEN, B_TOKEN>(
562
- manager_cap: &ManagerCap,
563
- registry: &mut Registry,
564
- index: u64,
565
- clock: &Clock,
566
- ctx: &mut TxContext,
567
- )
568
- */
569
- function getTerminateAuctionTx(gasBudget, packageId, typeArguments, managerCap, registry, index) {
570
- return __awaiter(this, void 0, void 0, function () {
571
- var tx;
572
- return __generator(this, function (_a) {
573
- tx = new transactions_1.TransactionBlock();
574
- tx.moveCall({
575
- target: "".concat(packageId, "::typus_dov_double::terminate_auction"),
576
- typeArguments: typeArguments,
577
- arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure("0x6")],
578
- });
579
- tx.setGasBudget(gasBudget);
580
- return [2 /*return*/, tx];
581
- });
582
- });
583
- }
584
- exports.getTerminateAuctionTx = getTerminateAuctionTx;
@@ -1,68 +0,0 @@
1
- import { SuiClient } from "@mysten/sui.js/client";
2
- import { DepositVault, BidVault } from "../typus-framework/vault";
3
- import { Auction } from "../typus-framework/dutch";
4
- export interface PortfolioVault {
5
- vaultId: string;
6
- typeArgs: string[];
7
- assets: string[];
8
- info: Info;
9
- config: Config;
10
- tokenDepositVault: DepositVault;
11
- usdDepositVault: DepositVault;
12
- bidVault: BidVault;
13
- auction: Auction;
14
- authority: string;
15
- tokenTvl: bigint;
16
- usdTvl: bigint;
17
- }
18
- export interface Info {
19
- index: string;
20
- creator: string;
21
- createTsMs: string;
22
- round: string;
23
- oracleInfo: OracleInfo;
24
- deliveryInfo?: DeliveryInfo;
25
- }
26
- export interface OracleInfo {
27
- price: string;
28
- decimal: string;
29
- }
30
- export interface DeliveryInfo {
31
- round: string;
32
- price: string;
33
- size: string;
34
- premium: string;
35
- tsMs: string;
36
- }
37
- export interface Config {
38
- strategyName: string;
39
- period: number;
40
- activationTsMs: string;
41
- expirationTsMs: string;
42
- oTokenDecimal: string;
43
- uTokenDecimal: string;
44
- bTokenDecimal: string;
45
- lotSize: string;
46
- capacity: string;
47
- leverage: string;
48
- hasNext: boolean;
49
- activeVaultConfig: VaultConfig;
50
- warmupVaultConfig: VaultConfig;
51
- upcomingVaultConfig: VaultConfig;
52
- }
53
- export interface VaultConfig {
54
- callPayoffConfigs: PayoffConfig[];
55
- putPayoffConfigs: PayoffConfig[];
56
- strikeIncrement: string;
57
- decaySpeed: string;
58
- initialPrice: string;
59
- finalPrice: string;
60
- auctionDurationInMs: string;
61
- }
62
- export interface PayoffConfig {
63
- strikePct: string;
64
- weight: string;
65
- isBuyer: boolean;
66
- strike?: string;
67
- }
68
- export declare function getPortfolioVaults(provider: SuiClient, registry: string, token_deposit_vault_registry: string, usd_deposit_vault_registry: string, bid_vault_registry: string, index?: string): Promise<Map<string, PortfolioVault>>;