@typus/typus-sdk 1.4.1 → 1.4.3-a

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.
@@ -1,5 +1,5 @@
1
1
  import { SuiClient } from "@mysten/sui.js/client";
2
- import { BidShare } from "@/typus-dov-single-v2/view-function";
2
+ import { BidShare } from "src/typus-dov-single-v2/view-function";
3
3
  export declare function getUserStrategies(provider: SuiClient, packageId: string, registry: string, strategyPool: string, user: string): Promise<StrategyV2[]>;
4
4
  export declare function getStrategyPool(provider: SuiClient, strategyPool: string): Promise<StrategyPoolV2>;
5
5
  export interface StrategyPoolV2 {
@@ -69,7 +69,7 @@ exports.getStrategies = getStrategies;
69
69
  exports.getStrategyIds = getStrategyIds;
70
70
  var bcs_1 = require("@mysten/bcs");
71
71
  var transactions_1 = require("@mysten/sui.js/transactions");
72
- var tools_1 = require("@/utils/tools");
72
+ var tools_1 = require("src/utils/tools");
73
73
  var bcs = new bcs_1.BCS((0, bcs_1.getSuiMoveConfig)());
74
74
  bcs.registerStructType("StrategyV2", {
75
75
  id: "address",
@@ -55,7 +55,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
55
55
  exports.getOtcTx = getOtcTx;
56
56
  exports.getUpdateConfigTx = getUpdateConfigTx;
57
57
  var transactions_1 = require("@mysten/sui.js/transactions");
58
- var constants_1 = require("@/constants");
58
+ var constants_1 = require("src/constants");
59
59
  /**
60
60
  public(friend) entry fun otc<D_TOKEN, B_TOKEN>(
61
61
  registry: &mut Registry,
@@ -28,7 +28,7 @@ exports.getMfudCloseStrategyTx = getMfudCloseStrategyTx;
28
28
  exports.getMfudWithdrawProfitStrategyTx = getMfudWithdrawProfitStrategyTx;
29
29
  exports.getMfudCompoundWithRedeemTx = getMfudCompoundWithRedeemTx;
30
30
  var transactions_1 = require("@mysten/sui.js/transactions");
31
- var constants_1 = require("@/constants");
31
+ var constants_1 = require("src/constants");
32
32
  function getMfudRaiseFundTx(input) {
33
33
  var typusTokenBalance = input.raiseCoins.length > 0
34
34
  ? input.tx.moveCall({
@@ -27,7 +27,7 @@ exports.getMultiTransferBidReceiptTx = getMultiTransferBidReceiptTx;
27
27
  exports.getRebateTx = getRebateTx;
28
28
  exports.getCompoundWithRedeemTx = getCompoundWithRedeemTx;
29
29
  var transactions_1 = require("@mysten/sui.js/transactions");
30
- var constants_1 = require("@/constants");
30
+ var constants_1 = require("src/constants");
31
31
  /**
32
32
  public fun public_raise_fund<D_TOKEN, B_TOKEN>(
33
33
  typus_ecosystem_version: &TypusEcosystemVersion,
@@ -95,11 +95,11 @@ var moment_1 = __importDefault(require("moment"));
95
95
  var view_function_1 = require("../view-function");
96
96
  var vault_1 = require("./vault");
97
97
  var token_1 = require("./token");
98
- var tools_1 = require("@/utils/tools");
99
- var view_function_2 = require("@/auto-bid/view-function");
100
- var token_2 = require("@/constants/token");
98
+ var tools_1 = require("src/utils/tools");
99
+ var view_function_2 = require("src/auto-bid/view-function");
100
+ var token_2 = require("src/constants/token");
101
101
  var token_3 = require("./token");
102
- var price_1 = require("@/utils/api/price");
102
+ var price_1 = require("src/utils/api/price");
103
103
  var config_json_1 = __importDefault(require("../../../config.json"));
104
104
  var PriceDecimal = (0, bignumber_js_1.default)(10).pow(8);
105
105
  exports.ASSET_INFO = {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseAssets = exports.AbbrStrategyName = exports.Period = void 0;
4
- var token_1 = require("@/constants/token");
4
+ var token_1 = require("src/constants/token");
5
5
  exports.Period = {
6
6
  0: "daily",
7
7
  1: "weekly",
@@ -73,7 +73,7 @@ exports.getFromSentio = getFromSentio;
73
73
  exports.getNewBidFromSentio = getNewBidFromSentio;
74
74
  exports.getExerciseFromSentio = getExerciseFromSentio;
75
75
  exports.getDepositorCashFlows = getDepositorCashFlows;
76
- var token_1 = require("@/constants/token");
76
+ var token_1 = require("src/constants/token");
77
77
  var bignumber_js_1 = __importDefault(require("bignumber.js"));
78
78
  function getUserEvents(provider, sender, cursor) {
79
79
  return __awaiter(this, void 0, void 0, function () {
@@ -53,7 +53,7 @@ exports.parseVaultHistory = parseVaultHistory;
53
53
  exports.getVaultHistoryFromDB = getVaultHistoryFromDB;
54
54
  exports.convertGroupEventToVaultHistory = convertGroupEventToVaultHistory;
55
55
  exports.parseBidEvents = parseBidEvents;
56
- var token_1 = require("@/constants/token");
56
+ var token_1 = require("src/constants/token");
57
57
  function getVaultHistoryEvents(provider, originPackage, startTimeMs) {
58
58
  return __awaiter(this, void 0, void 0, function () {
59
59
  var senderFilter, result, datas, hasNextPage, cursor, result;
@@ -60,7 +60,7 @@ exports.getMyBids = getMyBids;
60
60
  exports.getRefundShares = getRefundShares;
61
61
  var transactions_1 = require("@mysten/sui.js/transactions");
62
62
  var bcs_1 = require("@mysten/bcs");
63
- var tools_1 = require("@/utils/tools");
63
+ var tools_1 = require("src/utils/tools");
64
64
  var SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
65
65
  function getVaults(provider_1, packageId_1, registry_1, indexes_1) {
66
66
  return __awaiter(this, arguments, void 0, function (provider, packageId, registry, indexes, sender) {
@@ -3,7 +3,7 @@ import { LiquidityPool } from "./lp-pool/structs";
3
3
  import { Markets, SymbolMarket } from "./trading/structs";
4
4
  import { TradingOrder, Position } from "./position/structs";
5
5
  import { LpUserShare, StakePool } from "./stake-pool/structs";
6
- import { PythClient } from "@/utils/pyth/pythClient";
6
+ import { PythClient } from "src/utils/pyth/pythClient";
7
7
  export declare function getLpPools(provider: SuiClient, config: {
8
8
  REGISTRY: {
9
9
  LP_POOL_REGISTRY: string;
@@ -62,11 +62,11 @@ var transactions_1 = require("@mysten/sui.js/transactions");
62
62
  var readVec_1 = require("./readVec");
63
63
  var functions_2 = require("./stake-pool/functions");
64
64
  var structs_3 = require("./stake-pool/structs");
65
- var constants_1 = require("@/constants");
66
- var token_1 = require("@/constants/token");
67
- var constant_1 = require("@/utils/pyth/constant");
65
+ var constants_1 = require("src/constants");
66
+ var token_1 = require("src/constants/token");
67
+ var constant_1 = require("src/utils/pyth/constant");
68
68
  var _1 = require(".");
69
- var pythClient_1 = require("@/utils/pyth/pythClient");
69
+ var pythClient_1 = require("src/utils/pyth/pythClient");
70
70
  var bcs_1 = require("@mysten/bcs");
71
71
  function getLpPools(provider, config) {
72
72
  return __awaiter(this, void 0, void 0, function () {
@@ -4,7 +4,7 @@ exports.readVecPosition = readVecPosition;
4
4
  exports.readVecOrder = readVecOrder;
5
5
  exports.readVecShares = readVecShares;
6
6
  var bcs_1 = require("@mysten/bcs");
7
- var tools_1 = require("@/utils/tools");
7
+ var tools_1 = require("src/utils/tools");
8
8
  // import { Position, TradingOrder } from "./position/structs";
9
9
  function readVecPosition(bytes) {
10
10
  var reader = new bcs_1.BcsReader(bytes);
@@ -1,6 +1,6 @@
1
1
  import { TransactionBlock } from "@mysten/sui.js/transactions";
2
- import { PythClient } from "@/utils/pyth/pythClient";
3
- import { TOKEN } from "@/constants/token";
2
+ import { PythClient } from "src/utils/pyth/pythClient";
3
+ import { TOKEN } from "src/constants/token";
4
4
  import { Position, TradingOrder } from "../position/structs";
5
5
  export declare function createTradingOrder(config: {
6
6
  REGISTRY: {
@@ -57,10 +57,10 @@ exports.cancelTradingOrder = cancelTradingOrder;
57
57
  exports.increaseCollateral = increaseCollateral;
58
58
  exports.releaseCollateral = releaseCollateral;
59
59
  var functions_1 = require("../trading/functions");
60
- var constants_1 = require("@/constants");
61
- var pythClient_1 = require("@/utils/pyth/pythClient");
62
- var constant_1 = require("@/utils/pyth/constant");
63
- var token_1 = require("@/constants/token");
60
+ var constants_1 = require("src/constants");
61
+ var pythClient_1 = require("src/utils/pyth/pythClient");
62
+ var constant_1 = require("src/utils/pyth/constant");
63
+ var token_1 = require("src/constants/token");
64
64
  var __1 = require("..");
65
65
  function createTradingOrder(config, input) {
66
66
  return __awaiter(this, void 0, void 0, function () {
@@ -1,6 +1,6 @@
1
1
  import { TransactionBlock } from "@mysten/sui.js/transactions";
2
- import { PythClient } from "@/utils/pyth/pythClient";
3
- import { TOKEN } from "@/constants/token";
2
+ import { PythClient } from "src/utils/pyth/pythClient";
3
+ import { TOKEN } from "src/constants/token";
4
4
  import { Position } from "../position/structs";
5
5
  export declare function createTradingOrderWithBidReceipt(config: {
6
6
  PACKAGE_ORIGIN: {
@@ -40,11 +40,11 @@ exports.createTradingOrderWithBidReceipt = createTradingOrderWithBidReceipt;
40
40
  exports.reduceOptionCollateralPositionSize = reduceOptionCollateralPositionSize;
41
41
  var functions_1 = require("../trading/functions");
42
42
  var constants_1 = require("src/constants");
43
- var pythClient_1 = require("@/utils/pyth/pythClient");
44
- var constant_1 = require("@/utils/pyth/constant");
45
- var token_1 = require("@/constants/token");
43
+ var pythClient_1 = require("src/utils/pyth/pythClient");
44
+ var constant_1 = require("src/utils/pyth/constant");
45
+ var token_1 = require("src/constants/token");
46
46
  var __1 = require("..");
47
- var user_entry_1 = require("@/typus-dov-single-v2/entry/user-entry");
47
+ var user_entry_1 = require("src/typus-dov-single-v2/entry/user-entry");
48
48
  function createTradingOrderWithBidReceipt(config, input) {
49
49
  return __awaiter(this, void 0, void 0, function () {
50
50
  var TOKEN, BASE_TOKEN, cToken, bToken, baseToken, collateralBidReceipt;
@@ -1,7 +1,7 @@
1
1
  import { TransactionBlock } from "@mysten/sui.js/transactions";
2
2
  import { LiquidityPool } from "../lp-pool/structs";
3
- import { PythClient } from "@/utils/pyth/pythClient";
4
- import { TOKEN } from "@/constants/token";
3
+ import { PythClient } from "src/utils/pyth/pythClient";
4
+ import { TOKEN } from "src/constants/token";
5
5
  export declare function mintStakeLp(config: {
6
6
  REGISTRY: {
7
7
  LP_POOL_REGISTRY: string;
@@ -69,13 +69,13 @@ exports.swap = swap;
69
69
  exports.unsubscribe = unsubscribe;
70
70
  exports.harvest = harvest;
71
71
  var functions_1 = require("../lp-pool/functions");
72
- var constants_1 = require("@/constants");
73
- var pythClient_1 = require("@/utils/pyth/pythClient");
74
- var token_1 = require("@/constants/token");
72
+ var constants_1 = require("src/constants");
73
+ var pythClient_1 = require("src/utils/pyth/pythClient");
74
+ var token_1 = require("src/constants/token");
75
75
  var functions_2 = require("../stake-pool/functions");
76
76
  var functions_3 = require("../lp-pool/functions");
77
77
  var functions_4 = require("../stake-pool/functions");
78
- var constant_1 = require("@/utils/pyth/constant");
78
+ var constant_1 = require("src/utils/pyth/constant");
79
79
  var __1 = require("..");
80
80
  function mintStakeLp(config, input) {
81
81
  return __awaiter(this, void 0, void 0, function () {
@@ -503,7 +503,7 @@ function getAccumulatedNotionalVolumeUSD() {
503
503
  });
504
504
  });
505
505
  }
506
- var token_1 = require("@/constants/token");
506
+ var token_1 = require("src/constants/token");
507
507
  (function () { return __awaiter(void 0, void 0, void 0, function () {
508
508
  return __generator(this, function (_a) {
509
509
  return [2 /*return*/];
@@ -1,6 +1,6 @@
1
1
  import { SuiPriceServiceConnection, SuiPythClient } from "@pythnetwork/pyth-sui-js";
2
2
  import { TransactionBlock } from "@mysten/sui.js/transactions";
3
- import { TOKEN } from "@/constants/token";
3
+ import { TOKEN } from "src/constants/token";
4
4
  import { ObjectId } from "@pythnetwork/pyth-sui-js/lib/client";
5
5
  export declare class PythClient {
6
6
  network: "MAINNET" | "TESTNET";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.4.1",
5
+ "version": "1.4.3-a",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.11.1",
8
8
  "@mysten/kiosk": "0.8.10",