@typus/typus-sdk 1.4.15 → 1.4.17

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.
@@ -0,0 +1,97 @@
1
+ {
2
+ "RPC_ENDPOINT": "https://fullnode.mainnet.sui.io:443",
3
+ "PACKAGE_ORIGIN": {
4
+ "DOV_SINGLE": "0x321848bf1ae327a9e022ccb3701940191e02fa193ab160d9c0e49cd3c003de3a",
5
+ "DICE": "0x37816d28c34cc0df82655ca97b3f066112a5f3c202cbb4aaa76c8af54e779750",
6
+ "FRAMEWORK": "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274",
7
+ "TOKEN": "0xd8f04cd2a16c19c17428c3b4c22b01dd06740423b93fb7ee88fbe2676a82849d",
8
+ "NFT": "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196",
9
+ "ORACLE": "0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a",
10
+ "TYPUS": "0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a",
11
+ "PERP": "",
12
+ "SAFU": "0x8e4f745b9c0748d24d3c4248658a385822c5ae6c38dba4d8739ad2389a14529f"
13
+ },
14
+ "PACKAGE": {
15
+ "DOV_SINGLE": "0xf7ef57f3bd98455262417886b17eb4d5af1a18d2dec19c5b34e512bf4fc10acf",
16
+ "DICE": "0x14f1676b7a3b3a6c35eeff747bdb6fcb5bfe920755086c4af1079c23107c22aa",
17
+ "FRAMEWORK": "0x5c6648fb219c046256488486d23d4af7bc562d5ab5c382e1f4b558066a327fe8",
18
+ "TOKEN": "0xd8f04cd2a16c19c17428c3b4c22b01dd06740423b93fb7ee88fbe2676a82849d",
19
+ "NFT": "0xba06aae31d9b7c9f651e783272c7e4f776fb5ae17e89d525b75a17b099f58202",
20
+ "ORACLE": "0x978f65df8570a075298598a9965c18de9087f9e888eb3430fe20334f5c554cfd",
21
+ "TYPUS": "0xf5c7e61fd28d1ed38711f03e1c5ffc6c5b8435eff386132fc5822efe6d90b138",
22
+ "PERP": "",
23
+ "SAFU": "0x3260c1f95368ce4e2e6c90c4a2447cc0c7da58fdfa49aa207a382dcf51b85611"
24
+ },
25
+ "VERSION": {
26
+ "TYPUS": "0xd2882b992e986250b3304b59530700bc3850939f9a77e9e9dfa9cf1656f84b3d",
27
+ "PERP": "",
28
+ "SAFU": "0x340b1050764bd269739d579f1c99608a59705a23d1a2ea77e47344f695d720df"
29
+ },
30
+ "REGISTRY": {
31
+ "DICE": {
32
+ "COMBO_DICE": "0x16657424191772d40afac15738abb26cdf41172d2d205694b04d1300ad403c55",
33
+ "TAILS_EXP": "0x7679ab7157f13ec945579e3098ba589eb8b4eec841c775799d2aa22b565187c7"
34
+ },
35
+ "DOV": {
36
+ "DOV_SINGLE": "0x3d70b09359e3ca8301ae0abeda4f2fdf72ce313ba58c919ce568e5f535fd2ea8"
37
+ },
38
+ "PERP": {
39
+ "LIQUIDITY_POOL": "",
40
+ "LP_POOL": "",
41
+ "MARKET": "",
42
+ "STAKE_POOL": "",
43
+ "TLP": ""
44
+ },
45
+ "TOKEN": {
46
+ "INJ": "",
47
+ "MFUD": "0xb8d7e7ab783e56700c0212bd9f0938bba9dd3e7241c149e6c52b21334ec45ece",
48
+ "SEI": ""
49
+ },
50
+ "TYPUS": {
51
+ "AIRDROP": "0x4b451f4632bd64af82d5e6fe46e20705c9468bd46d6758a0f7093fde2930d084",
52
+ "LEADERBOARD": "0xc515a3e7fd12ba902f7f1ebe52c676136e1b34cb614ae9c79a46b257ca7d5534",
53
+ "TAILS_STAKING": "0xeca3e88577dc3f45df8b7bace51f26b126271ce4c5fa33b3739fd7b69fc16559",
54
+ "USER": "0xb1b16eb4845b5ee1a29432b1f2bcfe8cbb33c234492baf31a706d82e28e18bce",
55
+ "TGLD": "0x8ee1af362fe9e0a29f6bad48d8ff44249ece5aaa77a4302c2ffcc90950e52ed2"
56
+ },
57
+ "SAFU": {
58
+ "SAFU": "0x61ecdd1a8536663da6e60e93cbe14c61e2ece85366dbfa8b9509b699a52a54d0"
59
+ }
60
+ },
61
+ "OBJECT": {
62
+ "NFT_TRANSFER_POLICY": "0x55475b9e16d9a0176dcef37f83a1921b15f2cbd2711a5f30b9d952c0c8f5f957",
63
+ "STRATEGY_POOL": "0x2c60ddd50d76beb00faa025962d566359a6ea05b1f7f19ac6bd050f4db8c885c",
64
+ "TAILS_IDS": "0x3a6a403eb7c123b6f4d25081078b6f07c0ee5987d3ac8ab3e6bcf707c1b0e778",
65
+ "TGLD_COIN_METADATA": "0x3a070c729606334a2be7c51ab28da9a1101b0de01452dd62c10cda0f7a5795d2",
66
+ "TGLD_TOKEN_POLICY": "0xd9461bd329f1df24be9698131b6e2c2b9eaac7c9cf6d76689112f2e57be12009",
67
+ "TLP_TREASURY_CAP": ""
68
+ },
69
+ "ORACLE": {
70
+ "AFSUI": "",
71
+ "APT": "0x401ed2a4de92950351c54edaa9a8dce5e38bdb6b06e248935c6f6f7d361a99d6",
72
+ "BUCK": "",
73
+ "CETUS": "0xaedaa2e76661471924c1ca7edae069317cbe082798dd3bfa31694dc873102532",
74
+ "INJ": "",
75
+ "JUP": "0xd4a5fe0b48a6f8cbe528b5760462f0d9cad8080c8aebb1a9c63c2176c58fb3b3",
76
+ "NAVX": "0x726c5bafa4e8240d36bb42493c82bca30b920e2bcab1da1dca973322352e9f63",
77
+ "SCA": "0x8eb94035d6d54ad6b444dd67310b9ff54a05a54ecf77d5b22a43a75495774bb6",
78
+ "SEI": "",
79
+ "SOL": "0x9712ad1cba00a437fb669e4df1a59568e4267bd8a8ce989452fb63c9f00b59ab",
80
+ "SUI": "0xeb6b3e3300ff884604ead6172b0aeadee3854980cab65a7feb57300b04b74cc1",
81
+ "TURBOS": "0x819ff07b5768d7b9b428b69b123140f6a74b04eaa978a4cbab9055025bd1536d",
82
+ "USDY": "",
83
+ "BTC": "0x61813dc2e46dba41b14507857827f0ed7e99b0be242548828769728b81c8fab5",
84
+ "ETH": "0x253bbaaa35275240cf6df03258489707ea059762831e4102ebaabafd442bc935"
85
+ },
86
+ "TOKEN": {
87
+ "AFSUI": "",
88
+ "FUD": "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD",
89
+ "MFUD": "0xd8f04cd2a16c19c17428c3b4c22b01dd06740423b93fb7ee88fbe2676a82849d::mfud::MFUD",
90
+ "SUI": "0x2::sui::SUI",
91
+ "TGLD": "0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a::tgld::TGLD",
92
+ "TLP": "",
93
+ "USD": "",
94
+ "USDC": "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",
95
+ "USDT": ""
96
+ }
97
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "RPC_ENDPOINT": "https://sui-testnet.blastapi.io:443/7f446a12-c4ab-4e3c-b2d8-ebb0fcbe5cdd",
3
+ "PACKAGE_ORIGIN": {
4
+ "DOV_SINGLE": "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f",
5
+ "DICE": "0x9b43ee208a3b235810c145bca1161d1a71d08bfe76b1e55bb3db319ea95d0149",
6
+ "FRAMEWORK": "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded",
7
+ "TOKEN": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c",
8
+ "NFT": "0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828",
9
+ "ORACLE": "0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73",
10
+ "TYPUS": "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277",
11
+ "PERP": "0x4bcf9eade4480bcb9fcd3139ec8d22afda34b25af06092904fcccb06e1b8043c",
12
+ "SAFU": ""
13
+ },
14
+ "PACKAGE": {
15
+ "DOV_SINGLE": "0x2e462aa0224bec76acaea81c51ca5b9ae4b27ec50281a764797c84148c8a463f",
16
+ "DICE": "0x112321a74fb0903aff5c654603c19060552a704b5fb13a6cefa84e1147e66db8",
17
+ "FRAMEWORK": "0x90ca6e2393e3adc91b4e9b70ab16c017e5f70f7094b6f09b913fef2833a656e9",
18
+ "TOKEN": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c",
19
+ "NFT": "0x0f5162014f18686640b8d0adefd60c3fe5b377413ec4f1e77001c67d96f8501a",
20
+ "ORACLE": "0x71fbc7acaf513561dabdeb846e7dd5288108e56edb0b6de8d4999c4dfce21f66",
21
+ "TYPUS": "0x88124ef8caf346cc19bf7447e72cf540fb6f228f16806effdc3dafccee747264",
22
+ "PERP": "0x5ff329ee25f3936b7f3e191de702cc0dd8beca7e1ac833f7d73ea653d47ef4ad",
23
+ "SAFU": ""
24
+ },
25
+ "VERSION": {
26
+ "TYPUS": "0x2edc980f55e31ba3c660f4e2650e915fd47fb33b524b01a52a116719adac8be7",
27
+ "PERP": "0x3aafe933e23a9e10f3a34febf6a2996961989558315bae46458fd234496e8a97",
28
+ "SAFU": ""
29
+ },
30
+ "REGISTRY": {
31
+ "DICE": {
32
+ "COMBO_DICE": "0x034f58472d9604eee3e1fb5896e4d6a14f426c17c504cdb9dcdc7269ca4ad3b4",
33
+ "TAILS_EXP": "0x37e0c8c80a5099d5dfe1b0aeae62e3f01916be73935090efb9c95279b7bb1ce7"
34
+ },
35
+ "DOV": {
36
+ "DOV_SINGLE": "0x0285cbf4aa8585be6c978235d11d06fa35773266ede040d38d34e1d79b049460"
37
+ },
38
+ "PERP": {
39
+ "LIQUIDITY_POOL": "0x40d1ea0f0dfebbe0b130f08c0c62bfee1c58f6a99c0960cb4f08fd3040bf4714",
40
+ "LP_POOL": "0x0a213c906f7a9fc369f1e7d0ffabb7701bfd1cdff04679b1132c5838306e3394",
41
+ "MARKET": "0xa522a55413d109c568c3d42cbcd0e344000d61086f390df672663424e0329288",
42
+ "STAKE_POOL": "0xc853c36a9317a709ac92b611daa910b43805876ba6ca78fbbab9d51359994c5b",
43
+ "TLP": "0x4e40c46ebe73b3fdca694040747b99a1b25600ddeae26f9fbb8cda5a683d26de"
44
+ },
45
+ "TOKEN": {
46
+ "INJ": "0xcb7e2cb6c8c1138909b5bfec13b92ebde7117c82b395df46e3fe0e3a35d84d14",
47
+ "MFUD": "0x7ad87901531693f1baa541712947860dcc543617e11b14993ad70d20daf159c6",
48
+ "SEI": "0xf1ed3e5474476c7378039d44c7a088e0196129d3a183b3251fff2bb34fc2bcad"
49
+ },
50
+ "TYPUS": {
51
+ "AIRDROP": "0xfb2fbf261f6050d100bcd026ffa0076e088506b1bec26313947239303e2a0224",
52
+ "LEADERBOARD": "0x4faabe5a4a509a145fc9bae95761d34c11571da4cb25d681f06ffcbadbc355e7",
53
+ "TAILS_STAKING": "0x989bd585b580dfc22d9d7656a5807b2f6c8fe36260a2003ef697adc8a38d21af",
54
+ "USER": "0x5f1894a3680949111a7530d63ceda6857d31521ab2de625e9f826cae17c9a7f3",
55
+ "TGLD": "0x2118b4056c89d90a6dc40d198fbe239cb8e83f7ea20daaf4ea53341c7fdb043c"
56
+ }
57
+ },
58
+ "OBJECT": {
59
+ "NFT_TRANSFER_POLICY": "0x1c62271ecc443c3d92a8fe8f5662e877856d26b971d967f66937a65f55160831",
60
+ "STRATEGY_POOL": "0x50b01081469d032e04bfcbd057614b1359376920f55c7bebd076e0e2af07a57f",
61
+ "TAILS_IDS": "0xf4ea1c4432823ebde3b0c1f0705a45b08571b48237db879502b8ba336ea5b916",
62
+ "TGLD_COIN_METADATA": "0xf77f8aabe64dccef0e568f2ef58a6ca74bdfb31786507cc35b7626a4df0d0ebc",
63
+ "TGLD_TOKEN_POLICY": "0x17875c2f772053cd148bd2b8b8a40160db3f841825d8963192f8394d5c18974c",
64
+ "TLP_TREASURY_CAP": "0xeb835b5db70144d098f7b4885ac525900fb5a6b47565f31d2275e34479ef7889"
65
+ },
66
+ "ORACLE": {
67
+ "AFSUI": "0xacd75f051b8be445226f92d873fbf9bbc26fe25cec5708b1aeec44286dbbef5b",
68
+ "APT": "0x984e79d6cf30cc518e5e69dacacfa8db3e5f0674535c533061a7990c8a714c48",
69
+ "BUCK": "0x22ef75c17468f6ed24574f26011f7fcf61a7b983009c9ba6cacc28ae24ff1782",
70
+ "CETUS": "0xe8142c490363475a4ad0b9af02ac5a543962584f3a99cdb8754d909be6ec550d",
71
+ "INJ": "0xcdf04e2c9f400a713dc46748bc6eddddf472e669e604d13ed1eae8895a46d6c9",
72
+ "JUP": "0xd4a5fe0b48a6f8cbe528b5760462f0d9cad8080c8aebb1a9c63c2176c58fb3b3",
73
+ "NAVX": "0x726c5bafa4e8240d36bb42493c82bca30b920e2bcab1da1dca973322352e9f63",
74
+ "SCA": "0x8eb94035d6d54ad6b444dd67310b9ff54a05a54ecf77d5b22a43a75495774bb6",
75
+ "SEI": "0x3ad81c9951cb4e2e8908c184cea7e9cb52822ef7679f166ef9acf870bfc8e4f2",
76
+ "SOL": "0x0edabd97c679967e00d508c766fb4be0195890f96343bd3a58e10fa5e8063c96",
77
+ "SUI": "0x770f17817e809f22d3cf3ba5f452056622a31dd6a1db7c60c94c5a598aff9a29",
78
+ "TURBOS": "0x9fb8a445ba7ed37251f0ccd778b6cd7010174734562a18921d0684d4e01afe34",
79
+ "USDY": "0x604408004efddc03323cd6f6a72b98695dbdced57a630ca2622e6b96fc94a3f6",
80
+ "BTC": "0xaa72a2b370cf45a7b1363a2b9e3f0c57c05863375b984e2ca0928973574404f2",
81
+ "ETH": "0x0ac9f9275eb0ac33b7f59741b1df67a6783af2db6d2a4e5aba8ce350d5b6b260"
82
+ },
83
+ "TOKEN": {
84
+ "AFSUI": "0xd31923b6821fb7ba32d23e514b43d307da6ef991f9ef1af2cc4e26a0992ac87a::afsui::AFSUI",
85
+ "FUD": "0x461efa7ee5aa1b27e44450d79e2104e7fc0991461e9eb1c2a3fc1f44cd554856::fud::FUD",
86
+ "MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c::mfud::MFUD",
87
+ "SUI": "0x2::sui::SUI",
88
+ "TGLD": "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::tgld::TGLD",
89
+ "TLP": "0x4bcf9eade4480bcb9fcd3139ec8d22afda34b25af06092904fcccb06e1b8043c::tlp::TLP",
90
+ "USD": "0x01a05edb0e5e670196de98fbbf544180d129dd4ec11c3c57f742badf0304650d::trading::USD",
91
+ "USDT": "0xa38dad920880f81ea514de6db007d3a84e9116a29c60b3e69bbe418c2d9f553c::usdt::USDT"
92
+ }
93
+ }
@@ -3,6 +3,7 @@ import { PublicKey } from "@solana/web3.js";
3
3
  import { PriceData } from "@pythnetwork/client";
