@typus/typus-sdk 1.4.30 → 1.4.31

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.
@@ -33,6 +33,7 @@
33
33
  "TAILS_EXP": "0x7679ab7157f13ec945579e3098ba589eb8b4eec841c775799d2aa22b565187c7"
34
34
  },
35
35
  "DOV": {
36
+ "AUTO_BID": "0x2c60ddd50d76beb00faa025962d566359a6ea05b1f7f19ac6bd050f4db8c885c",
36
37
  "DOV_SINGLE": "0x3d70b09359e3ca8301ae0abeda4f2fdf72ce313ba58c919ce568e5f535fd2ea8"
37
38
  },
38
39
  "PERP": {
@@ -60,7 +61,6 @@
60
61
  },
61
62
  "OBJECT": {
62
63
  "NFT_TRANSFER_POLICY": "0x55475b9e16d9a0176dcef37f83a1921b15f2cbd2711a5f30b9d952c0c8f5f957",
63
- "STRATEGY_POOL": "0x2c60ddd50d76beb00faa025962d566359a6ea05b1f7f19ac6bd050f4db8c885c",
64
64
  "TAILS_IDS": "0x3a6a403eb7c123b6f4d25081078b6f07c0ee5987d3ac8ab3e6bcf707c1b0e778",
65
65
  "TGLD_COIN_METADATA": "0x3a070c729606334a2be7c51ab28da9a1101b0de01452dd62c10cda0f7a5795d2",
66
66
  "TGLD_TOKEN_POLICY": "0xd9461bd329f1df24be9698131b6e2c2b9eaac7c9cf6d76689112f2e57be12009",
@@ -84,14 +84,30 @@
84
84
  "ETH": "0x253bbaaa35275240cf6df03258489707ea059762831e4102ebaabafd442bc935"
85
85
  },
86
86
  "TOKEN": {
87
- "AFSUI": "",
87
+ "AFSUI": "0xf325ce1300e8dac124071d3152c5c5ee6174914f8bc2161e88329cf579246efc::afsui::AFSUI",
88
+ "APT": "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37::coin::COIN",
89
+ "BTC": "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN",
90
+ "BUCK": "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK",
91
+ "CETUS": "0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS",
92
+ "ETH": "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN",
88
93
  "FUD": "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD",
94
+ "HASUI": "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d::hasui::HASUI",
95
+ "INJ": "0xcac46c81bbe1e516c65f4c3e5da81e7092cc2e70218deafb31f1c8d5fcc9dae3::inj::INJ",
96
+ "JUP": "0x3dc8710253682b53706bd110d51fd9b298d5bb923b535fb7bca88e049208c508::jup::JUP",
89
97
  "MFUD": "0xd8f04cd2a16c19c17428c3b4c22b01dd06740423b93fb7ee88fbe2676a82849d::mfud::MFUD",
98
+ "NAVX": "0xa99b8952d4f7d947ea77fe0ecdcc9e5fc0bcab2841d6e2a5aa00c3044e5544b5::navx::NAVX",
99
+ "SCA": "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA",
100
+ "SEI": "0xcac46c81bbe1e516c65f4c3e5da81e7092cc2e70218deafb31f1c8d5fcc9dae3::sei::SEI",
101
+ "SOL": "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8::coin::COIN",
90
102
  "SUI": "0x2::sui::SUI",
103
+ "TEXP": "0x37816d28c34cc0df82655ca97b3f066112a5f3c202cbb4aaa76c8af54e779750::tails_exp::TAILS_EXP",
91
104
  "TGLD": "0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a::tgld::TGLD",
92
105
  "TLP": "",
106
+ "TURBOS": "0x5d1f47ea69bb0de31c313d7acf89b890dbb8991ea8e03c6c355171f84bb1ba4a::turbos::TURBOS",
93
107
  "USD": "",
94
108
  "USDC": "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",
95
- "USDT": ""
109
+ "USDT": "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN",
110
+ "USDY": "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY",
111
+ "VSUI": "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT"
96
112
  }
97
113
  }
@@ -33,6 +33,7 @@
33
33
  "TAILS_EXP": "0x37e0c8c80a5099d5dfe1b0aeae62e3f01916be73935090efb9c95279b7bb1ce7"
34
34
  },
35
35
  "DOV": {
36
+ "AUTO_BID": "0x50b01081469d032e04bfcbd057614b1359376920f55c7bebd076e0e2af07a57f",
36
37
  "DOV_SINGLE": "0x0285cbf4aa8585be6c978235d11d06fa35773266ede040d38d34e1d79b049460"
37
38
  },
38
39
  "PERP": {
@@ -57,7 +58,6 @@
57
58
  },
58
59
  "OBJECT": {
59
60
  "NFT_TRANSFER_POLICY": "0x1c62271ecc443c3d92a8fe8f5662e877856d26b971d967f66937a65f55160831",
60
- "STRATEGY_POOL": "0x50b01081469d032e04bfcbd057614b1359376920f55c7bebd076e0e2af07a57f",
61
61
  "TAILS_IDS": "0xf4ea1c4432823ebde3b0c1f0705a45b08571b48237db879502b8ba336ea5b916",
62
62
  "TGLD_COIN_METADATA": "0xf77f8aabe64dccef0e568f2ef58a6ca74bdfb31786507cc35b7626a4df0d0ebc",
63
63
  "TGLD_TOKEN_POLICY": "0x17875c2f772053cd148bd2b8b8a40160db3f841825d8963192f8394d5c18974c",
@@ -82,12 +82,25 @@
82
82
  },
