@typus/typus-sdk 1.4.47 → 1.4.49-wusdc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/auto-bid/token-user-entry.js +1 -0
- package/dist/src/constants/token.d.ts +3 -3
- package/dist/src/constants/token.js +6 -4
- package/dist/src/typus-dov-single-v2/function/bidding.d.ts +1 -1
- package/dist/src/typus-dov-single-v2/function/bidding.js +3 -1
- package/dist/src/typus-dov-single-v2/function/token.js +1 -1
- package/dist/src/utils/api/price.js +3 -3
- package/dist/src/utils/typusConfig.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export declare const tokenType: {
|
|
|
6
6
|
SUI: string;
|
|
7
7
|
BTC: string;
|
|
8
8
|
ETH: string;
|
|
9
|
-
|
|
9
|
+
wUSDC: string;
|
|
10
10
|
USDT: string;
|
|
11
11
|
CETUS: string;
|
|
12
12
|
BUCK: string;
|
|
@@ -44,10 +44,10 @@ export declare const tokenType: {
|
|
|
44
44
|
SCA: string;
|
|
45
45
|
BTC: string;
|
|
46
46
|
ETH: string;
|
|
47
|
-
|
|
47
|
+
wUSDC: string;
|
|
48
48
|
BLUB: string;
|
|
49
49
|
MBLUB: string;
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
export type TOKEN = "SUI" | "CETUS" | "BUCK" | "SOL" | "TURBOS" | "APT" | "FUD" | "MFUD" | "BLUB" | "MBLUB" | "USDT" | "AFSUI" | "INJ" | "SEI" | "USDY" | "TEXP" | "SCA" | "BTC" | "ETH" | "USDC";
|
|
52
|
+
export type TOKEN = "SUI" | "CETUS" | "BUCK" | "SOL" | "TURBOS" | "APT" | "FUD" | "MFUD" | "BLUB" | "MBLUB" | "USDT" | "AFSUI" | "INJ" | "SEI" | "USDY" | "TEXP" | "SCA" | "BTC" | "ETH" | "USDC" | "wUSDC";
|
|
53
53
|
export declare function typeArgToToken(typeArg: string): string;
|
|
@@ -22,7 +22,7 @@ function typeArgToAsset(typeArg) {
|
|
|
22
22
|
case "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8":
|
|
23
23
|
return "WSOL";
|
|
24
24
|
case "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf":
|
|
25
|
-
return "
|
|
25
|
+
return "wUSDC";
|
|
26
26
|
case "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c":
|
|
27
27
|
return "USDT";
|
|
28
28
|
case "0x5d1f47ea69bb0de31c313d7acf89b890dbb8991ea8e03c6c355171f84bb1ba4a":
|
|
@@ -68,6 +68,8 @@ function assetToDecimal(asset) {
|
|
|
68
68
|
return 8;
|
|
69
69
|
case "USDC":
|
|
70
70
|
return 6;
|
|
71
|
+
case "wUSDC":
|
|
72
|
+
return 6;
|
|
71
73
|
case "USDT":
|
|
72
74
|
return 6;
|
|
73
75
|
case "USDY":
|
|
@@ -111,7 +113,7 @@ exports.tokenType = {
|
|
|
111
113
|
SUI: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
|
|
112
114
|
BTC: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN",
|
|
113
115
|
ETH: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN",
|
|
114
|
-
|
|
116
|
+
wUSDC: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN",
|
|
115
117
|
USDT: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN",
|
|
116
118
|
CETUS: "0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS",
|
|
117
119
|
BUCK: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK",
|
|
@@ -149,7 +151,7 @@ exports.tokenType = {
|
|
|
149
151
|
SCA: "0xd33ea459d9e667c112f5168464a885a654d7bc3fd6903720aaa8cf495a32a77e::sca::SCA",
|
|
150
152
|
BTC: "0x949572061c09bbedef3ac4ffc42e58632291616f0605117cec86d840e09bf519::btc::BTC",
|
|
151
153
|
ETH: "0x949572061c09bbedef3ac4ffc42e58632291616f0605117cec86d840e09bf519::eth::ETH",
|
|
152
|
-
|
|
154
|
+
wUSDC: "0x949572061c09bbedef3ac4ffc42e58632291616f0605117cec86d840e09bf519::usdc::USDC",
|
|
153
155
|
BLUB: "0x94b8f6dcceeb2be160f6837089cc7502458f4f070fa0814380737acb0c41fd5b::blub::BLUB",
|
|
154
156
|
MBLUB: "0x4b5d0a097ee8a309a89bb2bc589403a4a9a39de639d576495b697be2a60f69bb::mblub::MBLUB",
|
|
155
157
|
},
|
|
@@ -165,7 +167,7 @@ function typeArgToToken(typeArg) {
|
|
|
165
167
|
case "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8":
|
|
166
168
|
return "SOL";
|
|
167
169
|
case "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf":
|
|
168
|
-
return "
|
|
170
|
+
return "wUSDC";
|
|
169
171
|
case "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c":
|
|
170
172
|
return "USDT";
|
|
171
173
|
case "0x5d1f47ea69bb0de31c313d7acf89b890dbb8991ea8e03c6c355171f84bb1ba4a":
|
|
@@ -121,7 +121,7 @@ exports.ASSET_INFO = {
|
|
|
121
121
|
product: new web3_js_1.PublicKey("24bB1mRGsrrDVawJTCVYXrxbEz6ozztukPUKvcZCDcPz"),
|
|
122
122
|
price: new web3_js_1.PublicKey("6cUuAyAX3eXoiWkjFF77RQBEUF15AAMQ7d1hm4EPd3tv"),
|
|
123
123
|
},
|
|
124
|
-
|
|
124
|
+
wUSDC: {
|
|
125
125
|
product: new web3_js_1.PublicKey("8GWTTbNiXdmyZREXbjsZBmCRuzdPrW55dnZGDkTRjWvb"),
|
|
126
126
|
price: new web3_js_1.PublicKey("Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD"),
|
|
127
127
|
},
|
|
@@ -179,6 +179,7 @@ exports.tokenOrder = {
|
|
|
179
179
|
SOL: 14,
|
|
180
180
|
TURBOS: 15,
|
|
181
181
|
USDC: 16,
|
|
182
|
+
wUSDC: 16,
|
|
182
183
|
USDT: 17,
|
|
183
184
|
USDY: 18,
|
|
184
185
|
VSUI: 20,
|
|
@@ -207,6 +208,7 @@ var DefaultOracleDecimal = {
|
|
|
207
208
|
APT: "8",
|
|
208
209
|
SOL: "8",
|
|
209
210
|
USDC: "8",
|
|
211
|
+
wUSDC: "8",
|
|
210
212
|
USDT: "8",
|
|
211
213
|
CETUS: "8",
|
|
212
214
|
TURBOS: "8",
|
|
@@ -24,7 +24,7 @@ exports.LST = {
|
|
|
24
24
|
HASUI: "SUI",
|
|
25
25
|
VSUI: "SUI",
|
|
26
26
|
};
|
|
27
|
-
exports.StableCoin = ["USDC", "USDT", "BUCK", "USDY"];
|
|
27
|
+
exports.StableCoin = ["USDC", "USDT", "BUCK", "USDY", "wUSDC"];
|
|
28
28
|
var getTokenName = function (_a) {
|
|
29
29
|
var _b, _c, _d, _e;
|
|
30
30
|
var token = _a.token, wrapped = _a.wrapped, million = _a.million;
|
|
@@ -82,16 +82,16 @@ function getPairPrices(pair, startTs, endTs) {
|
|
|
82
82
|
}
|
|
83
83
|
function getLatestPrice(pair) {
|
|
84
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
var currentTimestampInSeconds,
|
|
85
|
+
var currentTimestampInSeconds, fiveMinuteAgo, res, e_1;
|
|
86
86
|
return __generator(this, function (_a) {
|
|
87
87
|
switch (_a.label) {
|
|
88
88
|
case 0:
|
|
89
89
|
currentTimestampInSeconds = Math.floor(new Date().getTime() / 1000);
|
|
90
|
-
|
|
90
|
+
fiveMinuteAgo = currentTimestampInSeconds - 300;
|
|
91
91
|
_a.label = 1;
|
|
92
92
|
case 1:
|
|
93
93
|
_a.trys.push([1, 3, , 4]);
|
|
94
|
-
return [4 /*yield*/, getPairPrices(pair,
|
|
94
|
+
return [4 /*yield*/, getPairPrices(pair, fiveMinuteAgo.toString(), currentTimestampInSeconds.toString())];
|
|
95
95
|
case 2:
|
|
96
96
|
res = _a.sent();
|
|
97
97
|
if (res.at(-1)) {
|
|
@@ -18,7 +18,6 @@ export interface Package {
|
|
|
18
18
|
oracle: string;
|
|
19
19
|
perp: string;
|
|
20
20
|
safu: string;
|
|
21
|
-
token: string;
|
|
22
21
|
typus: string;
|
|
23
22
|
}
|
|
24
23
|
export interface Version {
|
|
@@ -106,6 +105,7 @@ export interface Token {
|
|
|
106
105
|
turbos: string;
|
|
107
106
|
usd: string;
|
|
108
107
|
usdc: string;
|
|
108
|
+
wusdc: string;
|
|
109
109
|
usdt: string;
|
|
110
110
|
usdy: string;
|
|
111
111
|
vsui: string;
|