4
4
  import { SuiClient } from "@mysten/sui.js/dist/cjs/client";
5
5
  import BigNumber from "bignumber.js";
6
+ import { TypusConfig } from "src/utils";
6
7
  export declare const ASSET_INFO: {
7
8
  BTC: {
8
9
  product: PublicKey;
@@ -114,7 +115,7 @@ export declare const parsePythOracleData: (data: PriceData[], decimals: {
114
115
  }) => {
115
116
  [key: string]: CoinInfo;
116
117
  };
117
- export declare const fetchPrices: (provider: SuiClient, network: string) => Promise<{
118
+ export declare const fetchPrices: (provider: SuiClient, config: TypusConfig) => Promise<{
118
119
  [key: string]: CoinInfo;
119
120
  }>;
120
121
  export declare const calcIncentiveRate: (incentiveBp: any) => number;
@@ -129,7 +130,7 @@ export declare const parseBidReceipt: (vaults: Vault[], bidReceipts: {
129
130
  bidVaultsInfo: BidVaultInfo[];
130
131
  };
131
132
  export declare const parseBid: (bidVaultInfo: BidVaultInfo, bidShare: BidShare, auction: Auction | null, oTokenPrice: string, isAutoBid: boolean) => Bid & OrderBy;
132
- export declare const getUserBidReceipts: (provider: SuiClient, network: string, originFramworkAddress: string, userAddress: string) => Promise<{
133
+ export declare const getUserBidReceipts: (provider: SuiClient, originFramworkAddress: string, userAddress: string) => Promise<{
133
134
  [key: string]: Receipt[];
134
135
  }>;
135
136
  /**
@@ -146,6 +147,6 @@ export declare const getUserBidReceipts: (provider: SuiClient, network: string,
146
147
  * @param prices - tokens prices (usd pair on Pyth)
147
148
  * @return User Bids.
148
149
  */
149
- export declare const fetchUserBids: (provider: SuiClient, network: string, packageAddress: string, framworkAddress: string, originFramworkAddress: string, registryAddress: string, strategyPoolAddress: string, userAddress: string, prices?: {
150
+ export declare const fetchUserBids: (provider: SuiClient, config: TypusConfig, userAddress: string, prices?: {
150
151
  [key: string]: CoinInfo;
151
152
  }) => Promise<any>;
@@ -97,7 +97,6 @@ var client_1 = require("@pythnetwork/client");
97
97
  var token_1 = require("./token");
98
98
  var constants_1 = require("../../constants");
99
99
  var bignumber_js_1 = __importDefault(require("bignumber.js"));
100
- var config_json_1 = __importDefault(require("../../../config.json"));
101
100
  var moment_1 = __importDefault(require("moment"));
102
101
  var PriceDecimal = (0, bignumber_js_1.default)(10).pow(8);
103
102
  exports.ASSET_INFO = {
@@ -253,13 +252,13 @@ var parsePythOracleData = function (data, decimals) {
253
252
  return prices;
254
253
  };
255
254
  exports.parsePythOracleData = parsePythOracleData;
256
- var fetchPrices = function (provider, network) { return __awaiter(void 0, void 0, void 0, function () {
255
+ var fetchPrices = function (provider, config) { return __awaiter(void 0, void 0, void 0, function () {
257
256
  var coinObjects, oracleDecimal, PYTHNET_CLUSTER_NAME, connection, pythPublicKey, pythClient, priceData, prices, suiusd, suifud, fudusd, suiafsui, afsuiusd, suinavx, navxusd, suibuck, buckusd, usdyusdc, usdyusdcWithDecimal, scasui, scausd;
258
257
  var _a, _b;
259
258
  return __generator(this, function (_c) {
260
259
  switch (_c.label) {
261
260
  case 0: return [4 /*yield*/, provider.multiGetObjects({
262
- ids: Object.values(config_json_1.default[network.toUpperCase()].ORACLE),
261
+ ids: Object.values(config.oracle),
263
262
  options: { showContent: true },
264
263
  })];
265
264
  case 1:
@@ -579,7 +578,7 @@ var parseBid = function (bidVaultInfo, bidShare, auction, oTokenPrice, isAutoBid
579
578
  };
580
579
  };
581
580
  exports.parseBid = parseBid;
582
- var getUserBidReceipts = function (provider, network, originFramworkAddress, userAddress) { return __awaiter(void 0, void 0, void 0, function () {
581
+ var getUserBidReceipts = function (provider, originFramworkAddress, userAddress) { return __awaiter(void 0, void 0, void 0, function () {
583
582
  var bidReceipts, result, hasNextPage, data, nextCursor, data_1, data_1_1, object, content, typeStringComponents, subtype, typeComponents, type, typePackage, vaultIndex, receipt;
584
583
  var e_1, _a;
585
584
  return __generator(this, function (_b) {
@@ -669,15 +668,21 @@ exports.getUserBidReceipts = getUserBidReceipts;
669
668
  * @param prices - tokens prices (usd pair on Pyth)
670
669
  * @return User Bids.
671
670
  */
672
- var fetchUserBids = function (provider, network, packageAddress, framworkAddress, originFramworkAddress, registryAddress, strategyPoolAddress, userAddress, prices) { return __awaiter(void 0, void 0, void 0, function () {
673
- var vaultsInfo, userReceipts, userStrategies, auctions, _a, sortedBidReceipts, bidVaultsInfo, bidShares, bidsFromBidShares, _loop_1, bidVaultsInfo_1, bidVaultsInfo_1_1, bidVaultInfo, autoBidsShares, vaultAutoBidReceipts, userStrategies_1, userStrategies_1_1, strategy, receipts, receipts_1, receipts_1_1, receiptItem, vaultIndex, receipt, autoBidVaultInfos, bidsFromStrategies, _loop_2, autoBidVaultInfos_1, autoBidVaultInfos_1_1, autoBidVaultInfo, byOrdered;
671
+ var fetchUserBids = function (provider, config, userAddress, prices) { return __awaiter(void 0, void 0, void 0, function () {
672
+ var packageAddress, registryAddress, originFramworkAddress, framworkAddress, strategyPoolAddress, vaultsInfo, userReceipts, userStrategies, auctions, _a, sortedBidReceipts, bidVaultsInfo, bidShares, bidsFromBidShares, _loop_1, bidVaultsInfo_1, bidVaultsInfo_1_1, bidVaultInfo, autoBidsShares, vaultAutoBidReceipts, userStrategies_1, userStrategies_1_1, strategy, receipts, receipts_1, receipts_1_1, receiptItem, vaultIndex, receipt, autoBidVaultInfos, bidsFromStrategies, _loop_2, autoBidVaultInfos_1, autoBidVaultInfos_1_1, autoBidVaultInfo, byOrdered;
674
673
  var e_2, _b, e_3, _c, e_4, _d, e_5, _e;
675
674
  return __generator(this, function (_f) {
676
675
  switch (_f.label) {
677
- case 0: return [4 /*yield*/, (0, view_function_1.getVaults)(provider, packageAddress, registryAddress, [])];
676
+ case 0:
677
+ packageAddress = config.package.dovSingle;
678
+ registryAddress = config.registry.dov.dovSingle;
679
+ originFramworkAddress = config.packageOrigin.framework;
680
+ framworkAddress = config.package.framework;
681
+ strategyPoolAddress = config.object.strategyPool;
682
+ return [4 /*yield*/, (0, view_function_1.getVaults)(provider, packageAddress, registryAddress, [])];
678
683
  case 1:
679
684
  vaultsInfo = _f.sent();
680
- return [4 /*yield*/, (0, exports.getUserBidReceipts)(provider, network, originFramworkAddress, userAddress)];
685
+ return [4 /*yield*/, (0, exports.getUserBidReceipts)(provider, originFramworkAddress, userAddress)];
681
686
  case 2:
682
687
  userReceipts = _f.sent();
683
688
  return [4 /*yield*/, (0, auto_bid_1.getUserStrategies)(provider, packageAddress, registryAddress, strategyPoolAddress, userAddress)];
@@ -687,7 +692,7 @@ var fetchUserBids = function (provider, network, packageAddress, framworkAddress
687
692
  case 4:
688
693
  auctions = _f.sent();
689
694
  if (!(typeof prices === "undefined")) return [3 /*break*/, 6];
690
- return [4 /*yield*/, (0, exports.fetchPrices)(provider, "testnet")];
695
+ return [4 /*yield*/, (0, exports.fetchPrices)(provider, config)];
691
696
  case 5:
692
697
  prices = _f.sent();
693
698
  _f.label = 6;
@@ -3,54 +3,15 @@ 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";
7
- export declare function getLpPools(provider: SuiClient, config: {
8
- REGISTRY: {
9
- LP_POOL: string;
10
- LIQUIDITY_POOL: string;
11
- };
12
- }): Promise<LiquidityPool[]>;
13
- export declare function getStakePools(provider: SuiClient, config: {
14
- REGISTRY: {
15
- STAKE_POOL: string;
16
- };
17
- }): Promise<StakePool[]>;
18
- export declare function getMarkets(provider: SuiClient, config: {
19
- REGISTRY: {
20
- MARKET: string;
21
- };
22
- }): Promise<Markets[]>;
6
+ import { PythClient, TypusConfig } from "../utils";
7
+ export declare function getLpPools(provider: SuiClient, config: TypusConfig): Promise<LiquidityPool[]>;
8
+ export declare function getStakePools(provider: SuiClient, config: TypusConfig): Promise<StakePool[]>;
9
+ export declare function getMarkets(provider: SuiClient, config: TypusConfig): Promise<Markets[]>;
23
10
  export declare function getSymbolMarkets(provider: SuiClient, market: Markets): Promise<Map<string, SymbolMarket>>;
24
- export declare function getUserOrders(provider: SuiClient, config: {
25
- OBJECT: {
26
- TYPUS_PERP_VERSION: string;
27
- };
28
- REGISTRY: {
29
- MARKET: string;
30
- };
31
- }, user: string): Promise<TradingOrder[]>;
32
- export declare function getUserPositions(provider: SuiClient, config: {
33
- OBJECT: {
34
- TYPUS_PERP_VERSION: string;
35
- };
36
- REGISTRY: {
37
- MARKET: string;
38
- };
39
- }, user: string): Promise<Position[]>;
40
- export declare function getUserStake(provider: SuiClient, config: {
41
- REGISTRY: {
42
- STAKE_POOL: string;
43
- };
44
- }, user: string): Promise<LpUserShare[]>;
45
- export declare function getLiquidationPrice(provider: SuiClient, config: {
46
- OBJECT: {
47
- TYPUS_PERP_VERSION: string;
48
- };
49
- REGISTRY: {
50
- LP_POOL: string;
51
- MARKET: string;
52
- };
53
- }, input: {
11
+ export declare function getUserOrders(provider: SuiClient, config: TypusConfig, user: string): Promise<TradingOrder[]>;
12
+ export declare function getUserPositions(provider: SuiClient, config: TypusConfig, user: string): Promise<Position[]>;
13
+ export declare function getUserStake(provider: SuiClient, config: TypusConfig, user: string): Promise<LpUserShare[]>;
14
+ export declare function getLiquidationPrice(provider: SuiClient, config: TypusConfig, input: {
54
15
  pythClient: PythClient;
55
16
  positions: Position[];
56
17
  user: string;
@@ -74,7 +74,7 @@ function getLpPools(provider, config) {
74
74
  return __generator(this, function (_d) {
75
75
  switch (_d.label) {
76
76
  case 0: return [4 /*yield*/, provider.getDynamicFields({
77
- parentId: config.REGISTRY.LIQUIDITY_POOL,
77
+ parentId: config.registry.perp.liquidityPool,
78
78
  })];
79
79
  case 1:
80
80
  dynamicFields = _d.sent();
@@ -119,7 +119,7 @@ function getStakePools(provider, config) {
119
119
  return __generator(this, function (_d) {
120
120
  switch (_d.label) {
121
121
  case 0: return [4 /*yield*/, provider.getDynamicFields({
122
- parentId: config.REGISTRY.STAKE_POOL,
122
+ parentId: config.registry.perp.stakePool,
123
123
  })];
124
124
  case 1:
125
125
  dynamicFields = _d.sent();
@@ -164,7 +164,7 @@ function getMarkets(provider, config) {
164
164
  return __generator(this, function (_d) {
165
165
  switch (_d.label) {
166
166
  case 0: return [4 /*yield*/, provider.getDynamicFields({
167
- parentId: config.REGISTRY.MARKET,
167
+ parentId: config.registry.perp.market,
168
168
  })];
169
169
  case 1:
170
170
  dynamicFields = _d.sent();
@@ -258,8 +258,8 @@ function getUserOrders(provider, config, user) {
258
258
  case 0:
259
259
  tx = new transactions_1.TransactionBlock();
260
260
  (0, functions_1.getUserOrders)(tx, {
261
- version: config.OBJECT.TYPUS_PERP_VERSION,
262
- registry: config.REGISTRY.MARKET,
261
+ version: config.version.perp,
262
+ registry: config.registry.perp.market,
263
263
  marketIndex: BigInt(0),
264
264
  user: user,
265
265
  });
@@ -282,8 +282,8 @@ function getUserPositions(provider, config, user) {
282
282
  case 0:
283
283
  tx = new transactions_1.TransactionBlock();
284
284
  (0, functions_1.getUserPositions)(tx, {
285
- version: config.OBJECT.TYPUS_PERP_VERSION,
286
- registry: config.REGISTRY.MARKET,
285
+ version: config.version.perp,
286
+ registry: config.registry.perp.market,
287
287
  marketIndex: BigInt(0),
288
288
  user: user,
289
289
  });
@@ -306,7 +306,7 @@ function getUserStake(provider, config, user) {
306
306
  case 0:
307
307
  tx = new transactions_1.TransactionBlock();
308
308
  (0, functions_2.getUserShares)(tx, {
309
- registry: config.REGISTRY.STAKE_POOL,
309
+ registry: config.registry.perp.stakePool,
310
310
  index: BigInt(0),
311
311
  user: user,
312
312
  });
@@ -367,9 +367,9 @@ function getLiquidationPrice(provider, config, input) {
367
367
  cToken = constants_2.tokenType[_1.NETWORK][TOKEN];
368
368
  baseToken = constants_2.tokenType[_1.NETWORK][BASE_TOKEN];
369
369
  (0, functions_1.getEstimatedLiquidationPrice)(tx, [cToken, baseToken], {
370
- version: config.OBJECT.TYPUS_PERP_VERSION,
371
- registry: config.REGISTRY.MARKET,
372
- poolRegistry: config.REGISTRY.LP_POOL,
370
+ version: config.version.perp,
371
+ registry: config.registry.perp.market,
372
+ poolRegistry: config.registry.perp.lpPool,
373
373
  marketIndex: BigInt(0),
374
374
  poolIndex: BigInt(0),
375
375
  pythState: utils_1.pythStateId[_1.NETWORK],
@@ -18,14 +18,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  exports.installEcosystemManagerCapEntry = exports.PUBLISHED_AT = exports.PACKAGE_ID = exports.NETWORK = void 0;
21
- var config_json_1 = __importDefault(require("../../config.json"));
21
+ var utils_1 = require("src/utils");
22
22
  var path_1 = __importDefault(require("path"));
23
23
  var dotenv_1 = __importDefault(require("dotenv"));
24
24
  // import .env file if exists
25
25
  dotenv_1.default.config({ path: path_1.default.resolve(__dirname, ".env") });
26
26
  exports.NETWORK = process.env.CLUSTER == "mainnet" ? "MAINNET" : "TESTNET";
27
- exports.PACKAGE_ID = process.env.CLUSTER == "mainnet" ? config_json_1.default.MAINNET.PACKAGE_ORIGIN.PERP : config_json_1.default.TESTNET.PACKAGE.PERP;
28
- exports.PUBLISHED_AT = process.env.CLUSTER == "mainnet" ? config_json_1.default.MAINNET.PACKAGE.PERP : config_json_1.default.TESTNET.PACKAGE.PERP;
27
+ var config = utils_1.TypusConfig.default(exports.NETWORK);
28
+ exports.PACKAGE_ID = config.packageOrigin.perp;
29
+ exports.PUBLISHED_AT = config.package.perp;
29
30
  var functions_1 = require("./admin/functions");
30
31
  Object.defineProperty(exports, "installEcosystemManagerCapEntry", { enumerable: true, get: function () { return functions_1.installEcosystemManagerCapEntry; } });
31
32
  __exportStar(require("./readVec"), exports);
@@ -1,19 +1,8 @@
1
1
  import { Position, TradingOrder } from "../position/structs";
2
- import { PythClient } from "../../utils";
2
+ import { PythClient, TypusConfig } from "../../utils";
3
3
  import { TOKEN } from "../../constants";
4
4
  import { TransactionBlock } from "@mysten/sui.js/transactions";
5
- export declare function createTradingOrder(config: {
6
- REGISTRY: {
7
- MARKET: string;
8
- USER: string;
9
- LEADERBOARD: string;
10
- LP_POOL: string;
11
- };
12
- OBJECT: {
13
- TYPUS_VERSION: string;
14
- TYPUS_PERP_VERSION: string;
15
- };
16
- }, input: {
5
+ export declare function createTradingOrder(config: TypusConfig, input: {
17
6
  pythClient: PythClient;
18
7
  tx: TransactionBlock;
19
8
  coins: string[];
@@ -27,42 +16,19 @@ export declare function createTradingOrder(config: {
27
16
  reduceOnly: boolean;
28
17
  linkedPositionId: string | null;
29
18
  }): Promise<TransactionBlock>;
30
- export declare function cancelTradingOrder(config: {
31
- REGISTRY: {
32
- MARKET: string;
33
- };
34
- OBJECT: {
35
- TYPUS_PERP_VERSION: string;
36
- };
37
- }, input: {
19
+ export declare function cancelTradingOrder(config: TypusConfig, input: {
38
20
  tx: TransactionBlock;
39
21
  order: TradingOrder;
40
22
  user: string;
41
23
  }): Promise<TransactionBlock>;
42
- export declare function increaseCollateral(config: {
43
- REGISTRY: {
44
- MARKET: string;
45
- LP_POOL: string;
46
- };
47
- OBJECT: {
48
- TYPUS_PERP_VERSION: string;
49
- };
50
- }, input: {
24
+ export declare function increaseCollateral(config: TypusConfig, input: {
51
25
  pythClient: PythClient;
52
26
  tx: TransactionBlock;
53
27
  coins: string[];
54
28
  amount: string;
55
29
  position: Position;
56
30
  }): Promise<TransactionBlock>;
57
- export declare function releaseCollateral(config: {
58
- REGISTRY: {
59
- MARKET: string;
60
- LP_POOL: string;
61
- };
62
- OBJECT: {
63
- TYPUS_PERP_VERSION: string;
64
- };
65
- }, input: {
31
+ export declare function releaseCollateral(config: TypusConfig, input: {
66
32
  pythClient: PythClient;
67
33
  tx: TransactionBlock;
68
34
  position: Position;
@@ -86,18 +86,18 @@ function createTradingOrder(config, input) {
86
86
  _b = __read(input.tx.splitCoins(destination, [input.amount]), 1), coin = _b[0];
87
87
  }
88
88
  (0, functions_1.createTradingOrder)(input.tx, [cToken, baseToken], {
89
- version: config.OBJECT.TYPUS_PERP_VERSION,
90
- registry: config.REGISTRY.MARKET,
91
- poolRegistry: config.REGISTRY.LP_POOL,
89
+ version: config.version.perp,
90
+ registry: config.registry.perp.market,
91
+ poolRegistry: config.registry.perp.lpPool,
92
92
  marketIndex: BigInt(0),
93
93
  poolIndex: BigInt(0),
94
94
  pythState: utils_1.pythStateId[__1.NETWORK],
95
95
  oracleCToken: utils_1.priceInfoObjectIds[__1.NETWORK][TOKEN],
96
96
  oracleTradingSymbol: utils_1.priceInfoObjectIds[__1.NETWORK][BASE_TOKEN],
97
97
  clock: constants_1.CLOCK,
98
- typusEcosystemVersion: config.OBJECT.TYPUS_VERSION,
99
- typusUserRegistry: config.REGISTRY.USER,
100
- typusLeaderboardRegistry: config.REGISTRY.LEADERBOARD,
98
+ typusEcosystemVersion: config.version.typus,
99
+ typusUserRegistry: config.registry.typus.user,
100
+ typusLeaderboardRegistry: config.registry.typus.leaderboard,
101
101
  collateral: coin,
102
102
  size: BigInt(input.size),
103
103
  triggerPrice: BigInt(input.triggerPrice),
@@ -118,8 +118,8 @@ function cancelTradingOrder(config, input) {
118
118
  cToken = "0x" + input.order.collateralToken.name;
119
119
  BASE_TOKEN = "0x" + input.order.symbol.baseToken.name;
120
120
  coin = (0, functions_1.cancelTradingOrder)(input.tx, [cToken, BASE_TOKEN], {
121
- version: config.OBJECT.TYPUS_PERP_VERSION,
122
- registry: config.REGISTRY.MARKET,
121
+ version: config.version.perp,
122
+ registry: config.registry.perp.market,
123
123
  marketIndex: BigInt(0),
124
124
  orderId: input.order.orderId,
125
125
  triggerPrice: input.order.triggerPrice,
@@ -154,9 +154,9 @@ function increaseCollateral(config, input) {
154
154
  _b = __read(input.tx.splitCoins(destination, [input.amount]), 1), coin = _b[0];
155
155
  }
156
156
  (0, functions_1.increaseCollateral)(input.tx, [cToken, baseToken], {
157
- version: config.OBJECT.TYPUS_PERP_VERSION,
158
- registry: config.REGISTRY.MARKET,
159
- poolRegistry: config.REGISTRY.LP_POOL,
157
+ version: config.version.perp,
158
+ registry: config.registry.perp.market,
159
+ poolRegistry: config.registry.perp.lpPool,
160
160
  marketIndex: BigInt(0),
161
161
  poolIndex: BigInt(0),
162
162
  pythState: utils_1.pythStateId[__1.NETWORK],
@@ -185,9 +185,9 @@ function releaseCollateral(config, input) {
185
185
  cToken = constants_2.tokenType[__1.NETWORK][TOKEN];
186
186
  baseToken = constants_2.tokenType[__1.NETWORK][BASE_TOKEN];
187
187
  coin = (0, functions_1.releaseCollateral)(input.tx, [cToken, baseToken], {
188
- version: config.OBJECT.TYPUS_PERP_VERSION,
189
- registry: config.REGISTRY.MARKET,
190
- poolRegistry: config.REGISTRY.LP_POOL,
188
+ version: config.version.perp,
189
+ registry: config.registry.perp.market,
190
+ poolRegistry: config.registry.perp.lpPool,
191
191
  marketIndex: BigInt(0),
192
192
  poolIndex: BigInt(0),
193
193
  pythState: utils_1.pythStateId[__1.NETWORK],
@@ -1,28 +1,8 @@
1
1
  import { TransactionBlock } from "@mysten/sui.js/transactions";
2
- import { PythClient } from "../../utils";
2
+ import { PythClient, TypusConfig } from "../../utils";
3
3
  import { TOKEN } from "../../constants";
4
4
  import { Position } from "../position/structs";
5
- export declare function createTradingOrderWithBidReceipt(config: {
6
- PACKAGE_ORIGIN: {
7
- FRAMEWORK: string;
8
- };
9
- PACKAGE: {
10
- DOV_SINGLE: string;
11
- ORACLE: string;
12
- };
13
- REGISTRY: {
14
- DOV_SINGLE: string;
15
- MARKET: string;
16
- USER: string;
17
- LEADERBOARD: string;
18
- LP_POOL: string;
19
- };
20
- OBJECT: {
21
- TYPUS_VERSION: string;
22
- TYPUS_PERP_VERSION: string;
23
- };
24
- ORACLE: {};
25
- }, input: {
5
+ export declare function createTradingOrderWithBidReceipt(config: TypusConfig, input: {
26
6
  pythClient: PythClient;
27
7
  tx: TransactionBlock;
28
8
  cToken: TOKEN;
@@ -34,27 +14,7 @@ export declare function createTradingOrderWithBidReceipt(config: {
34
14
  bidReceipt: string;
35
15
  share: string | null;
36
16
  }): Promise<TransactionBlock>;
37
- export declare function reduceOptionCollateralPositionSize(config: {
38
- PACKAGE_ORIGIN: {
39
- FRAMEWORK: string;
40
- };
41
- PACKAGE: {
42
- DOV_SINGLE: string;
43
- ORACLE: string;
44
- };
45
- REGISTRY: {
46
- DOV_SINGLE: string;
47
- MARKET: string;
48
- USER: string;
49
- LEADERBOARD: string;
50
- LP_POOL: string;
51
- };
52
- OBJECT: {
53
- TYPUS_VERSION: string;
54
- TYPUS_PERP_VERSION: string;
55
- };
56
- ORACLE: {};
57
- }, input: {
17
+ export declare function reduceOptionCollateralPositionSize(config: TypusConfig, input: {
58
18
  pythClient: PythClient;
59
19
  tx: TransactionBlock;
60
20
  position: Position;
@@ -57,13 +57,13 @@ function createTradingOrderWithBidReceipt(config, input) {
57
57
  cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
58
58
  bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
59
59
  baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
60
- (0, utils_1.updateOracleWithPyth)(input.pythClient, input.tx, config.PACKAGE.ORACLE, config.ORACLE[BASE_TOKEN], BASE_TOKEN, "USDC");
60
+ (0, utils_1.updateOracleWithPyth)(input.pythClient, input.tx, config.package.oracle, config.oracle[BASE_TOKEN.toLocaleLowerCase()], BASE_TOKEN, "USDC");
61
61
  if (input.share) {
62
62
  collateralBidReceipt = (0, typus_dov_single_v2_1.getSplitBidReceiptTx)({
63
63
  tx: input.tx,
64
- typusFrameworkOriginPackageId: config.PACKAGE_ORIGIN.FRAMEWORK,
65
- typusDovSinglePackageId: config.PACKAGE.DOV_SINGLE,
66
- typusDovSingleRegistry: config.REGISTRY.DOV_SINGLE,
64
+ typusFrameworkOriginPackageId: config.packageOrigin.framework,
65
+ typusDovSinglePackageId: config.package.dovSingle,
66
+ typusDovSingleRegistry: config.registry.dov.dovSingle,
67
67
  index: input.index,
68
68
  receipts: [input.bidReceipt],
69
69
  share: input.share,
@@ -74,21 +74,21 @@ function createTradingOrderWithBidReceipt(config, input) {
74
74
  collateralBidReceipt = input.bidReceipt;
75
75
  }
76
76
  (0, functions_1.createTradingOrderWithBidReceipt)(input.tx, [cToken, bToken, baseToken], {
77
- version: config.OBJECT.TYPUS_PERP_VERSION,
78
- registry: config.REGISTRY.MARKET,
79
- poolRegistry: config.REGISTRY.LP_POOL,
77
+ version: config.version.perp,
78
+ registry: config.registry.perp.market,
79
+ poolRegistry: config.registry.perp.lpPool,
80
80
  marketIndex: BigInt(0),
81
81
  poolIndex: BigInt(0),
82
82
  pythState: utils_1.pythStateId[__1.NETWORK],
83
83
  oracleCToken: utils_1.priceInfoObjectIds[__1.NETWORK][TOKEN],
84
84
  oracleTradingSymbol: utils_1.priceInfoObjectIds[__1.NETWORK][BASE_TOKEN],
85
85
  clock: constants_1.CLOCK,
86
- typusEcosystemVersion: config.OBJECT.TYPUS_VERSION,
87
- typusUserRegistry: config.REGISTRY.USER,
88
- typusLeaderboardRegistry: config.REGISTRY.LEADERBOARD,
86
+ typusEcosystemVersion: config.version.typus,
87
+ typusUserRegistry: config.registry.typus.user,
88
+ typusLeaderboardRegistry: config.registry.typus.leaderboard,
89
89
  isLong: input.isLong,
90
- dovRegistry: config.REGISTRY.DOV_SINGLE,
91
- typusOracle: config.ORACLE[BASE_TOKEN],
90
+ dovRegistry: config.registry.dov.dovSingle,
91
+ typusOracle: config.oracle[BASE_TOKEN.toLocaleLowerCase()],
92
92
  collateralBidReceipt: collateralBidReceipt,
93
93
  user: input.user,
94
94
  });
@@ -106,15 +106,15 @@ function reduceOptionCollateralPositionSize(config, input) {
106
106
  // const cToken = tokenType[NETWORK][TOKEN];
107
107
  // const bToken = tokenType[NETWORK][input.bToken];
108
108
  // const baseToken = tokenType[NETWORK][BASE_TOKEN];
109
- // updateOracleWithPyth(input.pythClient, input.tx, config.PACKAGE.ORACLE, config.ORACLE[BASE_TOKEN], BASE_TOKEN, "USDC");
109
+ // updateOracleWithPyth(input.pythClient, input.tx, config.package.oracle, config.oracle[BASE_TOKEN.toLocaleLowerCase()], BASE_TOKEN, "USDC");
110
110
  // // split bid receipt
111
111
  // var collateralBidReceipt;
112
112
  // if (input.share) {
113
113
  // collateralBidReceipt = getSplitBidReceiptTx({
114
114
  // tx: input.tx,
115
- // typusFrameworkOriginPackageId: config.PACKAGE_ORIGIN.FRAMEWORK,
116
- // typusDovSinglePackageId: config.PACKAGE.DOV_SINGLE,
117
- // typusDovSingleRegistry: config.REGISTRY.DOV_SINGLE,
115
+ // typusFrameworkOriginPackageId: config.packageOrigin.framework,
116
+ // typusDovSinglePackageId: config.package.dovSingle,
117
+ // typusDovSingleRegistry: config.registry.dov.dovSingle,
118
118
  // index: input.index,
119
119
  // receipts: [input.bidReceipt],
120
120
  // share: input.share,
@@ -124,20 +124,20 @@ function reduceOptionCollateralPositionSize(config, input) {
124
124
  // collateralBidReceipt = input.bidReceipt;
125
125
  // }
126
126
  // _reduceOptionCollateralPositionSize(input.tx, [cToken, bToken, baseToken], {
127
- // version: config.OBJECT.TYPUS_PERP_VERSION,
128
- // registry: config.REGISTRY.MARKET,
129
- // poolRegistry: config.REGISTRY.LP_POOL,
127
+ // version: config.version.perp,
128
+ // registry: config.registry.perp.market,
129
+ // poolRegistry: config.registry.perp.lpPool,
130
130
  // marketIndex: BigInt(0),
131
131
  // poolIndex: BigInt(0),
132
132
  // pythState: pythStateId[NETWORK],
133
133
  // oracleCToken: priceInfoObjectIds[NETWORK][TOKEN],
134
134
  // oracleTradingSymbol: priceInfoObjectIds[NETWORK][BASE_TOKEN],
135
135
  // clock: CLOCK,
136
- // typusEcosystemVersion: config.OBJECT.TYPUS_VERSION,
137
- // typusUserRegistry: config.REGISTRY.USER,
138
- // typusLeaderboardRegistry: config.REGISTRY.LEADERBOARD,
139
- // dovRegistry: config.REGISTRY.DOV_SINGLE,
140
- // typusOracle: config.ORACLE[BASE_TOKEN],
136
+ // typusEcosystemVersion: config.version.typus,
137
+ // typusUserRegistry: config.registry.typus.user,
138
+ // typusLeaderboardRegistry: config.registry.typus.leaderboard,
139
+ // dovRegistry: config.registry.dov.dovSingle,
140
+ // typusOracle: config.oracle[BASE_TOKEN.toLocaleLowerCase()],
141
141
  // positionId: BigInt(123),
142
142
  // orderSize: null,
143
143
  // });
@@ -1,20 +1,8 @@
1
1
  import { TransactionBlock } from "@mysten/sui.js/transactions";
2
2
  import { LiquidityPool } from "../lp-pool/structs";
3
- import { PythClient } from "../../utils";
3
+ import { PythClient, TypusConfig } from "../../utils";
4
4
  import { TOKEN } from "../../constants";
5
- export declare function mintStakeLp(config: {
6
- REGISTRY: {
7
- LP_POOL: string;
8
- STAKE_POOL: string;
9
- };
10
- OBJECT: {
11
- TYPUS_PERP_VERSION: string;
12
- TLP_TREASURY_CAP: string;
13
- };
14
- TOKEN: {
15
- TLP: string;
16
- };
17
- }, input: {
5
+ export declare function mintStakeLp(config: TypusConfig, input: {
18
6
  pythClient: PythClient;
19
7
  tx: TransactionBlock;
20
8
  lpPool: LiquidityPool;
@@ -23,19 +11,7 @@ export declare function mintStakeLp(config: {
23
11
  amount: string;
24
12
  userShareId: string | null;
25
13
  }): Promise<TransactionBlock>;
26
- export declare function unstakeBurn(config: {
27
- REGISTRY: {
28
- LP_POOL: string;
29
- STAKE_POOL: string;
30
- };
31
- OBJECT: {
32
- TYPUS_PERP_VERSION: string;
33
- TLP_TREASURY_CAP: string;
34
- };
35
- TOKEN: {
36
- TLP: string;
37
- };
38
- }, input: {
14
+ export declare function unstakeBurn(config: TypusConfig, input: {
39
15
  pythClient: PythClient;
40
16
  tx: TransactionBlock;
41
17
  lpPool: LiquidityPool;
@@ -44,18 +20,7 @@ export declare function unstakeBurn(config: {
44
20
  share: string | null;
45
21
  user: string;
46
22
  }): Promise<TransactionBlock>;
47
- export declare function swap(config: {
48
- REGISTRY: {
49
- LP_POOL: string;
50
- STAKE_POOL: string;
51
- };
52
- OBJECT: {
53
- TYPUS_PERP_VERSION: string;
54
- };
55
- TOKEN: {
56
- TLP: string;
57
- };
58
- }, input: {
23
+ export declare function swap(config: TypusConfig, input: {
59
24
  pythClient: PythClient;
60
25
  tx: TransactionBlock;
61
26
  coins: string[];
@@ -64,29 +29,12 @@ export declare function swap(config: {
64
29
  amount: string;
65
30
  user: string;
66
31
  }): Promise<TransactionBlock>;
67
- export declare function unsubscribe(config: {
68
- REGISTRY: {
69
- STAKE_POOL: string;
70
- };
71
- OBJECT: {
72
- TYPUS_PERP_VERSION: string;
73
- };
74
- TOKEN: {
75
- TLP: string;
76
- };
77
- }, input: {
32
+ export declare function unsubscribe(config: TypusConfig, input: {
78
33
  tx: TransactionBlock;
79
34
  userShareId: string;
80
35
  share: string | null;
81
36
  }): Promise<TransactionBlock>;
82
- export declare function harvest(config: {
83
- REGISTRY: {
84
- STAKE_POOL: string;
85
- };
86
- OBJECT: {
87
- TYPUS_PERP_VERSION: string;
88
- };
89
- }, input: {
37
+ export declare function harvest(config: TypusConfig, input: {
90
38
  tx: TransactionBlock;
91
39
  userShareId: string;
92
40
  }): Promise<TransactionBlock>;
@@ -90,8 +90,8 @@ function mintStakeLp(config, input) {
90
90
  for (tokens_1 = __values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) {
91
91
  token = tokens_1_1.value;
92
92
  (0, functions_1.updateLiquidityValue)(input.tx, constants_2.tokenType[__1.NETWORK][token], {
93
- version: config.OBJECT.TYPUS_PERP_VERSION,
94
- registry: config.REGISTRY.LP_POOL,
93
+ version: config.version.perp,
94
+ registry: config.registry.perp.lpPool,
95
95
  index: BigInt(0),
96
96
  pythState: utils_1.pythStateId[__1.NETWORK],
97
97
  oracle: utils_1.priceInfoObjectIds[__1.NETWORK][token],
@@ -116,19 +116,19 @@ function mintStakeLp(config, input) {
116
116
  }
117
117
  _c = __read(input.tx.splitCoins(destination, [input.amount]), 1), coin = _c[0];
118
118
  }
119
- lpCoin = (0, functions_1.mintLp)(input.tx, [cToken, config.TOKEN.TLP], {
120
- version: config.OBJECT.TYPUS_PERP_VERSION,
121
- registry: config.REGISTRY.LP_POOL,
122
- treasuryCaps: config.OBJECT.TLP_TREASURY_CAP,
119
+ lpCoin = (0, functions_1.mintLp)(input.tx, [cToken, config.token.tlp], {
120
+ version: config.version.perp,
121
+ registry: config.registry.perp.lpPool,
122
+ treasuryCaps: config.object.tlpTreasuryCap,
123
123
  index: BigInt(0),
124
124
  pythState: utils_1.pythStateId[__1.NETWORK],
125
125
  oracle: utils_1.priceInfoObjectIds[__1.NETWORK][input.cTOKEN],
126
126
  coin: coin,
127
127
  clock: constants_1.CLOCK,
128
128
  });
129
- (0, functions_2.stake)(input.tx, config.TOKEN.TLP, {
130
- version: config.OBJECT.TYPUS_PERP_VERSION,
131
- registry: config.REGISTRY.STAKE_POOL,
129
+ (0, functions_2.stake)(input.tx, config.token.tlp, {
130
+ version: config.version.perp,
131
+ registry: config.registry.perp.stakePool,
132
132
  index: BigInt(0),
133
133
  lpToken: lpCoin,
134
134
  clock: constants_1.CLOCK,
@@ -156,8 +156,8 @@ function unstakeBurn(config, input) {
156
156
  for (tokens_2 = __values(tokens), tokens_2_1 = tokens_2.next(); !tokens_2_1.done; tokens_2_1 = tokens_2.next()) {
157
157
  token = tokens_2_1.value;
158
158
  (0, functions_1.updateLiquidityValue)(input.tx, constants_2.tokenType[__1.NETWORK][token], {
159
- version: config.OBJECT.TYPUS_PERP_VERSION,
160
- registry: config.REGISTRY.LP_POOL,
159
+ version: config.version.perp,
160
+ registry: config.registry.perp.lpPool,
161
161
  index: BigInt(0),
162
162
  pythState: utils_1.pythStateId[__1.NETWORK],
163
163
  oracle: utils_1.priceInfoObjectIds[__1.NETWORK][token],
@@ -172,18 +172,18 @@ function unstakeBurn(config, input) {
172
172
  }
173
173
  finally { if (e_2) throw e_2.error; }
174
174
  }
175
- lpCoin = (0, functions_2.unstake)(input.tx, config.TOKEN.TLP, {
176
- version: config.OBJECT.TYPUS_PERP_VERSION,
177
- registry: config.REGISTRY.STAKE_POOL,
175
+ lpCoin = (0, functions_2.unstake)(input.tx, config.token.tlp, {
176
+ version: config.version.perp,
177
+ registry: config.registry.perp.stakePool,
178
178
  index: BigInt(0),
179
179
  userShareId: BigInt(input.userShareId),
180
180
  clock: constants_1.CLOCK,
181
181
  unstakedShares: input.share ? BigInt(input.share) : null,
182
182
  });
183
- coin = (0, functions_1.burnLp)(input.tx, [cToken, config.TOKEN.TLP], {
184
- version: config.OBJECT.TYPUS_PERP_VERSION,
185
- registry: config.REGISTRY.LP_POOL,
186
- treasuryCaps: config.OBJECT.TLP_TREASURY_CAP,
183
+ coin = (0, functions_1.burnLp)(input.tx, [cToken, config.token.tlp], {
184
+ version: config.version.perp,
185
+ registry: config.registry.perp.lpPool,
186
+ treasuryCaps: config.object.tlpTreasuryCap,
187
187
  index: BigInt(0),
188
188
  pythState: utils_1.pythStateId[__1.NETWORK],
189
189
  oracle: oracle,
@@ -218,8 +218,8 @@ function swap(config, input) {
218
218
  _b = __read(input.tx.splitCoins(destination, [input.amount]), 1), coin = _b[0];
219
219
  }
220
220
  token = (0, functions_1.swap)(input.tx, [fromToken, toToken], {
221
- version: config.OBJECT.TYPUS_PERP_VERSION,
222
- registry: config.REGISTRY.LP_POOL,
221
+ version: config.version.perp,
222
+ registry: config.registry.perp.lpPool,
223
223
  pythState: utils_1.pythStateId[__1.NETWORK],
224
224
  clock: constants_1.CLOCK,
225
225
  index: BigInt(0),
@@ -237,9 +237,9 @@ function swap(config, input) {
237
237
  function unsubscribe(config, input) {
238
238
  return __awaiter(this, void 0, void 0, function () {
239
239
  return __generator(this, function (_a) {
240
- (0, functions_2.unsubscribe)(input.tx, config.TOKEN.TLP, {
241
- version: config.OBJECT.TYPUS_PERP_VERSION,
242
- registry: config.REGISTRY.STAKE_POOL,
240
+ (0, functions_2.unsubscribe)(input.tx, config.token.tlp, {
241
+ version: config.version.perp,
242
+ registry: config.registry.perp.stakePool,
243
243
  index: BigInt(0),
244
244
  userShareId: BigInt(input.userShareId),
245
245
  clock: constants_1.CLOCK,
@@ -253,8 +253,8 @@ function harvest(config, input) {
253
253
  return __awaiter(this, void 0, void 0, function () {
254
254
  return __generator(this, function (_a) {
255
255
  (0, functions_2.harvestPerUserShare)(input.tx, "0x2::sui::SUI", {
256
- version: config.OBJECT.TYPUS_PERP_VERSION,
257
- registry: config.REGISTRY.STAKE_POOL,
256
+ version: config.version.perp,
257
+ registry: config.registry.perp.stakePool,
258
258
  index: BigInt(0),
259
259
  userShareId: BigInt(input.userShareId),
260
260
  clock: constants_1.CLOCK,
@@ -38,6 +38,7 @@ export interface ShareSupply {
38
38
  inactive_share: string;
39
39
  warmup_share: string;
40
40
  snapshot_share: string;
41
+ reward_share: string[];
41
42
  }
42
43
  export declare function getVaultData(config: TypusConfig, input: {
43
44
  provider: SuiClient;
@@ -110,6 +110,7 @@ function getVaultData(config, input) {
110
110
  inactive_share: shareSupplyArray[2],
111
111
  warmup_share: shareSupplyArray[3],
112
112
  snapshot_share: shareSupplyArray[4],
113
+ reward_share: shareSupplyArray.slice(5)
113
114
  };
114
115
  var u64Padding = reader.readVec(function (reader) {
115
116
  return reader.read64();
@@ -168,6 +169,7 @@ function getShareData(config, input) {
168
169
  inactive_share: shareSupplyArray[2],
169
170
  warmup_share: shareSupplyArray[3],
170
171
  snapshot_share: shareSupplyArray[4],
172
+ reward_share: shareSupplyArray.slice(5)
171
173
  };
172
174
  return {
173
175
  user: user,
@@ -8,6 +8,7 @@ export declare class TypusConfig {
8
8
  oracle: Oracle;
9
9
  token: Token;
10
10
  static parse(json: any): TypusConfig;
11
+ static default(network: "MAINNET" | "TESTNET"): TypusConfig;
11
12
  }
12
13
  export interface Package {
13
14
  dice: string;
@@ -78,8 +79,8 @@ export interface Oracle {
78
79
  sui: string;
79
80
  turbos: string;
80
81
  usdy: string;
81
- wbtc: string;
82
- weth: string;
82
+ btc: string;
83
+ eth: string;
83
84
  }
84
85
  export interface Token {
85
86
  afsui: string;
@@ -1,13 +1,26 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.TypusConfig = void 0;
4
7
  var camelcaseKeysDeep = require("camelcase-keys-deep");
8
+ var config_mainnet_json_1 = __importDefault(require("../../config-mainnet.json"));
9
+ var config_testnet_json_1 = __importDefault(require("../../config-testnet.json"));
5
10
  var TypusConfig = /** @class */ (function () {
6
11
  function TypusConfig() {
7
12
  }
8
13
  TypusConfig.parse = function (json) {
9
14
  return JSON.parse(JSON.stringify(camelcaseKeysDeep(json)));
10
15
  };
16
+ TypusConfig.default = function (network) {
17
+ switch (network) {
18
+ case "MAINNET":
19
+ return JSON.parse(JSON.stringify(camelcaseKeysDeep(config_mainnet_json_1.default)));
20
+ case "TESTNET":
21
+ return JSON.parse(JSON.stringify(camelcaseKeysDeep(config_testnet_json_1.default)));
22
+ }
23
+ };
11
24
  return TypusConfig;
12
25
  }());
13
26
  exports.TypusConfig = TypusConfig;
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.15",
5
+ "version": "1.4.17",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.11.1",
8
8
  "@mysten/kiosk": "0.8.10",
@@ -84,7 +84,6 @@
84
84
  "dist"
85
85
  ],
86
86
  "scripts": {
87
- "ts-node": "ts-node -r tsconfig-paths/register",
88
87
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
89
88
  "test": "rm -rf dist && tsc -p tsconfig.build.json && ts-mocha test/test*.ts"
90
89
  },
package/dist/config.json DELETED
@@ -1,194 +0,0 @@
1
- {
2
- "MAINNET": {
3
- "RPC_ENDPOINT": "https://fullnode.mainnet.sui.io:443",
4
- "PACKAGE_ORIGIN": {
5
- "DOV_SINGLE": "0x321848bf1ae327a9e022ccb3701940191e02fa193ab160d9c0e49cd3c003de3a",
6
- "FRAMEWORK": "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274",
7
- "DICE": "0x37816d28c34cc0df82655ca97b3f066112a5f3c202cbb4aaa76c8af54e779750",
8
- "MFUD": "0xd8f04cd2a16c19c17428c3b4c22b01dd06740423b93fb7ee88fbe2676a82849d",
9
- "NFT": "0xbd147bc7f12f38f175d78947a61364e8e077b9b188b00e7094bc0c3623162196",
10
- "ORACLE": "0x855eb2d260ee42b898266e6df90bfd3c4ed821ccb253a352c159c223244a4b8a",
11
- "TYPUS": "0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a",
12
- "SAFU": "0x4a68c41bfa2b908ce449e411d0e16718839a62780df0fee568bc027ee2d14ebb",
13
- "PERP": ""
14
- },
15
- "PACKAGE": {
16
- "DOV_SINGLE": "0xf7ef57f3bd98455262417886b17eb4d5af1a18d2dec19c5b34e512bf4fc10acf",
17
- "FRAMEWORK": "0x5c6648fb219c046256488486d23d4af7bc562d5ab5c382e1f4b558066a327fe8",
18
- "DICE": "0x14f1676b7a3b3a6c35eeff747bdb6fcb5bfe920755086c4af1079c23107c22aa",
19
- "MFUD": "0xd8f04cd2a16c19c17428c3b4c22b01dd06740423b93fb7ee88fbe2676a82849d",
20
- "NFT": "0xba06aae31d9b7c9f651e783272c7e4f776fb5ae17e89d525b75a17b099f58202",
21
- "ORACLE": "0x978f65df8570a075298598a9965c18de9087f9e888eb3430fe20334f5c554cfd",
22
- "TYPUS": "0xf5c7e61fd28d1ed38711f03e1c5ffc6c5b8435eff386132fc5822efe6d90b138",
23
- "SAFU": "0xdda1734b67dca059111849d17a54a095d5e3847eafcd7bf5636c6972f12a9050",
24
- "PERP": ""
25
- },
26
- "REGISTRY": {
27
- "AIRDROP": "0x4b451f4632bd64af82d5e6fe46e20705c9468bd46d6758a0f7093fde2930d084",
28
- "DOV_SINGLE": "0x3d70b09359e3ca8301ae0abeda4f2fdf72ce313ba58c919ce568e5f535fd2ea8",
29
- "TYPUS_DICE": "0x16657424191772d40afac15738abb26cdf41172d2d205694b04d1300ad403c55",
30
- "EXP_GUESS": "0x7679ab7157f13ec945579e3098ba589eb8b4eec841c775799d2aa22b565187c7",
31
- "LEADERBOARD": "0xc515a3e7fd12ba902f7f1ebe52c676136e1b34cb614ae9c79a46b257ca7d5534",
32
- "MFUD": "0xb8d7e7ab783e56700c0212bd9f0938bba9dd3e7241c149e6c52b21334ec45ece",
33
- "TAILS_STAKING": "0xeca3e88577dc3f45df8b7bace51f26b126271ce4c5fa33b3739fd7b69fc16559",
34
- "TGLD": "0x8ee1af362fe9e0a29f6bad48d8ff44249ece5aaa77a4302c2ffcc90950e52ed2",
35
- "USER": "0xb1b16eb4845b5ee1a29432b1f2bcfe8cbb33c234492baf31a706d82e28e18bce",
36
- "SAFU": "0x855b51c812e593d1eb563430593ff42a966b5704e98e93e58a94b555fd25ceeb"
37
- },
38
- "TOKEN": {
39
- "FUD": "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD",
40
- "MFUD": "0xd8f04cd2a16c19c17428c3b4c22b01dd06740423b93fb7ee88fbe2676a82849d::mfud::MFUD",
41
- "SUI": "0x2::sui::SUI",
42
- "TGLD": "0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a::tgld::TGLD"
43
- },
44
- "ORACLE": {
45
- "APT": "0x401ed2a4de92950351c54edaa9a8dce5e38bdb6b06e248935c6f6f7d361a99d6",
46
- "CETUS": "0xaedaa2e76661471924c1ca7edae069317cbe082798dd3bfa31694dc873102532",
47
- "JUP": "0xd4a5fe0b48a6f8cbe528b5760462f0d9cad8080c8aebb1a9c63c2176c58fb3b3",
48
- "NAVX": "0x726c5bafa4e8240d36bb42493c82bca30b920e2bcab1da1dca973322352e9f63",
49
- "SCA": "0x8eb94035d6d54ad6b444dd67310b9ff54a05a54ecf77d5b22a43a75495774bb6",
50
- "SOL": "0x9712ad1cba00a437fb669e4df1a59568e4267bd8a8ce989452fb63c9f00b59ab",
51
- "SUI": "0xeb6b3e3300ff884604ead6172b0aeadee3854980cab65a7feb57300b04b74cc1",
52
- "TURBOS": "0x819ff07b5768d7b9b428b69b123140f6a74b04eaa978a4cbab9055025bd1536d",
53
- "WBTC": "0x61813dc2e46dba41b14507857827f0ed7e99b0be242548828769728b81c8fab5",
54
- "WETH": "0x253bbaaa35275240cf6df03258489707ea059762831e4102ebaabafd442bc935"
55
- },
56
- "OBJECT": {
57
- "TYPUS_VERSION": "0xd2882b992e986250b3304b59530700bc3850939f9a77e9e9dfa9cf1656f84b3d",
58
- "TGLD_COIN_METADATA": "0x3a070c729606334a2be7c51ab28da9a1101b0de01452dd62c10cda0f7a5795d2",
59
- "TGLD_TOKEN_POLICY": "0xd9461bd329f1df24be9698131b6e2c2b9eaac7c9cf6d76689112f2e57be12009",
60
- "NFT_TRANSFER_POLICY": "0x55475b9e16d9a0176dcef37f83a1921b15f2cbd2711a5f30b9d952c0c8f5f957",
61
- "STRATEGY_POOL": "0x2c60ddd50d76beb00faa025962d566359a6ea05b1f7f19ac6bd050f4db8c885c",
62
- "TAILS_IDS": "0x3a6a403eb7c123b6f4d25081078b6f07c0ee5987d3ac8ab3e6bcf707c1b0e778",
63
- "SAFU_VERSION": "0x63702bd95f1359399e8b26830905e35867310a88a029963ddfa50f7e55c63e79"
64
- }
65
- },
66
- "TESTNET": {
67
- "RPC_ENDPOINT": "https://sui-testnet.blastapi.io:443/7f446a12-c4ab-4e3c-b2d8-ebb0fcbe5cdd",
68
- "PACKAGE_ORIGIN": {
69
- "DOV_SINGLE": "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f",
70
- "DICE": "0x9b43ee208a3b235810c145bca1161d1a71d08bfe76b1e55bb3db319ea95d0149",
71
- "FRAMEWORK": "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded",
72
- "MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c",
73
- "NFT": "0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828",
74
- "ORACLE": "0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73",
75
- "TYPUS": "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277",
76
- "LOCKED_VAULT": "0xe79b7ba69b750d30ac7ae171483a4064d0bb34090493fef3c844a11b05818d79",
77
- "PERP": "0x4bcf9eade4480bcb9fcd3139ec8d22afda34b25af06092904fcccb06e1b8043c"
78
- },
79
- "PACKAGE": {
80
- "DOV_SINGLE": "0x2e462aa0224bec76acaea81c51ca5b9ae4b27ec50281a764797c84148c8a463f",
81
- "DICE": "0x112321a74fb0903aff5c654603c19060552a704b5fb13a6cefa84e1147e66db8",
82
- "FRAMEWORK": "0x90ca6e2393e3adc91b4e9b70ab16c017e5f70f7094b6f09b913fef2833a656e9",
83
- "MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c",
84
- "NFT": "0x0f5162014f18686640b8d0adefd60c3fe5b377413ec4f1e77001c67d96f8501a",
85
- "ORACLE": "0x71fbc7acaf513561dabdeb846e7dd5288108e56edb0b6de8d4999c4dfce21f66",
86
- "TYPUS": "0x88124ef8caf346cc19bf7447e72cf540fb6f228f16806effdc3dafccee747264",
87
- "PERP": "0x5ff329ee25f3936b7f3e191de702cc0dd8beca7e1ac833f7d73ea653d47ef4ad"
88
- },
89
- "REGISTRY": {
90
- "AIRDROP": "0xfb2fbf261f6050d100bcd026ffa0076e088506b1bec26313947239303e2a0224",
91
- "DOV_SINGLE": "0x0285cbf4aa8585be6c978235d11d06fa35773266ede040d38d34e1d79b049460",
92
- "LEADERBOARD": "0x4faabe5a4a509a145fc9bae95761d34c11571da4cb25d681f06ffcbadbc355e7",
93
- "MFUD": "0x7ad87901531693f1baa541712947860dcc543617e11b14993ad70d20daf159c6",
94
- "TAILS_EXP": "0x37e0c8c80a5099d5dfe1b0aeae62e3f01916be73935090efb9c95279b7bb1ce7",
95
- "TYPUS_DICE": "0x034f58472d9604eee3e1fb5896e4d6a14f426c17c504cdb9dcdc7269ca4ad3b4",
96
- "EXP_GUESS": "0x37e0c8c80a5099d5dfe1b0aeae62e3f01916be73935090efb9c95279b7bb1ce7",
97
- "TAILS_STAKING": "0x989bd585b580dfc22d9d7656a5807b2f6c8fe36260a2003ef697adc8a38d21af",
98
- "TGLD": "0x2118b4056c89d90a6dc40d198fbe239cb8e83f7ea20daaf4ea53341c7fdb043c",
99
- "USER": "0x5f1894a3680949111a7530d63ceda6857d31521ab2de625e9f826cae17c9a7f3",
100
- "LOCKED_VAULT": "0x50f1fc44c907f8738b098abf2b594e523739df7d40df8164154cfe6f60513302",
101
- "STAKE_POOL": "0xc853c36a9317a709ac92b611daa910b43805876ba6ca78fbbab9d51359994c5b",
102
- "LP_POOL": "0x0a213c906f7a9fc369f1e7d0ffabb7701bfd1cdff04679b1132c5838306e3394",
103
- "LIQUIDITY_POOL": "0x40d1ea0f0dfebbe0b130f08c0c62bfee1c58f6a99c0960cb4f08fd3040bf4714",
104
- "MARKET": "0xa522a55413d109c568c3d42cbcd0e344000d61086f390df672663424e0329288",
105
- "TLP": "0x4e40c46ebe73b3fdca694040747b99a1b25600ddeae26f9fbb8cda5a683d26de"
106
- },
107
- "TOKEN": {
108
- "FUD": "0x461efa7ee5aa1b27e44450d79e2104e7fc0991461e9eb1c2a3fc1f44cd554856::fud::FUD",
109
- "MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c::mfud::MFUD",
110
- "SUI": "0x2::sui::SUI",
111
- "TGLD": "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::tgld::TGLD",
112
- "USDT": "0xa38dad920880f81ea514de6db007d3a84e9116a29c60b3e69bbe418c2d9f553c::usdt::USDT",
113
- "TLP": "0x4bcf9eade4480bcb9fcd3139ec8d22afda34b25af06092904fcccb06e1b8043c::tlp::TLP",
114
- "USD": "0x01a05edb0e5e670196de98fbbf544180d129dd4ec11c3c57f742badf0304650d::trading::USD",
115
- "AFSUI": "0xd31923b6821fb7ba32d23e514b43d307da6ef991f9ef1af2cc4e26a0992ac87a::afsui::AFSUI"
116
- },
117
- "ORACLE": {
118
- "AFSUI": "0xacd75f051b8be445226f92d873fbf9bbc26fe25cec5708b1aeec44286dbbef5b",
119
- "APT": "0x984e79d6cf30cc518e5e69dacacfa8db3e5f0674535c533061a7990c8a714c48",
120
- "BUCK": "0x22ef75c17468f6ed24574f26011f7fcf61a7b983009c9ba6cacc28ae24ff1782",
121
- "CETUS": "0xe8142c490363475a4ad0b9af02ac5a543962584f3a99cdb8754d909be6ec550d",
122
- "INJ": "0xcdf04e2c9f400a713dc46748bc6eddddf472e669e604d13ed1eae8895a46d6c9",
123
- "JUP": "0xd4a5fe0b48a6f8cbe528b5760462f0d9cad8080c8aebb1a9c63c2176c58fb3b3",
124
- "NAVX": "0x726c5bafa4e8240d36bb42493c82bca30b920e2bcab1da1dca973322352e9f63",
125
- "SCA": "0x8eb94035d6d54ad6b444dd67310b9ff54a05a54ecf77d5b22a43a75495774bb6",
126
- "SEI": "0x3ad81c9951cb4e2e8908c184cea7e9cb52822ef7679f166ef9acf870bfc8e4f2",
127
- "SOL": "0x0edabd97c679967e00d508c766fb4be0195890f96343bd3a58e10fa5e8063c96",
128
- "SUI": "0x770f17817e809f22d3cf3ba5f452056622a31dd6a1db7c60c94c5a598aff9a29",
129
- "TURBOS": "0x9fb8a445ba7ed37251f0ccd778b6cd7010174734562a18921d0684d4e01afe34",
130
- "USDY": "0x604408004efddc03323cd6f6a72b98695dbdced57a630ca2622e6b96fc94a3f6",
131
- "WBTC": "0xaa72a2b370cf45a7b1363a2b9e3f0c57c05863375b984e2ca0928973574404f2",
132
- "WETH": "0x0ac9f9275eb0ac33b7f59741b1df67a6783af2db6d2a4e5aba8ce350d5b6b260"
133
- },
134
- "OBJECT": {
135
- "TYPUS_VERSION": "0x2edc980f55e31ba3c660f4e2650e915fd47fb33b524b01a52a116719adac8be7",
136
- "TGLD_COIN_METADATA": "0xf77f8aabe64dccef0e568f2ef58a6ca74bdfb31786507cc35b7626a4df0d0ebc",
137
- "TGLD_TOKEN_POLICY": "0x17875c2f772053cd148bd2b8b8a40160db3f841825d8963192f8394d5c18974c",
138
- "NFT_TRANSFER_POLICY": "0x1c62271ecc443c3d92a8fe8f5662e877856d26b971d967f66937a65f55160831",
139
- "STRATEGY_POOL": "0x50b01081469d032e04bfcbd057614b1359376920f55c7bebd076e0e2af07a57f",
140
- "TAILS_IDS": "0xf4ea1c4432823ebde3b0c1f0705a45b08571b48237db879502b8ba336ea5b916",
141
- "TYPUS_PERP_VERSION": "0x3aafe933e23a9e10f3a34febf6a2996961989558315bae46458fd234496e8a97",
142
- "TLP_TREASURY_CAP": "0xeb835b5db70144d098f7b4885ac525900fb5a6b47565f31d2275e34479ef7889"
143
- }
144
- },
145
- "MOVEMENT": {
146
- "RPC_ENDPOINT": "https://sui.devnet.m2.movementlabs.xyz:443",
147
- "TYPUS_VERSION": "0x78f91a4142a62881bc5ac6f84d43144e02ba32ddec3e0bb2985f6980d044032a",
148
- "PACKAGE_ORIGIN": {
149
- "DOV_SINGLE": "0x773fbd026bcdffa6ca746c995a440b711e4b55fb220a6552e12041ede12a5b6b",
150
- "FRAMEWORK": "0x421b30b0ebf1a60834adaa946cbb8fd0595c42d90c99bfac79a7f450b55c1a44",
151
- "ORACLE": "0xbf0ff0490f2c33fe0dfea8407cca4c4d4be30a877f5dbffcbad1a078673845da",
152
- "TOKEN": "0xad00cb50c52af6e61b2dc45e7c80a4e0bf6149a5e45b08623fcec33a83361d2e",
153
- "TYPUS": "0xc7dc8f963a06a3675d9d423435d65c1144b0df1a17aa67b2ec7acabad96be2a4"
154
- },
155
- "PACKAGE": {
156
- "DOV_SINGLE": "0x773fbd026bcdffa6ca746c995a440b711e4b55fb220a6552e12041ede12a5b6b",
157
- "FRAMEWORK": "0x421b30b0ebf1a60834adaa946cbb8fd0595c42d90c99bfac79a7f450b55c1a44",
158
- "ORACLE": "0xbf0ff0490f2c33fe0dfea8407cca4c4d4be30a877f5dbffcbad1a078673845da",
159
- "TOKEN": "0xad00cb50c52af6e61b2dc45e7c80a4e0bf6149a5e45b08623fcec33a83361d2e",
160
- "TYPUS": "0xc7dc8f963a06a3675d9d423435d65c1144b0df1a17aa67b2ec7acabad96be2a4"
161
- },
162
- "REGISTRY": {
163
- "AIRDROP": "0x4300030cda3b3c4774f2bf108fc0461e9d48f6ab91ddd38da80cd4e51f509303",
164
- "DOV_SINGLE": "0x2cdcf02854b3d75bb3abd2589a20f1288e2b80a4e7021fd8ade30c765d4b477b",
165
- "LEADERBOARD": "0xf7991a4cbd5ec7977c9950d77ee0e944e8e84b768048ca9c3296acd7226cdcf9"
166
- },
167
- "TOKEN_REGISTRY": {
168
- "BTC": "0x811bed2a13066c606638d71e695799022752291c94e46c334511a837cee7603f",
169
- "ETH": "0x07323910600d887a12694c8c5dd3c61d919d711a8f34236d385d88a4881b08b5",
170
- "SOL": "0x10dcc6468670b773e0ab1cbdb57e5e0fd79f29ec259bdbd45ba81a7b9675106c",
171
- "USDC": "0x6ad27e79cd914de17e68a4cd2a564de65e9cce4b57798c93e96354d8a00e965e",
172
- "USDT": "0xf9a3d1334132dd916e65abf23680d618b39de0fed6c92a338f30895fe0b134fe"
173
- },
174
- "TOKEN": {
175
- "SUI": "0x2::sui::SUI",
176
- "BTC": "0xad00cb50c52af6e61b2dc45e7c80a4e0bf6149a5e45b08623fcec33a83361d2e::btc::BTC",
177
- "ETH": "0xad00cb50c52af6e61b2dc45e7c80a4e0bf6149a5e45b08623fcec33a83361d2e::eth::ETH",
178
- "SOL": "0xad00cb50c52af6e61b2dc45e7c80a4e0bf6149a5e45b08623fcec33a83361d2e::sol::SOL",
179
- "USDC": "0xad00cb50c52af6e61b2dc45e7c80a4e0bf6149a5e45b08623fcec33a83361d2e::usdc::USDC",
180
- "USDT": "0xad00cb50c52af6e61b2dc45e7c80a4e0bf6149a5e45b08623fcec33a83361d2e::usdt::USDT"
181
- },
182
- "ORACLE_MANAGER_CAP": {
183
- "SUIUSDC": "0xcda9da5c6fc39bde7adae554b192d9a50c5ff65b8e0c815d646623ab065d63b4",
184
- "SUIUSDT": "0xcda9da5c6fc39bde7adae554b192d9a50c5ff65b8e0c815d646623ab065d63b4"
185
- },
186
- "ORACLE": {
187
- "SUIUSDC": "0xf7d081223650168e7e7ea02fc2289e6e0795decdbeddb951c1609937b9dfe0cf",
188
- "SUIUSDT": "0xf26ff14cc14e9342139d6a6c45775f98f006f8d39c8e8dee0aadf8127ce9118f"
189
- },
190
- "VAULT": {
191
- "0": "2hkoQrhPcvch8CMtVx3XkwPDjDDEwr89bkn8Qq5VAg24"
192
- }
193
- }
194
- }