83
83
  "TOKEN": {
84
84
  "AFSUI": "0xd31923b6821fb7ba32d23e514b43d307da6ef991f9ef1af2cc4e26a0992ac87a::afsui::AFSUI",
85
+ "APT": "0xdede697a5748d20ebff2aabf3f2fd5bd9e41afb1a624b636cddc6df69078bd22::apt::APT",
86
+ "BTC": "0x949572061c09bbedef3ac4ffc42e58632291616f0605117cec86d840e09bf519::btc::BTC",
87
+ "BUCK": "0x879cd4804fe865897090e26eceb9f7a7cfda7dda1b2529a81631fa567e67375c::buck::BUCK",
88
+ "CETUS": "0xb69a412ba4b22137088183da5e5042d37ba17580897884f00f959d4135d3e1a7::cetus::CETUS",
89
+ "ETH": "0x949572061c09bbedef3ac4ffc42e58632291616f0605117cec86d840e09bf519::eth::ETH",
85
90
  "FUD": "0x461efa7ee5aa1b27e44450d79e2104e7fc0991461e9eb1c2a3fc1f44cd554856::fud::FUD",
91
+ "INJ": "0xfd3d56e007e3ae44d74b6a6840de0bd04a3724360abd89ae683ca7d592bbb49e::inj::INJ",
86
92
  "MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c::mfud::MFUD",
93
+ "SCA": "0xd33ea459d9e667c112f5168464a885a654d7bc3fd6903720aaa8cf495a32a77e::sca::SCA",
94
+ "SEI": "0xfd3d56e007e3ae44d74b6a6840de0bd04a3724360abd89ae683ca7d592bbb49e::sei::SEI",
95
+ "SOL": "0x879cd4804fe865897090e26eceb9f7a7cfda7dda1b2529a81631fa567e67375c::sol::SOL",
87
96
  "SUI": "0x2::sui::SUI",
97
+ "TEXP": "0x9b43ee208a3b235810c145bca1161d1a71d08bfe76b1e55bb3db319ea95d0149::tails_exp::TAILS_EXP",
88
98
  "TGLD": "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::tgld::TGLD",
89
99
  "TLP": "0x4bcf9eade4480bcb9fcd3139ec8d22afda34b25af06092904fcccb06e1b8043c::tlp::TLP",
100
+ "TURBOS": "0xebc68999f399a5ba121f8e59c0940eaa0e074e30454403357b93b25af9f30117::turbos::TURBOS",
90
101
  "USD": "0x01a05edb0e5e670196de98fbbf544180d129dd4ec11c3c57f742badf0304650d::trading::USD",
91
- "USDT": "0xa38dad920880f81ea514de6db007d3a84e9116a29c60b3e69bbe418c2d9f553c::usdt::USDT"
102
+ "USDC": "0x949572061c09bbedef3ac4ffc42e58632291616f0605117cec86d840e09bf519::usdc::USDC",
103
+ "USDT": "0xa38dad920880f81ea514de6db007d3a84e9116a29c60b3e69bbe418c2d9f553c::usdt::USDT",
104
+ "USDY": "0x579809c614d4388ed821c9f304bb741715cdf4a718707eb7c6fcf7b7189870ef::usdy::USDY"
92
105
  }
93
106
  }
@@ -3,45 +3,41 @@ import { TypusConfig } from "../../src/utils";
3
3
  export declare function getTokenNewStrategyTx(config: TypusConfig, tx: TransactionBlock, input: {
4
4
  typeArguments: string[];
5
5
  typusTokenType: string;
6
- strategy_pool: string;
7
- vault_index: string;
8
- signal_index: string;
6
+ vaultIndex: string;
7
+ signalIndex: string;
9
8
  coins: string[];
10
9
  amount: string;
11
10
  size: string;
12
- price_percentage: string;
13
- max_times: string;
14
- target_rounds: string[];
11
+ pricePercentage: string;
12
+ maxTimes: string;
13
+ targetRounds: string[];
15
14
  }): TransactionBlock;
16
15
  export declare function getTokenUpdateStrategyTx(config: TypusConfig, tx: TransactionBlock, input: {
17
16
  typeArguments: string[];
18
17
  typusTokenType: string;
19
- strategy_pool: string;
20
- vault_index: string;
21
- signal_index: string;
22
- strategy_index: string;
18
+ vaultIndex: string;
19
+ signalIndex: string;
20
+ strategyIndex: string;
23
21
  coins: string[];
24
22
  amount: string;
25
23
  size: string | null;
26
- price_percentage: string | null;
27
- max_times: string | null;
28
- target_rounds: string[];
24
+ pricePercentage: string | null;
25
+ maxTimes: string | null;
26
+ targetRounds: string[];
29
27
  }): TransactionBlock;
30
28
  export declare function getTokenCloseStrategyTx(config: TypusConfig, tx: TransactionBlock, input: {
31
29
  typeArguments: string[];
32
30
  typusTokenType: string;
33
- strategy_pool: string;
34
- vault_index: string;
35
- signal_index: string;
36
- strategy_index: string;
31
+ vaultIndex: string;
32
+ signalIndex: string;
33
+ strategyIndex: string;
37
34
  user: string;
38
35
  }): TransactionBlock;
