forked from nktkas/hyperliquid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
106 lines (106 loc) · 5.82 KB
/
Copy pathpackage.json
File metadata and controls
106 lines (106 loc) · 5.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"name": "@bloxwap/hyperliquid",
"version": "0.3.0",
"description": "Blazing fast TypeScript Hyperliquid SDK.",
"license": "MIT",
"type": "module",
"sideEffects": false,
"keywords": [
"api",
"library",
"sdk",
"javascript",
"typescript",
"cryptocurrency",
"trading",
"blockchain",
"exchange",
"web3",
"dex",
"hyperliquid"
],
"homepage": "https://github.com/bloxwap/hyperliquid",
"bugs": {
"url": "https://github.com/bloxwap/hyperliquid/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bloxwap/hyperliquid.git"
},
"engines": {
"node": ">=22.12.0"
},
"//exports": "Points at TypeScript sources: Bun consumes them directly, and self-referential imports (`@bloxwap/hyperliquid/...`) in tests, docs and JSDoc examples resolve without a build. The publishable package is emitted by `bun run build`, which writes dist/ with its own package.json whose exports point at .js/.d.ts.",
"//exports:narrow": "The `.` barrel re-exports all four clients plus the transports, so importing it evaluates the exchange and signing graph even for a read-only process: 69.5 ms on Node, 22.0 ms on Bun, against 41.0 / 8.3 ms for an info-only consumer entering through `./api/info/client` + `./transport`. The `./transport*` and `./api/*/client` keys below exist for that consumer — `.` stays the compatible default and nothing under src/ changed to add them.",
"exports": {
".": "./src/mod.ts",
"./signing": "./src/signing/mod.ts",
"./utils": "./src/utils/mod.ts",
"./transport": "./src/transport/mod.ts",
"./transport/http": "./src/transport/http/mod.ts",
"./transport/websocket": "./src/transport/websocket/mod.ts",
"./api/exchange": "./src/api/exchange/mod.ts",
"./api/exchange/client": "./src/api/exchange/client.ts",
"./api/explorer": "./src/api/explorer/mod.ts",
"./api/explorer/client": "./src/api/explorer/client.ts",
"./api/info": "./src/api/info/mod.ts",
"./api/info/client": "./src/api/info/client.ts",
"./api/subscription": "./src/api/subscription/mod.ts",
"./api/subscription/client": "./src/api/subscription/client.ts"
},
"scripts": {
"//check": "Everything CI gates on.",
"check": "bun run check:format && bun run check:lint && bun run check:docs && bun run check:types && bun run check:ts7 && bun run check:jsdoc && bun run check:export && bun run check:imports",
"check:format": "biome format .",
"check:lint": "biome lint .",
"//check:docs": "Verifies Markdown formatting, the docs index, and GitHub-compatible syntax. External links are checked by the Documentation workflow.",
"check:docs": "bun run .dev/docs_check.ts && markdownlint-cli2 \"README.md\" \"docs/**/*.md\"",
"//check:types": "TypeScript 5 pass over sources and tests (the version the JS-API tooling pins).",
"check:types": "tsc --project tsconfig.json",
"//check:ts7": "Forward-compatibility gate: TypeScript 7 (native) over src/. See .dev/ts7/tsconfig.json.",
"check:ts7": "cd .dev/ts7 && bun install --frozen-lockfile && bunx tsc --project tsconfig.json",
"//check:jsdoc": "Verifies JSDoc on API methods stays in sync with the schemas.",
"check:jsdoc": "bun run .dev/jsdoc_sync_check.ts",
"//check:export": "Verifies every module is reachable from the package exports.",
"check:export": "bun run .dev/export_sync_check.ts",
"//check:imports": "Budgets how many modules each entry point loads at runtime, so a barrel import cannot silently reattach a large subgraph to a small entry point.",
"check:imports": "bun run .dev/import_graph_check.ts",
"format": "biome format --write .",
"lint": "biome lint --write .",
"test": "bun test tests/",
"//test:offline": "Skips every test that needs live Hyperliquid endpoints. `bun test tests/ -- --offline` also works, but `bun test` does not forward argv to test files, so that path relies on tests/_offline.ts recovering the raw command line; the env var needs no such recovery.",
"test:offline": "HL_OFFLINE=1 bun test tests/",
"//perf": "Runs the performance suite and prints a table. Pass --out <path> to also write a machine-readable JSON report.",
"perf": "bun run tests/perf/run.ts",
"//perf:gate": "Zero-regression gate: fails if any scenario got materially slower than the baseline.",
"perf:gate": "bun run .dev/perf/gate.ts",
"build": "bun run .dev/build/build.ts"
},
"dependencies": {
"@noble/hashes": "2.2.0",
"valibot": "1.4.2"
},
"//optionalDependencies": "Opt-in accelerators, loaded only through guarded dynamic imports. `tiny-secp256k1` powers the WASM fast wallet (see `createFastLocalWallet` in src/signing/mod.ts); installs that skip optional dependencies transparently fall back to the viem/noble path. `hash-wasm` powers the WASM keccak256 provider (see src/signing/_keccak.ts); without it, hashing transparently stays on @noble/hashes.",
"optionalDependencies": {
"hash-wasm": "4.12.0",
"tiny-secp256k1": "2.2.4"
},
"//devDependencies": "`typescript` is pinned to 5.x on purpose: TypeScript 7's npm package ships only a native binary with no JS compiler API, and `ts-json-schema-generator` needs that API. TypeScript 7 is installed separately under .dev/ts7 and used solely as a type-check gate. `decimal.js` is a devDependency: it is the conformance oracle for the in-house decimal formatter in tests/utils/format.test.ts, and is no longer imported by src/.",
"devDependencies": {
"@biomejs/biome": "2.5.5",
"@jsr/std__assert": "1.0.19",
"@jsr/std__msgpack": "1.0.3",
"@jsr/std__testing": "1.0.19",
"@types/bun": "1.3.14",
"@valibot/to-json-schema": "1.7.1",
"ajv": "8.20.0",
"decimal.js": "10.6.0",
"markdownlint-cli2": "0.23.1",
"ts-json-schema-generator": "2.9.0",
"typescript": "5.9.3",
"viem": "2.55.8"
},
"publishConfig": {
"access": "public"
}
}