@basedone/core 0.1.8 → 0.1.10
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/index.d.mts +74 -7
- package/dist/index.d.ts +74 -7
- package/dist/index.js +1011 -154
- package/dist/index.mjs +46 -21
- package/dist/{meta-57AY44US.mjs → meta-FVJIMALT.mjs} +2 -4
- package/dist/{meta-RSZFFH63.mjs → meta-UOGUG3OW.mjs} +2 -4
- package/dist/{perpDexs-XSB4Y2BP.mjs → perpDexs-G7V2QIM6.mjs} +646 -114
- package/dist/{perpDexs-PBKWKKQU.mjs → perpDexs-GGL32HT4.mjs} +64 -6
- package/dist/{spotMeta-WQ4PXRNY.mjs → spotMeta-OD7S6HGW.mjs} +61 -5
- package/dist/{spotMeta-Y7G2GI7B.mjs → spotMeta-PCN4Z4R3.mjs} +195 -6
- package/index.ts +1 -0
- package/lib/cloid/cloid.ts +2 -0
- package/lib/fee.ts +10 -10
- package/lib/hip3/market-info.ts +36 -8
- package/lib/hip3/utils.ts +15 -2
- package/lib/meta/data/mainnet/meta.json +2 -4
- package/lib/meta/data/mainnet/perpDexs.json +64 -6
- package/lib/meta/data/mainnet/spotMeta.json +61 -5
- package/lib/meta/data/testnet/meta.json +2 -4
- package/lib/meta/data/testnet/perpDexs.json +646 -114
- package/lib/meta/data/testnet/spotMeta.json +195 -6
- package/lib/meta/metadata.ts +8 -1
- package/lib/meta/types.ts +36 -0
- package/package.json +1 -1
|
@@ -10547,6 +10547,105 @@
|
|
|
10547
10547
|
"name": "@1366",
|
|
10548
10548
|
"index": 1366,
|
|
10549
10549
|
"isCanonical": false
|
|
10550
|
+
},
|
|
10551
|
+
{
|
|
10552
|
+
"tokens": [
|
|
10553
|
+
1487,
|
|
10554
|
+
0
|
|
10555
|
+
],
|
|
10556
|
+
"name": "@1368",
|
|
10557
|
+
"index": 1368,
|
|
10558
|
+
"isCanonical": false
|
|
10559
|
+
},
|
|
10560
|
+
{
|
|
10561
|
+
"tokens": [
|
|
10562
|
+
1485,
|
|
10563
|
+
0
|
|
10564
|
+
],
|
|
10565
|
+
"name": "@1369",
|
|
10566
|
+
"index": 1369,
|
|
10567
|
+
"isCanonical": false
|
|
10568
|
+
},
|
|
10569
|
+
{
|
|
10570
|
+
"tokens": [
|
|
10571
|
+
1490,
|
|
10572
|
+
0
|
|
10573
|
+
],
|
|
10574
|
+
"name": "@1370",
|
|
10575
|
+
"index": 1370,
|
|
10576
|
+
"isCanonical": false
|
|
10577
|
+
},
|
|
10578
|
+
{
|
|
10579
|
+
"tokens": [
|
|
10580
|
+
1481,
|
|
10581
|
+
0
|
|
10582
|
+
],
|
|
10583
|
+
"name": "@1371",
|
|
10584
|
+
"index": 1371,
|
|
10585
|
+
"isCanonical": false
|
|
10586
|
+
},
|
|
10587
|
+
{
|
|
10588
|
+
"tokens": [
|
|
10589
|
+
1484,
|
|
10590
|
+
0
|
|
10591
|
+
],
|
|
10592
|
+
"name": "@1372",
|
|
10593
|
+
"index": 1372,
|
|
10594
|
+
"isCanonical": false
|
|
10595
|
+
},
|
|
10596
|
+
{
|
|
10597
|
+
"tokens": [
|
|
10598
|
+
1477,
|
|
10599
|
+
1452
|
|
10600
|
+
],
|
|
10601
|
+
"name": "@1373",
|
|
10602
|
+
"index": 1373,
|
|
10603
|
+
"isCanonical": false
|
|
10604
|
+
},
|
|
10605
|
+
{
|
|
10606
|
+
"tokens": [
|
|
10607
|
+
1492,
|
|
10608
|
+
0
|
|
10609
|
+
],
|
|
10610
|
+
"name": "@1374",
|
|
10611
|
+
"index": 1374,
|
|
10612
|
+
"isCanonical": false
|
|
10613
|
+
},
|
|
10614
|
+
{
|
|
10615
|
+
"tokens": [
|
|
10616
|
+
1469,
|
|
10617
|
+
0
|
|
10618
|
+
],
|
|
10619
|
+
"name": "@1375",
|
|
10620
|
+
"index": 1375,
|
|
10621
|
+
"isCanonical": false
|
|
10622
|
+
},
|
|
10623
|
+
{
|
|
10624
|
+
"tokens": [
|
|
10625
|
+
1,
|
|
10626
|
+
1295
|
|
10627
|
+
],
|
|
10628
|
+
"name": "@1376",
|
|
10629
|
+
"index": 1376,
|
|
10630
|
+
"isCanonical": true
|
|
10631
|
+
},
|
|
10632
|
+
{
|
|
10633
|
+
"tokens": [
|
|
10634
|
+
1493,
|
|
10635
|
+
0
|
|
10636
|
+
],
|
|
10637
|
+
"name": "@1377",
|
|
10638
|
+
"index": 1377,
|
|
10639
|
+
"isCanonical": false
|
|
10640
|
+
},
|
|
10641
|
+
{
|
|
10642
|
+
"tokens": [
|
|
10643
|
+
1105,
|
|
10644
|
+
1493
|
|
10645
|
+
],
|
|
10646
|
+
"name": "@1378",
|
|
10647
|
+
"index": 1378,
|
|
10648
|
+
"isCanonical": false
|
|
10550
10649
|
}
|
|
10551
10650
|
],
|
|
10552
10651
|
"tokens": [
|
|
@@ -27088,7 +27187,10 @@
|
|
|
27088
27187
|
"index": 1469,
|
|
27089
27188
|
"tokenId": "0x8e670650571a3ce604ece184eaaf01c0",
|
|
27090
27189
|
"isCanonical": false,
|
|
27091
|
-
"evmContract":
|
|
27190
|
+
"evmContract": {
|
|
27191
|
+
"address": "0x03d7cd2d64de683e07f24fd857367d7492c85b22",
|
|
27192
|
+
"evm_extra_wei_decimals": 10
|
|
27193
|
+
},
|
|
27092
27194
|
"fullName": null,
|
|
27093
27195
|
"deployerTradingFeeShare": "1.0"
|
|
27094
27196
|
},
|
|
@@ -27244,7 +27346,10 @@
|
|
|
27244
27346
|
"index": 1481,
|
|
27245
27347
|
"tokenId": "0x21a4632b44112fe0593fccbe5400a701",
|
|
27246
27348
|
"isCanonical": false,
|
|
27247
|
-
"evmContract":
|
|
27349
|
+
"evmContract": {
|
|
27350
|
+
"address": "0xed40d1ab429ff92ad66935766fb0f7025125b520",
|
|
27351
|
+
"evm_extra_wei_decimals": 4
|
|
27352
|
+
},
|
|
27248
27353
|
"fullName": null,
|
|
27249
27354
|
"deployerTradingFeeShare": "1.0"
|
|
27250
27355
|
},
|
|
@@ -27280,7 +27385,10 @@
|
|
|
27280
27385
|
"index": 1484,
|
|
27281
27386
|
"tokenId": "0x57df584e21097424d758b228e842d2ef",
|
|
27282
27387
|
"isCanonical": false,
|
|
27283
|
-
"evmContract":
|
|
27388
|
+
"evmContract": {
|
|
27389
|
+
"address": "0xe04532bd84a7ee59599a90512a8fcc8484b546b5",
|
|
27390
|
+
"evm_extra_wei_decimals": 10
|
|
27391
|
+
},
|
|
27284
27392
|
"fullName": null,
|
|
27285
27393
|
"deployerTradingFeeShare": "1.0"
|
|
27286
27394
|
},
|
|
@@ -27291,7 +27399,10 @@
|
|
|
27291
27399
|
"index": 1485,
|
|
27292
27400
|
"tokenId": "0x797f444bb03c7be19234b94ca29f3410",
|
|
27293
27401
|
"isCanonical": false,
|
|
27294
|
-
"evmContract":
|
|
27402
|
+
"evmContract": {
|
|
27403
|
+
"address": "0x2af50e43e313cfab0e7f46ac95106991cd9baea8",
|
|
27404
|
+
"evm_extra_wei_decimals": 10
|
|
27405
|
+
},
|
|
27295
27406
|
"fullName": "STABLE",
|
|
27296
27407
|
"deployerTradingFeeShare": "1.0"
|
|
27297
27408
|
},
|
|
@@ -27313,7 +27424,10 @@
|
|
|
27313
27424
|
"index": 1487,
|
|
27314
27425
|
"tokenId": "0xd55b27dcaed90223bfc3c378b98526bb",
|
|
27315
27426
|
"isCanonical": false,
|
|
27316
|
-
"evmContract":
|
|
27427
|
+
"evmContract": {
|
|
27428
|
+
"address": "0xed3eb348853a670e3bb692dd5e654ad51c2f5128",
|
|
27429
|
+
"evm_extra_wei_decimals": 10
|
|
27430
|
+
},
|
|
27317
27431
|
"fullName": "MONARCH TEST 1",
|
|
27318
27432
|
"deployerTradingFeeShare": "1.0"
|
|
27319
27433
|
},
|
|
@@ -27335,9 +27449,84 @@
|
|
|
27335
27449
|
"index": 1489,
|
|
27336
27450
|
"tokenId": "0x398e2bab402c7f3c9e214d3862d02ada",
|
|
27337
27451
|
"isCanonical": false,
|
|
27338
|
-
"evmContract":
|
|
27452
|
+
"evmContract": {
|
|
27453
|
+
"address": "0x000000000000780555bd0bca3791f89f9542c2d6",
|
|
27454
|
+
"evm_extra_wei_decimals": 10
|
|
27455
|
+
},
|
|
27339
27456
|
"fullName": "They HYPE beta",
|
|
27340
27457
|
"deployerTradingFeeShare": "1.0"
|
|
27458
|
+
},
|
|
27459
|
+
{
|
|
27460
|
+
"name": "PP",
|
|
27461
|
+
"szDecimals": 2,
|
|
27462
|
+
"weiDecimals": 8,
|
|
27463
|
+
"index": 1490,
|
|
27464
|
+
"tokenId": "0xc7a956f1c1174545c713707d2ca67b76",
|
|
27465
|
+
"isCanonical": false,
|
|
27466
|
+
"evmContract": {
|
|
27467
|
+
"address": "0x1fc9929be618ede69b1f71a69440165c885acadc",
|
|
27468
|
+
"evm_extra_wei_decimals": 10
|
|
27469
|
+
},
|
|
27470
|
+
"fullName": "smol pp",
|
|
27471
|
+
"deployerTradingFeeShare": "1.0"
|
|
27472
|
+
},
|
|
27473
|
+
{
|
|
27474
|
+
"name": "SLIM",
|
|
27475
|
+
"szDecimals": 2,
|
|
27476
|
+
"weiDecimals": 8,
|
|
27477
|
+
"index": 1491,
|
|
27478
|
+
"tokenId": "0x45754dd4d3bb5517fa92dbbe8ccb6392",
|
|
27479
|
+
"isCanonical": false,
|
|
27480
|
+
"evmContract": {
|
|
27481
|
+
"address": "0x719d4dee0fbefebbfbc837b2347840684b891916",
|
|
27482
|
+
"evm_extra_wei_decimals": 10
|
|
27483
|
+
},
|
|
27484
|
+
"fullName": "The Real Slim Shady",
|
|
27485
|
+
"deployerTradingFeeShare": "1.0"
|
|
27486
|
+
},
|
|
27487
|
+
{
|
|
27488
|
+
"name": "USDZ",
|
|
27489
|
+
"szDecimals": 2,
|
|
27490
|
+
"weiDecimals": 8,
|
|
27491
|
+
"index": 1492,
|
|
27492
|
+
"tokenId": "0x7f8d334fed99e32ccc7d1ef50af5f246",
|
|
27493
|
+
"isCanonical": false,
|
|
27494
|
+
"evmContract": null,
|
|
27495
|
+
"fullName": "Z Test Token",
|
|
27496
|
+
"deployerTradingFeeShare": "1.0"
|
|
27497
|
+
},
|
|
27498
|
+
{
|
|
27499
|
+
"name": "TUSDC",
|
|
27500
|
+
"szDecimals": 2,
|
|
27501
|
+
"weiDecimals": 8,
|
|
27502
|
+
"index": 1493,
|
|
27503
|
+
"tokenId": "0xa8469cf6df9c92f729a4bfa0f3643479",
|
|
27504
|
+
"isCanonical": false,
|
|
27505
|
+
"evmContract": null,
|
|
27506
|
+
"fullName": "USDC Coin",
|
|
27507
|
+
"deployerTradingFeeShare": "0.0"
|
|
27508
|
+
},
|
|
27509
|
+
{
|
|
27510
|
+
"name": "MQVMJW",
|
|
27511
|
+
"szDecimals": 1,
|
|
27512
|
+
"weiDecimals": 9,
|
|
27513
|
+
"index": 1494,
|
|
27514
|
+
"tokenId": "0x202ec473e3100aac31d517c0a673ceaf",
|
|
27515
|
+
"isCanonical": false,
|
|
27516
|
+
"evmContract": null,
|
|
27517
|
+
"fullName": "$WASH launchpad 2025-12-01T19:17:15.851Z",
|
|
27518
|
+
"deployerTradingFeeShare": "1.0"
|
|
27519
|
+
},
|
|
27520
|
+
{
|
|
27521
|
+
"name": "TSQEBL",
|
|
27522
|
+
"szDecimals": 1,
|
|
27523
|
+
"weiDecimals": 10,
|
|
27524
|
+
"index": 1495,
|
|
27525
|
+
"tokenId": "0x5d05f06a9590464cf3555a30d2d8ffd4",
|
|
27526
|
+
"isCanonical": false,
|
|
27527
|
+
"evmContract": null,
|
|
27528
|
+
"fullName": "$WASH launchpad 2025-12-02T20:17:18.214Z",
|
|
27529
|
+
"deployerTradingFeeShare": "1.0"
|
|
27341
27530
|
}
|
|
27342
27531
|
]
|
|
27343
27532
|
}
|
package/lib/meta/metadata.ts
CHANGED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
HttpTransport,
|
|
3
3
|
InfoClient,
|
|
4
4
|
PerpsAssetCtx,
|
|
5
|
-
PerpsMeta,
|
|
6
5
|
SpotMeta,
|
|
7
6
|
SpotToken,
|
|
8
7
|
} from "@nktkas/hyperliquid";
|
|
9
8
|
import { isHip3Symbol } from "../hip3/utils";
|
|
10
9
|
import type { Hex } from "@nktkas/hyperliquid/types";
|
|
10
|
+
import type { PerpsMeta } from "./types";
|
|
11
11
|
|
|
12
12
|
export interface PerpDex {
|
|
13
13
|
/** Short name of the perpetual dex. */
|
|
@@ -48,6 +48,8 @@ export interface MarketInfo {
|
|
|
48
48
|
dexDisplayName?: string; // Display name override for the DEX
|
|
49
49
|
dexImageUrl?: string; // Image URL override for the DEX
|
|
50
50
|
dexCollateralTokenSymbol?: string; // Collateral token symbol for HIP-3 markets
|
|
51
|
+
|
|
52
|
+
growthMode: boolean; // Whether the market is in growth mode
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
export interface DexInfo {
|
|
@@ -130,6 +132,7 @@ interface MetadataClientConfig {
|
|
|
130
132
|
*/
|
|
131
133
|
export const ROOT_DEX = "hyperliquid";
|
|
132
134
|
|
|
135
|
+
/**@deprecated use react sdk instead */
|
|
133
136
|
export class MetadataClient {
|
|
134
137
|
private infoClient: InfoClient;
|
|
135
138
|
private config: MetadataClientConfig;
|
|
@@ -359,6 +362,7 @@ export class MetadataClient {
|
|
|
359
362
|
szDecimals: market.szDecimals,
|
|
360
363
|
type: "perps",
|
|
361
364
|
maxLeverage: market.maxLeverage,
|
|
365
|
+
growthMode: market.growthMode === "enabled",
|
|
362
366
|
};
|
|
363
367
|
|
|
364
368
|
// Apply static metadata overrides for perps
|
|
@@ -410,6 +414,7 @@ export class MetadataClient {
|
|
|
410
414
|
type: "spot",
|
|
411
415
|
baseToken: baseToken,
|
|
412
416
|
quoteToken: quoteToken,
|
|
417
|
+
growthMode: false,
|
|
413
418
|
};
|
|
414
419
|
|
|
415
420
|
// Apply static metadata overrides for spot
|
|
@@ -545,6 +550,7 @@ export class MetadataClient {
|
|
|
545
550
|
dexDisplayName: dexInfo.displayName,
|
|
546
551
|
dexImageUrl: dexInfo.imageUrl,
|
|
547
552
|
dexCollateralTokenSymbol: dexInfo.collateralTokenSymbol,
|
|
553
|
+
growthMode: market.growthMode === "enabled",
|
|
548
554
|
};
|
|
549
555
|
|
|
550
556
|
// Apply static metadata overrides for HIP-3
|
|
@@ -648,6 +654,7 @@ export class MetadataClient {
|
|
|
648
654
|
szDecimals: market.szDecimals,
|
|
649
655
|
type: "perps",
|
|
650
656
|
maxLeverage: market.maxLeverage,
|
|
657
|
+
growthMode: market.growthMode === "enabled",
|
|
651
658
|
};
|
|
652
659
|
}
|
|
653
660
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MarginTables, PerpsAssetCtx } from "@nktkas/hyperliquid";
|
|
2
|
+
|
|
3
|
+
export interface PerpsMeta {
|
|
4
|
+
/** Trading universes available for perpetual trading. */
|
|
5
|
+
universe: PerpsUniverse[];
|
|
6
|
+
/** Margin requirement tables for different leverage tiers. */
|
|
7
|
+
marginTables: MarginTables;
|
|
8
|
+
/** Collateral token index. */
|
|
9
|
+
collateralToken?: number;
|
|
10
|
+
}
|
|
11
|
+
/** Metadata and context for perpetual assets. */
|
|
12
|
+
export type PerpsMetaAndAssetCtxs = [
|
|
13
|
+
/** Metadata for assets. */
|
|
14
|
+
PerpsMeta,
|
|
15
|
+
/** Context for each perpetual asset. */
|
|
16
|
+
PerpsAssetCtx[],
|
|
17
|
+
];
|
|
18
|
+
/** Trading universe parameters for perpetual assets. */
|
|
19
|
+
export interface PerpsUniverse {
|
|
20
|
+
/** Minimum decimal places for order sizes. */
|
|
21
|
+
szDecimals: number;
|
|
22
|
+
/** Name of the universe. */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Maximum allowed leverage. */
|
|
25
|
+
maxLeverage: number;
|
|
26
|
+
/** Unique identifier for the margin requirements table. */
|
|
27
|
+
marginTableId: number;
|
|
28
|
+
/** Indicates if only isolated margin trading is allowed. */
|
|
29
|
+
onlyIsolated?: true;
|
|
30
|
+
/** Indicates if the universe is delisted. */
|
|
31
|
+
isDelisted?: true;
|
|
32
|
+
/** Indicates if the universe is in growth mode, eligible for discounted fees */
|
|
33
|
+
growthMode?: "enabled";
|
|
34
|
+
/** Margin mode for the universe. */
|
|
35
|
+
marginMode?: "strictIsolated" | "noCross";
|
|
36
|
+
}
|