39
36
  export declare function getTokenWithdrawProfitStrategyTx(config: TypusConfig, tx: TransactionBlock, input: {
40
37
  typeArguments: string[];
41
38
  typusTokenType: string;
42
- strategy_pool: string;
43
- vault_index: string;
44
- signal_index: string;
45
- strategy_index: string;
39
+ vaultIndex: string;
40
+ signalIndex: string;
41
+ strategyIndex: string;
46
42
  user: string;
47
43
  }): TransactionBlock;
@@ -43,13 +43,13 @@ function getTokenNewStrategyTx(config, tx, input) {
43
43
  typeArguments: input.typeArguments,
44
44
  arguments: [
45
45
  tx.object(config.registry.dov.dovSingle),
46
- tx.object(input.strategy_pool),
47
- tx.pure(input.vault_index),
48
- tx.pure(input.signal_index),
46
+ tx.object(config.registry.dov.autoBid),
47
+ tx.pure(input.vaultIndex),
48
+ tx.pure(input.signalIndex),
49
49
  tx.pure(input.size),
50
- tx.pure(input.price_percentage),
51
- tx.pure(input.max_times),
52
- tx.pure(input.target_rounds),
50
+ tx.pure(input.pricePercentage),
51
+ tx.pure(input.maxTimes),
52
+ tx.pure(input.targetRounds),
53
53
  tToken,
54
54
  ],
55
55
  });
@@ -78,14 +78,14 @@ function getTokenUpdateStrategyTx(config, tx, input) {
78
78
  typeArguments: input.typeArguments,
79
79
  arguments: [
80
80
  tx.object(config.registry.dov.dovSingle),
81
- tx.object(input.strategy_pool),
82
- tx.pure(input.vault_index),
83
- tx.pure(input.signal_index),
84
- tx.pure(input.strategy_index),
81
+ tx.object(config.registry.dov.autoBid),
82
+ tx.pure(input.vaultIndex),
83
+ tx.pure(input.signalIndex),
84
+ tx.pure(input.strategyIndex),
85
85
  tx.pure(input.size ? [input.size] : []),
86
- tx.pure(input.price_percentage ? [input.price_percentage] : []),
87
- tx.pure(input.max_times ? [input.max_times] : []),
88
- tx.pure(input.target_rounds),
86
+ tx.pure(input.pricePercentage ? [input.pricePercentage] : []),
87
+ tx.pure(input.maxTimes ? [input.maxTimes] : []),
88
+ tx.pure(input.targetRounds),
89
89
  tx.makeMoveVec({ objects: [tToken] }),
90
90
  ],
91
91
  });
@@ -106,10 +106,10 @@ function getTokenCloseStrategyTx(config, tx, input) {
106
106
  typeArguments: input.typeArguments,
107
107
  arguments: [
108
108
  tx.object(config.registry.dov.dovSingle),
109
- tx.object(input.strategy_pool),
110
- tx.pure(input.vault_index),
111
- tx.pure(input.signal_index),
112
- tx.pure(input.strategy_index),
109
+ tx.object(config.registry.dov.autoBid),
110
+ tx.pure(input.vaultIndex),
111
+ tx.pure(input.signalIndex),
112
+ tx.pure(input.strategyIndex),
113
113
  ],
114
114
  }), 2), d_token = _a[0], b_token = _a[1];
115
115
  if (input.typeArguments[0] == input.typusTokenType) {
@@ -149,10 +149,10 @@ function getTokenWithdrawProfitStrategyTx(config, tx, input) {
149
149
  typeArguments: input.typeArguments,
150
150
  arguments: [
151
151
  tx.object(config.registry.dov.dovSingle),
152
- tx.object(input.strategy_pool),
153
- tx.pure(input.vault_index),
154
- tx.pure(input.signal_index),
155
- tx.pure(input.strategy_index),
152
+ tx.object(config.registry.dov.autoBid),
153
+ tx.pure(input.vaultIndex),
154
+ tx.pure(input.signalIndex),
155
+ tx.pure(input.strategyIndex),
156
156
  ],
157
157
  });
