@nktkas/hyperliquid 0.25.0-beta.1 → 0.25.0-beta.2
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 +46 -14
- package/esm/mod.js +1 -0
- package/esm/mod.js.map +1 -0
- package/esm/src/clients/exchange.d.ts +0 -7
- package/esm/src/clients/exchange.d.ts.map +1 -1
- package/esm/src/clients/exchange.js +4 -5
- package/esm/src/clients/exchange.js.map +1 -0
- package/esm/src/clients/info.d.ts +64 -2
- package/esm/src/clients/info.d.ts.map +1 -1
- package/esm/src/clients/info.js +77 -1
- package/esm/src/clients/info.js.map +1 -0
- package/esm/src/clients/multiSign.js +2 -1
- package/esm/src/clients/multiSign.js.map +1 -0
- package/esm/src/clients/subscription.js +1 -0
- package/esm/src/clients/subscription.js.map +1 -0
- package/esm/src/errors.js +1 -0
- package/esm/src/errors.js.map +1 -0
- package/esm/src/schemas/_base.d.ts +6 -2
- package/esm/src/schemas/_base.d.ts.map +1 -1
- package/esm/src/schemas/_base.js +4 -1
- package/esm/src/schemas/_base.js.map +1 -0
- package/esm/src/schemas/exchange/requests.d.ts +284 -284
- package/esm/src/schemas/exchange/requests.js +260 -259
- package/esm/src/schemas/exchange/requests.js.map +1 -0
- package/esm/src/schemas/exchange/responses.d.ts +47 -47
- package/esm/src/schemas/exchange/responses.js +55 -54
- package/esm/src/schemas/exchange/responses.js.map +1 -0
- package/esm/src/schemas/explorer/requests.d.ts +3 -3
- package/esm/src/schemas/explorer/requests.js +6 -5
- package/esm/src/schemas/explorer/requests.js.map +1 -0
- package/esm/src/schemas/explorer/responses.d.ts +10 -10
- package/esm/src/schemas/explorer/responses.js +12 -11
- package/esm/src/schemas/explorer/responses.js.map +1 -0
- package/esm/src/schemas/info/accounts.d.ts +121 -121
- package/esm/src/schemas/info/accounts.js +110 -109
- package/esm/src/schemas/info/accounts.js.map +1 -0
- package/esm/src/schemas/info/assets.d.ts +68 -39
- package/esm/src/schemas/info/assets.d.ts.map +1 -1
- package/esm/src/schemas/info/assets.js +69 -49
- package/esm/src/schemas/info/assets.js.map +1 -0
- package/esm/src/schemas/info/markets.d.ts +25 -8
- package/esm/src/schemas/info/markets.d.ts.map +1 -1
- package/esm/src/schemas/info/markets.js +27 -15
- package/esm/src/schemas/info/markets.js.map +1 -0
- package/esm/src/schemas/info/orders.d.ts +56 -56
- package/esm/src/schemas/info/orders.js +37 -36
- package/esm/src/schemas/info/orders.js.map +1 -0
- package/esm/src/schemas/info/requests.d.ts +98 -56
- package/esm/src/schemas/info/requests.d.ts.map +1 -1
- package/esm/src/schemas/info/requests.js +103 -71
- package/esm/src/schemas/info/requests.js.map +1 -0
- package/esm/src/schemas/info/validators.d.ts +44 -23
- package/esm/src/schemas/info/validators.d.ts.map +1 -1
- package/esm/src/schemas/info/validators.js +40 -26
- package/esm/src/schemas/info/validators.js.map +1 -0
- package/esm/src/schemas/info/vaults.d.ts +40 -40
- package/esm/src/schemas/info/vaults.js +20 -19
- package/esm/src/schemas/info/vaults.js.map +1 -0
- package/esm/src/schemas/mod.d.ts +1 -0
- package/esm/src/schemas/mod.d.ts.map +1 -1
- package/esm/src/schemas/mod.js +2 -0
- package/esm/src/schemas/mod.js.map +1 -0
- package/esm/src/schemas/subscriptions/requests.d.ts +21 -21
- package/esm/src/schemas/subscriptions/requests.js +22 -21
- package/esm/src/schemas/subscriptions/requests.js.map +1 -0
- package/esm/src/schemas/subscriptions/responses.d.ts +192 -192
- package/esm/src/schemas/subscriptions/responses.js +41 -40
- package/esm/src/schemas/subscriptions/responses.js.map +1 -0
- package/esm/src/signing/_signTypedData/ethers.js +1 -0
- package/esm/src/signing/_signTypedData/ethers.js.map +1 -0
- package/esm/src/signing/_signTypedData/mod.js +1 -0
- package/esm/src/signing/_signTypedData/mod.js.map +1 -0
- package/esm/src/signing/_signTypedData/private_key.js +1 -0
- package/esm/src/signing/_signTypedData/private_key.js.map +1 -0
- package/esm/src/signing/_signTypedData/viem.js +1 -0
- package/esm/src/signing/_signTypedData/viem.js.map +1 -0
- package/esm/src/signing/mod.js +1 -0
- package/esm/src/signing/mod.js.map +1 -0
- package/esm/src/transports/base.d.ts +2 -2
- package/esm/src/transports/base.d.ts.map +1 -1
- package/esm/src/transports/base.js +1 -0
- package/esm/src/transports/base.js.map +1 -0
- package/esm/src/transports/http/http_transport.d.ts +1 -1
- package/esm/src/transports/http/http_transport.js +1 -0
- package/esm/src/transports/http/http_transport.js.map +1 -0
- package/esm/src/transports/websocket/_hyperliquid_event_target.js +1 -0
- package/esm/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
- package/esm/src/transports/websocket/_reconnecting_websocket.js +1 -0
- package/esm/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
- package/esm/src/transports/websocket/_websocket_async_request.js +1 -0
- package/esm/src/transports/websocket/_websocket_async_request.js.map +1 -0
- package/esm/src/transports/websocket/websocket_transport.d.ts +7 -0
- package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/esm/src/transports/websocket/websocket_transport.js +4 -0
- package/esm/src/transports/websocket/websocket_transport.js.map +1 -0
- package/package.json +1 -1
- package/script/mod.js +1 -0
- package/script/mod.js.map +1 -0
- package/script/src/clients/exchange.d.ts +0 -7
- package/script/src/clients/exchange.d.ts.map +1 -1
- package/script/src/clients/exchange.js +4 -5
- package/script/src/clients/exchange.js.map +1 -0
- package/script/src/clients/info.d.ts +64 -2
- package/script/src/clients/info.d.ts.map +1 -1
- package/script/src/clients/info.js +76 -0
- package/script/src/clients/info.js.map +1 -0
- package/script/src/clients/multiSign.js +2 -1
- package/script/src/clients/multiSign.js.map +1 -0
- package/script/src/clients/subscription.js +1 -0
- package/script/src/clients/subscription.js.map +1 -0
- package/script/src/errors.js +1 -0
- package/script/src/errors.js.map +1 -0
- package/script/src/schemas/_base.d.ts +6 -2
- package/script/src/schemas/_base.d.ts.map +1 -1
- package/script/src/schemas/_base.js +5 -2
- package/script/src/schemas/_base.js.map +1 -0
- package/script/src/schemas/exchange/requests.d.ts +284 -284
- package/script/src/schemas/exchange/requests.js +259 -258
- package/script/src/schemas/exchange/requests.js.map +1 -0
- package/script/src/schemas/exchange/responses.d.ts +47 -47
- package/script/src/schemas/exchange/responses.js +54 -53
- package/script/src/schemas/exchange/responses.js.map +1 -0
- package/script/src/schemas/explorer/requests.d.ts +3 -3
- package/script/src/schemas/explorer/requests.js +5 -4
- package/script/src/schemas/explorer/requests.js.map +1 -0
- package/script/src/schemas/explorer/responses.d.ts +10 -10
- package/script/src/schemas/explorer/responses.js +11 -10
- package/script/src/schemas/explorer/responses.js.map +1 -0
- package/script/src/schemas/info/accounts.d.ts +121 -121
- package/script/src/schemas/info/accounts.js +109 -108
- package/script/src/schemas/info/accounts.js.map +1 -0
- package/script/src/schemas/info/assets.d.ts +68 -39
- package/script/src/schemas/info/assets.d.ts.map +1 -1
- package/script/src/schemas/info/assets.js +69 -49
- package/script/src/schemas/info/assets.js.map +1 -0
- package/script/src/schemas/info/markets.d.ts +25 -8
- package/script/src/schemas/info/markets.d.ts.map +1 -1
- package/script/src/schemas/info/markets.js +27 -15
- package/script/src/schemas/info/markets.js.map +1 -0
- package/script/src/schemas/info/orders.d.ts +56 -56
- package/script/src/schemas/info/orders.js +36 -35
- package/script/src/schemas/info/orders.js.map +1 -0
- package/script/src/schemas/info/requests.d.ts +98 -56
- package/script/src/schemas/info/requests.d.ts.map +1 -1
- package/script/src/schemas/info/requests.js +103 -71
- package/script/src/schemas/info/requests.js.map +1 -0
- package/script/src/schemas/info/validators.d.ts +44 -23
- package/script/src/schemas/info/validators.d.ts.map +1 -1
- package/script/src/schemas/info/validators.js +40 -26
- package/script/src/schemas/info/validators.js.map +1 -0
- package/script/src/schemas/info/vaults.d.ts +40 -40
- package/script/src/schemas/info/vaults.js +19 -18
- package/script/src/schemas/info/vaults.js.map +1 -0
- package/script/src/schemas/mod.d.ts +1 -0
- package/script/src/schemas/mod.d.ts.map +1 -1
- package/script/src/schemas/mod.js +4 -1
- package/script/src/schemas/mod.js.map +1 -0
- package/script/src/schemas/subscriptions/requests.d.ts +21 -21
- package/script/src/schemas/subscriptions/requests.js +22 -21
- package/script/src/schemas/subscriptions/requests.js.map +1 -0
- package/script/src/schemas/subscriptions/responses.d.ts +192 -192
- package/script/src/schemas/subscriptions/responses.js +40 -39
- package/script/src/schemas/subscriptions/responses.js.map +1 -0
- package/script/src/signing/_signTypedData/ethers.js +1 -0
- package/script/src/signing/_signTypedData/ethers.js.map +1 -0
- package/script/src/signing/_signTypedData/mod.js +1 -0
- package/script/src/signing/_signTypedData/mod.js.map +1 -0
- package/script/src/signing/_signTypedData/private_key.js +1 -0
- package/script/src/signing/_signTypedData/private_key.js.map +1 -0
- package/script/src/signing/_signTypedData/viem.js +1 -0
- package/script/src/signing/_signTypedData/viem.js.map +1 -0
- package/script/src/signing/mod.js +1 -0
- package/script/src/signing/mod.js.map +1 -0
- package/script/src/transports/base.d.ts +2 -2
- package/script/src/transports/base.d.ts.map +1 -1
- package/script/src/transports/base.js +1 -0
- package/script/src/transports/base.js.map +1 -0
- package/script/src/transports/http/http_transport.d.ts +1 -1
- package/script/src/transports/http/http_transport.js +1 -0
- package/script/src/transports/http/http_transport.js.map +1 -0
- package/script/src/transports/websocket/_hyperliquid_event_target.js +1 -0
- package/script/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
- package/script/src/transports/websocket/_reconnecting_websocket.js +1 -0
- package/script/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
- package/script/src/transports/websocket/_websocket_async_request.js +1 -0
- package/script/src/transports/websocket/_websocket_async_request.js.map +1 -0
- package/script/src/transports/websocket/websocket_transport.d.ts +7 -0
- package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/script/src/transports/websocket/websocket_transport.js +4 -0
- package/script/src/transports/websocket/websocket_transport.js.map +1 -0
- package/src/mod.ts +28 -0
- package/src/src/clients/exchange.ts +2246 -0
- package/src/src/clients/info.ts +2076 -0
- package/src/src/clients/multiSign.ts +183 -0
- package/src/src/clients/subscription.ts +841 -0
- package/src/src/errors.ts +7 -0
- package/src/src/schemas/_base.ts +43 -0
- package/src/src/schemas/exchange/requests.ts +3057 -0
- package/src/src/schemas/exchange/responses.ts +540 -0
- package/src/src/schemas/explorer/requests.ts +65 -0
- package/src/src/schemas/explorer/responses.ts +138 -0
- package/src/src/schemas/info/accounts.ts +1490 -0
- package/src/src/schemas/info/assets.ts +693 -0
- package/src/src/schemas/info/markets.ts +171 -0
- package/src/src/schemas/info/orders.ts +597 -0
- package/src/src/schemas/info/requests.ts +1369 -0
- package/src/src/schemas/info/validators.ts +299 -0
- package/src/src/schemas/info/vaults.ts +262 -0
- package/src/src/schemas/mod.ts +121 -0
- package/src/src/schemas/subscriptions/requests.ts +504 -0
- package/src/src/schemas/subscriptions/responses.ts +576 -0
- package/src/src/signing/_signTypedData/ethers.ts +59 -0
- package/src/src/signing/_signTypedData/mod.ts +121 -0
- package/src/src/signing/_signTypedData/private_key.ts +229 -0
- package/src/src/signing/_signTypedData/viem.ts +55 -0
- package/src/src/signing/mod.ts +572 -0
- package/src/src/transports/base.ts +54 -0
- package/src/src/transports/http/http_transport.ts +208 -0
- package/src/src/transports/websocket/_hyperliquid_event_target.ts +118 -0
- package/src/src/transports/websocket/_reconnecting_websocket.ts +404 -0
- package/src/src/transports/websocket/_websocket_async_request.ts +229 -0
- package/src/src/transports/websocket/websocket_transport.ts +394 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
/** Vault relationship configuration. */
|
|
3
|
-
export declare const VaultRelationship: v.SchemaWithPipe<readonly [v.UnionSchema<[v.
|
|
3
|
+
export declare const VaultRelationship: v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
|
|
4
4
|
/** Relationship type. */
|
|
5
5
|
readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
|
|
6
|
-
}, undefined>, v.
|
|
6
|
+
}, undefined>, v.ObjectSchema<{
|
|
7
7
|
/** Relationship type. */
|
|
8
8
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
|
|
9
9
|
/** Child vault information. */
|
|
10
|
-
readonly data: v.SchemaWithPipe<readonly [v.
|
|
10
|
+
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
11
11
|
/** Child vault addresses. */
|
|
12
12
|
readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
|
|
13
13
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -23,7 +23,7 @@ export declare const VaultRelationship: v.SchemaWithPipe<readonly [v.UnionSchema
|
|
|
23
23
|
}, "Vault relationship configuration.">]>;
|
|
24
24
|
export type VaultRelationship = v.InferOutput<typeof VaultRelationship>;
|
|
25
25
|
/** Vault follower state. */
|
|
26
|
-
export declare const VaultFollowerState: v.SchemaWithPipe<readonly [v.
|
|
26
|
+
export declare const VaultFollowerState: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
27
27
|
/** Follower address. */
|
|
28
28
|
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Follower address.">]>;
|
|
29
29
|
/** Follower vault equity. */
|
|
@@ -49,7 +49,7 @@ export declare const VaultFollowerState: v.SchemaWithPipe<readonly [v.StrictObje
|
|
|
49
49
|
}, "Vault follower state.">]>;
|
|
50
50
|
export type VaultFollowerState = v.InferOutput<typeof VaultFollowerState>;
|
|
51
51
|
/** Details about a vault. */
|
|
52
|
-
export declare const VaultDetails: v.SchemaWithPipe<readonly [v.
|
|
52
|
+
export declare const VaultDetails: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
53
53
|
/** Vault name. */
|
|
54
54
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault name.">]>;
|
|
55
55
|
/** Vault address. */
|
|
@@ -59,65 +59,65 @@ export declare const VaultDetails: v.SchemaWithPipe<readonly [v.StrictObjectSche
|
|
|
59
59
|
/** Vault description. */
|
|
60
60
|
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault description.">]>;
|
|
61
61
|
/** Vault portfolio metrics grouped by time periods. */
|
|
62
|
-
readonly portfolio: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.
|
|
63
|
-
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
64
|
-
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
62
|
+
readonly portfolio: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.TupleSchema<[v.TupleSchema<[v.LiteralSchema<"day", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
63
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
64
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
65
65
|
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
66
66
|
}, undefined>, v.DescriptionAction<{
|
|
67
67
|
accountValueHistory: [number, string][];
|
|
68
68
|
pnlHistory: [number, string][];
|
|
69
69
|
vlm: string;
|
|
70
|
-
}, "Portfolio metrics snapshot.">]>], undefined>, v.
|
|
71
|
-
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
72
|
-
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
70
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"week", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
71
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
72
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
73
73
|
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
74
74
|
}, undefined>, v.DescriptionAction<{
|
|
75
75
|
accountValueHistory: [number, string][];
|
|
76
76
|
pnlHistory: [number, string][];
|
|
77
77
|
vlm: string;
|
|
78
|
-
}, "Portfolio metrics snapshot.">]>], undefined>, v.
|
|
79
|
-
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
80
|
-
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
78
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"month", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
79
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
80
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
81
81
|
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
82
82
|
}, undefined>, v.DescriptionAction<{
|
|
83
83
|
accountValueHistory: [number, string][];
|
|
84
84
|
pnlHistory: [number, string][];
|
|
85
85
|
vlm: string;
|
|
86
|
-
}, "Portfolio metrics snapshot.">]>], undefined>, v.
|
|
87
|
-
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
88
|
-
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
86
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"allTime", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
87
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
88
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
89
89
|
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
90
90
|
}, undefined>, v.DescriptionAction<{
|
|
91
91
|
accountValueHistory: [number, string][];
|
|
92
92
|
pnlHistory: [number, string][];
|
|
93
93
|
vlm: string;
|
|
94
|
-
}, "Portfolio metrics snapshot.">]>], undefined>, v.
|
|
95
|
-
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
96
|
-
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
94
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"perpDay", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
95
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
96
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
97
97
|
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
98
98
|
}, undefined>, v.DescriptionAction<{
|
|
99
99
|
accountValueHistory: [number, string][];
|
|
100
100
|
pnlHistory: [number, string][];
|
|
101
101
|
vlm: string;
|
|
102
|
-
}, "Portfolio metrics snapshot.">]>], undefined>, v.
|
|
103
|
-
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
104
|
-
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
102
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"perpWeek", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
103
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
104
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
105
105
|
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
106
106
|
}, undefined>, v.DescriptionAction<{
|
|
107
107
|
accountValueHistory: [number, string][];
|
|
108
108
|
pnlHistory: [number, string][];
|
|
109
109
|
vlm: string;
|
|
110
|
-
}, "Portfolio metrics snapshot.">]>], undefined>, v.
|
|
111
|
-
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
112
|
-
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
110
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"perpMonth", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
111
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
112
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
113
113
|
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
114
114
|
}, undefined>, v.DescriptionAction<{
|
|
115
115
|
accountValueHistory: [number, string][];
|
|
116
116
|
pnlHistory: [number, string][];
|
|
117
117
|
vlm: string;
|
|
118
|
-
}, "Portfolio metrics snapshot.">]>], undefined>, v.
|
|
119
|
-
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
120
|
-
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
118
|
+
}, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"perpAllTime", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
119
|
+
readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
|
|
120
|
+
readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
|
|
121
121
|
readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
|
|
122
122
|
}, undefined>, v.DescriptionAction<{
|
|
123
123
|
accountValueHistory: [number, string][];
|
|
@@ -191,7 +191,7 @@ export declare const VaultDetails: v.SchemaWithPipe<readonly [v.StrictObjectSche
|
|
|
191
191
|
/** Annual percentage rate. */
|
|
192
192
|
readonly apr: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Annual percentage rate.">]>;
|
|
193
193
|
/** Current user follower state */
|
|
194
|
-
readonly followerState: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.
|
|
194
|
+
readonly followerState: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
195
195
|
/** Follower address. */
|
|
196
196
|
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Follower address.">]>;
|
|
197
197
|
/** Follower vault equity. */
|
|
@@ -228,7 +228,7 @@ export declare const VaultDetails: v.SchemaWithPipe<readonly [v.StrictObjectSche
|
|
|
228
228
|
/** Leader commission percentage. */
|
|
229
229
|
readonly leaderCommission: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Leader commission percentage.">]>;
|
|
230
230
|
/** Vault followers list. */
|
|
231
|
-
readonly followers: v.SchemaWithPipe<readonly [v.ArraySchema<v.
|
|
231
|
+
readonly followers: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
232
232
|
/** Follower address or Leader. */
|
|
233
233
|
readonly user: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.LiteralSchema<"Leader", undefined>], undefined>, v.DescriptionAction<`0x${string}` | "Leader", "Follower address or Leader.">]>;
|
|
234
234
|
readonly vaultEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Follower vault equity.">]>;
|
|
@@ -253,14 +253,14 @@ export declare const VaultDetails: v.SchemaWithPipe<readonly [v.StrictObjectSche
|
|
|
253
253
|
/** Vault closure status. */
|
|
254
254
|
readonly isClosed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Vault closure status.">]>;
|
|
255
255
|
/** Vault relationship type. */
|
|
256
|
-
readonly relationship: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.
|
|
256
|
+
readonly relationship: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
|
|
257
257
|
/** Relationship type. */
|
|
258
258
|
readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
|
|
259
|
-
}, undefined>, v.
|
|
259
|
+
}, undefined>, v.ObjectSchema<{
|
|
260
260
|
/** Relationship type. */
|
|
261
261
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
|
|
262
262
|
/** Child vault information. */
|
|
263
|
-
readonly data: v.SchemaWithPipe<readonly [v.
|
|
263
|
+
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
264
264
|
/** Child vault addresses. */
|
|
265
265
|
readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
|
|
266
266
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -360,7 +360,7 @@ export declare const VaultDetails: v.SchemaWithPipe<readonly [v.StrictObjectSche
|
|
|
360
360
|
}, "Details about a vault.">]>;
|
|
361
361
|
export type VaultDetails = v.InferOutput<typeof VaultDetails>;
|
|
362
362
|
/** User vault equity details. */
|
|
363
|
-
export declare const VaultEquity: v.SchemaWithPipe<readonly [v.
|
|
363
|
+
export declare const VaultEquity: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
364
364
|
/** Vault address. */
|
|
365
365
|
readonly vaultAddress: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
|
|
366
366
|
/** User deposited equity. */
|
|
@@ -374,7 +374,7 @@ export declare const VaultEquity: v.SchemaWithPipe<readonly [v.StrictObjectSchem
|
|
|
374
374
|
}, "User vault equity details.">]>;
|
|
375
375
|
export type VaultEquity = v.InferOutput<typeof VaultEquity>;
|
|
376
376
|
/** Summary of a vault. */
|
|
377
|
-
export declare const VaultSummary: v.SchemaWithPipe<readonly [v.
|
|
377
|
+
export declare const VaultSummary: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
378
378
|
/** Vault name. */
|
|
379
379
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault name.">]>;
|
|
380
380
|
/** Vault address. */
|
|
@@ -386,14 +386,14 @@ export declare const VaultSummary: v.SchemaWithPipe<readonly [v.StrictObjectSche
|
|
|
386
386
|
/** Vault closure status. */
|
|
387
387
|
readonly isClosed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Vault closure status.">]>;
|
|
388
388
|
/** Vault relationship type. */
|
|
389
|
-
readonly relationship: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.
|
|
389
|
+
readonly relationship: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
|
|
390
390
|
/** Relationship type. */
|
|
391
391
|
readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
|
|
392
|
-
}, undefined>, v.
|
|
392
|
+
}, undefined>, v.ObjectSchema<{
|
|
393
393
|
/** Relationship type. */
|
|
394
394
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
|
|
395
395
|
/** Child vault information. */
|
|
396
|
-
readonly data: v.SchemaWithPipe<readonly [v.
|
|
396
|
+
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
397
397
|
/** Child vault addresses. */
|
|
398
398
|
readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
|
|
399
399
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -434,7 +434,7 @@ export declare const VaultSummary: v.SchemaWithPipe<readonly [v.StrictObjectSche
|
|
|
434
434
|
}, "Summary of a vault.">]>;
|
|
435
435
|
export type VaultSummary = v.InferOutput<typeof VaultSummary>;
|
|
436
436
|
/** Vault that a user is leading. */
|
|
437
|
-
export declare const VaultLeading: v.SchemaWithPipe<readonly [v.
|
|
437
|
+
export declare const VaultLeading: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
438
438
|
/** Vault address. */
|
|
439
439
|
readonly address: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
|
|
440
440
|
/** Vault name. */
|
|
@@ -39,39 +39,39 @@ const _base_js_1 = require("../_base.js");
|
|
|
39
39
|
const accounts_js_1 = require("./accounts.js");
|
|
40
40
|
/** Vault relationship configuration. */
|
|
41
41
|
exports.VaultRelationship = v.pipe(v.union([
|
|
42
|
-
v.
|
|
42
|
+
v.object({
|
|
43
43
|
/** Relationship type. */
|
|
44
44
|
type: v.pipe(v.union([v.literal("normal"), v.literal("child")]), v.description("Relationship type.")),
|
|
45
45
|
}),
|
|
46
|
-
v.
|
|
46
|
+
v.object({
|
|
47
47
|
/** Relationship type. */
|
|
48
48
|
type: v.pipe(v.literal("parent"), v.description("Relationship type.")),
|
|
49
49
|
/** Child vault information. */
|
|
50
|
-
data: v.pipe(v.
|
|
50
|
+
data: v.pipe(v.object({
|
|
51
51
|
/** Child vault addresses. */
|
|
52
52
|
childAddresses: v.pipe(v.array(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Child vault addresses.")),
|
|
53
53
|
}), v.description("Child vault information.")),
|
|
54
54
|
}),
|
|
55
55
|
]), v.description("Vault relationship configuration."));
|
|
56
56
|
/** Vault follower state. */
|
|
57
|
-
exports.VaultFollowerState = v.pipe(v.
|
|
57
|
+
exports.VaultFollowerState = v.pipe(v.object({
|
|
58
58
|
/** Follower address. */
|
|
59
59
|
user: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Follower address.")),
|
|
60
60
|
/** Follower vault equity. */
|
|
61
61
|
vaultEquity: v.pipe(_base_js_1.UnsignedDecimal, v.description("Follower vault equity.")),
|
|
62
62
|
/** Current profit and loss. */
|
|
63
|
-
pnl: v.pipe(_base_js_1.
|
|
63
|
+
pnl: v.pipe(_base_js_1.Decimal, v.description("Current profit and loss.")),
|
|
64
64
|
/** All-time profit and loss. */
|
|
65
|
-
allTimePnl: v.pipe(_base_js_1.
|
|
65
|
+
allTimePnl: v.pipe(_base_js_1.Decimal, v.description("All-time profit and loss.")),
|
|
66
66
|
/** Subscription duration in days. */
|
|
67
|
-
daysFollowing: v.pipe(
|
|
67
|
+
daysFollowing: v.pipe(_base_js_1.UnsignedInteger, v.description("Subscription duration in days.")),
|
|
68
68
|
/** Vault entry timestamp. */
|
|
69
|
-
vaultEntryTime: v.pipe(
|
|
69
|
+
vaultEntryTime: v.pipe(_base_js_1.UnsignedInteger, v.description("Vault entry timestamp.")),
|
|
70
70
|
/** Timestamp when funds become unlocked. */
|
|
71
|
-
lockupUntil: v.pipe(
|
|
71
|
+
lockupUntil: v.pipe(_base_js_1.UnsignedInteger, v.description("Timestamp when funds become unlocked.")),
|
|
72
72
|
}), v.description("Vault follower state."));
|
|
73
73
|
/** Details about a vault. */
|
|
74
|
-
exports.VaultDetails = v.pipe(v.
|
|
74
|
+
exports.VaultDetails = v.pipe(v.object({
|
|
75
75
|
/** Vault name. */
|
|
76
76
|
name: v.pipe(v.string(), v.description("Vault name.")),
|
|
77
77
|
/** Vault address. */
|
|
@@ -91,9 +91,9 @@ exports.VaultDetails = v.pipe(v.strictObject({
|
|
|
91
91
|
/** Leader commission percentage. */
|
|
92
92
|
leaderCommission: v.pipe(v.number(), v.description("Leader commission percentage.")),
|
|
93
93
|
/** Vault followers list. */
|
|
94
|
-
followers: v.pipe(v.array(v.
|
|
95
|
-
...v.omit(v.
|
|
96
|
-
...v.
|
|
94
|
+
followers: v.pipe(v.array(v.object({
|
|
95
|
+
...v.omit(v.object(exports.VaultFollowerState.entries), ["user"]).entries,
|
|
96
|
+
...v.object({
|
|
97
97
|
/** Follower address or Leader. */
|
|
98
98
|
user: v.pipe(v.union([v.pipe(_base_js_1.Hex, v.length(42)), v.literal("Leader")]), v.description("Follower address or Leader.")),
|
|
99
99
|
}).entries,
|
|
@@ -112,16 +112,16 @@ exports.VaultDetails = v.pipe(v.strictObject({
|
|
|
112
112
|
alwaysCloseOnWithdraw: v.pipe(v.boolean(), v.description("Position closure policy on withdrawal.")),
|
|
113
113
|
}), v.description("Details about a vault."));
|
|
114
114
|
/** User vault equity details. */
|
|
115
|
-
exports.VaultEquity = v.pipe(v.
|
|
115
|
+
exports.VaultEquity = v.pipe(v.object({
|
|
116
116
|
/** Vault address. */
|
|
117
117
|
vaultAddress: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Vault address.")),
|
|
118
118
|
/** User deposited equity. */
|
|
119
119
|
equity: v.pipe(_base_js_1.UnsignedDecimal, v.description("User deposited equity.")),
|
|
120
120
|
/** Timestamp when the user can withdraw their equity. */
|
|
121
|
-
lockedUntilTimestamp: v.pipe(
|
|
121
|
+
lockedUntilTimestamp: v.pipe(_base_js_1.UnsignedInteger, v.description("Timestamp when the user can withdraw their equity.")),
|
|
122
122
|
}), v.description("User vault equity details."));
|
|
123
123
|
/** Summary of a vault. */
|
|
124
|
-
exports.VaultSummary = v.pipe(v.
|
|
124
|
+
exports.VaultSummary = v.pipe(v.object({
|
|
125
125
|
/** Vault name. */
|
|
126
126
|
name: v.pipe(v.string(), v.description("Vault name.")),
|
|
127
127
|
/** Vault address. */
|
|
@@ -135,12 +135,13 @@ exports.VaultSummary = v.pipe(v.strictObject({
|
|
|
135
135
|
/** Vault relationship type. */
|
|
136
136
|
relationship: v.pipe(exports.VaultRelationship, v.description("Vault relationship type.")),
|
|
137
137
|
/** Creation timestamp. */
|
|
138
|
-
createTimeMillis: v.pipe(
|
|
138
|
+
createTimeMillis: v.pipe(_base_js_1.UnsignedInteger, v.description("Creation timestamp.")),
|
|
139
139
|
}), v.description("Summary of a vault."));
|
|
140
140
|
/** Vault that a user is leading. */
|
|
141
|
-
exports.VaultLeading = v.pipe(v.
|
|
141
|
+
exports.VaultLeading = v.pipe(v.object({
|
|
142
142
|
/** Vault address. */
|
|
143
143
|
address: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Vault address.")),
|
|
144
144
|
/** Vault name. */
|
|
145
145
|
name: v.pipe(v.string(), v.description("Vault name.")),
|
|
146
146
|
}), v.description("Vault that a user is leading."));
|
|
147
|
+
//# sourceMappingURL=vaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vaults.js","sourceRoot":"","sources":["../../../../src/src/schemas/info/vaults.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,0CAA6E;AAC7E,+CAAiD;AAEjD,wCAAwC;AAC3B,QAAA,iBAAiB,GAAG,CAAC,CAAC,IAAI,CACnC,CAAC,CAAC,KAAK,CAAC;IACJ,CAAC,CAAC,MAAM,CAAC;QACL,yBAAyB;QACzB,IAAI,EAAE,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,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,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CACvC;CACJ,CAAC,EACF,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CACvC,CAAC;AAGF,oCAAoC;AACvB,QAAA,YAAY,GAAG,CAAC,CAAC,IAAI,CAC9B,CAAC,CAAC,MAAM,CAAC;IACL,qBAAqB;IACrB,OAAO,EAAE,CAAC,CAAC,IAAI,CACX,CAAC,CAAC,IAAI,CAAC,cAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EACzB,CAAC,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAClC;IACD,kBAAkB;IAClB,IAAI,EAAE,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,EAAE,EACV,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAC/B;CACJ,CAAC,EACF,CAAC,CAAC,WAAW,CAAC,+BAA+B,CAAC,CACjD,CAAC"}
|
|
@@ -84,6 +84,7 @@ export declare class SchemaError extends HyperliquidError {
|
|
|
84
84
|
* @returns A parser function that validates input against the schema.
|
|
85
85
|
*/
|
|
86
86
|
export declare function parser<TSchema extends v.GenericSchema>(schema: TSchema): v.Parser<TSchema, undefined>;
|
|
87
|
+
export { Hex } from "./_base.js";
|
|
87
88
|
export * from "./exchange/requests.js";
|
|
88
89
|
export * from "./exchange/responses.js";
|
|
89
90
|
export * from "./explorer/requests.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/schemas/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,qDAAqD;AACrD,qBAAa,WAAY,SAAQ,gBAAgB;gBACjC,OAAO,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kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
|
|
@@ -109,7 +109,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
109
109
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
110
110
|
};
|
|
111
111
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
112
|
-
exports.SchemaError = void 0;
|
|
112
|
+
exports.Hex = exports.SchemaError = void 0;
|
|
113
113
|
exports.parser = parser;
|
|
114
114
|
const v = __importStar(require("valibot"));
|
|
115
115
|
const errors_js_1 = require("../errors.js");
|
|
@@ -139,6 +139,8 @@ function parser(schema) {
|
|
|
139
139
|
parser.config = undefined;
|
|
140
140
|
return parser;
|
|
141
141
|
}
|
|
142
|
+
var _base_js_1 = require("./_base.js");
|
|
143
|
+
Object.defineProperty(exports, "Hex", { enumerable: true, get: function () { return _base_js_1.Hex; } });
|
|
142
144
|
__exportStar(require("./exchange/requests.js"), exports);
|
|
143
145
|
__exportStar(require("./exchange/responses.js"), exports);
|
|
144
146
|
__exportStar(require("./explorer/requests.js"), exports);
|
|
@@ -152,3 +154,4 @@ __exportStar(require("./info/validators.js"), exports);
|
|
|
152
154
|
__exportStar(require("./info/vaults.js"), exports);
|
|
153
155
|
__exportStar(require("./subscriptions/responses.js"), exports);
|
|
154
156
|
__exportStar(require("./subscriptions/requests.js"), exports);
|
|
157
|
+
//# sourceMappingURL=mod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../../src/src/schemas/mod.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBH,wBAUC;AA3BD,2CAA6B;AAC7B,4CAAgD;AAEhD,qDAAqD;AACrD,MAAa,WAAY,SAAQ,4BAAgB;IAC7C,YAAY,OAAe;QACvB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC9B,CAAC;CACJ;AALD,kCAKC;AAED;;;;;GAKG;AACH,SAAgB,MAAM,CAAkC,MAAe;IACnE,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,CAAC,KAAc,EAAE,EAAE;QAC9B,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,MAAM,CAAC,MAAM;YAAE,MAAM,IAAI,WAAW,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC5E,OAAO,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC,CAAC;IACF,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,uCAAiC;AAAxB,+FAAA,GAAG,OAAA;AAEZ,yDAAuC;AACvC,0DAAwC;AAExC,yDAAuC;AACvC,0DAAwC;AAExC,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,qDAAmC;AACnC,uDAAqC;AACrC,mDAAiC;AAEjC,+DAA6C;AAC7C,8DAA4C"}
|
|
@@ -4,7 +4,7 @@ import * as v from "valibot";
|
|
|
4
4
|
* @returns {WsActiveAssetCtx | WsActiveSpotAssetCtx}
|
|
5
5
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
6
6
|
*/
|
|
7
|
-
export declare const WsActiveAssetCtxRequest: v.SchemaWithPipe<readonly [v.
|
|
7
|
+
export declare const WsActiveAssetCtxRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
8
8
|
/** Type of subscription. */
|
|
9
9
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"activeAssetCtx", undefined>, v.DescriptionAction<"activeAssetCtx", "Type of subscription.">]>;
|
|
10
10
|
/** Asset symbol (e.g., BTC). */
|
|
@@ -19,7 +19,7 @@ export type WsActiveAssetCtxRequest = v.InferOutput<typeof WsActiveAssetCtxReque
|
|
|
19
19
|
* @returns {ActiveAssetData}
|
|
20
20
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-active-asset-data
|
|
21
21
|
*/
|
|
22
|
-
export declare const WsActiveAssetDataRequest: v.SchemaWithPipe<readonly [v.
|
|
22
|
+
export declare const WsActiveAssetDataRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
23
23
|
/** Type of subscription. */
|
|
24
24
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"activeAssetData", undefined>, v.DescriptionAction<"activeAssetData", "Type of subscription.">]>;
|
|
25
25
|
/** Asset symbol (e.g., BTC). */
|
|
@@ -37,7 +37,7 @@ export type WsActiveAssetDataRequest = v.InferOutput<typeof WsActiveAssetDataReq
|
|
|
37
37
|
* @returns {AllMids}
|
|
38
38
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-mids-for-all-coins
|
|
39
39
|
*/
|
|
40
|
-
export declare const WsAllMidsRequest: v.SchemaWithPipe<readonly [v.
|
|
40
|
+
export declare const WsAllMidsRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
41
41
|
/** Type of subscription. */
|
|
42
42
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"allMids", undefined>, v.DescriptionAction<"allMids", "Type of subscription.">]>;
|
|
43
43
|
/** DEX name (empty string for main dex). */
|
|
@@ -52,7 +52,7 @@ export type WsAllMidsRequest = v.InferOutput<typeof WsAllMidsRequest>;
|
|
|
52
52
|
* @returns {WsAssetCtx[]}
|
|
53
53
|
* @see null
|
|
54
54
|
*/
|
|
55
|
-
export declare const WsAssetCtxsRequest: v.SchemaWithPipe<readonly [v.
|
|
55
|
+
export declare const WsAssetCtxsRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
56
56
|
/** Type of subscription. */
|
|
57
57
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"assetCtxs", undefined>, v.DescriptionAction<"assetCtxs", "Type of subscription.">]>;
|
|
58
58
|
/** DEX name (empty string for main dex). */
|
|
@@ -67,7 +67,7 @@ export type WsAssetCtxsRequest = v.InferOutput<typeof WsAssetCtxsRequest>;
|
|
|
67
67
|
* @returns {WsBbo}
|
|
68
68
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
69
69
|
*/
|
|
70
|
-
export declare const WsBboRequest: v.SchemaWithPipe<readonly [v.
|
|
70
|
+
export declare const WsBboRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
71
71
|
/** Type of subscription. */
|
|
72
72
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"bbo", undefined>, v.DescriptionAction<"bbo", "Type of subscription.">]>;
|
|
73
73
|
/** Asset symbol (e.g., BTC). */
|
|
@@ -82,7 +82,7 @@ export type WsBboRequest = v.InferOutput<typeof WsBboRequest>;
|
|
|
82
82
|
* @returns {Candle}
|
|
83
83
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
84
84
|
*/
|
|
85
|
-
export declare const WsCandleRequest: v.SchemaWithPipe<readonly [v.
|
|
85
|
+
export declare const WsCandleRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
86
86
|
/** Type of subscription. */
|
|
87
87
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"candle", undefined>, v.DescriptionAction<"candle", "Type of subscription.">]>;
|
|
88
88
|
/** Asset symbol (e.g., BTC). */
|
|
@@ -100,7 +100,7 @@ export type WsCandleRequest = v.InferOutput<typeof WsCandleRequest>;
|
|
|
100
100
|
* @returns {PerpsClearinghouseState}
|
|
101
101
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
|
|
102
102
|
*/
|
|
103
|
-
export declare const WsClearinghouseStateRequest: v.SchemaWithPipe<readonly [v.
|
|
103
|
+
export declare const WsClearinghouseStateRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
104
104
|
/** Type of subscription. */
|
|
105
105
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"clearinghouseState", undefined>, v.DescriptionAction<"clearinghouseState", "Type of subscription.">]>;
|
|
106
106
|
/** User address. */
|
|
@@ -118,7 +118,7 @@ export type WsClearinghouseStateRequest = v.InferOutput<typeof WsClearinghouseSt
|
|
|
118
118
|
* @returns {Book}
|
|
119
119
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#l2-book-snapshot
|
|
120
120
|
*/
|
|
121
|
-
export declare const WsL2BookRequest: v.SchemaWithPipe<readonly [v.
|
|
121
|
+
export declare const WsL2BookRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
122
122
|
/** Type of subscription. */
|
|
123
123
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"l2Book", undefined>, v.DescriptionAction<"l2Book", "Type of subscription.">]>;
|
|
124
124
|
/** Asset symbol (e.g., BTC). */
|
|
@@ -139,7 +139,7 @@ export type WsL2BookRequest = v.InferOutput<typeof WsL2BookRequest>;
|
|
|
139
139
|
* @returns {WsBlockDetails[]}
|
|
140
140
|
* @see null
|
|
141
141
|
*/
|
|
142
|
-
export declare const WsExplorerBlockRequest: v.SchemaWithPipe<readonly [v.
|
|
142
|
+
export declare const WsExplorerBlockRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
143
143
|
/** Type of subscription. */
|
|
144
144
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"explorerBlock", undefined>, v.DescriptionAction<"explorerBlock", "Type of subscription.">]>;
|
|
145
145
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -151,7 +151,7 @@ export type WsExplorerBlockRequest = v.InferOutput<typeof WsExplorerBlockRequest
|
|
|
151
151
|
* @returns {TxDetails[]}
|
|
152
152
|
* @see null
|
|
153
153
|
*/
|
|
154
|
-
export declare const WsExplorerTxsRequest: v.SchemaWithPipe<readonly [v.
|
|
154
|
+
export declare const WsExplorerTxsRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
155
155
|
/** Type of subscription. */
|
|
156
156
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"explorerTxs", undefined>, v.DescriptionAction<"explorerTxs", "Type of subscription.">]>;
|
|
157
157
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -163,7 +163,7 @@ export type WsExplorerTxsRequest = v.InferOutput<typeof WsExplorerTxsRequest>;
|
|
|
163
163
|
* @returns {WsNotification}
|
|
164
164
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
165
165
|
*/
|
|
166
|
-
export declare const WsNotificationRequest: v.SchemaWithPipe<readonly [v.
|
|
166
|
+
export declare const WsNotificationRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
167
167
|
/** Type of subscription. */
|
|
168
168
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"notification", undefined>, v.DescriptionAction<"notification", "Type of subscription.">]>;
|
|
169
169
|
/** User address. */
|
|
@@ -178,7 +178,7 @@ export type WsNotificationRequest = v.InferOutput<typeof WsNotificationRequest>;
|
|
|
178
178
|
* @returns {Order[]}
|
|
179
179
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders
|
|
180
180
|
*/
|
|
181
|
-
export declare const WsOpenOrdersRequest: v.SchemaWithPipe<readonly [v.
|
|
181
|
+
export declare const WsOpenOrdersRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
182
182
|
/** Type of subscription. */
|
|
183
183
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"openOrders", undefined>, v.DescriptionAction<"openOrders", "Type of subscription.">]>;
|
|
184
184
|
/** User address. */
|
|
@@ -196,7 +196,7 @@ export type WsOpenOrdersRequest = v.InferOutput<typeof WsOpenOrdersRequest>;
|
|
|
196
196
|
* @returns {OrderStatus>[]}
|
|
197
197
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
198
198
|
*/
|
|
199
|
-
export declare const WsOrderUpdatesRequest: v.SchemaWithPipe<readonly [v.
|
|
199
|
+
export declare const WsOrderUpdatesRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
200
200
|
/** Type of subscription. */
|
|
201
201
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"orderUpdates", undefined>, v.DescriptionAction<"orderUpdates", "Type of subscription.">]>;
|
|
202
202
|
/** User address. */
|
|
@@ -211,7 +211,7 @@ export type WsOrderUpdatesRequest = v.InferOutput<typeof WsOrderUpdatesRequest>;
|
|
|
211
211
|
* @returns {WsTrade[]}
|
|
212
212
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
213
213
|
*/
|
|
214
|
-
export declare const WsTradesRequest: v.SchemaWithPipe<readonly [v.
|
|
214
|
+
export declare const WsTradesRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
215
215
|
/** Type of subscription. */
|
|
216
216
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"trades", undefined>, v.DescriptionAction<"trades", "Type of subscription.">]>;
|
|
217
217
|
/** Asset symbol (e.g., BTC). */
|
|
@@ -226,7 +226,7 @@ export type WsTradesRequest = v.InferOutput<typeof WsTradesRequest>;
|
|
|
226
226
|
* @returns {WsUserEvent}
|
|
227
227
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
228
228
|
*/
|
|
229
|
-
export declare const WsUserEventsRequest: v.SchemaWithPipe<readonly [v.
|
|
229
|
+
export declare const WsUserEventsRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
230
230
|
/** Type of subscription. */
|
|
231
231
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userEvents", undefined>, v.DescriptionAction<"userEvents", "Type of subscription.">]>;
|
|
232
232
|
/** User address. */
|
|
@@ -241,7 +241,7 @@ export type WsUserEventsRequest = v.InferOutput<typeof WsUserEventsRequest>;
|
|
|
241
241
|
* @returns {Fill[]}
|
|
242
242
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills
|
|
243
243
|
*/
|
|
244
|
-
export declare const WsUserFillsRequest: v.SchemaWithPipe<readonly [v.
|
|
244
|
+
export declare const WsUserFillsRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
245
245
|
/** Type of subscription. */
|
|
246
246
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userFills", undefined>, v.DescriptionAction<"userFills", "Type of subscription.">]>;
|
|
247
247
|
/** User address. */
|
|
@@ -259,7 +259,7 @@ export type WsUserFillsRequest = v.InferOutput<typeof WsUserFillsRequest>;
|
|
|
259
259
|
* @returns {WsUserFundings}
|
|
260
260
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
261
261
|
*/
|
|
262
|
-
export declare const WsUserFundingsRequest: v.SchemaWithPipe<readonly [v.
|
|
262
|
+
export declare const WsUserFundingsRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
263
263
|
/** Type of subscription. */
|
|
264
264
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userFundings", undefined>, v.DescriptionAction<"userFundings", "Type of subscription.">]>;
|
|
265
265
|
/** User address. */
|
|
@@ -274,7 +274,7 @@ export type WsUserFundingsRequest = v.InferOutput<typeof WsUserFundingsRequest>;
|
|
|
274
274
|
* @returns {WsUserNonFundingLedgerUpdates}
|
|
275
275
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
276
276
|
*/
|
|
277
|
-
export declare const WsUserNonFundingLedgerUpdatesRequest: v.SchemaWithPipe<readonly [v.
|
|
277
|
+
export declare const WsUserNonFundingLedgerUpdatesRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
278
278
|
/** Type of subscription. */
|
|
279
279
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userNonFundingLedgerUpdates", undefined>, v.DescriptionAction<"userNonFundingLedgerUpdates", "Type of subscription.">]>;
|
|
280
280
|
/** User address. */
|
|
@@ -289,7 +289,7 @@ export type WsUserNonFundingLedgerUpdatesRequest = v.InferOutput<typeof WsUserNo
|
|
|
289
289
|
* @returns {WsUserTwapHistory}
|
|
290
290
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
291
291
|
*/
|
|
292
|
-
export declare const WsUserTwapHistoryRequest: v.SchemaWithPipe<readonly [v.
|
|
292
|
+
export declare const WsUserTwapHistoryRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
293
293
|
/** Type of subscription. */
|
|
294
294
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userTwapHistory", undefined>, v.DescriptionAction<"userTwapHistory", "Type of subscription.">]>;
|
|
295
295
|
/** User address. */
|
|
@@ -304,7 +304,7 @@ export type WsUserTwapHistoryRequest = v.InferOutput<typeof WsUserTwapHistoryReq
|
|
|
304
304
|
* @returns {TwapSliceFill[]}
|
|
305
305
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-twap-slice-fills
|
|
306
306
|
*/
|
|
307
|
-
export declare const WsUserTwapSliceFillsRequest: v.SchemaWithPipe<readonly [v.
|
|
307
|
+
export declare const WsUserTwapSliceFillsRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
308
308
|
/** Type of subscription. */
|
|
309
309
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"userTwapSliceFills", undefined>, v.DescriptionAction<"userTwapSliceFills", "Type of subscription.">]>;
|
|
310
310
|
/** User address. */
|
|
@@ -319,7 +319,7 @@ export type WsUserTwapSliceFillsRequest = v.InferOutput<typeof WsUserTwapSliceFi
|
|
|
319
319
|
* @returns {WsWebData2}
|
|
320
320
|
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
|
|
321
321
|
*/
|
|
322
|
-
export declare const WsWebData2Request: v.SchemaWithPipe<readonly [v.
|
|
322
|
+
export declare const WsWebData2Request: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
323
323
|
/** Type of subscription. */
|
|
324
324
|
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"webData2", undefined>, v.DescriptionAction<"webData2", "Type of subscription.">]>;
|
|
325
325
|
/** User address. */
|