@typus/typus-sdk 1.0.26 → 1.0.28
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 +0 -15
- package/lib/constants.js +1 -29
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/authorized-entry.js +7 -7
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/manager-entry.js +18 -18
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/portfolio-vault.d.ts +2 -2
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/portfolio-vault.js +2 -2
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/user-entry.js +9 -9
- package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/view-function.d.ts +4 -2
- package/lib/utils/{portfolio/multiple-collateral/user-share.js → typus-dov-double/view-function.js} +50 -3
- package/lib/utils/{portfolio/single-collateral → typus-dov-single}/portfolio-vault.d.ts +2 -2
- package/lib/utils/{portfolio/single-collateral → typus-dov-single}/portfolio-vault.js +2 -2
- package/lib/utils/{portfolio/single-collateral → typus-dov-single}/user-entry.js +8 -8
- package/lib/utils/{portfolio/single-collateral → typus-dov-single}/view-function.d.ts +2 -1
- package/lib/utils/{portfolio/single-collateral/user-share.js → typus-dov-single/view-function.js} +60 -3
- package/package.json +2 -2
- package/lib/config.json +0 -33
- package/lib/utils/portfolio/multiple-collateral/user-share.d.ts +0 -9
- package/lib/utils/portfolio/multiple-collateral/view-function.js +0 -88
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedAddPortfolioVaultAuthorizedUserTx.d.ts +0 -5
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedAddPortfolioVaultAuthorizedUserTx.js +0 -61
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedDeliveryTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedDeliveryTx.js +0 -63
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedNewPortfolioVaultTx.d.ts +0 -39
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedNewPortfolioVaultTx.js +0 -118
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedRemovePortfolioVaultAuthorizedUserTx.d.ts +0 -5
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedRemovePortfolioVaultAuthorizedUserTx.js +0 -61
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateCapacityTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateCapacityTx.js +0 -58
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateUpcomingVaultConfigTx.d.ts +0 -5
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateUpcomingVaultConfigTx.js +0 -72
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateWarmupVaultConfigTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/authorized/getAuthorizedUpdateWarmupVaultConfigTx.js +0 -66
- package/lib/utils/portfolio/single-collateral/manager/getAddAuthorizedUserTx.d.ts +0 -9
- package/lib/utils/portfolio/single-collateral/manager/getAddAuthorizedUserTx.js +0 -65
- package/lib/utils/portfolio/single-collateral/manager/getAddPortfolioVaultAuthorizedUserTx.d.ts +0 -11
- package/lib/utils/portfolio/single-collateral/manager/getAddPortfolioVaultAuthorizedUserTx.js +0 -67
- package/lib/utils/portfolio/single-collateral/manager/getCloseAuctionTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/manager/getCloseAuctionTx.js +0 -64
- package/lib/utils/portfolio/single-collateral/manager/getCloseVaultTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/manager/getCloseVaultTx.js +0 -58
- package/lib/utils/portfolio/single-collateral/manager/getDeliveryTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/manager/getDeliveryTx.js +0 -64
- package/lib/utils/portfolio/single-collateral/manager/getEvolutionTx.d.ts +0 -16
- package/lib/utils/portfolio/single-collateral/manager/getEvolutionTx.js +0 -80
- package/lib/utils/portfolio/single-collateral/manager/getNewManagerTx.d.ts +0 -9
- package/lib/utils/portfolio/single-collateral/manager/getNewManagerTx.js +0 -65
- package/lib/utils/portfolio/single-collateral/manager/getNewPortfolioVaultTx.d.ts +0 -39
- package/lib/utils/portfolio/single-collateral/manager/getNewPortfolioVaultTx.js +0 -118
- package/lib/utils/portfolio/single-collateral/manager/getRemoveAuthorizedUserTx.d.ts +0 -9
- package/lib/utils/portfolio/single-collateral/manager/getRemoveAuthorizedUserTx.js +0 -65
- package/lib/utils/portfolio/single-collateral/manager/getRemoveManagerTx.d.ts +0 -7
- package/lib/utils/portfolio/single-collateral/manager/getRemoveManagerTx.js +0 -63
- package/lib/utils/portfolio/single-collateral/manager/getRemovePortfolioVaultAuthorizedUserTx.d.ts +0 -11
- package/lib/utils/portfolio/single-collateral/manager/getRemovePortfolioVaultAuthorizedUserTx.js +0 -67
- package/lib/utils/portfolio/single-collateral/manager/getUpdateCapacityTx.d.ts +0 -2
- package/lib/utils/portfolio/single-collateral/manager/getUpdateCapacityTx.js +0 -58
- package/lib/utils/portfolio/single-collateral/user-share.d.ts +0 -8
- package/lib/utils/portfolio/single-collateral/view-function.js +0 -98
- /package/lib/utils/{portfolio/leader-board.d.ts → leader-board.d.ts} +0 -0
- /package/lib/utils/{portfolio/leader-board.js → leader-board.js} +0 -0
- /package/lib/utils/{portfolio/mint.d.ts → mint.d.ts} +0 -0
- /package/lib/utils/{portfolio/mint.js → mint.js} +0 -0
- /package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/authorized-entry.d.ts +0 -0
- /package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/manager-entry.d.ts +0 -0
- /package/lib/utils/{portfolio/multiple-collateral → typus-dov-double}/user-entry.d.ts +0 -0
- /package/lib/utils/{portfolio/single-collateral → typus-dov-single}/user-entry.d.ts +0 -0
package/lib/constants.d.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import { Connection } from "@mysten/sui.js";
|
|
2
|
-
export declare const TOKEN_PACKAGE: string;
|
|
3
|
-
export declare const TOKEN_REGISTRY_SUI = "0x3b87b3f0403f527d28fd1301074a12446f43817a";
|
|
4
|
-
export declare const ORACLE_PACKAGE: string;
|
|
5
|
-
export declare const TIME_ORACLE = "0x6";
|
|
6
2
|
export declare const CLOCK = "0x6";
|
|
7
3
|
export declare const SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
|
8
|
-
export declare const BTC_ORACLE: string;
|
|
9
|
-
export declare const ETH_ORACLE: string;
|
|
10
|
-
export declare const SUI_ORACLE: string;
|
|
11
|
-
export declare const APT_ORACLE: string;
|
|
12
|
-
export declare const DOGE_ORACLE: string;
|
|
13
|
-
export declare const PORTFOLIO_PACKAGE: string;
|
|
14
|
-
export declare const REGISTRY: string;
|
|
15
|
-
export declare const MODULE = "single_collateral";
|
|
16
|
-
export declare const SINGLE_COLLATERAL_DEPOSIT_VAULT_REGISTRY: string;
|
|
17
|
-
export declare const SINGLE_COLLATERAL_BID_VAULT_REGISTRY: string;
|
|
18
|
-
export declare const TEST_MINT_TOKEN = "0x672612858fcb5c6abf944638253142820c251753";
|
|
19
4
|
export declare const PRICE_DECIMAL = 8;
|
|
20
5
|
export declare const TOKEN_DECIMAL = 9;
|
|
21
6
|
export declare const DEFAULT_TYPE_ARGUMENT = "0x2::sui::SUI";
|
package/lib/constants.js
CHANGED
|
@@ -1,37 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PERFORMANCE_FEE_SUB_VAULT_TAG = exports.PREMIUM_SUB_VAULT_TAG = exports.BIDDER_SUB_VAULT_TAG = exports.WARMUP_SUB_VAULT_TAG = exports.INACTIVE_SUB_VAULT_TAG = exports.DEACTIVATING_SUB_VAULT_TAG = exports.ACTIVE_SUB_VAULT_TAG = exports.testnetConnection = exports.TOKEN_NAME_TO_MODULE = exports.TOKEN_NAME = exports.FAKE_TOKEN_TYPE_ARGUMENT = exports.DEFAULT_TYPE_ARGUMENT = exports.TOKEN_DECIMAL = exports.PRICE_DECIMAL = exports.
|
|
3
|
+
exports.PERFORMANCE_FEE_SUB_VAULT_TAG = exports.PREMIUM_SUB_VAULT_TAG = exports.BIDDER_SUB_VAULT_TAG = exports.WARMUP_SUB_VAULT_TAG = exports.INACTIVE_SUB_VAULT_TAG = exports.DEACTIVATING_SUB_VAULT_TAG = exports.ACTIVE_SUB_VAULT_TAG = exports.testnetConnection = exports.TOKEN_NAME_TO_MODULE = exports.TOKEN_NAME = exports.FAKE_TOKEN_TYPE_ARGUMENT = exports.DEFAULT_TYPE_ARGUMENT = exports.TOKEN_DECIMAL = exports.PRICE_DECIMAL = exports.SENDER = exports.CLOCK = void 0;
|
|
7
4
|
var sui_js_1 = require("@mysten/sui.js");
|
|
8
|
-
var config_json_1 = __importDefault(require("./config.json"));
|
|
9
|
-
var path_1 = __importDefault(require("path"));
|
|
10
|
-
var dotenv_1 = __importDefault(require("dotenv"));
|
|
11
|
-
// import .env file if exists
|
|
12
|
-
dotenv_1.default.config({ path: path_1.default.resolve(__dirname, ".env") });
|
|
13
|
-
//publish from sui-dev-token
|
|
14
|
-
exports.TOKEN_PACKAGE = config_json_1.default.TOKEN_PACKAGE;
|
|
15
|
-
exports.TOKEN_REGISTRY_SUI = "0x3b87b3f0403f527d28fd1301074a12446f43817a";
|
|
16
|
-
//publish from typus-oracle
|
|
17
|
-
exports.ORACLE_PACKAGE = config_json_1.default.ORACLE_PACKAGE;
|
|
18
|
-
exports.TIME_ORACLE = "0x6";
|
|
19
5
|
exports.CLOCK = "0x6";
|
|
20
6
|
exports.SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
|
21
|
-
exports.BTC_ORACLE = config_json_1.default.BTC_ORACLE;
|
|
22
|
-
exports.ETH_ORACLE = config_json_1.default.ETH_ORACLE;
|
|
23
|
-
exports.SUI_ORACLE = config_json_1.default.SUI_ORACLE;
|
|
24
|
-
exports.APT_ORACLE = config_json_1.default.APT_ORACLE;
|
|
25
|
-
exports.DOGE_ORACLE = config_json_1.default.DOGE_ORACLE;
|
|
26
|
-
//publish from typus-dov/cover_call
|
|
27
|
-
exports.PORTFOLIO_PACKAGE = config_json_1.default.PORTFOLIO_PACKAGE;
|
|
28
|
-
exports.REGISTRY = config_json_1.default.SINGLE_COLLATERAL_REGISTRY;
|
|
29
|
-
// export const MANAGER_CAP = config.MANAGER_CAP;
|
|
30
|
-
exports.MODULE = "single_collateral";
|
|
31
|
-
exports.SINGLE_COLLATERAL_DEPOSIT_VAULT_REGISTRY = config_json_1.default.SINGLE_COLLATERAL_DEPOSIT_VAULT_REGISTRY;
|
|
32
|
-
exports.SINGLE_COLLATERAL_BID_VAULT_REGISTRY = config_json_1.default.SINGLE_COLLATERAL_BID_VAULT_REGISTRY;
|
|
33
|
-
//publish from typus-dov/typus-dov
|
|
34
|
-
exports.TEST_MINT_TOKEN = "0x672612858fcb5c6abf944638253142820c251753";
|
|
35
7
|
exports.PRICE_DECIMAL = 8;
|
|
36
8
|
exports.TOKEN_DECIMAL = 9;
|
|
37
9
|
exports.DEFAULT_TYPE_ARGUMENT = "0x2::sui::SUI";
|
|
@@ -52,7 +52,7 @@ function getAuthorizedAddPortfolioVaultAuthorizedUserTx(gasBudget, packageId, ty
|
|
|
52
52
|
return __generator(this, function (_a) {
|
|
53
53
|
tx = new sui_js_1.TransactionBlock();
|
|
54
54
|
tx.moveCall({
|
|
55
|
-
target: "".concat(packageId, "::
|
|
55
|
+
target: "".concat(packageId, "::typus_dov_double::authorized_add_portfolio_vault_authorized_user"),
|
|
56
56
|
typeArguments: typeArguments,
|
|
57
57
|
arguments: [tx.pure(registry), tx.pure(index), tx.pure(users)],
|
|
58
58
|
});
|
|
@@ -76,7 +76,7 @@ function getAuthorizedRemovePortfolioVaultAuthorizedUserTx(gasBudget, packageId,
|
|
|
76
76
|
return __generator(this, function (_a) {
|
|
77
77
|
tx = new sui_js_1.TransactionBlock();
|
|
78
78
|
tx.moveCall({
|
|
79
|
-
target: "".concat(packageId, "::
|
|
79
|
+
target: "".concat(packageId, "::typus_dov_double::authorized_remove_portfolio_vault_authorized_user"),
|
|
80
80
|
typeArguments: typeArguments,
|
|
81
81
|
arguments: [tx.pure(registry), tx.pure(index), tx.pure(users)],
|
|
82
82
|
});
|
|
@@ -123,7 +123,7 @@ function getAuthorizedNewPortfolioVaultTx(gasBudget, packageId, typeArguments, r
|
|
|
123
123
|
return __generator(this, function (_a) {
|
|
124
124
|
tx = new sui_js_1.TransactionBlock();
|
|
125
125
|
tx.moveCall({
|
|
126
|
-
target: "".concat(packageId, "::
|
|
126
|
+
target: "".concat(packageId, "::typus_dov_double::authorized_new_portfolio_vault"),
|
|
127
127
|
typeArguments: typeArguments,
|
|
128
128
|
arguments: [
|
|
129
129
|
tx.pure(registry),
|
|
@@ -174,7 +174,7 @@ function getAuthorizedUpdateCapacityTx(gasBudget, packageId, typeArguments, regi
|
|
|
174
174
|
return __generator(this, function (_a) {
|
|
175
175
|
tx = new sui_js_1.TransactionBlock();
|
|
176
176
|
tx.moveCall({
|
|
177
|
-
target: "".concat(packageId, "::
|
|
177
|
+
target: "".concat(packageId, "::typus_dov_double::authorized_update_capacity"),
|
|
178
178
|
typeArguments: typeArguments,
|
|
179
179
|
arguments: [tx.pure(registry), tx.pure(index), tx.pure(capacity)],
|
|
180
180
|
});
|
|
@@ -202,7 +202,7 @@ function getAuthorizedUpdateWarmupVaultConfigTx(gasBudget, packageId, typeArgume
|
|
|
202
202
|
return __generator(this, function (_a) {
|
|
203
203
|
tx = new sui_js_1.TransactionBlock();
|
|
204
204
|
tx.moveCall({
|
|
205
|
-
target: "".concat(packageId, "::
|
|
205
|
+
target: "".concat(packageId, "::typus_dov_double::authorized_update_warmup_vault_config"),
|
|
206
206
|
typeArguments: typeArguments,
|
|
207
207
|
arguments: [
|
|
208
208
|
tx.pure(registry),
|
|
@@ -244,7 +244,7 @@ function getAuthorizedUpdateUpcomingVaultConfigTx(gasBudget, packageId, typeArgu
|
|
|
244
244
|
return __generator(this, function (_a) {
|
|
245
245
|
tx = new sui_js_1.TransactionBlock();
|
|
246
246
|
tx.moveCall({
|
|
247
|
-
target: "".concat(packageId, "::
|
|
247
|
+
target: "".concat(packageId, "::typus_dov_double::authorized_update_upcoming_vault_config"),
|
|
248
248
|
typeArguments: typeArguments,
|
|
249
249
|
arguments: [
|
|
250
250
|
tx.pure(registry),
|
|
@@ -283,7 +283,7 @@ function getAuthorizedDeliveryTx(gasBudget, packageId, typeArguments, registry,
|
|
|
283
283
|
return __generator(this, function (_a) {
|
|
284
284
|
tx = new sui_js_1.TransactionBlock();
|
|
285
285
|
tx.moveCall({
|
|
286
|
-
target: "".concat(packageId, "::
|
|
286
|
+
target: "".concat(packageId, "::typus_dov_double::authorized_delivery"),
|
|
287
287
|
typeArguments: typeArguments,
|
|
288
288
|
arguments: [tx.pure(registry), tx.pure(index), tx.pure(priceOracle), tx.pure("0x6")],
|
|
289
289
|
});
|
|
@@ -51,7 +51,7 @@ function getNewManagerTx(gasBudget, packageId, managerCap, users) {
|
|
|
51
51
|
return __generator(this, function (_a) {
|
|
52
52
|
tx = new sui_js_1.TransactionBlock();
|
|
53
53
|
tx.moveCall({
|
|
54
|
-
target: "".concat(packageId, "::
|
|
54
|
+
target: "".concat(packageId, "::typus_dov_double::new_manager"),
|
|
55
55
|
arguments: [tx.pure(managerCap), tx.pure(users)],
|
|
56
56
|
});
|
|
57
57
|
tx.setGasBudget(gasBudget);
|
|
@@ -73,7 +73,7 @@ function getRemoveManagerTx(gasBudget, packageId, managerCap) {
|
|
|
73
73
|
return __generator(this, function (_a) {
|
|
74
74
|
tx = new sui_js_1.TransactionBlock();
|
|
75
75
|
tx.moveCall({
|
|
76
|
-
target: "".concat(packageId, "::
|
|
76
|
+
target: "".concat(packageId, "::typus_dov_double::remove_manager"),
|
|
77
77
|
arguments: [tx.pure(managerCap)],
|
|
78
78
|
});
|
|
79
79
|
tx.setGasBudget(gasBudget);
|
|
@@ -96,7 +96,7 @@ function getAddAuthorizedUserTx(gasBudget, packageId, managerCap, registry, user
|
|
|
96
96
|
return __generator(this, function (_a) {
|
|
97
97
|
tx = new sui_js_1.TransactionBlock();
|
|
98
98
|
tx.moveCall({
|
|
99
|
-
target: "".concat(packageId, "::
|
|
99
|
+
target: "".concat(packageId, "::typus_dov_double::add_authorized_user"),
|
|
100
100
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(users)],
|
|
101
101
|
});
|
|
102
102
|
tx.setGasBudget(gasBudget);
|
|
@@ -119,7 +119,7 @@ function getRemoveAuthorizedUserTx(gasBudget, packageId, managerCap, registry, u
|
|
|
119
119
|
return __generator(this, function (_a) {
|
|
120
120
|
tx = new sui_js_1.TransactionBlock();
|
|
121
121
|
tx.moveCall({
|
|
122
|
-
target: "".concat(packageId, "::
|
|
122
|
+
target: "".concat(packageId, "::typus_dov_double::remove_authorized_user"),
|
|
123
123
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(users)],
|
|
124
124
|
});
|
|
125
125
|
tx.setGasBudget(gasBudget);
|
|
@@ -143,7 +143,7 @@ function getAddPortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArgument
|
|
|
143
143
|
return __generator(this, function (_a) {
|
|
144
144
|
tx = new sui_js_1.TransactionBlock();
|
|
145
145
|
tx.moveCall({
|
|
146
|
-
target: "".concat(packageId, "::
|
|
146
|
+
target: "".concat(packageId, "::typus_dov_double::add_portfolio_vault_authorized_user"),
|
|
147
147
|
typeArguments: typeArguments,
|
|
148
148
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(users)],
|
|
149
149
|
});
|
|
@@ -168,7 +168,7 @@ function getRemovePortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArgum
|
|
|
168
168
|
return __generator(this, function (_a) {
|
|
169
169
|
tx = new sui_js_1.TransactionBlock();
|
|
170
170
|
tx.moveCall({
|
|
171
|
-
target: "".concat(packageId, "::
|
|
171
|
+
target: "".concat(packageId, "::typus_dov_double::remove_portfolio_vault_authorized_user"),
|
|
172
172
|
typeArguments: typeArguments,
|
|
173
173
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(users)],
|
|
174
174
|
});
|
|
@@ -193,7 +193,7 @@ function getUpdateRestrictActivationTimePeriodTx(gasBudget, packageId, managerCa
|
|
|
193
193
|
return __generator(this, function (_a) {
|
|
194
194
|
tx = new sui_js_1.TransactionBlock();
|
|
195
195
|
tx.moveCall({
|
|
196
|
-
target: "".concat(packageId, "::
|
|
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)],
|
|
198
198
|
});
|
|
199
199
|
tx.setGasBudget(gasBudget);
|
|
@@ -240,7 +240,7 @@ function getNewPortfolioVaultTx(gasBudget, packageId, typeArguments, managerCap,
|
|
|
240
240
|
return __generator(this, function (_a) {
|
|
241
241
|
tx = new sui_js_1.TransactionBlock();
|
|
242
242
|
tx.moveCall({
|
|
243
|
-
target: "".concat(packageId, "::
|
|
243
|
+
target: "".concat(packageId, "::typus_dov_double::new_portfolio_vault"),
|
|
244
244
|
typeArguments: typeArguments,
|
|
245
245
|
arguments: [
|
|
246
246
|
tx.pure(managerCap),
|
|
@@ -293,7 +293,7 @@ function getUpdateCapacityTx(gasBudget, packageId, typeArguments, managerCap, re
|
|
|
293
293
|
return __generator(this, function (_a) {
|
|
294
294
|
tx = new sui_js_1.TransactionBlock();
|
|
295
295
|
tx.moveCall({
|
|
296
|
-
target: "".concat(packageId, "::
|
|
296
|
+
target: "".concat(packageId, "::typus_dov_double::update_capacity"),
|
|
297
297
|
typeArguments: typeArguments,
|
|
298
298
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(capacity)],
|
|
299
299
|
});
|
|
@@ -322,7 +322,7 @@ function getUpdateWarmupVaultConfigTx(gasBudget, packageId, typeArguments, manag
|
|
|
322
322
|
return __generator(this, function (_a) {
|
|
323
323
|
tx = new sui_js_1.TransactionBlock();
|
|
324
324
|
tx.moveCall({
|
|
325
|
-
target: "".concat(packageId, "::
|
|
325
|
+
target: "".concat(packageId, "::typus_dov_double::update_warmup_vault_config"),
|
|
326
326
|
typeArguments: typeArguments,
|
|
327
327
|
arguments: [
|
|
328
328
|
tx.pure(managerCap),
|
|
@@ -366,7 +366,7 @@ function getUpdateUpcomingVaultConfigTx(gasBudget, packageId, typeArguments, man
|
|
|
366
366
|
return __generator(this, function (_a) {
|
|
367
367
|
tx = new sui_js_1.TransactionBlock();
|
|
368
368
|
tx.moveCall({
|
|
369
|
-
target: "".concat(packageId, "::
|
|
369
|
+
target: "".concat(packageId, "::typus_dov_double::update_upcoming_vault_config"),
|
|
370
370
|
typeArguments: typeArguments,
|
|
371
371
|
arguments: [
|
|
372
372
|
tx.pure(managerCap),
|
|
@@ -407,7 +407,7 @@ function getDeliveryTx(gasBudget, packageId, typeArguments, managerCap, registry
|
|
|
407
407
|
return __generator(this, function (_a) {
|
|
408
408
|
tx = new sui_js_1.TransactionBlock();
|
|
409
409
|
tx.moveCall({
|
|
410
|
-
target: "".concat(packageId, "::
|
|
410
|
+
target: "".concat(packageId, "::typus_dov_double::delivery"),
|
|
411
411
|
typeArguments: typeArguments,
|
|
412
412
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(priceOracle), tx.pure("0x6")],
|
|
413
413
|
});
|
|
@@ -433,7 +433,7 @@ function getEvolutionTx(gasBudget, packageId, typeArguments, managerCap, registr
|
|
|
433
433
|
return __generator(this, function (_a) {
|
|
434
434
|
tx = new sui_js_1.TransactionBlock();
|
|
435
435
|
tx.moveCall({
|
|
436
|
-
target: "".concat(packageId, "::
|
|
436
|
+
target: "".concat(packageId, "::typus_dov_double::evolution"),
|
|
437
437
|
typeArguments: typeArguments,
|
|
438
438
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(priceOracle), tx.pure("0x6")],
|
|
439
439
|
});
|
|
@@ -457,7 +457,7 @@ function getCloseTx(gasBudget, packageId, typeArguments, managerCap, registry, i
|
|
|
457
457
|
return __generator(this, function (_a) {
|
|
458
458
|
tx = new sui_js_1.TransactionBlock();
|
|
459
459
|
tx.moveCall({
|
|
460
|
-
target: "".concat(packageId, "::
|
|
460
|
+
target: "".concat(packageId, "::typus_dov_double::evolution"),
|
|
461
461
|
typeArguments: typeArguments,
|
|
462
462
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index)],
|
|
463
463
|
});
|
|
@@ -486,7 +486,7 @@ function getUpdateActiveVaultConfigTx(gasBudget, packageId, typeArguments, manag
|
|
|
486
486
|
return __generator(this, function (_a) {
|
|
487
487
|
tx = new sui_js_1.TransactionBlock();
|
|
488
488
|
tx.moveCall({
|
|
489
|
-
target: "".concat(packageId, "::
|
|
489
|
+
target: "".concat(packageId, "::typus_dov_double::update_active_vault_config"),
|
|
490
490
|
typeArguments: typeArguments,
|
|
491
491
|
arguments: [
|
|
492
492
|
tx.pure(managerCap),
|
|
@@ -522,7 +522,7 @@ function getNewAuctionTx(gasBudget, packageId, typeArguments, managerCap, regist
|
|
|
522
522
|
return __generator(this, function (_a) {
|
|
523
523
|
tx = new sui_js_1.TransactionBlock();
|
|
524
524
|
tx.moveCall({
|
|
525
|
-
target: "".concat(packageId, "::
|
|
525
|
+
target: "".concat(packageId, "::typus_dov_double::new_auction"),
|
|
526
526
|
typeArguments: typeArguments,
|
|
527
527
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure(start_ts_ms), tx.pure(price_oracle), tx.pure("0x6")],
|
|
528
528
|
});
|
|
@@ -547,7 +547,7 @@ function getTerminateVaultTx(gasBudget, packageId, typeArguments, managerCap, re
|
|
|
547
547
|
return __generator(this, function (_a) {
|
|
548
548
|
tx = new sui_js_1.TransactionBlock();
|
|
549
549
|
tx.moveCall({
|
|
550
|
-
target: "".concat(packageId, "::
|
|
550
|
+
target: "".concat(packageId, "::typus_dov_double::terminate_vault"),
|
|
551
551
|
typeArguments: typeArguments,
|
|
552
552
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure("0x6")],
|
|
553
553
|
});
|
|
@@ -572,7 +572,7 @@ function getTerminateAuctionTx(gasBudget, packageId, typeArguments, managerCap,
|
|
|
572
572
|
return __generator(this, function (_a) {
|
|
573
573
|
tx = new sui_js_1.TransactionBlock();
|
|
574
574
|
tx.moveCall({
|
|
575
|
-
target: "".concat(packageId, "::
|
|
575
|
+
target: "".concat(packageId, "::typus_dov_double::terminate_auction"),
|
|
576
576
|
typeArguments: typeArguments,
|
|
577
577
|
arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(index), tx.pure("0x6")],
|
|
578
578
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JsonRpcProvider } from "@mysten/sui.js";
|
|
2
|
-
import { DepositVault, BidVault } from "
|
|
3
|
-
import { Auction } from "
|
|
2
|
+
import { DepositVault, BidVault } from "../typus-framework/vault";
|
|
3
|
+
import { Auction } from "../typus-framework/dutch";
|
|
4
4
|
export interface PortfolioVault {
|
|
5
5
|
vaultId: string;
|
|
6
6
|
typeArgs: string[];
|
|
@@ -37,8 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getPortfolioVaults = void 0;
|
|
40
|
-
var vault_1 = require("
|
|
41
|
-
var dutch_1 = require("
|
|
40
|
+
var vault_1 = require("../typus-framework/vault");
|
|
41
|
+
var dutch_1 = require("../typus-framework/dutch");
|
|
42
42
|
function getPortfolioVaults(provider, registry, token_deposit_vault_registry, usd_deposit_vault_registry, bid_vault_registry, index) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
44
|
var portfolioVaultIds, portfolioVaults, tokenDepositVaultIds, usdDepositVaultIds, bidVaultIds;
|
|
@@ -55,7 +55,7 @@ function getDepositTx(gasBudget, packageId, typeArguments, registry, index, o_co
|
|
|
55
55
|
return __generator(this, function (_a) {
|
|
56
56
|
tx = new sui_js_1.TransactionBlock();
|
|
57
57
|
tx.moveCall({
|
|
58
|
-
target: "".concat(packageId, "::
|
|
58
|
+
target: "".concat(packageId, "::typus_dov_double::deposit"),
|
|
59
59
|
typeArguments: typeArguments,
|
|
60
60
|
arguments: [
|
|
61
61
|
tx.pure(registry),
|
|
@@ -86,7 +86,7 @@ function getWithdrawTx(gasBudget, packageId, typeArguments, registry, index, sha
|
|
|
86
86
|
return __generator(this, function (_a) {
|
|
87
87
|
tx = new sui_js_1.TransactionBlock();
|
|
88
88
|
tx.moveCall({
|
|
89
|
-
target: "".concat(packageId, "::
|
|
89
|
+
target: "".concat(packageId, "::typus_dov_double::withdraw"),
|
|
90
90
|
typeArguments: typeArguments,
|
|
91
91
|
arguments: [tx.pure(registry), tx.pure(index), tx.pure(share ? [share] : [])],
|
|
92
92
|
});
|
|
@@ -110,7 +110,7 @@ function getClaimTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
110
110
|
return __generator(this, function (_a) {
|
|
111
111
|
tx = new sui_js_1.TransactionBlock();
|
|
112
112
|
tx.moveCall({
|
|
113
|
-
target: "".concat(packageId, "::
|
|
113
|
+
target: "".concat(packageId, "::typus_dov_double::claim"),
|
|
114
114
|
typeArguments: typeArguments,
|
|
115
115
|
arguments: [tx.pure(registry), tx.pure(index)],
|
|
116
116
|
});
|
|
@@ -134,7 +134,7 @@ function getHarvestTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
134
134
|
return __generator(this, function (_a) {
|
|
135
135
|
tx = new sui_js_1.TransactionBlock();
|
|
136
136
|
tx.moveCall({
|
|
137
|
-
target: "".concat(packageId, "::
|
|
137
|
+
target: "".concat(packageId, "::typus_dov_double::harvest"),
|
|
138
138
|
typeArguments: typeArguments,
|
|
139
139
|
arguments: [tx.pure(registry), tx.pure(index)],
|
|
140
140
|
});
|
|
@@ -158,7 +158,7 @@ function getClaimAndHarvestTx(gasBudget, packageId, typeArguments, registry, ind
|
|
|
158
158
|
return __generator(this, function (_a) {
|
|
159
159
|
tx = new sui_js_1.TransactionBlock();
|
|
160
160
|
tx.moveCall({
|
|
161
|
-
target: "".concat(packageId, "::
|
|
161
|
+
target: "".concat(packageId, "::typus_dov_double::claim_and_harvest"),
|
|
162
162
|
typeArguments: typeArguments,
|
|
163
163
|
arguments: [tx.pure(registry), tx.pure(index)],
|
|
164
164
|
});
|
|
@@ -183,7 +183,7 @@ function getCompoundTokenTx(gasBudget, packageId, typeArguments, registry, index
|
|
|
183
183
|
return __generator(this, function (_a) {
|
|
184
184
|
tx = new sui_js_1.TransactionBlock();
|
|
185
185
|
tx.moveCall({
|
|
186
|
-
target: "".concat(packageId, "::
|
|
186
|
+
target: "".concat(packageId, "::typus_dov_double::compound_token"),
|
|
187
187
|
typeArguments: typeArguments,
|
|
188
188
|
arguments: [tx.pure(registry), tx.pure(index), tx.makeMoveVec({ objects: u_coins.map(function (id) { return tx.object(id); }) })],
|
|
189
189
|
});
|
|
@@ -208,7 +208,7 @@ function getCompoundUsdTx(gasBudget, packageId, typeArguments, registry, index,
|
|
|
208
208
|
return __generator(this, function (_a) {
|
|
209
209
|
tx = new sui_js_1.TransactionBlock();
|
|
210
210
|
tx.moveCall({
|
|
211
|
-
target: "".concat(packageId, "::
|
|
211
|
+
target: "".concat(packageId, "::typus_dov_double::compound_usd"),
|
|
212
212
|
typeArguments: typeArguments,
|
|
213
213
|
arguments: [tx.pure(registry), tx.pure(index), tx.makeMoveVec({ objects: o_coins.map(function (id) { return tx.object(id); }) })],
|
|
214
214
|
});
|
|
@@ -233,7 +233,7 @@ function getUnsubscribeTx(gasBudget, packageId, typeArguments, registry, index,
|
|
|
233
233
|
return __generator(this, function (_a) {
|
|
234
234
|
tx = new sui_js_1.TransactionBlock();
|
|
235
235
|
tx.moveCall({
|
|
236
|
-
target: "".concat(packageId, "::
|
|
236
|
+
target: "".concat(packageId, "::typus_dov_double::unsubscribe"),
|
|
237
237
|
typeArguments: typeArguments,
|
|
238
238
|
arguments: [tx.pure(registry), tx.pure(index), tx.pure(share ? [share] : [])],
|
|
239
239
|
});
|
|
@@ -261,7 +261,7 @@ function getNewBidTx(gasBudget, packageId, typeArguments, registry, index, price
|
|
|
261
261
|
return __generator(this, function (_a) {
|
|
262
262
|
tx = new sui_js_1.TransactionBlock();
|
|
263
263
|
tx.moveCall({
|
|
264
|
-
target: "".concat(packageId, "::
|
|
264
|
+
target: "".concat(packageId, "::typus_dov_double::new_bid"),
|
|
265
265
|
typeArguments: typeArguments,
|
|
266
266
|
arguments: [
|
|
267
267
|
tx.pure(registry),
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { JsonRpcProvider } from "@mysten/sui.js";
|
|
2
|
-
import { DepositVaultUserShare, BidVaultUserShare } from "
|
|
2
|
+
import { DepositVaultUserShare, BidVaultUserShare } from "../typus-framework/vault";
|
|
3
3
|
export interface UserShare {
|
|
4
4
|
index: string;
|
|
5
|
-
|
|
5
|
+
tokenDepositVaultUserShare: DepositVaultUserShare;
|
|
6
|
+
usdDepositVaultUserShare: DepositVaultUserShare;
|
|
6
7
|
bidVaultUserShare: BidVaultUserShare;
|
|
7
8
|
}
|
|
9
|
+
export declare function getUserShares(provider: JsonRpcProvider, packageId: string, registry: string, indexes: string[], user: string): Promise<Map<string, UserShare>>;
|
|
8
10
|
export declare function getAuctionMaxSize(provider: JsonRpcProvider, packageId: string, typeArguments: string[], registry: string, index: string): Promise<BigInt>;
|
|
9
11
|
export declare function getMaxLossPerUnit(provider: JsonRpcProvider, packageId: string, typeArguments: string[], registry: string, index: string): Promise<BigInt>;
|
package/lib/utils/{portfolio/multiple-collateral/user-share.js → typus-dov-double/view-function.js}
RENAMED
|
@@ -52,9 +52,10 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
52
52
|
return ar;
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
exports.getUserShares = void 0;
|
|
55
|
+
exports.getMaxLossPerUnit = exports.getAuctionMaxSize = exports.getUserShares = void 0;
|
|
56
56
|
var sui_js_1 = require("@mysten/sui.js");
|
|
57
|
-
var tools_1 = require("
|
|
57
|
+
var tools_1 = require("../tools");
|
|
58
|
+
var constants_1 = require("../../constants");
|
|
58
59
|
function getUserShares(provider, packageId, registry, indexes, user) {
|
|
59
60
|
return __awaiter(this, void 0, void 0, function () {
|
|
60
61
|
var transactionBlock, target, transactionBlockArguments, bytes, result, user_share_bytes, index, tag, position, share;
|
|
@@ -62,7 +63,7 @@ function getUserShares(provider, packageId, registry, indexes, user) {
|
|
|
62
63
|
switch (_a.label) {
|
|
63
64
|
case 0:
|
|
64
65
|
transactionBlock = new sui_js_1.TransactionBlock();
|
|
65
|
-
target = "".concat(packageId, "::
|
|
66
|
+
target = "".concat(packageId, "::typus_dov_double::get_user_shares");
|
|
66
67
|
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(indexes), transactionBlock.pure(user)];
|
|
67
68
|
transactionBlock.moveCall({
|
|
68
69
|
target: target,
|
|
@@ -164,3 +165,49 @@ function getUserShares(provider, packageId, registry, indexes, user) {
|
|
|
164
165
|
});
|
|
165
166
|
}
|
|
166
167
|
exports.getUserShares = getUserShares;
|
|
168
|
+
function getAuctionMaxSize(provider, packageId, typeArguments, registry, index) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
170
|
+
var transactionBlock, target, transactionBlockArguments, bytes;
|
|
171
|
+
return __generator(this, function (_a) {
|
|
172
|
+
switch (_a.label) {
|
|
173
|
+
case 0:
|
|
174
|
+
transactionBlock = new sui_js_1.TransactionBlock();
|
|
175
|
+
target = "".concat(packageId, "::typus_dov_double::get_auction_max_size");
|
|
176
|
+
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(index)];
|
|
177
|
+
transactionBlock.moveCall({
|
|
178
|
+
target: target,
|
|
179
|
+
typeArguments: typeArguments,
|
|
180
|
+
arguments: transactionBlockArguments,
|
|
181
|
+
});
|
|
182
|
+
return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: constants_1.SENDER })];
|
|
183
|
+
case 1:
|
|
184
|
+
bytes = (_a.sent()).results[0].returnValues[0][0];
|
|
185
|
+
return [2 /*return*/, (0, tools_1.U64FromBytes)(bytes.reverse())];
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
exports.getAuctionMaxSize = getAuctionMaxSize;
|
|
191
|
+
function getMaxLossPerUnit(provider, packageId, typeArguments, registry, index) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
193
|
+
var transactionBlock, target, transactionBlockArguments, bytes;
|
|
194
|
+
return __generator(this, function (_a) {
|
|
195
|
+
switch (_a.label) {
|
|
196
|
+
case 0:
|
|
197
|
+
transactionBlock = new sui_js_1.TransactionBlock();
|
|
198
|
+
target = "".concat(packageId, "::typus_dov_double::get_max_loss_per_unit");
|
|
199
|
+
transactionBlockArguments = [transactionBlock.pure(registry), transactionBlock.pure(index)];
|
|
200
|
+
transactionBlock.moveCall({
|
|
201
|
+
target: target,
|
|
202
|
+
typeArguments: typeArguments,
|
|
203
|
+
arguments: transactionBlockArguments,
|
|
204
|
+
});
|
|
205
|
+
return [4 /*yield*/, provider.devInspectTransactionBlock({ transactionBlock: transactionBlock, sender: constants_1.SENDER })];
|
|
206
|
+
case 1:
|
|
207
|
+
bytes = (_a.sent()).results[0].returnValues[0][0];
|
|
208
|
+
return [2 /*return*/, (0, tools_1.U64FromBytes)(bytes.reverse())];
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
exports.getMaxLossPerUnit = getMaxLossPerUnit;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JsonRpcProvider } from "@mysten/sui.js";
|
|
2
|
-
import { DepositVault, BidVault } from "
|
|
3
|
-
import { Auction } from "
|
|
2
|
+
import { DepositVault, BidVault } from "../typus-framework/vault";
|
|
3
|
+
import { Auction } from "../typus-framework/dutch";
|
|
4
4
|
export interface PortfolioVault {
|
|
5
5
|
vaultId: string;
|
|
6
6
|
typeArgs: string[];
|
|
@@ -37,8 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getPortfolioVaults = void 0;
|
|
40
|
-
var vault_1 = require("
|
|
41
|
-
var dutch_1 = require("
|
|
40
|
+
var vault_1 = require("../typus-framework/vault");
|
|
41
|
+
var dutch_1 = require("../typus-framework/dutch");
|
|
42
42
|
function getPortfolioVaults(provider, registry, deposit_vault_registry, bid_vault_registry, index) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
44
|
var portfolioVaultIds, portfolioVaults, depositVaultIds, bidVaultIds;
|
|
@@ -54,7 +54,7 @@ function getDepositTx(gasBudget, packageId, typeArguments, registry, index, coin
|
|
|
54
54
|
return __generator(this, function (_a) {
|
|
55
55
|
tx = new sui_js_1.TransactionBlock();
|
|
56
56
|
tx.moveCall({
|
|
57
|
-
target: "".concat(packageId, "::
|
|
57
|
+
target: "".concat(packageId, "::typus_dov_single::deposit"),
|
|
58
58
|
typeArguments: typeArguments,
|
|
59
59
|
arguments: [tx.pure(registry), tx.pure(index), tx.makeMoveVec({ objects: coins.map(function (id) { return tx.object(id); }) }), tx.pure(amount)],
|
|
60
60
|
});
|
|
@@ -79,7 +79,7 @@ function getWithdrawTx(gasBudget, packageId, typeArguments, registry, index, sha
|
|
|
79
79
|
return __generator(this, function (_a) {
|
|
80
80
|
tx = new sui_js_1.TransactionBlock();
|
|
81
81
|
tx.moveCall({
|
|
82
|
-
target: "".concat(packageId, "::
|
|
82
|
+
target: "".concat(packageId, "::typus_dov_single::withdraw"),
|
|
83
83
|
typeArguments: typeArguments,
|
|
84
84
|
arguments: [tx.pure(registry), tx.pure(index), tx.pure(share ? [share] : [])],
|
|
85
85
|
});
|
|
@@ -103,7 +103,7 @@ function getClaimTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
103
103
|
return __generator(this, function (_a) {
|
|
104
104
|
tx = new sui_js_1.TransactionBlock();
|
|
105
105
|
tx.moveCall({
|
|
106
|
-
target: "".concat(packageId, "::
|
|
106
|
+
target: "".concat(packageId, "::typus_dov_single::claim"),
|
|
107
107
|
typeArguments: typeArguments,
|
|
108
108
|
arguments: [tx.pure(registry), tx.pure(index)],
|
|
109
109
|
});
|
|
@@ -127,7 +127,7 @@ function getHarvestTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
127
127
|
return __generator(this, function (_a) {
|
|
128
128
|
tx = new sui_js_1.TransactionBlock();
|
|
129
129
|
tx.moveCall({
|
|
130
|
-
target: "".concat(packageId, "::
|
|
130
|
+
target: "".concat(packageId, "::typus_dov_single::harvest"),
|
|
131
131
|
typeArguments: typeArguments,
|
|
132
132
|
arguments: [tx.pure(registry), tx.pure(index)],
|
|
133
133
|
});
|
|
@@ -151,7 +151,7 @@ function getClaimAndHarvestTx(gasBudget, packageId, typeArguments, registry, ind
|
|
|
151
151
|
return __generator(this, function (_a) {
|
|
152
152
|
tx = new sui_js_1.TransactionBlock();
|
|
153
153
|
tx.moveCall({
|
|
154
|
-
target: "".concat(packageId, "::
|
|
154
|
+
target: "".concat(packageId, "::typus_dov_single::claim_and_harvest"),
|
|
155
155
|
typeArguments: typeArguments,
|
|
156
156
|
arguments: [tx.pure(registry), tx.pure(index)],
|
|
157
157
|
});
|
|
@@ -175,7 +175,7 @@ function getCompoundTx(gasBudget, packageId, typeArguments, registry, index) {
|
|
|
175
175
|
return __generator(this, function (_a) {
|
|
176
176
|
tx = new sui_js_1.TransactionBlock();
|
|
177
177
|
tx.moveCall({
|
|
178
|
-
target: "".concat(packageId, "::
|
|
178
|
+
target: "".concat(packageId, "::typus_dov_single::compound"),
|
|
179
179
|
typeArguments: typeArguments,
|
|
180
180
|
arguments: [tx.pure(registry), tx.pure(index)],
|
|
181
181
|
});
|
|
@@ -200,7 +200,7 @@ function getUnsubscribeTx(gasBudget, packageId, typeArguments, registry, index,
|
|
|
200
200
|
return __generator(this, function (_a) {
|
|
201
201
|
tx = new sui_js_1.TransactionBlock();
|
|
202
202
|
tx.moveCall({
|
|
203
|
-
target: "".concat(packageId, "::
|
|
203
|
+
target: "".concat(packageId, "::typus_dov_single::unsubscribe"),
|
|
204
204
|
typeArguments: typeArguments,
|
|
205
205
|
arguments: [tx.pure(registry), tx.pure(index), tx.pure(share ? [share] : [])],
|
|
206
206
|
});
|
|
@@ -228,7 +228,7 @@ function getNewBidTx(gasBudget, packageId, typeArguments, registry, index, price
|
|
|
228
228
|
return __generator(this, function (_a) {
|
|
229
229
|
tx = new sui_js_1.TransactionBlock();
|
|
230
230
|
tx.moveCall({
|
|
231
|
-
target: "".concat(packageId, "::
|
|
231
|
+
target: "".concat(packageId, "::typus_dov_single::new_bid"),
|
|
232
232
|
typeArguments: typeArguments,
|
|
233
233
|
arguments: [
|
|
234
234
|
tx.pure(registry),
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { JsonRpcProvider } from "@mysten/sui.js";
|
|
2
|
-
import { DepositVaultUserShare, BidVaultUserShare } from "
|
|
2
|
+
import { DepositVaultUserShare, BidVaultUserShare } from "../typus-framework/vault";
|
|
3
3
|
export interface UserShare {
|
|
4
4
|
index: string;
|
|
5
5
|
depositVaultUserShare: DepositVaultUserShare;
|
|
6
6
|
bidVaultUserShare: BidVaultUserShare;
|
|
7
7
|
}
|
|
8
|
+
export declare function getUserShares(provider: JsonRpcProvider, packageId: string, registry: string, indexes: string[], user: string): Promise<Map<string, UserShare>>;
|
|
8
9
|
export declare function getAuctionMaxSize(provider: JsonRpcProvider, packageId: string, typeArguments: string[], registry: string, index: string, priceOracle: string): Promise<BigInt>;
|
|
9
10
|
export declare function getMaxLossPerUnit(provider: JsonRpcProvider, packageId: string, typeArguments: string[], registry: string, index: string, priceOracle: string): Promise<BigInt>;
|