158
158
  if (input.typeArguments[0] == input.typusTokenType) {
@@ -15,47 +15,44 @@ import { TypusConfig } from "../../src/utils";
15
15
  */
16
16
  export declare function getNewStrategyTx(config: TypusConfig, tx: TransactionBlock, input: {
17
17
  typeArguments: string[];
18
- strategy_pool: string;
19
- vault_index: string;
20
- signal_index: string;
18
+ vaultIndex: string;
19
+ signalIndex: string;
21
20
  coins: string[];
22
21
  amount: string;
23
22
  size: string;
24
- price_percentage: string;
25
- max_times: string;
26
- target_rounds: string[];
23
+ pricePercentage: string;
24
+ maxTimes: string;
25
+ targetRounds: string[];
27
26
  }): TransactionBlock;
28
27
  /**
29
28
  entry fun close_strategy<D_TOKEN, B_TOKEN>(
30
29
  strategy_pool: &mut StrategyPoolV2,
31
- vault_index: u64,
32
- signal_index: u64,
33
- strategy_index: u64,
30
+ vaultIndex: u64,
31
+ signalIndex: u64,
32
+ strategyIndex: u64,
34
33
  ctx: &mut TxContext
35
34
  )
36
35
  */
37
36
  export declare function getCloseStrategyTx(config: TypusConfig, tx: TransactionBlock, input: {
38
37
  typeArguments: string[];
39
- strategy_pool: string;
40
- vault_index: string;
41
- signal_index: string;
42
- strategy_index: string;
38
+ vaultIndex: string;
39
+ signalIndex: string;
40
+ strategyIndex: string;
43
41
  user: string;
44
42
  }): TransactionBlock;
45
43
  export declare function getWithdrawProfitStrategyTx(config: TypusConfig, tx: TransactionBlock, input: {
46
44
  typeArguments: string[];
47
- strategy_pool: string;
48
- vault_index: string;
49
- signal_index: string;
50
- strategy_index: string;
45
+ vaultIndex: string;
46
+ signalIndex: string;
47
+ strategyIndex: string;
51
48
  user: string;
52
49
  }): TransactionBlock;
53
50
  /**
54
51
  entry fun update_strategy<D_TOKEN, B_TOKEN>(
55
52
  strategy_pool: &mut StrategyPoolV2,
56
- vault_index: u64,
57
- signal_index: u64,
58
- strategy_index: u64,
53
+ vaultIndex: u64,
54
+ signalIndex: u64,
55
+ strategyIndex: u64,
59
56
  size: Option<u64>,
60
57
  price_percentage: Option<u64>,
61
58
  max_times: Option<u64>,
@@ -66,14 +63,13 @@ export declare function getWithdrawProfitStrategyTx(config: TypusConfig, tx: Tra
66
63
  */
67
64
  export declare function getUpdateStrategyTx(config: TypusConfig, tx: TransactionBlock, input: {
68
65
  typeArguments: string[];
69
- strategy_pool: string;
70
- vault_index: string;
71
- signal_index: string;
72
- strategy_index: string;
66
+ vaultIndex: string;
67
+ signalIndex: string;
68
+ strategyIndex: string;
73
69
  coins: string[];
74
70
  amount: string;
75
71
  size: string | null;
76
- price_percentage: string | null;
77
- max_times: string | null;
78
- target_rounds: string[];
72
+ pricePercentage: string | null;
73
+ maxTimes: string | null;
74
+ targetRounds: string[];
79
75
  }): TransactionBlock;
@@ -44,13 +44,13 @@ function getNewStrategyTx(config, tx, input) {
44
44
  typeArguments: input.typeArguments,
45
45
  arguments: [
46
46
  tx.object(config.registry.dov.dovSingle),
47
- tx.object(input.strategy_pool),
48
- tx.pure(input.vault_index),
49
- tx.pure(input.signal_index),
47
+ tx.object(config.registry.dov.autoBid),
48
+ tx.pure(input.vaultIndex),
49
+ tx.pure(input.signalIndex),
50
50
  tx.pure(input.size),
51
- tx.pure(input.price_percentage),
52
- tx.pure(input.max_times),
53
- tx.pure(input.target_rounds),
51
+ tx.pure(input.pricePercentage),
52
+ tx.pure(input.maxTimes),
53
+ tx.pure(input.targetRounds),
54
54
  input_coin,
55
55
  ],
56
56
  });
@@ -66,13 +66,13 @@ function getNewStrategyTx(config, tx, input) {
66
66
  typeArguments: input.typeArguments,
67
67
  arguments: [
68
68
  tx.object(config.registry.dov.dovSingle),
69
- tx.object(input.strategy_pool),
70
- tx.pure(input.vault_index),
71
- tx.pure(input.signal_index),
69
+ tx.object(config.registry.dov.autoBid),
70
+ tx.pure(input.vaultIndex),
71
+ tx.pure(input.signalIndex),
72
72
  tx.pure(input.size),
73
- tx.pure(input.price_percentage),
74
- tx.pure(input.max_times),
75
- tx.pure(input.target_rounds),
73
+ tx.pure(input.pricePercentage),
74
+ tx.pure(input.maxTimes),
75
+ tx.pure(input.targetRounds),
76
76
  input_coin,
77
77
  ],
78
78
  });
@@ -82,9 +82,9 @@ function getNewStrategyTx(config, tx, input) {
82
82
  /**
83
83
  entry fun close_strategy<D_TOKEN, B_TOKEN>(
84
84
  strategy_pool: &mut StrategyPoolV2,
85
- vault_index: u64,
86
- signal_index: u64,
87
- strategy_index: u64,
85
+ vaultIndex: u64,
86
+ signalIndex: u64,
87
+ strategyIndex: u64,
88
88
  ctx: &mut TxContext
89
89
  )
90
90
  */
@@ -94,10 +94,10 @@ function getCloseStrategyTx(config, tx, input) {
94
94
  typeArguments: input.typeArguments,
95
95
  arguments: [
96
96
  tx.object(config.registry.dov.dovSingle),
97
- tx.object(input.strategy_pool),
98
- tx.pure(input.vault_index),
99
- tx.pure(input.signal_index),
100
- tx.pure(input.strategy_index),
97
+ tx.object(config.registry.dov.autoBid),
98
+ tx.pure(input.vaultIndex),
99
+ tx.pure(input.signalIndex),
100
+ tx.pure(input.strategyIndex),
101
101
  ],
102
102
  }), 2), d_token = _a[0], b_token = _a[1];
