@nktkas/hyperliquid 0.19.2 → 0.20.0
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/README.md +21 -29
- package/esm/_dnt.polyfills.d.ts +20 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -0
- package/esm/_dnt.polyfills.js +12 -0
- package/esm/mod.d.ts +3 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -0
- package/esm/src/base.d.ts +1 -47
- package/esm/src/base.d.ts.map +1 -1
- package/esm/src/base.js +1 -8
- package/esm/src/clients/event.d.ts +2 -3
- package/esm/src/clients/event.d.ts.map +1 -1
- package/esm/src/clients/event.js +49 -57
- package/esm/src/clients/public.d.ts +24 -5
- package/esm/src/clients/public.d.ts.map +1 -1
- package/esm/src/clients/public.js +23 -7
- package/esm/src/clients/wallet.d.ts +12 -13
- package/esm/src/clients/wallet.d.ts.map +1 -1
- package/esm/src/clients/wallet.js +55 -265
- package/esm/src/signing.d.ts +5 -0
- package/esm/src/signing.d.ts.map +1 -1
- package/esm/src/signing.js +24 -5
- package/esm/src/transports/base.d.ts +49 -0
- package/esm/src/transports/base.d.ts.map +1 -0
- package/esm/src/transports/base.js +8 -0
- package/esm/src/transports/http/http_transport.d.ts +8 -5
- package/esm/src/transports/http/http_transport.d.ts.map +1 -1
- package/esm/src/transports/http/http_transport.js +15 -62
- package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +36 -39
- package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
- package/esm/src/transports/websocket/_reconnecting_websocket.d.ts +18 -25
- package/esm/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
- package/esm/src/transports/websocket/_reconnecting_websocket.js +80 -179
- package/{script/src/transports/websocket/_websocket_request_dispatcher.d.ts → esm/src/transports/websocket/_websocket_async_request.d.ts} +14 -18
- package/esm/src/transports/websocket/_websocket_async_request.d.ts.map +1 -0
- package/esm/src/transports/websocket/{_websocket_request_dispatcher.js → _websocket_async_request.js} +41 -74
- package/esm/src/transports/websocket/websocket_transport.d.ts +38 -28
- package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/esm/src/transports/websocket/websocket_transport.js +61 -76
- package/esm/src/types/info/assets.d.ts +0 -48
- package/esm/src/types/info/assets.d.ts.map +1 -1
- package/esm/src/types/info/markets.d.ts +52 -0
- package/esm/src/types/info/markets.d.ts.map +1 -0
- package/esm/src/types/info/markets.js +1 -0
- package/esm/src/types/info/requests.d.ts +9 -0
- package/esm/src/types/info/requests.d.ts.map +1 -1
- package/esm/src/types/mod.d.ts +4 -0
- package/esm/src/types/mod.d.ts.map +1 -1
- package/esm/src/types/mod.js +3 -1
- package/package.json +12 -9
- package/script/_dnt.polyfills.d.ts +20 -0
- package/script/_dnt.polyfills.d.ts.map +1 -0
- package/script/_dnt.polyfills.js +23 -0
- package/script/mod.d.ts +3 -0
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +3 -1
- package/script/src/base.d.ts +1 -47
- package/script/src/base.d.ts.map +1 -1
- package/script/src/base.js +2 -10
- package/script/src/clients/event.d.ts +2 -3
- package/script/src/clients/event.d.ts.map +1 -1
- package/script/src/clients/event.js +49 -57
- package/script/src/clients/public.d.ts +24 -5
- package/script/src/clients/public.d.ts.map +1 -1
- package/script/src/clients/public.js +23 -7
- package/script/src/clients/wallet.d.ts +12 -13
- package/script/src/clients/wallet.d.ts.map +1 -1
- package/script/src/clients/wallet.js +55 -265
- package/script/src/signing.d.ts +5 -0
- package/script/src/signing.d.ts.map +1 -1
- package/script/src/signing.js +75 -56
- package/script/src/transports/base.d.ts +49 -0
- package/script/src/transports/base.d.ts.map +1 -0
- package/script/src/transports/base.js +22 -0
- package/script/src/transports/http/http_transport.d.ts +8 -5
- package/script/src/transports/http/http_transport.d.ts.map +1 -1
- package/script/src/transports/http/http_transport.js +16 -63
- package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +36 -39
- package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
- package/script/src/transports/websocket/_reconnecting_websocket.d.ts +18 -25
- package/script/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
- package/script/src/transports/websocket/_reconnecting_websocket.js +81 -180
- package/{esm/src/transports/websocket/_websocket_request_dispatcher.d.ts → script/src/transports/websocket/_websocket_async_request.d.ts} +14 -18
- package/script/src/transports/websocket/_websocket_async_request.d.ts.map +1 -0
- package/script/src/transports/websocket/{_websocket_request_dispatcher.js → _websocket_async_request.js} +44 -77
- package/script/src/transports/websocket/websocket_transport.d.ts +38 -28
- package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/script/src/transports/websocket/websocket_transport.js +63 -78
- package/script/src/types/info/assets.d.ts +0 -48
- package/script/src/types/info/assets.d.ts.map +1 -1
- package/script/src/types/info/markets.d.ts +52 -0
- package/script/src/types/info/markets.d.ts.map +1 -0
- package/script/{deps/jsr.io/@noble/hashes/1.8.0/src/crypto.js → src/types/info/markets.js} +0 -2
- package/script/src/types/info/requests.d.ts +9 -0
- package/script/src/types/info/requests.d.ts.map +1 -1
- package/script/src/types/mod.d.ts +4 -0
- package/script/src/types/mod.d.ts.map +1 -1
- package/script/src/types/mod.js +25 -22
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/_u64.d.ts +0 -55
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/_u64.d.ts.map +0 -1
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/_u64.js +0 -66
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/crypto.d.ts +0 -2
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/crypto.d.ts.map +0 -1
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/crypto.js +0 -1
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/sha3.d.ts +0 -53
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/sha3.d.ts.map +0 -1
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/sha3.js +0 -294
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/utils.d.ts +0 -161
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/utils.d.ts.map +0 -1
- package/esm/deps/jsr.io/@noble/hashes/1.8.0/src/utils.js +0 -280
- package/esm/src/transports/websocket/_websocket_request_dispatcher.d.ts.map +0 -1
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/_u64.d.ts +0 -55
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/_u64.d.ts.map +0 -1
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/_u64.js +0 -99
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/crypto.d.ts +0 -2
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/crypto.d.ts.map +0 -1
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/sha3.d.ts +0 -53
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/sha3.d.ts.map +0 -1
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/sha3.js +0 -309
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/utils.d.ts +0 -161
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/utils.d.ts.map +0 -1
- package/script/deps/jsr.io/@noble/hashes/1.8.0/src/utils.js +0 -322
- package/script/src/transports/websocket/_websocket_request_dispatcher.d.ts.map +0 -1
package/esm/src/signing.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This module contains functions for generating Hyperliquid transaction signatures
|
|
3
3
|
* and interfaces to various wallet implementations.
|
|
4
|
+
*
|
|
4
5
|
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* import { signL1Action } from "@nktkas/hyperliquid/signing";
|
|
@@ -45,9 +46,11 @@
|
|
|
45
46
|
* chainId: parseInt(action.signatureChainId, 16),
|
|
46
47
|
* });
|
|
47
48
|
* ```
|
|
49
|
+
*
|
|
48
50
|
* @module
|
|
49
51
|
*/
|
|
50
|
-
import
|
|
52
|
+
import "../_dnt.polyfills.js";
|
|
53
|
+
import { keccak_256 } from "@noble/hashes/sha3";
|
|
51
54
|
import { encode as encodeMsgpack } from "../deps/jsr.io/@std/msgpack/1.0.3/encode.js";
|
|
52
55
|
import { decodeHex, encodeHex } from "../deps/jsr.io/@std/encoding/1.0.10/hex.js";
|
|
53
56
|
import { concat } from "../deps/jsr.io/@std/bytes/1.0.6/concat.js";
|
|
@@ -68,14 +71,28 @@ export function createL1ActionHash(action, nonce, vaultAddress, expiresAfter) {
|
|
|
68
71
|
const nonceBytes = new Uint8Array(8);
|
|
69
72
|
new DataView(nonceBytes.buffer).setBigUint64(0, BigInt(nonce));
|
|
70
73
|
// 3. Vault address
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
let vaultMarker;
|
|
75
|
+
let vaultBytes;
|
|
76
|
+
if (vaultAddress) {
|
|
77
|
+
vaultMarker = Uint8Array.of(1);
|
|
78
|
+
vaultBytes = decodeHex(vaultAddress.slice(2));
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
vaultMarker = new Uint8Array(1);
|
|
82
|
+
vaultBytes = new Uint8Array();
|
|
83
|
+
}
|
|
73
84
|
// 4. Expires after
|
|
74
|
-
|
|
75
|
-
|
|
85
|
+
let expiresMarker;
|
|
86
|
+
let expiresBytes;
|
|
76
87
|
if (expiresAfter !== undefined) {
|
|
88
|
+
expiresMarker = new Uint8Array(1);
|
|
89
|
+
expiresBytes = new Uint8Array(8);
|
|
77
90
|
new DataView(expiresBytes.buffer).setBigUint64(0, BigInt(expiresAfter));
|
|
78
91
|
}
|
|
92
|
+
else {
|
|
93
|
+
expiresMarker = new Uint8Array();
|
|
94
|
+
expiresBytes = new Uint8Array();
|
|
95
|
+
}
|
|
79
96
|
// Create a keccak256 hash
|
|
80
97
|
const chunks = [
|
|
81
98
|
actionBytes,
|
|
@@ -168,6 +185,7 @@ export async function signL1Action(args) {
|
|
|
168
185
|
* Sign a user-signed action.
|
|
169
186
|
*
|
|
170
187
|
* Note: Signature generation depends on the order of types.
|
|
188
|
+
*
|
|
171
189
|
* @param args - Arguments for signing the action.
|
|
172
190
|
* @returns The signature components r, s, and v.
|
|
173
191
|
* @example
|
|
@@ -223,6 +241,7 @@ export async function signUserSignedAction(args) {
|
|
|
223
241
|
* Sign a multi-signature action.
|
|
224
242
|
*
|
|
225
243
|
* Note: Signature generation depends on the order of the action keys.
|
|
244
|
+
*
|
|
226
245
|
* @param args - Arguments for signing the action.
|
|
227
246
|
* @returns The signature components r, s, and v.
|
|
228
247
|
* @example
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HyperliquidError } from "../base.js";
|
|
2
|
+
/**
|
|
3
|
+
* Interface representing a REST transport.
|
|
4
|
+
*
|
|
5
|
+
* Handles communication with Hyperliquid API endpoints.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint | Info endpoint}
|
|
8
|
+
* @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint | Exchange endpoint}
|
|
9
|
+
* @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/post-requests | Websocket post requests}
|
|
10
|
+
*/
|
|
11
|
+
export interface IRequestTransport extends Partial<AsyncDisposable> {
|
|
12
|
+
/**
|
|
13
|
+
* Sends a request to the Hyperliquid API.
|
|
14
|
+
* @param endpoint - The API endpoint to send the request to.
|
|
15
|
+
* @param payload - The payload to send with the request.
|
|
16
|
+
* @param signal - An ptional abort signal.
|
|
17
|
+
* @returns A promise that resolves with parsed JSON response body.
|
|
18
|
+
*/
|
|
19
|
+
request<T>(endpoint: "info" | "exchange" | "explorer", payload: unknown, signal?: AbortSignal): Promise<T>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Interface representing an event subscription transport.
|
|
23
|
+
* Handles WebSocket subscriptions for real-time updates.
|
|
24
|
+
* @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Websocket subscriptions}
|
|
25
|
+
*/
|
|
26
|
+
export interface ISubscriptionTransport extends Partial<AsyncDisposable> {
|
|
27
|
+
/**
|
|
28
|
+
* Subscribes to a Hyperliquid event channel.
|
|
29
|
+
* @param channel - The event channel to listen to.
|
|
30
|
+
* @param payload - The payload to send with the subscription request.
|
|
31
|
+
* @param listener - The function to call when the event is dispatched.
|
|
32
|
+
* @param signal - An optional abort signal for canceling the subscription request.
|
|
33
|
+
* @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
|
|
34
|
+
*/
|
|
35
|
+
subscribe<T>(channel: string, payload: unknown, listener: (data: CustomEvent<T>) => void, signal?: AbortSignal): Promise<Subscription>;
|
|
36
|
+
}
|
|
37
|
+
/** Controls event subscription lifecycle. */
|
|
38
|
+
export interface Subscription {
|
|
39
|
+
/**
|
|
40
|
+
* Unsubscribes from the event and sends an unsubscribe request to the server.
|
|
41
|
+
* @param signal - An optional abort signal for canceling the unsubscribe request.
|
|
42
|
+
*/
|
|
43
|
+
unsubscribe(signal?: AbortSignal): Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
/** Base class for all transport-related errors. */
|
|
46
|
+
export declare class TransportError extends HyperliquidError {
|
|
47
|
+
constructor(message?: string);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/src/transports/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,eAAe,CAAC;IAC/D;;;;;;OAMG;IACH,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC9G;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAuB,SAAQ,OAAO,CAAC,eAAe,CAAC;IACpE;;;;;;;OAOG;IACH,SAAS,CAAC,CAAC,EACP,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,EACxC,MAAM,CAAC,EAAE,WAAW,GACrB,OAAO,CAAC,YAAY,CAAC,CAAC;CAC5B;AAED,6CAA6C;AAC7C,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,mDAAmD;AACnD,qBAAa,cAAe,SAAQ,gBAAgB;gBACpC,OAAO,CAAC,EAAE,MAAM;CAI/B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { MaybePromise } from "../../base.js";
|
|
2
|
+
import { type IRequestTransport, TransportError } from "../base.js";
|
|
2
3
|
/**
|
|
3
4
|
* Error thrown when an HTTP response is deemed invalid:
|
|
4
5
|
* - Non-200 status code
|
|
@@ -22,12 +23,14 @@ export interface HttpTransportOptions {
|
|
|
22
23
|
*/
|
|
23
24
|
isTestnet?: boolean;
|
|
24
25
|
/**
|
|
25
|
-
* Request timeout in ms.
|
|
26
|
-
* Set to `null` to disable.
|
|
26
|
+
* Request timeout in ms. Set to `null` to disable.
|
|
27
27
|
* @defaultValue `10_000`
|
|
28
28
|
*/
|
|
29
29
|
timeout?: number | null;
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Custom server to use for API requests.
|
|
32
|
+
* @defaultValue `https://api.hyperliquid.xyz` for mainnet and `https://api.hyperliquid-testnet.xyz` for testnet.
|
|
33
|
+
*/
|
|
31
34
|
server?: {
|
|
32
35
|
mainnet?: {
|
|
33
36
|
api?: string | URL;
|
|
@@ -84,6 +87,6 @@ export declare class HttpTransport implements IRequestTransport, HttpTransportOp
|
|
|
84
87
|
* @throws {HttpRequestError} - Thrown when an HTTP response is deemed invalid.
|
|
85
88
|
* @throws May throw {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch#exceptions | fetch errors}.
|
|
86
89
|
*/
|
|
87
|
-
request(endpoint: "info" | "exchange" | "explorer", payload: unknown, signal?: AbortSignal): Promise<
|
|
90
|
+
request<T>(endpoint: "info" | "exchange" | "explorer", payload: unknown, signal?: AbortSignal): Promise<T>;
|
|
88
91
|
}
|
|
89
92
|
//# sourceMappingURL=http_transport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http_transport.d.ts","sourceRoot":"","sources":["../../../../src/src/transports/http/http_transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"http_transport.d.ts","sourceRoot":"","sources":["../../../../src/src/transports/http/http_transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,KAAK,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEpE;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;IAM7B,QAAQ,EAAE,QAAQ;IAAS,YAAY,CAAC,EAAE,MAAM;IALnE;;;;OAIG;gBACgB,QAAQ,EAAE,QAAQ,EAAS,YAAY,CAAC,EAAE,MAAM,YAAA;CAOtE;AAED,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE;QACL,OAAO,CAAC,EAAE;YAAE,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;YAAC,GAAG,CAAC,EAAE,MA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,IAAI,GAAG,SAAS,CAAC,CAAC;IAEtF;;;OAGG;gBACS,OAAO,CAAC,EAAE,oBAAoB;IAkB1C;;;;;;;;OAQG;IACG,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;CAuDnH"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { TransportError } from "
|
|
1
|
+
import { TransportError } from "../base.js";
|
|
2
2
|
/**
|
|
3
3
|
* Error thrown when an HTTP response is deemed invalid:
|
|
4
4
|
* - Non-200 status code
|
|
5
5
|
* - Unexpected content type
|
|
6
6
|
*/
|
|
7
7
|
export class HttpRequestError extends TransportError {
|
|
8
|
+
response;
|
|
9
|
+
responseBody;
|
|
8
10
|
/**
|
|
9
11
|
* Creates a new HTTP request error.
|
|
10
12
|
* @param response - The failed HTTP response.
|
|
@@ -15,64 +17,24 @@ export class HttpRequestError extends TransportError {
|
|
|
15
17
|
if (responseBody)
|
|
16
18
|
message += `, body "${responseBody}"`;
|
|
17
19
|
super(message);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: response
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(this, "responseBody", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: responseBody
|
|
29
|
-
});
|
|
20
|
+
this.response = response;
|
|
21
|
+
this.responseBody = responseBody;
|
|
30
22
|
this.name = "HttpRequestError";
|
|
31
23
|
}
|
|
32
24
|
}
|
|
33
25
|
/** HTTP implementation of the REST transport interface. */
|
|
34
26
|
export class HttpTransport {
|
|
27
|
+
isTestnet;
|
|
28
|
+
timeout;
|
|
29
|
+
server;
|
|
30
|
+
fetchOptions;
|
|
31
|
+
onRequest;
|
|
32
|
+
onResponse;
|
|
35
33
|
/**
|
|
36
34
|
* Creates a new HTTP transport instance.
|
|
37
35
|
* @param options - Configuration options for the HTTP transport layer.
|
|
38
36
|
*/
|
|
39
37
|
constructor(options) {
|
|
40
|
-
Object.defineProperty(this, "isTestnet", {
|
|
41
|
-
enumerable: true,
|
|
42
|
-
configurable: true,
|
|
43
|
-
writable: true,
|
|
44
|
-
value: void 0
|
|
45
|
-
});
|
|
46
|
-
Object.defineProperty(this, "timeout", {
|
|
47
|
-
enumerable: true,
|
|
48
|
-
configurable: true,
|
|
49
|
-
writable: true,
|
|
50
|
-
value: void 0
|
|
51
|
-
});
|
|
52
|
-
Object.defineProperty(this, "server", {
|
|
53
|
-
enumerable: true,
|
|
54
|
-
configurable: true,
|
|
55
|
-
writable: true,
|
|
56
|
-
value: void 0
|
|
57
|
-
});
|
|
58
|
-
Object.defineProperty(this, "fetchOptions", {
|
|
59
|
-
enumerable: true,
|
|
60
|
-
configurable: true,
|
|
61
|
-
writable: true,
|
|
62
|
-
value: void 0
|
|
63
|
-
});
|
|
64
|
-
Object.defineProperty(this, "onRequest", {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
configurable: true,
|
|
67
|
-
writable: true,
|
|
68
|
-
value: void 0
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(this, "onResponse", {
|
|
71
|
-
enumerable: true,
|
|
72
|
-
configurable: true,
|
|
73
|
-
writable: true,
|
|
74
|
-
value: void 0
|
|
75
|
-
});
|
|
76
38
|
this.isTestnet = options?.isTestnet ?? false;
|
|
77
39
|
this.timeout = options?.timeout === undefined ? 10_000 : options.timeout;
|
|
78
40
|
this.server = {
|
|
@@ -105,7 +67,6 @@ export class HttpTransport {
|
|
|
105
67
|
body: JSON.stringify(payload),
|
|
106
68
|
headers: {
|
|
107
69
|
"Accept-Encoding": "gzip, deflate, br, zstd",
|
|
108
|
-
"Connection": "keep-alive",
|
|
109
70
|
"Content-Type": "application/json",
|
|
110
71
|
},
|
|
111
72
|
keepalive: true,
|
|
@@ -143,29 +104,21 @@ export class HttpTransport {
|
|
|
143
104
|
return body;
|
|
144
105
|
}
|
|
145
106
|
}
|
|
146
|
-
/**
|
|
147
|
-
* Merges multiple `HeadersInit` objects into one.
|
|
148
|
-
* @param inits - A list of `HeadersInit` objects to merge.
|
|
149
|
-
* @returns A new `Headers` object that contains all headers from the input objects.
|
|
150
|
-
*/
|
|
107
|
+
/** Merges multiple {@linkcode HeadersInit} into one {@linkcode Headers}. */
|
|
151
108
|
function mergeHeadersInit(...inits) {
|
|
152
109
|
if (inits.length === 0 || inits.length === 1) {
|
|
153
110
|
return new Headers(inits[0]);
|
|
154
111
|
}
|
|
155
112
|
const merged = new Headers();
|
|
156
113
|
for (const headers of inits) {
|
|
157
|
-
const
|
|
158
|
-
for (const [key, value] of
|
|
114
|
+
const iterator = Symbol.iterator in headers ? headers : Object.entries(headers);
|
|
115
|
+
for (const [key, value] of iterator) {
|
|
159
116
|
merged.set(key, value);
|
|
160
117
|
}
|
|
161
118
|
}
|
|
162
119
|
return merged;
|
|
163
120
|
}
|
|
164
|
-
/**
|
|
165
|
-
* Merges multiple `RequestInit` objects into one.
|
|
166
|
-
* @param inits - A list of `RequestInit` objects to merge.
|
|
167
|
-
* @returns A new `RequestInit` object that contains all properties from the input objects.
|
|
168
|
-
*/
|
|
121
|
+
/** Merges multiple {@linkcode RequestInit} into one {@linkcode RequestInit}. */
|
|
169
122
|
function mergeRequestInit(...inits) {
|
|
170
123
|
const merged = inits.reduce((acc, init) => ({ ...acc, ...init }), {});
|
|
171
124
|
const headersList = inits.map((init) => init.headers)
|
|
@@ -1,51 +1,48 @@
|
|
|
1
1
|
import { TypedEventTarget } from "../../../deps/jsr.io/@derzade/typescript-event-target/1.1.1/mod.js";
|
|
2
2
|
import type { BlockDetails, TxDetails } from "../../types/explorer/responses.js";
|
|
3
3
|
import type { BaseExchangeResponse } from "../../types/exchange/responses.js";
|
|
4
|
+
/** Response to subscribe to or unsubscribe from an event. */
|
|
5
|
+
interface SubscriptionResponse {
|
|
6
|
+
/** Type of subscription operation. */
|
|
7
|
+
method: "subscribe" | "unsubscribe";
|
|
8
|
+
/** Original subscription request. */
|
|
9
|
+
subscription: unknown;
|
|
10
|
+
}
|
|
11
|
+
/** Response to post request. */
|
|
12
|
+
interface PostResponse {
|
|
13
|
+
/** Unique request identifier. */
|
|
14
|
+
id: number;
|
|
15
|
+
/** Server response. */
|
|
16
|
+
response:
|
|
17
|
+
/** Response containing requested information. */
|
|
18
|
+
{
|
|
19
|
+
/** Indicates that this is an informational response. */
|
|
20
|
+
type: "info";
|
|
21
|
+
/** Contains the information data. */
|
|
22
|
+
payload: {
|
|
23
|
+
/** Type of information being returned. */
|
|
24
|
+
type: string;
|
|
25
|
+
/** Information specific data. */
|
|
26
|
+
data: unknown;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** Response containing action result. */
|
|
30
|
+
| {
|
|
31
|
+
/** Indicates that this is an action response. */
|
|
32
|
+
type: "action";
|
|
33
|
+
/** Action result. */
|
|
34
|
+
payload: BaseExchangeResponse;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
4
37
|
/** Base system events and dynamic channel events for Hyperliquid WebSocket API. */
|
|
5
38
|
interface HyperliquidEventMap {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/** Type of subscription operation. */
|
|
9
|
-
method: "subscribe" | "unsubscribe";
|
|
10
|
-
/** Original subscription request. */
|
|
11
|
-
subscription: unknown;
|
|
12
|
-
}>;
|
|
13
|
-
/** Response to post request event. */
|
|
14
|
-
post: CustomEvent<{
|
|
15
|
-
/** Unique request identifier. */
|
|
16
|
-
id: number;
|
|
17
|
-
/** Server response. */
|
|
18
|
-
response:
|
|
19
|
-
/** Response containing requested information. */
|
|
20
|
-
{
|
|
21
|
-
/** Indicates that this is an informational response. */
|
|
22
|
-
type: "info";
|
|
23
|
-
/** Contains the information data. */
|
|
24
|
-
payload: {
|
|
25
|
-
/** Type of information being returned. */
|
|
26
|
-
type: string;
|
|
27
|
-
/** Information specific data. */
|
|
28
|
-
data: unknown;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
/** Response containing action result. */
|
|
32
|
-
| {
|
|
33
|
-
/** Indicates that this is an action response. */
|
|
34
|
-
type: "action";
|
|
35
|
-
/** Action result. */
|
|
36
|
-
payload: BaseExchangeResponse;
|
|
37
|
-
};
|
|
38
|
-
}>;
|
|
39
|
-
/** Error response for message event. */
|
|
39
|
+
subscriptionResponse: CustomEvent<SubscriptionResponse>;
|
|
40
|
+
post: CustomEvent<PostResponse>;
|
|
40
41
|
error: CustomEvent<string>;
|
|
41
|
-
/** Pong response event. */
|
|
42
42
|
pong: CustomEvent<undefined>;
|
|
43
|
-
/** Block explorer update event. */
|
|
44
43
|
_explorerBlock: CustomEvent<Omit<BlockDetails, "txs">[]>;
|
|
45
|
-
/** Transaction explorer update event. */
|
|
46
44
|
_explorerTxs: CustomEvent<TxDetails[]>;
|
|
47
|
-
|
|
48
|
-
[key: string]: CustomEvent<unknown>;
|
|
45
|
+
[key: string]: CustomEvent<any>;
|
|
49
46
|
}
|
|
50
47
|
/** Listens for WebSocket messages and sends them as Hyperliquid typed events. */
|
|
51
48
|
export declare class HyperliquidEventTarget extends TypedEventTarget<HyperliquidEventMap> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_hyperliquid_event_target.d.ts","sourceRoot":"","sources":["../../../../src/src/transports/websocket/_hyperliquid_event_target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oEAAoE,CAAC;AACtG,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAU9E,
|
|
1
|
+
{"version":3,"file":"_hyperliquid_event_target.d.ts","sourceRoot":"","sources":["../../../../src/src/transports/websocket/_hyperliquid_event_target.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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gB,CAAC,mBAAmB,CAAC;gBACjE,MAAM,EAAE,SAAS;CAiBhC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MaybePromise } from "../../base.js";
|
|
2
|
+
import { TransportError } from "../base.js";
|
|
2
3
|
/** Configuration options for the `ReconnectingWebSocket`. */
|
|
3
4
|
export interface ReconnectingWebSocketOptions {
|
|
4
5
|
/**
|
|
@@ -34,46 +35,38 @@ export interface ReconnectingWebSocketOptions {
|
|
|
34
35
|
}
|
|
35
36
|
/** Message buffer strategy interface. */
|
|
36
37
|
export interface MessageBufferStrategy {
|
|
37
|
-
/** Array of buffered messages. */
|
|
38
|
-
messages: (string | ArrayBufferLike | Blob | ArrayBufferView)[];
|
|
39
|
-
/**
|
|
40
|
-
* Add a message to the buffer.
|
|
41
|
-
* @param data - The message to buffer.
|
|
42
|
-
*/
|
|
43
38
|
push(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
|
|
44
|
-
|
|
45
|
-
* Get and remove the next message from the buffer.
|
|
46
|
-
* @returns The next message or `undefined` if no more messages are available.
|
|
47
|
-
*/
|
|
48
|
-
shift(): (string | ArrayBufferLike | Blob | ArrayBufferView) | undefined;
|
|
49
|
-
/** Clear all buffered messages. */
|
|
50
|
-
clear(): void;
|
|
39
|
+
[Symbol.iterator](): Iterator<string | ArrayBufferLike | Blob | ArrayBufferView>;
|
|
51
40
|
}
|
|
52
41
|
/** Error thrown when reconnection problems occur. */
|
|
53
42
|
export declare class ReconnectingWebSocketError extends TransportError {
|
|
54
43
|
code: "RECONNECTION_LIMIT_REACHED" | "RECONNECTION_STOPPED_BY_USER" | "USER_INITIATED_CLOSE" | "UNKNOWN_ERROR";
|
|
55
|
-
|
|
56
|
-
constructor(code: "RECONNECTION_LIMIT_REACHED" | "RECONNECTION_STOPPED_BY_USER" | "USER_INITIATED_CLOSE" | "UNKNOWN_ERROR", originalError?: unknown);
|
|
44
|
+
constructor(code: "RECONNECTION_LIMIT_REACHED" | "RECONNECTION_STOPPED_BY_USER" | "USER_INITIATED_CLOSE" | "UNKNOWN_ERROR", cause?: unknown);
|
|
57
45
|
}
|
|
58
46
|
/**
|
|
59
47
|
* A WebSocket that automatically reconnects when disconnected.
|
|
60
48
|
* Fully compatible with standard WebSocket API.
|
|
61
49
|
*/
|
|
62
50
|
export declare class ReconnectingWebSocket implements WebSocket {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
51
|
+
protected _socket: WebSocket;
|
|
52
|
+
protected _protocols?: string | string[];
|
|
53
|
+
protected _listeners: {
|
|
54
|
+
type: string;
|
|
55
|
+
listener: EventListenerOrEventListenerObject;
|
|
56
|
+
options?: boolean | AddEventListenerOptions;
|
|
57
|
+
listenerProxy: EventListenerOrEventListenerObject;
|
|
58
|
+
}[];
|
|
59
|
+
protected _attempt: number;
|
|
67
60
|
reconnectOptions: Required<ReconnectingWebSocketOptions>;
|
|
68
61
|
readonly reconnectAbortController: AbortController;
|
|
69
62
|
constructor(url: string | URL, protocols?: string | string[], options?: ReconnectingWebSocketOptions);
|
|
70
|
-
|
|
63
|
+
protected _createSocket(url: string | URL, protocols?: string | string[]): WebSocket;
|
|
71
64
|
/** Initializes the internal event listeners for the socket. */
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
protected _setupEventListeners(): void;
|
|
66
|
+
protected _open: () => void;
|
|
67
|
+
protected _close: (event: CloseEvent) => Promise<void>;
|
|
75
68
|
/** Clean up internal resources. */
|
|
76
|
-
|
|
69
|
+
protected _cleanup(code: ConstructorParameters<typeof ReconnectingWebSocketError>[0], cause?: unknown): void;
|
|
77
70
|
get url(): string;
|
|
78
71
|
get readyState(): number;
|
|
79
72
|
get bufferedAmount(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_reconnecting_websocket.d.ts","sourceRoot":"","sources":["../../../../src/src/transports/websocket/_reconnecting_websocket.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"_reconnecting_websocket.d.ts","sourceRoot":"","sources":["../../../../src/src/transports/websocket/_reconnecting_websocket.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,6DAA6D;AAC7D,MAAM,WAAW,4BAA4B;IACzC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAE5F;;;;;OAKG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC;IAEpF;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;CACzC;AAED,yCAAyC;AACzC,MAAM,WAAW,qBAAqB;IAClC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,GAAG,eAAe,GAAG,IAAI,CAAC;IACpE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,eAAe,GAAG,IAAI,GAAG,eAAe,CAAC,CAAC;CACpF;AAiBD,qDAAqD;AACrD,qBAAa,0BAA2B,SAAQ,cAAc;IAE/C,IAAI,EACL,4BAA4B,GAC5B,8BAA8B,GAC9B,sBAAsB,GACtB,eAAe;gBAJd,IAAI,EACL,4BAA4B,GAC5B,8BAA8B,GAC9B,sBAAsB,GACtB,eAAe,EACrB,KAAK,CAAC,EAAE,OAAO;CAMtB;AAED;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,SAAS;IACnD,SA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