@typus/typus-sdk 1.1.39 → 1.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/constants.d.ts +2 -2
- package/lib/constants.js +3 -4
- package/lib/utils/mint.d.ts +1 -1
- package/lib/utils/mint.js +2 -2
- package/lib/utils/nft-staking/authorized-entry.d.ts +1 -1
- package/lib/utils/nft-staking/authorized-entry.js +4 -4
- package/lib/utils/nft-staking/fetch.d.ts +2 -2
- package/lib/utils/nft-staking/user-entry.d.ts +4 -2
- package/lib/utils/nft-staking/user-entry.js +37 -27
- package/lib/utils/tails-exp-dice/fetch.d.ts +5 -4
- package/lib/utils/tails-exp-dice/fetch.js +63 -1
- package/lib/utils/tails-exp-dice/user-entry.d.ts +1 -1
- package/lib/utils/tails-exp-dice/user-entry.js +4 -4
- package/lib/utils/token.js +2 -2
- package/lib/utils/typus-dov-double/authorized-entry.d.ts +1 -1
- package/lib/utils/typus-dov-double/authorized-entry.js +8 -8
- package/lib/utils/typus-dov-double/manager-entry.d.ts +1 -1
- package/lib/utils/typus-dov-double/manager-entry.js +19 -19
- package/lib/utils/typus-dov-double/portfolio-vault.d.ts +2 -2
- package/lib/utils/typus-dov-double/portfolio-vault.js +6 -2
- package/lib/utils/typus-dov-double/user-entry.d.ts +1 -1
- package/lib/utils/typus-dov-double/user-entry.js +10 -10
- package/lib/utils/typus-dov-double/view-function.d.ts +4 -4
- package/lib/utils/typus-dov-double/view-function.js +4 -4
- package/lib/utils/typus-dov-single/portfolio-vault.d.ts +3 -3
- package/lib/utils/typus-dov-single/registry.d.ts +3 -3
- package/lib/utils/typus-dov-single/user-entry.d.ts +1 -1
- package/lib/utils/typus-dov-single/user-entry.js +12 -12
- package/lib/utils/typus-dov-single/user-history.d.ts +2 -2
- package/lib/utils/typus-dov-single/view-function.d.ts +8 -8
- package/lib/utils/typus-dov-single/view-function.js +8 -8
- package/lib/utils/typus-dov-single-v2/authorized-entry.d.ts +1 -1
- package/lib/utils/typus-dov-single-v2/authorized-entry.js +3 -3
- package/lib/utils/typus-dov-single-v2/leaderboard.d.ts +4 -16
- package/lib/utils/typus-dov-single-v2/leaderboard.js +12 -0
- package/lib/utils/typus-dov-single-v2/user-entry.d.ts +14 -1
- package/lib/utils/typus-dov-single-v2/user-entry.js +67 -12
- package/lib/utils/typus-dov-single-v2/user-history.d.ts +2 -2
- package/lib/utils/typus-dov-single-v2/view-function.d.ts +7 -7
- package/lib/utils/typus-dov-single-v2/view-function.js +7 -7
- package/lib/utils/typus-framework/dutch.d.ts +2 -2
- package/lib/utils/typus-nft/fetch.d.ts +6 -6
- package/lib/utils/typus-nft/fetch.js +8 -4
- package/lib/utils/typus-nft/user-entry.d.ts +1 -1
- package/lib/utils/typus-nft/user-entry.js +3 -3
- package/package.json +3 -3
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.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
|
|
40
|
+
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
41
41
|
/**
|
|
42
42
|
public(friend) entry fun new_manager(
|
|
43
43
|
_manager_cap: &ManagerCap,
|
|
@@ -49,7 +49,7 @@ function getNewManagerTx(gasBudget, packageId, managerCap, users) {
|
|
|
49
49
|
return __awaiter(this, void 0, void 0, function () {
|
|
50
50
|
var tx;
|
|
51
51
|
return __generator(this, function (_a) {
|
|
52
|
-
tx = new
|
|
52
|
+
tx = new transactions_1.TransactionBlock();
|
|
53
53
|
tx.moveCall({
|
|
54
54
|
target: "".concat(packageId, "::typus_dov_double::new_manager"),
|
|
55
55
|
arguments: [tx.pure(managerCap), tx.pure(users)],
|
|
@@ -71,7 +71,7 @@ function getRemoveManagerTx(gasBudget, packageId, managerCap) {
|
|
|
71
71
|
return __awaiter(this, void 0, void 0, function () {
|
|
72
72
|
var tx;
|
|
73
73
|
return __generator(this, function (_a) {
|
|
74
|
-
tx = new
|
|
74
|
+
tx = new transactions_1.TransactionBlock();
|
|
75
75
|
tx.moveCall({
|
|
76
76
|
target: "".concat(packageId, "::typus_dov_double::remove_manager"),
|
|
77
77
|
arguments: [tx.pure(managerCap)],
|
|
@@ -94,7 +94,7 @@ function getAddAuthorizedUserTx(gasBudget, packageId, managerCap, registry, user
|
|
|
94
94
|
return __awaiter(this, void 0, void 0, function () {
|
|
95
95
|
var tx;
|
|
96
96
|
return __generator(this, function (_a) {
|
|
97
|
-
tx = new
|
|
97
|
+
tx = new transactions_1.TransactionBlock();
|
|
98
98
|
tx.moveCall({
|
|
99
99
|
target: "".concat(packageId, "::typus_dov_double::add_authorized_user"),
|
|
100
100
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(users)],
|
|
@@ -117,7 +117,7 @@ function getRemoveAuthorizedUserTx(gasBudget, packageId, managerCap, registry, u
|
|
|
117
117
|
return __awaiter(this, void 0, void 0, function () {
|
|
118
118
|
var tx;
|
|
119
119
|
return __generator(this, function (_a) {
|
|
120
|
-
tx = new
|
|
120
|
+
tx = new transactions_1.TransactionBlock();
|
|
121
121
|
tx.moveCall({
|
|
122
122
|
target: "".concat(packageId, "::typus_dov_double::remove_authorized_user"),
|
|
123
123
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(users)],
|
|
@@ -141,7 +141,7 @@ function getAddPortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArgument
|
|
|
141
141
|
return __awaiter(this, void 0, void 0, function () {
|
|
142
142
|
var tx;
|
|
143
143
|
return __generator(this, function (_a) {
|
|
144
|
-
tx = new
|
|
144
|
+
tx = new transactions_1.TransactionBlock();
|
|
145
145
|
tx.moveCall({
|
|
146
146
|
target: "".concat(packageId, "::typus_dov_double::add_portfolio_vault_authorized_user"),
|
|
147
147
|
typeArguments: typeArguments,
|
|
@@ -166,7 +166,7 @@ function getRemovePortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArgum
|
|
|
166
166
|
return __awaiter(this, void 0, void 0, function () {
|
|
167
167
|
var tx;
|
|
168
168
|
return __generator(this, function (_a) {
|
|
169
|
-
tx = new
|
|
169
|
+
tx = new transactions_1.TransactionBlock();
|
|
170
170
|
tx.moveCall({
|
|
171
171
|
target: "".concat(packageId, "::typus_dov_double::remove_portfolio_vault_authorized_user"),
|
|
172
172
|
typeArguments: typeArguments,
|
|
@@ -191,7 +191,7 @@ function getUpdateRestrictActivationTimePeriodTx(gasBudget, packageId, managerCa
|
|
|
191
191
|
return __awaiter(this, void 0, void 0, function () {
|
|
192
192
|
var tx;
|
|
193
193
|
return __generator(this, function (_a) {
|
|
194
|
-
tx = new
|
|
194
|
+
tx = new transactions_1.TransactionBlock();
|
|
195
195
|
tx.moveCall({
|
|
196
196
|
target: "".concat(packageId, "::typus_dov_double::update_restrict_activation_time_period"),
|
|
197
197
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(from_ts_ms), tx.pure(to_ts_ms)],
|
|
@@ -238,7 +238,7 @@ function getNewPortfolioVaultTx(gasBudget, packageId, typeArguments, managerCap,
|
|
|
238
238
|
return __awaiter(this, void 0, void 0, function () {
|
|
239
239
|
var tx;
|
|
240
240
|
return __generator(this, function (_a) {
|
|
241
|
-
tx = new
|
|
241
|
+
tx = new transactions_1.TransactionBlock();
|
|
242
242
|
tx.moveCall({
|
|
243
243
|
target: "".concat(packageId, "::typus_dov_double::new_portfolio_vault"),
|
|
244
244
|
typeArguments: typeArguments,
|
|
@@ -291,7 +291,7 @@ function getUpdateCapacityTx(gasBudget, packageId, typeArguments, managerCap, re
|
|
|
291
291
|
return __awaiter(this, void 0, void 0, function () {
|
|
292
292
|
var tx;
|
|
293
293
|
return __generator(this, function (_a) {
|
|
294
|
-
tx = new
|
|
294
|
+
tx = new transactions_1.TransactionBlock();
|
|
295
295
|
tx.moveCall({
|
|
296
296
|
target: "".concat(packageId, "::typus_dov_double::update_capacity"),
|
|
297
297
|
typeArguments: typeArguments,
|
|
@@ -320,7 +320,7 @@ function getUpdateWarmupVaultConfigTx(gasBudget, packageId, typeArguments, manag
|
|
|
320
320
|
return __awaiter(this, void 0, void 0, function () {
|
|
321
321
|
var tx;
|
|
322
322
|
return __generator(this, function (_a) {
|
|
323
|
-
tx = new
|
|
323
|
+
tx = new transactions_1.TransactionBlock();
|
|
324
324
|
tx.moveCall({
|
|
325
325
|
target: "".concat(packageId, "::typus_dov_double::update_warmup_vault_config"),
|
|
326
326
|
typeArguments: typeArguments,
|
|
@@ -364,7 +364,7 @@ function getUpdateUpcomingVaultConfigTx(gasBudget, packageId, typeArguments, man
|
|
|
364
364
|
return __awaiter(this, void 0, void 0, function () {
|
|
365
365
|
var tx;
|
|
366
366
|
return __generator(this, function (_a) {
|
|
367
|
-
tx = new
|
|
367
|
+
tx = new transactions_1.TransactionBlock();
|
|
368
368
|
tx.moveCall({
|
|
369
369
|
target: "".concat(packageId, "::typus_dov_double::update_upcoming_vault_config"),
|
|
370
370
|
typeArguments: typeArguments,
|
|
@@ -405,7 +405,7 @@ function getDeliveryTx(gasBudget, packageId, typeArguments, managerCap, registry
|
|
|
405
405
|
return __awaiter(this, void 0, void 0, function () {
|
|
406
406
|
var tx;
|
|
407
407
|
return __generator(this, function (_a) {
|
|
408
|
-
tx = new
|
|
408
|
+
tx = new transactions_1.TransactionBlock();
|
|
409
409
|
tx.moveCall({
|
|
410
410
|
target: "".concat(packageId, "::typus_dov_double::delivery"),
|
|
411
411
|
typeArguments: typeArguments,
|
|
@@ -431,7 +431,7 @@ function getEvolutionTx(gasBudget, packageId, typeArguments, managerCap, registr
|
|
|
431
431
|
return __awaiter(this, void 0, void 0, function () {
|
|
432
432
|
var tx;
|
|
433
433
|
return __generator(this, function (_a) {
|
|
434
|
-
tx = new
|
|
434
|
+
tx = new transactions_1.TransactionBlock();
|
|
435
435
|
tx.moveCall({
|
|
436
436
|
target: "".concat(packageId, "::typus_dov_double::evolution"),
|
|
437
437
|
typeArguments: typeArguments,
|
|
@@ -455,7 +455,7 @@ function getCloseTx(gasBudget, packageId, typeArguments, managerCap, registry, i
|
|
|
455
455
|
return __awaiter(this, void 0, void 0, function () {
|
|
456
456
|
var tx;
|
|
457
457
|
return __generator(this, function (_a) {
|
|
458
|
-
tx = new
|
|
458
|
+
tx = new transactions_1.TransactionBlock();
|
|
459
459
|
tx.moveCall({
|
|
460
460
|
target: "".concat(packageId, "::typus_dov_double::evolution"),
|
|
461
461
|
typeArguments: typeArguments,
|
|
@@ -484,7 +484,7 @@ function getUpdateActiveVaultConfigTx(gasBudget, packageId, typeArguments, manag
|
|
|
484
484
|
return __awaiter(this, void 0, void 0, function () {
|
|
485
485
|
var tx;
|
|
486
486
|
return __generator(this, function (_a) {
|
|
487
|
-
tx = new
|
|
487
|
+
tx = new transactions_1.TransactionBlock();
|
|
488
488
|
tx.moveCall({
|
|
489
489
|
target: "".concat(packageId, "::typus_dov_double::update_active_vault_config"),
|
|
490
490
|
typeArguments: typeArguments,
|
|
@@ -520,7 +520,7 @@ function getNewAuctionTx(gasBudget, packageId, typeArguments, managerCap, regist
|
|
|
520
520
|
return __awaiter(this, void 0, void 0, function () {
|
|
521
521
|
var tx;
|
|
522
522
|
return __generator(this, function (_a) {
|
|
523
|
-
tx = new
|
|
523
|
+
tx = new transactions_1.TransactionBlock();
|
|
524
524
|
tx.moveCall({
|
|
525
525
|
target: "".concat(packageId, "::typus_dov_double::new_auction"),
|
|
526
526
|
typeArguments: typeArguments,
|
|
@@ -545,7 +545,7 @@ function getTerminateVaultTx(gasBudget, packageId, typeArguments, managerCap, re
|
|
|
545
545
|
return __awaiter(this, void 0, void 0, function () {
|
|
546
546
|
var tx;
|
|
547
547
|
return __generator(this, function (_a) {
|
|
548
|
-
tx = new
|
|
548
|
+
tx = new transactions_1.TransactionBlock();
|
|
549
549
|
tx.moveCall({
|
|
550
550
|
target: "".concat(packageId, "::typus_dov_double::terminate_vault"),
|
|
551
551
|
typeArguments: typeArguments,
|
|
@@ -570,7 +570,7 @@ function getTerminateAuctionTx(gasBudget, packageId, typeArguments, managerCap,
|
|
|
570
570
|
return __awaiter(this, void 0, void 0, function () {
|
|
571
571
|
var tx;
|
|
572
572
|
return __generator(this, function (_a) {
|
|
573
|
-
tx = new
|
|
573
|
+
tx = new transactions_1.TransactionBlock();
|
|
574
574
|
tx.moveCall({
|
|
575
575
|
target: "".concat(packageId, "::typus_dov_double::terminate_auction"),
|
|
576
576
|
typeArguments: typeArguments,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuiClient } from "@mysten/sui.js/client";
|
|
2
2
|
import { DepositVault, BidVault } from "../typus-framework/vault";
|
|
3
3
|
import { Auction } from "../typus-framework/dutch";
|
|
4
4
|
export interface PortfolioVault {
|
|
@@ -65,4 +65,4 @@ export interface PayoffConfig {
|
|
|
65
65
|
isBuyer: boolean;
|
|
66
66
|
strike?: string;
|
|
67
67
|
}
|
|
68
|
-
export declare function getPortfolioVaults(provider:
|
|
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>>;
|
|
@@ -185,7 +185,9 @@ function getPortfolioVaults(provider, registry, token_deposit_vault_registry, us
|
|
|
185
185
|
},
|
|
186
186
|
upcomingVaultConfig: {
|
|
187
187
|
// @ts-ignore
|
|
188
|
-
callPayoffConfigs:
|
|
188
|
+
callPayoffConfigs:
|
|
189
|
+
// @ts-ignore
|
|
190
|
+
portfolioVault.data.content.fields.config.fields.upcoming_vault_config.fields.call_payoff_configs.map(function (x) {
|
|
189
191
|
return ({
|
|
190
192
|
strikePct: x.fields.strike_pct,
|
|
191
193
|
weight: x.fields.weight,
|
|
@@ -211,7 +213,9 @@ function getPortfolioVaults(provider, registry, token_deposit_vault_registry, us
|
|
|
211
213
|
// @ts-ignore
|
|
212
214
|
finalPrice: portfolioVault.data.content.fields.config.fields.upcoming_vault_config.fields.final_price,
|
|
213
215
|
// @ts-ignore
|
|
214
|
-
auctionDurationInMs:
|
|
216
|
+
auctionDurationInMs:
|
|
217
|
+
// @ts-ignore
|
|
218
|
+
portfolioVault.data.content.fields.config.fields.upcoming_vault_config.fields.auction_duration_in_ms,
|
|
215
219
|
},
|
|
216
220
|
};
|
|
217
221
|
// @ts-ignore
|
|
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getNewBidTx = exports.getUnsubscribeTx = exports.getCompoundUsdTx = exports.getCompoundTokenTx = exports.getClaimAndHarvestTx = exports.getHarvestTx = exports.getClaimTx = exports.getWithdrawTx = exports.getDepositTx = void 0;
|
|
40
|
-
var
|
|
40
|
+
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
41
41
|
/**
|
|
42
42
|
public(friend) entry fun deposit<O_TOKEN, U_TOKEN, B_TOKEN>(
|
|
43
43
|
registry: &mut Registry,
|
|
@@ -53,7 +53,7 @@ function getDepositTx(gasBudget, packageId, typeArguments, registry, index, o_co
|
|
|
53
53
|
return __awaiter(this, void 0, void 0, function () {
|
|
54
54
|
var tx;
|
|
55
55
|
return __generator(this, function (_a) {
|
|
56
|
-
tx = new
|
|
56
|
+
tx = new transactions_1.TransactionBlock();
|
|
57
57
|
tx.moveCall({
|
|
58
58
|
target: "".concat(packageId, "::typus_dov_double::deposit"),
|
|
59
59
|
typeArguments: typeArguments,
|
|
@@ -84,7 +84,7 @@ function getWithdrawTx(gasBudget, packageId, typeArguments, registry, index, sha
|
|
|
84
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
85
85
|
var tx;
|
|
86
86
|
return __generator(this, function (_a) {
|
|
87
|
-
tx = new
|
|
87
|
+
tx = new transactions_1.TransactionBlock();
|
|
88
88
|
tx.moveCall({
|
|
89
89
|
target: "".concat(packageId, "::typus_dov_double::withdraw"),
|
|
90
90
|
typeArguments: typeArguments,
|
|
@@ -108,7 +108,7 @@ function getClaimTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
108
108
|
return __awaiter(this, void 0, void 0, function () {
|
|
109
109
|
var tx;
|
|
110
110
|
return __generator(this, function (_a) {
|
|
111
|
-
tx = new
|
|
111
|
+
tx = new transactions_1.TransactionBlock();
|
|
112
112
|
tx.moveCall({
|
|
113
113
|
target: "".concat(packageId, "::typus_dov_double::claim"),
|
|
114
114
|
typeArguments: typeArguments,
|
|
@@ -132,7 +132,7 @@ function getHarvestTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
132
132
|
return __awaiter(this, void 0, void 0, function () {
|
|
133
133
|
var tx;
|
|
134
134
|
return __generator(this, function (_a) {
|
|
135
|
-
tx = new
|
|
135
|
+
tx = new transactions_1.TransactionBlock();
|
|
136
136
|
tx.moveCall({
|
|
137
137
|
target: "".concat(packageId, "::typus_dov_double::harvest"),
|
|
138
138
|
typeArguments: typeArguments,
|
|
@@ -156,7 +156,7 @@ function getClaimAndHarvestTx(gasBudget, packageId, typeArguments, registry, ind
|
|
|
156
156
|
return __awaiter(this, void 0, void 0, function () {
|
|
157
157
|
var tx;
|
|
158
158
|
return __generator(this, function (_a) {
|
|
159
|
-
tx = new
|
|
159
|
+
tx = new transactions_1.TransactionBlock();
|
|
160
160
|
tx.moveCall({
|
|
161
161
|
target: "".concat(packageId, "::typus_dov_double::claim_and_harvest"),
|
|
162
162
|
typeArguments: typeArguments,
|
|
@@ -181,7 +181,7 @@ function getCompoundTokenTx(gasBudget, packageId, typeArguments, registry, index
|
|
|
181
181
|
return __awaiter(this, void 0, void 0, function () {
|
|
182
182
|
var tx;
|
|
183
183
|
return __generator(this, function (_a) {
|
|
184
|
-
tx = new
|
|
184
|
+
tx = new transactions_1.TransactionBlock();
|
|
185
185
|
tx.moveCall({
|
|
186
186
|
target: "".concat(packageId, "::typus_dov_double::compound_token"),
|
|
187
187
|
typeArguments: typeArguments,
|
|
@@ -206,7 +206,7 @@ function getCompoundUsdTx(gasBudget, packageId, typeArguments, registry, index,
|
|
|
206
206
|
return __awaiter(this, void 0, void 0, function () {
|
|
207
207
|
var tx;
|
|
208
208
|
return __generator(this, function (_a) {
|
|
209
|
-
tx = new
|
|
209
|
+
tx = new transactions_1.TransactionBlock();
|
|
210
210
|
tx.moveCall({
|
|
211
211
|
target: "".concat(packageId, "::typus_dov_double::compound_usd"),
|
|
212
212
|
typeArguments: typeArguments,
|
|
@@ -231,7 +231,7 @@ function getUnsubscribeTx(gasBudget, packageId, typeArguments, registry, index,
|
|
|
231
231
|
return __awaiter(this, void 0, void 0, function () {
|
|
232
232
|
var tx;
|
|
233
233
|
return __generator(this, function (_a) {
|
|
234
|
-
tx = new
|
|
234
|
+
tx = new transactions_1.TransactionBlock();
|
|
235
235
|
tx.moveCall({
|
|
236
236
|
target: "".concat(packageId, "::typus_dov_double::unsubscribe"),
|
|
237
237
|
typeArguments: typeArguments,
|
|
@@ -259,7 +259,7 @@ function getNewBidTx(gasBudget, packageId, typeArguments, registry, index, price
|
|
|
259
259
|
return __awaiter(this, void 0, void 0, function () {
|
|
260
260
|
var tx;
|
|
261
261
|
return __generator(this, function (_a) {
|
|
262
|
-
tx = new
|
|
262
|
+
tx = new transactions_1.TransactionBlock();
|
|
263
263
|
tx.moveCall({
|
|
264
264
|
target: "".concat(packageId, "::typus_dov_double::new_bid"),
|
|
265
265
|
typeArguments: typeArguments,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuiClient } from "@mysten/sui.js/client";
|
|
2
2
|
import { DepositVaultUserShare, BidVaultUserShare } from "../typus-framework/vault";
|
|
3
3
|
export interface UserShare {
|
|
4
4
|
index: string;
|
|
@@ -6,6 +6,6 @@ export interface UserShare {
|
|
|
6
6
|
usdDepositVaultUserShare: DepositVaultUserShare;
|
|
7
7
|
bidVaultUserShare: BidVaultUserShare;
|
|
8
8
|
}
|
|
9
|
-
export declare function getUserShares(provider:
|
|
10
|
-
export declare function getAuctionMaxSize(provider:
|
|
11
|
-
export declare function getMaxLossPerUnit(provider:
|
|
9
|
+
export declare function getUserShares(provider: SuiClient, packageId: string, registry: string, indexes: string[], user: string): Promise<Map<string, UserShare>>;
|
|
10
|
+
export declare function getAuctionMaxSize(provider: SuiClient, packageId: string, typeArguments: string[], registry: string, index: string): Promise<BigInt>;
|
|
11
|
+
export declare function getMaxLossPerUnit(provider: SuiClient, packageId: string, typeArguments: string[], registry: string, index: string): Promise<BigInt>;
|
|
@@ -53,7 +53,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
55
|
exports.getMaxLossPerUnit = exports.getAuctionMaxSize = exports.getUserShares = void 0;
|
|
56
|
-
var
|
|
56
|
+
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
57
57
|
var tools_1 = require("../tools");
|
|
58
58
|
var constants_1 = require("../../constants");
|
|
59
59
|
function getUserShares(provider, packageId, registry, indexes, user) {
|
|
@@ -62,7 +62,7 @@ function getUserShares(provider, packageId, registry, indexes, user) {
|
|
|
62
62
|
return __generator(this, function (_a) {
|
|
63
63
|
switch (_a.label) {
|
|
64
64
|
case 0:
|
|
65
|
-
transactionBlock = new
|
|
65
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
66
66
|
target = "".concat(packageId, "::typus_dov_double::get_user_shares");
|
|
67
67
|
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(indexes), transactionBlock.pure(user)];
|
|
68
68
|
transactionBlock.moveCall({
|
|
@@ -171,7 +171,7 @@ function getAuctionMaxSize(provider, packageId, typeArguments, registry, index)
|
|
|
171
171
|
return __generator(this, function (_a) {
|
|
172
172
|
switch (_a.label) {
|
|
173
173
|
case 0:
|
|
174
|
-
transactionBlock = new
|
|
174
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
175
175
|
target = "".concat(packageId, "::typus_dov_double::get_auction_max_size");
|
|
176
176
|
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(index)];
|
|
177
177
|
transactionBlock.moveCall({
|
|
@@ -194,7 +194,7 @@ function getMaxLossPerUnit(provider, packageId, typeArguments, registry, index)
|
|
|
194
194
|
return __generator(this, function (_a) {
|
|
195
195
|
switch (_a.label) {
|
|
196
196
|
case 0:
|
|
197
|
-
transactionBlock = new
|
|
197
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
198
198
|
target = "".concat(packageId, "::typus_dov_double::get_max_loss_per_unit");
|
|
199
199
|
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(index)];
|
|
200
200
|
transactionBlock.moveCall({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuiClient } from "@mysten/sui.js/client";
|
|
2
2
|
import { DepositVault, BidVault } from "../typus-framework/vault";
|
|
3
3
|
import { Auction } from "../typus-framework/dutch";
|
|
4
4
|
export interface PortfolioVault {
|
|
@@ -59,5 +59,5 @@ export interface PayoffConfig {
|
|
|
59
59
|
isBuyer: boolean;
|
|
60
60
|
strike?: string;
|
|
61
61
|
}
|
|
62
|
-
export declare function getPortfolioVaults(provider:
|
|
63
|
-
export declare function getPortfolioVaultAuctionDelayTsMs(provider:
|
|
62
|
+
export declare function getPortfolioVaults(provider: SuiClient, registry: string, deposit_vault_registry: string, bid_vault_registry: string, index?: string): Promise<Map<string, PortfolioVault>>;
|
|
63
|
+
export declare function getPortfolioVaultAuctionDelayTsMs(provider: SuiClient, portfolio_vault: PortfolioVault): Promise<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuiClient } from "@mysten/sui.js/client";
|
|
2
2
|
export interface Registry {
|
|
3
3
|
version: string;
|
|
4
4
|
numOfVault: string;
|
|
@@ -10,5 +10,5 @@ export interface Registry {
|
|
|
10
10
|
};
|
|
11
11
|
authority: string[];
|
|
12
12
|
}
|
|
13
|
-
export declare function getRegistry(provider:
|
|
14
|
-
export declare function getPackageVersion(provider:
|
|
13
|
+
export declare function getRegistry(provider: SuiClient, registry: string): Promise<Registry>;
|
|
14
|
+
export declare function getPackageVersion(provider: SuiClient, packageId: string): Promise<bigint>;
|
|
@@ -53,7 +53,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
55
|
exports.getNewBidTx = exports.getUnsubscribeTx = exports.getCompoundTx = exports.getClaimAndHarvestTx = exports.getHarvestTx = exports.getBatchClaimHarvestWithdrawTx = exports.getBatchClaimHarvestTx = exports.getBatchClaimTx = exports.getClaimTx = exports.getWithdrawTx = exports.getDepositTx = void 0;
|
|
56
|
-
var
|
|
56
|
+
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
57
57
|
var constants_1 = require("../../constants");
|
|
58
58
|
/**
|
|
59
59
|
public(friend) entry fun deposit<D_TOKEN, B_TOKEN, O_TOKEN>(
|
|
@@ -70,7 +70,7 @@ function getDepositTx(gasBudget, packageId, typeArguments, registry, additional_
|
|
|
70
70
|
return __awaiter(this, void 0, void 0, function () {
|
|
71
71
|
var tx, _a, coin;
|
|
72
72
|
return __generator(this, function (_b) {
|
|
73
|
-
tx = new
|
|
73
|
+
tx = new transactions_1.TransactionBlock();
|
|
74
74
|
if (!usingSponsoredGasCoin &&
|
|
75
75
|
(typeArguments[0] == "0x2::sui::SUI" ||
|
|
76
76
|
typeArguments[0] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
|
|
@@ -119,7 +119,7 @@ function getWithdrawTx(gasBudget, packageId, typeArguments, registry, index, sha
|
|
|
119
119
|
return __awaiter(this, void 0, void 0, function () {
|
|
120
120
|
var tx;
|
|
121
121
|
return __generator(this, function (_a) {
|
|
122
|
-
tx = new
|
|
122
|
+
tx = new transactions_1.TransactionBlock();
|
|
123
123
|
tx.moveCall({
|
|
124
124
|
target: "".concat(packageId, "::typus_dov_single::withdraw"),
|
|
125
125
|
typeArguments: typeArguments,
|
|
@@ -143,7 +143,7 @@ function getClaimTx(gasBudget, packageId, typeArguments, registry, additional_co
|
|
|
143
143
|
return __awaiter(this, void 0, void 0, function () {
|
|
144
144
|
var tx;
|
|
145
145
|
return __generator(this, function (_a) {
|
|
146
|
-
tx = new
|
|
146
|
+
tx = new transactions_1.TransactionBlock();
|
|
147
147
|
tx.moveCall({
|
|
148
148
|
target: "".concat(packageId, "::typus_dov_single::claim"),
|
|
149
149
|
typeArguments: typeArguments,
|
|
@@ -159,7 +159,7 @@ function getBatchClaimTx(gasBudget, packageId, registry, additional_config_regis
|
|
|
159
159
|
return __awaiter(this, void 0, void 0, function () {
|
|
160
160
|
var tx;
|
|
161
161
|
return __generator(this, function (_a) {
|
|
162
|
-
tx = new
|
|
162
|
+
tx = new transactions_1.TransactionBlock();
|
|
163
163
|
requests.forEach(function (request) {
|
|
164
164
|
tx.moveCall({
|
|
165
165
|
target: "".concat(packageId, "::typus_dov_single::claim"),
|
|
@@ -177,7 +177,7 @@ function getBatchClaimHarvestTx(gasBudget, packageId, registry, additional_confi
|
|
|
177
177
|
return __awaiter(this, void 0, void 0, function () {
|
|
178
178
|
var tx;
|
|
179
179
|
return __generator(this, function (_a) {
|
|
180
|
-
tx = new
|
|
180
|
+
tx = new transactions_1.TransactionBlock();
|
|
181
181
|
claimRequests.forEach(function (request) {
|
|
182
182
|
tx.moveCall({
|
|
183
183
|
target: "".concat(packageId, "::typus_dov_single::claim"),
|
|
@@ -203,7 +203,7 @@ function getBatchClaimHarvestWithdrawTx(gasBudget, packageId, registry, addition
|
|
|
203
203
|
return __awaiter(this, void 0, void 0, function () {
|
|
204
204
|
var tx;
|
|
205
205
|
return __generator(this, function (_a) {
|
|
206
|
-
tx = new
|
|
206
|
+
tx = new transactions_1.TransactionBlock();
|
|
207
207
|
claimRequests.forEach(function (request) {
|
|
208
208
|
tx.moveCall({
|
|
209
209
|
target: "".concat(packageId, "::typus_dov_single::claim"),
|
|
@@ -243,7 +243,7 @@ function getHarvestTx(gasBudget, packageId, typeArguments, registry, additional_
|
|
|
243
243
|
return __awaiter(this, void 0, void 0, function () {
|
|
244
244
|
var tx;
|
|
245
245
|
return __generator(this, function (_a) {
|
|
246
|
-
tx = new
|
|
246
|
+
tx = new transactions_1.TransactionBlock();
|
|
247
247
|
tx.moveCall({
|
|
248
248
|
target: "".concat(packageId, "::typus_dov_single::harvest"),
|
|
249
249
|
typeArguments: typeArguments,
|
|
@@ -267,7 +267,7 @@ function getClaimAndHarvestTx(gasBudget, packageId, typeArguments, registry, add
|
|
|
267
267
|
return __awaiter(this, void 0, void 0, function () {
|
|
268
268
|
var tx;
|
|
269
269
|
return __generator(this, function (_a) {
|
|
270
|
-
tx = new
|
|
270
|
+
tx = new transactions_1.TransactionBlock();
|
|
271
271
|
tx.moveCall({
|
|
272
272
|
target: "".concat(packageId, "::typus_dov_single::claim_and_harvest"),
|
|
273
273
|
typeArguments: typeArguments,
|
|
@@ -291,7 +291,7 @@ function getCompoundTx(gasBudget, packageId, typeArguments, registry, additional
|
|
|
291
291
|
return __awaiter(this, void 0, void 0, function () {
|
|
292
292
|
var tx;
|
|
293
293
|
return __generator(this, function (_a) {
|
|
294
|
-
tx = new
|
|
294
|
+
tx = new transactions_1.TransactionBlock();
|
|
295
295
|
tx.moveCall({
|
|
296
296
|
target: "".concat(packageId, "::typus_dov_single::compound"),
|
|
297
297
|
typeArguments: typeArguments,
|
|
@@ -316,7 +316,7 @@ function getUnsubscribeTx(gasBudget, packageId, typeArguments, registry, additio
|
|
|
316
316
|
return __awaiter(this, void 0, void 0, function () {
|
|
317
317
|
var tx;
|
|
318
318
|
return __generator(this, function (_a) {
|
|
319
|
-
tx = new
|
|
319
|
+
tx = new transactions_1.TransactionBlock();
|
|
320
320
|
tx.moveCall({
|
|
321
321
|
target: "".concat(packageId, "::typus_dov_single::unsubscribe"),
|
|
322
322
|
typeArguments: typeArguments,
|
|
@@ -346,7 +346,7 @@ usingSponsoredGasCoin) {
|
|
|
346
346
|
return __awaiter(this, void 0, void 0, function () {
|
|
347
347
|
var tx, _a, coin;
|
|
348
348
|
return __generator(this, function (_b) {
|
|
349
|
-
tx = new
|
|
349
|
+
tx = new transactions_1.TransactionBlock();
|
|
350
350
|
if (!usingSponsoredGasCoin &&
|
|
351
351
|
(typeArguments[1] == "0x2::sui::SUI" ||
|
|
352
352
|
typeArguments[1] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getUserHistory(provider:
|
|
1
|
+
import { SuiClient } from "@mysten/sui.js/client";
|
|
2
|
+
export declare function getUserHistory(provider: SuiClient, originPackage: string, sender: string, startTimeMs: number): Promise<TxHistory[]>;
|
|
3
3
|
interface TxHistory {
|
|
4
4
|
Vault: string;
|
|
5
5
|
Action: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuiClient } from "@mysten/sui.js/client";
|
|
2
2
|
import { DepositVaultUserShare, BidVaultUserShare } from "../typus-framework/vault";
|
|
3
3
|
export interface UserShare {
|
|
4
4
|
index: string;
|
|
@@ -41,10 +41,10 @@ export interface AdditionalConfig {
|
|
|
41
41
|
depositor_incentive_rate_bp: string;
|
|
42
42
|
current_portfolio_step: string;
|
|
43
43
|
}
|
|
44
|
-
export declare function getUserShares(provider:
|
|
45
|
-
export declare function getAuctionMaxSize(provider:
|
|
46
|
-
export declare function getMaxLossPerUnit(provider:
|
|
47
|
-
export declare function getAuctionTotalBidSize(provider:
|
|
48
|
-
export declare function getAuctionBids(provider:
|
|
49
|
-
export declare function getVaultUserShares(provider:
|
|
50
|
-
export declare function getAdditionalConfigs(provider:
|
|
44
|
+
export declare function getUserShares(provider: SuiClient, packageId: string, registry: string, indexes: string[], user: string): Promise<Map<string, UserShare>>;
|
|
45
|
+
export declare function getAuctionMaxSize(provider: SuiClient, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string, priceOracle: string): Promise<BigInt>;
|
|
46
|
+
export declare function getMaxLossPerUnit(provider: SuiClient, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string, priceOracle: string): Promise<BigInt>;
|
|
47
|
+
export declare function getAuctionTotalBidSize(provider: SuiClient, packageId: string, typeArguments: string[], registry: string, index: string): Promise<BigInt>;
|
|
48
|
+
export declare function getAuctionBids(provider: SuiClient, packageId: string, typeArguments: string[], registry: string, index: string): Promise<UserBid[]>;
|
|
49
|
+
export declare function getVaultUserShares(provider: SuiClient, packageId: string, typeArguments: string[], registry: string, index: string): Promise<VaultUserShares>;
|
|
50
|
+
export declare function getAdditionalConfigs(provider: SuiClient, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, indexes: string[]): Promise<[string, Map<string, AdditionalConfig>]>;
|
|
@@ -53,7 +53,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
55
|
exports.getAdditionalConfigs = exports.getVaultUserShares = exports.getAuctionBids = exports.getAuctionTotalBidSize = exports.getMaxLossPerUnit = exports.getAuctionMaxSize = exports.getUserShares = void 0;
|
|
56
|
-
var
|
|
56
|
+
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
57
57
|
var bcs_1 = require("@mysten/bcs");
|
|
58
58
|
var tools_1 = require("../tools");
|
|
59
59
|
var constants_1 = require("../../constants");
|
|
@@ -63,7 +63,7 @@ function getUserShares(provider, packageId, registry, indexes, user) {
|
|
|
63
63
|
return __generator(this, function (_a) {
|
|
64
64
|
switch (_a.label) {
|
|
65
65
|
case 0:
|
|
66
|
-
transactionBlock = new
|
|
66
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
67
67
|
target = "".concat(packageId, "::typus_dov_single::get_user_shares");
|
|
68
68
|
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(indexes), transactionBlock.pure(user)];
|
|
69
69
|
transactionBlock.moveCall({
|
|
@@ -145,7 +145,7 @@ function getAuctionMaxSize(provider, packageId, typeArguments, registry, additio
|
|
|
145
145
|
return __generator(this, function (_a) {
|
|
146
146
|
switch (_a.label) {
|
|
147
147
|
case 0:
|
|
148
|
-
transactionBlock = new
|
|
148
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
149
149
|
target = "".concat(packageId, "::typus_dov_single::get_auction_max_size");
|
|
150
150
|
transactionBlockArguments = [
|
|
151
151
|
transactionBlock.pure(registry),
|
|
@@ -174,7 +174,7 @@ function getMaxLossPerUnit(provider, packageId, typeArguments, registry, additio
|
|
|
174
174
|
return __generator(this, function (_a) {
|
|
175
175
|
switch (_a.label) {
|
|
176
176
|
case 0:
|
|
177
|
-
transactionBlock = new
|
|
177
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
178
178
|
target = "".concat(packageId, "::typus_dov_single::get_max_loss_per_unit");
|
|
179
179
|
transactionBlockArguments = [
|
|
180
180
|
transactionBlock.pure(registry),
|
|
@@ -203,7 +203,7 @@ function getAuctionTotalBidSize(provider, packageId, typeArguments, registry, in
|
|
|
203
203
|
return __generator(this, function (_a) {
|
|
204
204
|
switch (_a.label) {
|
|
205
205
|
case 0:
|
|
206
|
-
transactionBlock = new
|
|
206
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
207
207
|
target = "".concat(packageId, "::typus_dov_single::get_auction_total_bid_size");
|
|
208
208
|
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(index)];
|
|
209
209
|
transactionBlock.moveCall({
|
|
@@ -226,7 +226,7 @@ function getAuctionBids(provider, packageId, typeArguments, registry, index) {
|
|
|
226
226
|
return __generator(this, function (_a) {
|
|
227
227
|
switch (_a.label) {
|
|
228
228
|
case 0:
|
|
229
|
-
transactionBlock = new
|
|
229
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
230
230
|
target = "".concat(packageId, "::typus_dov_single::get_auction_bids");
|
|
231
231
|
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(index)];
|
|
232
232
|
transactionBlock.moveCall({
|
|
@@ -267,7 +267,7 @@ function getVaultUserShares(provider, packageId, typeArguments, registry, index)
|
|
|
267
267
|
return __generator(this, function (_a) {
|
|
268
268
|
switch (_a.label) {
|
|
269
269
|
case 0:
|
|
270
|
-
transactionBlock = new
|
|
270
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
271
271
|
target = "".concat(packageId, "::typus_dov_single::get_vault_user_shares");
|
|
272
272
|
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(index)];
|
|
273
273
|
transactionBlock.moveCall({
|
|
@@ -322,7 +322,7 @@ function getAdditionalConfigs(provider, packageId, typeArguments, registry, addi
|
|
|
322
322
|
return __generator(this, function (_a) {
|
|
323
323
|
switch (_a.label) {
|
|
324
324
|
case 0:
|
|
325
|
-
transactionBlock = new
|
|
325
|
+
transactionBlock = new transactions_1.TransactionBlock();
|
|
326
326
|
target = "".concat(packageId, "::typus_dov_single::get_additional_configs");
|
|
327
327
|
transactionBlockArguments = [
|
|
328
328
|
transactionBlock.pure(registry),
|
|
@@ -53,7 +53,7 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
55
|
exports.getUpdateConfigTx = exports.getOtcTx = void 0;
|
|
56
|
-
var
|
|
56
|
+
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
57
57
|
var constants_1 = require("../../constants");
|
|
58
58
|
/**
|
|
59
59
|
public(friend) entry fun otc<D_TOKEN, B_TOKEN>(
|
|
@@ -76,7 +76,7 @@ function getOtcTx(gasBudget, packageId, typeArguments, registry, index, coins, d
|
|
|
76
76
|
return __awaiter(this, void 0, void 0, function () {
|
|
77
77
|
var tx, amount, _a, coin;
|
|
78
78
|
return __generator(this, function (_b) {
|
|
79
|
-
tx = new
|
|
79
|
+
tx = new transactions_1.TransactionBlock();
|
|
80
80
|
if (!usingSponsoredGasCoin &&
|
|
81
81
|
(typeArguments[0] == "0x2::sui::SUI" ||
|
|
82
82
|
typeArguments[0] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
|
|
@@ -129,7 +129,7 @@ function getUpdateConfigTx(gasBudget, packageId, registry, requests) {
|
|
|
129
129
|
return __awaiter(this, void 0, void 0, function () {
|
|
130
130
|
var tx;
|
|
131
131
|
return __generator(this, function (_a) {
|
|
132
|
-
tx = new
|
|
132
|
+
tx = new transactions_1.TransactionBlock();
|
|
133
133
|
requests.forEach(function (request) {
|
|
134
134
|
tx.moveCall({
|
|
135
135
|
target: "".concat(packageId, "::tds_authorized_entry::update_config"),
|