103
103
  tx.transferObjects([d_token, b_token], input.user);
@@ -109,10 +109,10 @@ function getWithdrawProfitStrategyTx(config, tx, input) {
109
109
  typeArguments: input.typeArguments,
110
110
  arguments: [
111
111
  tx.object(config.registry.dov.dovSingle),
112
- tx.object(input.strategy_pool),
113
- tx.pure(input.vault_index),
114
- tx.pure(input.signal_index),
115
- tx.pure(input.strategy_index),
112
+ tx.object(config.registry.dov.autoBid),
113
+ tx.pure(input.vaultIndex),
114
+ tx.pure(input.signalIndex),
115
+ tx.pure(input.strategyIndex),
116
116
  ],
117
117
  });
118
118
  tx.transferObjects([d_token], input.user);
@@ -121,9 +121,9 @@ function getWithdrawProfitStrategyTx(config, tx, input) {
121
121
  /**
122
122
  entry fun update_strategy<D_TOKEN, B_TOKEN>(
123
123
  strategy_pool: &mut StrategyPoolV2,
124
- vault_index: u64,
125
- signal_index: u64,
126
- strategy_index: u64,
124
+ vaultIndex: u64,
125
+ signalIndex: u64,
126
+ strategyIndex: u64,
127
127
  size: Option<u64>,
128
128
  price_percentage: Option<u64>,
129
129
  max_times: Option<u64>,
@@ -144,14 +144,14 @@ function getUpdateStrategyTx(config, tx, input) {
144
144
  typeArguments: input.typeArguments,
145
145
  arguments: [
146
146
  tx.object(config.registry.dov.dovSingle),
147
- tx.object(input.strategy_pool),
148
- tx.pure(input.vault_index),
149
- tx.pure(input.signal_index),
150
- tx.pure(input.strategy_index),
147
+ tx.object(config.registry.dov.autoBid),
148
+ tx.pure(input.vaultIndex),
149
+ tx.pure(input.signalIndex),
150
+ tx.pure(input.strategyIndex),
151
151
  tx.pure(input.size ? [input.size] : []),
152
- tx.pure(input.price_percentage ? [input.price_percentage] : []),
153
- tx.pure(input.max_times ? [input.max_times] : []),
154
- tx.pure(input.target_rounds),
152
+ tx.pure(input.pricePercentage ? [input.pricePercentage] : []),
153
+ tx.pure(input.maxTimes ? [input.maxTimes] : []),
154
+ tx.pure(input.targetRounds),
155
155
  tx.makeMoveVec({ objects: [input_coin] }),
156
156
  ],
157
157
  });
@@ -162,14 +162,14 @@ function getUpdateStrategyTx(config, tx, input) {
162
162
  typeArguments: input.typeArguments,
163
163
  arguments: [
164
164
  tx.object(config.registry.dov.dovSingle),
165
- tx.object(input.strategy_pool),
166
- tx.pure(input.vault_index),
167
- tx.pure(input.signal_index),
168
- tx.pure(input.strategy_index),
165
+ tx.object(config.registry.dov.autoBid),
166
+ tx.pure(input.vaultIndex),
167
+ tx.pure(input.signalIndex),
168
+ tx.pure(input.strategyIndex),
169
169
  tx.pure(input.size ? [input.size] : []),
170
- tx.pure(input.price_percentage ? [input.price_percentage] : []),
171
- tx.pure(input.max_times ? [input.max_times] : []),
172
- tx.pure(input.target_rounds),
170
+ tx.pure(input.pricePercentage ? [input.pricePercentage] : []),
171
+ tx.pure(input.maxTimes ? [input.maxTimes] : []),
172
+ tx.pure(input.targetRounds),
173
173
  tx.makeMoveVec({ objects: [] }),
174
174
  ],
175
175
  });
@@ -186,14 +186,14 @@ function getUpdateStrategyTx(config, tx, input) {
186
186
  typeArguments: input.typeArguments,
187
187
  arguments: [
188
188
  tx.object(config.registry.dov.dovSingle),
189
- tx.object(input.strategy_pool),
190
- tx.pure(input.vault_index),
191
- tx.pure(input.signal_index),
192
- tx.pure(input.strategy_index),
189
+ tx.object(config.registry.dov.autoBid),
190
+ tx.pure(input.vaultIndex),
191
+ tx.pure(input.signalIndex),
192
+ tx.pure(input.strategyIndex),
193
193
  tx.pure(input.size ? [input.size] : []),
194
- tx.pure(input.price_percentage ? [input.price_percentage] : []),
195
- tx.pure(input.max_times ? [input.max_times] : []),
196
- tx.pure(input.target_rounds),
194
+ tx.pure(input.pricePercentage ? [input.pricePercentage] : []),
195
+ tx.pure(input.maxTimes ? [input.maxTimes] : []),
196
+ tx.pure(input.targetRounds),
197
197
  tx.makeMoveVec({ objects: [input_coin] }),
198
198
  ],
199
199
  });
@@ -1,10 +1,9 @@
1
1
  import { BidShare } from "../../src/typus-dov-single-v2/view-function";
2
2
  import { TypusConfig } from "../../src/utils";
3
3
  export declare function getUserStrategies(config: TypusConfig, input: {
4
- strategyPool: string;
5
4
  user: string;
6
5
  }): Promise<StrategyV2[]>;
7
- export declare function getStrategyPool(config: TypusConfig, strategyPool: string): Promise<StrategyPoolV2>;
6
+ export declare function getStrategyPool(config: TypusConfig): Promise<StrategyPoolV2>;
8
7
  export interface StrategyPoolV2 {
9
8
  id: string;
10
9
  strategies: Map<string, Map<string, string>>;
@@ -132,7 +132,7 @@ function getUserStrategies(config, input
132
132
  target = "".concat(config.package.dovSingle, "::auto_bid::view_user_strategies");
133
133
  transactionBlockArguments = [
134
134
  transactionBlock.pure(config.registry.dov.dovSingle),
135
- transactionBlock.object(input.strategyPool),
135
+ transactionBlock.object(config.registry.dov.autoBid),
136
136
  transactionBlock.pure(input.user),
137
137
  ];
138
138
  transactionBlock.moveCall({
@@ -236,16 +236,16 @@ function getUserStrategies(config, input
236
236
  });
237
237
  });
238
238
  }
239
- function getStrategyPool(config, strategyPool) {
239
+ function getStrategyPool(config) {
240
240
  return __awaiter(this, void 0, void 0, function () {
241
- var provider, pool, vaults, strategies, vaults_1, vaults_1_1, vault, signals, _a, _b, signal, strategyTable, strategy_pool;
241
+ var provider, pool, vaults, strategies, vaults_1, vaults_1_1, vault, signals, _a, _b, signal, strategyTable, strategyPool;
242
242
  var e_1, _c, e_2, _d;
243
243
  var _e;
244
244
  return __generator(this, function (_f) {
245
245
  switch (_f.label) {
246
246
  case 0:
247
247
  provider = new client_1.SuiClient({ url: config.rpcEndpoint });
248
- return [4 /*yield*/, provider.getObject({ id: strategyPool, options: { showContent: true } })];
248
+ return [4 /*yield*/, provider.getObject({ id: config.registry.dov.autoBid, options: { showContent: true } })];
249
249
  case 1:
250
250
  pool = (_e = (_f.sent()).data) === null || _e === void 0 ? void 0 : _e.content.fields;
251
251
  vaults = pool.strategies.fields.contents;
@@ -279,12 +279,12 @@ function getStrategyPool(config, strategyPool) {
279
279
  }
280
280
  finally { if (e_1) throw e_1.error; }
281
281
  }
282
- strategy_pool = {
282
+ strategyPool = {
283
283
  id: pool.id.id,
284
284
  strategies: strategies,
285
285
  authority: pool.authority,
286
286
  };
287
- return [2 /*return*/, strategy_pool];
287
+ return [2 /*return*/, strategyPool];
288
288
  }
289
289
  });
290
290
  });
@@ -1,6 +1,6 @@
1
1
  import { TypusConfig } from "../../src/utils";
2
2
  export declare function getDrawResult(config: TypusConfig, input: {
3
- network: "mainnet" | "testnet";
3
+ network: "MAINNET" | "TESTNET";
4
4
  module: "tails_exp" | "combo_dice";
5
5
  index: string;
6
6
  amount: string;
@@ -55,7 +55,7 @@ function getDrawResult(config, input) {
55
55
  break;
56
56
  }
57
57
  queryParams = new URLSearchParams({
58
- network: input.network,
58
+ network: input.network.toLowerCase(),
59
59
  packageId: config.package.dice,
60
60
  registry: registry,
61
61
  index: input.index,
@@ -134,24 +134,29 @@ function getPlaygrounds(config, input) {
134
134
  }
135
135
  function getHistory(config, input) {
136
136
  return __awaiter(this, void 0, void 0, function () {
137
- var provider, registry, eventFilter, result, history, nextPage;
137
+ var provider, MoveEventType, eventFilter, result, history, nextPage;
138
138
  return __generator(this, function (_a) {
139
139
  switch (_a.label) {
140
140
  case 0:
141
141
  provider = new client_1.SuiClient({ url: config.rpcEndpoint });
142
- registry = "";
142
+ MoveEventType = "";
143
143
  switch (input.module) {
144
144
  case "tails_exp":
145
- registry = config.registry.dice.tailsExp;
145
+ MoveEventType = "".concat(config.packageOrigin.dice, "::tails_exp::Draw");
146
146
  break;
147
147
  case "combo_dice":
148
- registry = config.registry.dice.comboDice;
148
+ if (config.rpcEndpoint.includes("mainnet")) {
149
+ MoveEventType = "0xdd2265bf4ee2190ec67d646ac6552bc4ef4da104af948aa8447e50e7e94a0c9f::combo_dice::Draw";
150
+ }
151
+ else {
152
+ MoveEventType = "0xf1d628b4f14f9dae42d73a6cdee9b5f80567fee323166c4ecfb124de7d4ff254::combo_dice::Draw";
153
+ }
149
154
  break;
150
155
  default:
151
156
  break;
152
157
  }
153
158
  eventFilter = {
154
- MoveEventType: "".concat(registry, "::").concat(input.module, "::Draw"),
159
+ MoveEventType: MoveEventType,
155
160
  };
156
161
  return [4 /*yield*/, provider.queryEvents({ query: eventFilter, order: "descending" })];
157
162
  case 1:
@@ -279,15 +284,15 @@ function parseHistory(datas, playgrounds) {
279
284
  // tokenType: string;
280
285
  // }
281
286
  // export async function getProfitSharing(provider: SuiClient, diceProfitSharing: string) {
282
- // const object = await provider.getObject({
287
+ // let object = await provider.getObject({
283
288
  // id: diceProfitSharing,
284
289
  // options: { showContent: true },
285
290
  // });
286
291
  // // @ts-ignore
287
- // const type: string = object.data?.content.type;
288
- // const tokenType = type.split("<").at(-1)?.replace(">>", "")!;
292
+ // let type: string = object.data?.content.type;
293
+ // let tokenType = type.split("<").at(-1)?.replace(">>", "")!;
289
294
  // // @ts-ignore
290
- // const result = object.data?.content?.fields.value.fields as ProfitSharing;
295
+ // let result = object.data?.content?.fields.value.fields as ProfitSharing;
291
296
  // result.tokenType = tokenType;
292
297
  // return result;
293
298
  // }
@@ -671,23 +671,19 @@ exports.getUserBidReceipts = getUserBidReceipts;
671
671
  * @return User Bids.
672
672
  */
673
673
  var fetchUserBids = function (config, user, prices) { return __awaiter(void 0, void 0, void 0, function () {
674
- var provider, packageAddress, registryAddress, originFramworkAddress, strategyPool, 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
+ var provider, 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;
675
675
  var e_2, _b, e_3, _c, e_4, _d, e_5, _e;
676
676
  return __generator(this, function (_f) {
677
677
  switch (_f.label) {
678
678
  case 0:
679
679
  provider = new client_2.SuiClient({ url: config.rpcEndpoint });
680
- packageAddress = config.package.dovSingle;
681
- registryAddress = config.registry.dov.dovSingle;
682
- originFramworkAddress = config.packageOrigin.framework;
683
- strategyPool = config.object.strategyPool;
684
680
  return [4 /*yield*/, (0, typus_dov_single_v2_1.getVaults)(config, { indexes: [] })];
685
681
  case 1:
686
682
  vaultsInfo = _f.sent();
687
683
  return [4 /*yield*/, (0, exports.getUserBidReceipts)(config, { user: user })];
688
684
  case 2:
689
685
  userReceipts = _f.sent();
690
- return [4 /*yield*/, (0, auto_bid_1.getUserStrategies)(config, { strategyPool: strategyPool, user: user })];
686
+ return [4 /*yield*/, (0, auto_bid_1.getUserStrategies)(config, { user: user })];
691
687
  case 3:
692
688
  userStrategies = _f.sent();
693
689
  return [4 /*yield*/, (0, typus_dov_single_v2_1.getAuctions)(config, { indexes: [] })];
@@ -178,7 +178,7 @@ function parseTxHistory(datas, originPackage, vaults) {
178
178
  functionType = (_d = new RegExp("^([^::]+)::([^::]+)::([^<]+)").exec(event.type)) === null || _d === void 0 ? void 0 : _d.slice(1, 4);
179
179
  action = functionType[2];
180
180
  Tails = undefined;
181
- Index = event.parsedJson.index || event.parsedJson.vault_index;
181
+ Index = event.parsedJson.index || event.parsedJson.vaultIndex;
182
182
  if (Index) {
183
183
  _a = __read(parseVaultInfo(vaults, Index, action, event.parsedJson.log), 6), Period = _a[0], Vault = _a[1], RiskLevel = _a[2], d_token = _a[3], b_token = _a[4], o_token = _a[5];
184
184
  }
@@ -82,7 +82,6 @@ export declare function getRefreshDepositSnapshotTx(config: TypusConfig, tx: Tra
82
82
  )
83
83
  */
84
84
  export declare function getNewBidTx(config: TypusConfig, tx: TransactionBlock, input: {
85
- tgldRegistry: string;
86
85
  typeArguments: string[];
87
86
  index: string;
88
87
  coins: string[];
@@ -205,7 +205,7 @@ function getNewBidTx(config, tx, input) {
205
205
  arguments: [
206
206
  tx.object(config.version.typus),
207
207
  tx.object(config.registry.typus.user),
208
- tx.object(input.tgldRegistry),
208
+ tx.object(config.registry.typus.tgld),
209
209
  tx.object(config.registry.typus.leaderboard),
210
210
  tx.object(config.registry.dov.dovSingle),
211
211
  tx.pure(input.index),
@@ -238,7 +238,7 @@ function getNewBidTx(config, tx, input) {
238
238
  arguments: [
239
239
  tx.object(config.version.typus),
240
240
  tx.object(config.registry.typus.user),
241
- tx.object(input.tgldRegistry),
241
+ tx.object(config.registry.typus.tgld),
242
242
  tx.object(config.registry.typus.leaderboard),
243
243
  tx.object(config.registry.dov.dovSingle),
244
244
  tx.pure(input.index),
@@ -7,7 +7,7 @@ export declare function createTradingOrderWithBidReceipt(config: TypusConfig, tx
7
7
  isLong: boolean;
8
8
  user: string;
9
9
  index: string;
10
- bToken: string;
10
+ bToken: TOKEN;
11
11
  bidReceipt: string;
12
12
  share: string | null;
13
13
  }): Promise<TransactionBlock>;
@@ -1,4 +1,3 @@
1
1
  export * from "./view-function";
2
2
  export * from "./user-entry";
3
3
  export * from "./user-history";
4
- export declare const NETWORK = "MAINNET";
@@ -14,8 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.NETWORK = void 0;
18
17
  __exportStar(require("./view-function"), exports);
19
18
  __exportStar(require("./user-entry"), exports);
20
19
  __exportStar(require("./user-history"), exports);
21
- exports.NETWORK = "MAINNET";
@@ -13,7 +13,7 @@ export interface Vault {
13
13
  export interface Info {
14
14
  index: string;
15
15
  round: string;
16
- portfolio_vault_index: string;
16
+ portfolio_vaultIndex: string;
17
17
  refresh_ts_ms: string;
18
18
  status: string;
19
19
  lending_enabled: string;
@@ -53,9 +53,7 @@ function getVaultData(config, input) {
53
53
  transactionBlock = new transactions_1.TransactionBlock();
54
54
  transactionBlock.moveCall({
55
55
  target: "".concat(config.package.safu, "::view_function::get_vault_data_bcs"),
56
- typeArguments: [
57
- "".concat(config.package.framework, "::vault::TypusBidReceipt")
58
- ],
56
+ typeArguments: ["".concat(config.package.framework, "::vault::TypusBidReceipt")],
59
57
  arguments: [transactionBlock.pure(config.registry.safu.safu), transactionBlock.pure(input.indexes)],
60
58
  });
61
59
  return [4 /*yield*/, provider.devInspectTransactionBlock({ sender: constants_1.SENDER, transactionBlock: transactionBlock })];
@@ -80,7 +78,7 @@ function getVaultData(config, input) {
80
78
  var info = {
81
79
  index: infoArray[0],
82
80
  round: infoArray[1],
83
- portfolio_vault_index: infoArray[2],
81
+ portfolio_vaultIndex: infoArray[2],
84
82
  refresh_ts_ms: infoArray[3],
85
83
  status: infoArray[4],
86
84
  lending_enabled: infoArray[5],
@@ -142,8 +140,8 @@ function getVaultData(config, input) {
142
140
  metadata: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8()))),
143
141
  u64_padding: reader.readVec(function (reader) {
144
142
  return reader.read64();
145
- })
146
- }
143
+ }),
144
+ },
147
145
  ];
148
146
  }
149
147
  else {
@@ -158,7 +156,7 @@ function getVaultData(config, input) {
158
156
  u64Padding: u64Padding,
159
157
  bcsPadding: bcsPadding,
160
158
  },
161
- null
159
+ null,
162
160
  ];
163
161
  }
164
162
  });
@@ -98,6 +98,6 @@ function getExpLeaderBoard(startTimestamp, endTimestamp) {
98
98
  });
99
99
  }
100
100
  // (async () => {
101
- // const res1 = await getExpLeaderBoard("0");
101
+ // let res1 = await getExpLeaderBoard("0");
102
102
  // console.log(res1);
103
103
  // })();
@@ -33,6 +33,7 @@ export interface Registry {
33
33
  tailsExp: string;
34
34
  };
35
35
  dov: {
36
+ autoBid: string;
36
37
  dovSingle: string;
37
38
  };
38
39
  perp: {
@@ -60,7 +61,6 @@ export interface Registry {
60
61
  }
61
62
  export interface Object {
62
63
  nftTransferPolicy: string;
63
- strategyPool: string;
64
64
  tailsIds: string;
65
65
  tgldCoinMetadata: string;
66
66
  tgldTokenPolicy: string;
@@ -85,12 +85,28 @@ export interface Oracle {
85
85
  }
86
86
  export interface Token {
87
87
  afsui: string;
88
+ apt: string;
89
+ btc: string;
90
+ buck: string;
91
+ cetus: string;
92
+ eth: string;
88
93
  fud: string;
94
+ hasui: string;
95
+ inj: string;
96
+ jup: string;
89
97
  mfud: string;
98
+ navx: string;
99
+ sca: string;
100
+ sei: string;
101
+ sol: string;
90
102
  sui: string;
103
+ texp: string;
91
104
  tgld: string;
92
105
  tlp: string;
93
- usdc: string;
106
+ turbos: string;
94
107
  usd: string;
108
+ usdc: string;
95
109
  usdt: string;
110
+ usdy: string;
111
+ vsui: string;
96
112
  }
@@ -25,7 +25,7 @@ var TypusConfig = /** @class */ (function () {
25
25
  }());
26
26
  exports.TypusConfig = TypusConfig;
27
27
  // (async () => {
28
- // const { default: json } = await import("../../config-testnet.json");
28
+ // let { default: json } = await import("../../config-testnet.json");
29
29
  // let config = TypusConfig.parse(json);
30
30
  // console.log(config);
31
31
  // console.log(config.rpcEndpoint);
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.30",
5
+ "version": "1.4.31",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.11.1",
8
8
  "@mysten/kiosk": "0.8.10",