@nktkas/hyperliquid 0.23.1 → 0.24.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.
Files changed (165) hide show
  1. package/CONTRIBUTING.md +3 -2
  2. package/README.md +154 -170
  3. package/esm/mod.d.ts +1 -1
  4. package/esm/mod.d.ts.map +1 -1
  5. package/esm/src/base.d.ts +0 -5
  6. package/esm/src/base.d.ts.map +1 -1
  7. package/esm/src/clients/exchange.d.ts +430 -393
  8. package/esm/src/clients/exchange.d.ts.map +1 -1
  9. package/esm/src/clients/exchange.js +467 -927
  10. package/esm/src/clients/info.d.ts +228 -203
  11. package/esm/src/clients/info.d.ts.map +1 -1
  12. package/esm/src/clients/info.js +236 -368
  13. package/esm/src/clients/multiSign.d.ts +14 -1184
  14. package/esm/src/clients/multiSign.d.ts.map +1 -1
  15. package/esm/src/clients/multiSign.js +37 -2004
  16. package/esm/src/clients/subscription.d.ts +95 -93
  17. package/esm/src/clients/subscription.d.ts.map +1 -1
  18. package/esm/src/clients/subscription.js +101 -146
  19. package/esm/src/signing/_signTypedData/ethers.d.ts +16 -4
  20. package/esm/src/signing/_signTypedData/ethers.d.ts.map +1 -1
  21. package/esm/src/signing/_signTypedData/ethers.js +1 -1
  22. package/esm/src/signing/_signTypedData/mod.d.ts +12 -12
  23. package/esm/src/signing/_signTypedData/mod.d.ts.map +1 -1
  24. package/esm/src/signing/_signTypedData/mod.js +52 -24
  25. package/esm/src/signing/_signTypedData/private_key.d.ts +6 -5
  26. package/esm/src/signing/_signTypedData/private_key.d.ts.map +1 -1
  27. package/esm/src/signing/_signTypedData/private_key.js +40 -19
  28. package/esm/src/signing/_signTypedData/viem.d.ts +27 -6
  29. package/esm/src/signing/_signTypedData/viem.d.ts.map +1 -1
  30. package/esm/src/signing/_signTypedData/viem.js +1 -1
  31. package/esm/src/signing/_sorter.d.ts +12 -21
  32. package/esm/src/signing/_sorter.d.ts.map +1 -1
  33. package/esm/src/signing/_sorter.js +30 -63
  34. package/esm/src/signing/mod.d.ts +177 -127
  35. package/esm/src/signing/mod.d.ts.map +1 -1
  36. package/esm/src/signing/mod.js +182 -130
  37. package/esm/src/transports/base.d.ts +2 -1
  38. package/esm/src/transports/base.d.ts.map +1 -1
  39. package/esm/src/transports/http/http_transport.d.ts +3 -2
  40. package/esm/src/transports/http/http_transport.d.ts.map +1 -1
  41. package/esm/src/transports/http/http_transport.js +4 -4
  42. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +14 -6
  43. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  44. package/esm/src/transports/websocket/_hyperliquid_event_target.js +1 -2
  45. package/esm/src/transports/websocket/_reconnecting_websocket.d.ts +2 -1
  46. package/esm/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
  47. package/esm/src/transports/websocket/_reconnecting_websocket.js +1 -0
  48. package/esm/src/transports/websocket/_websocket_async_request.d.ts.map +1 -1
  49. package/esm/src/transports/websocket/_websocket_async_request.js +17 -21
  50. package/esm/src/transports/websocket/websocket_transport.d.ts +4 -4
  51. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  52. package/esm/src/transports/websocket/websocket_transport.js +6 -6
  53. package/esm/src/types/exchange/requests.d.ts +492 -306
  54. package/esm/src/types/exchange/requests.d.ts.map +1 -1
  55. package/esm/src/types/exchange/responses.d.ts +105 -25
  56. package/esm/src/types/exchange/responses.d.ts.map +1 -1
  57. package/esm/src/types/explorer/requests.d.ts +3 -3
  58. package/esm/src/types/explorer/requests.d.ts.map +1 -1
  59. package/esm/src/types/explorer/responses.d.ts +1 -1
  60. package/esm/src/types/explorer/responses.d.ts.map +1 -1
  61. package/esm/src/types/info/accounts.d.ts +403 -98
  62. package/esm/src/types/info/accounts.d.ts.map +1 -1
  63. package/esm/src/types/info/assets.d.ts +131 -35
  64. package/esm/src/types/info/assets.d.ts.map +1 -1
  65. package/esm/src/types/info/markets.d.ts +29 -8
  66. package/esm/src/types/info/markets.d.ts.map +1 -1
  67. package/esm/src/types/info/orders.d.ts +62 -17
  68. package/esm/src/types/info/orders.d.ts.map +1 -1
  69. package/esm/src/types/info/requests.d.ts +117 -51
  70. package/esm/src/types/info/requests.d.ts.map +1 -1
  71. package/esm/src/types/info/validators.d.ts +44 -14
  72. package/esm/src/types/info/validators.d.ts.map +1 -1
  73. package/esm/src/types/info/vaults.d.ts +25 -10
  74. package/esm/src/types/info/vaults.d.ts.map +1 -1
  75. package/esm/src/types/mod.d.ts +1 -1
  76. package/esm/src/types/mod.d.ts.map +1 -1
  77. package/esm/src/types/subscriptions/requests.d.ts +21 -66
  78. package/esm/src/types/subscriptions/requests.d.ts.map +1 -1
  79. package/esm/src/types/subscriptions/responses.d.ts +46 -55
  80. package/esm/src/types/subscriptions/responses.d.ts.map +1 -1
  81. package/package.json +2 -3
  82. package/script/mod.d.ts +1 -1
  83. package/script/mod.d.ts.map +1 -1
  84. package/script/src/base.d.ts +0 -5
  85. package/script/src/base.d.ts.map +1 -1
  86. package/script/src/clients/exchange.d.ts +430 -393
  87. package/script/src/clients/exchange.d.ts.map +1 -1
  88. package/script/src/clients/exchange.js +466 -926
  89. package/script/src/clients/info.d.ts +228 -203
  90. package/script/src/clients/info.d.ts.map +1 -1
  91. package/script/src/clients/info.js +236 -368
  92. package/script/src/clients/multiSign.d.ts +14 -1184
  93. package/script/src/clients/multiSign.d.ts.map +1 -1
  94. package/script/src/clients/multiSign.js +38 -2005
  95. package/script/src/clients/subscription.d.ts +95 -93
  96. package/script/src/clients/subscription.d.ts.map +1 -1
  97. package/script/src/clients/subscription.js +101 -146
  98. package/script/src/signing/_signTypedData/ethers.d.ts +16 -4
  99. package/script/src/signing/_signTypedData/ethers.d.ts.map +1 -1
  100. package/script/src/signing/_signTypedData/ethers.js +2 -2
  101. package/script/src/signing/_signTypedData/mod.d.ts +12 -12
  102. package/script/src/signing/_signTypedData/mod.d.ts.map +1 -1
  103. package/script/src/signing/_signTypedData/mod.js +51 -26
  104. package/script/src/signing/_signTypedData/private_key.d.ts +6 -5
  105. package/script/src/signing/_signTypedData/private_key.d.ts.map +1 -1
  106. package/script/src/signing/_signTypedData/private_key.js +40 -18
  107. package/script/src/signing/_signTypedData/viem.d.ts +27 -6
  108. package/script/src/signing/_signTypedData/viem.d.ts.map +1 -1
  109. package/script/src/signing/_signTypedData/viem.js +2 -2
  110. package/script/src/signing/_sorter.d.ts +12 -21
  111. package/script/src/signing/_sorter.d.ts.map +1 -1
  112. package/script/src/signing/_sorter.js +30 -63
  113. package/script/src/signing/mod.d.ts +177 -127
  114. package/script/src/signing/mod.d.ts.map +1 -1
  115. package/script/src/signing/mod.js +185 -148
  116. package/script/src/transports/base.d.ts +2 -1
  117. package/script/src/transports/base.d.ts.map +1 -1
  118. package/script/src/transports/http/http_transport.d.ts +3 -2
  119. package/script/src/transports/http/http_transport.d.ts.map +1 -1
  120. package/script/src/transports/http/http_transport.js +4 -4
  121. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +14 -6
  122. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  123. package/script/src/transports/websocket/_hyperliquid_event_target.js +1 -2
  124. package/script/src/transports/websocket/_reconnecting_websocket.d.ts +2 -1
  125. package/script/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
  126. package/script/src/transports/websocket/_reconnecting_websocket.js +1 -0
  127. package/script/src/transports/websocket/_websocket_async_request.d.ts.map +1 -1
  128. package/script/src/transports/websocket/_websocket_async_request.js +17 -21
  129. package/script/src/transports/websocket/websocket_transport.d.ts +4 -4
  130. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  131. package/script/src/transports/websocket/websocket_transport.js +6 -6
  132. package/script/src/types/exchange/requests.d.ts +492 -306
  133. package/script/src/types/exchange/requests.d.ts.map +1 -1
  134. package/script/src/types/exchange/responses.d.ts +105 -25
  135. package/script/src/types/exchange/responses.d.ts.map +1 -1
  136. package/script/src/types/explorer/requests.d.ts +3 -3
  137. package/script/src/types/explorer/requests.d.ts.map +1 -1
  138. package/script/src/types/explorer/responses.d.ts +1 -1
  139. package/script/src/types/explorer/responses.d.ts.map +1 -1
  140. package/script/src/types/info/accounts.d.ts +403 -98
  141. package/script/src/types/info/accounts.d.ts.map +1 -1
  142. package/script/src/types/info/assets.d.ts +131 -35
  143. package/script/src/types/info/assets.d.ts.map +1 -1
  144. package/script/src/types/info/markets.d.ts +29 -8
  145. package/script/src/types/info/markets.d.ts.map +1 -1
  146. package/script/src/types/info/orders.d.ts +62 -17
  147. package/script/src/types/info/orders.d.ts.map +1 -1
  148. package/script/src/types/info/requests.d.ts +117 -51
  149. package/script/src/types/info/requests.d.ts.map +1 -1
  150. package/script/src/types/info/validators.d.ts +44 -14
  151. package/script/src/types/info/validators.d.ts.map +1 -1
  152. package/script/src/types/info/vaults.d.ts +25 -10
  153. package/script/src/types/info/vaults.d.ts.map +1 -1
  154. package/script/src/types/mod.d.ts +1 -1
  155. package/script/src/types/mod.d.ts.map +1 -1
  156. package/script/src/types/subscriptions/requests.d.ts +21 -66
  157. package/script/src/types/subscriptions/requests.d.ts.map +1 -1
  158. package/script/src/types/subscriptions/responses.d.ts +46 -55
  159. package/script/src/types/subscriptions/responses.d.ts.map +1 -1
  160. package/esm/src/signing/_signTypedData/window.d.ts +0 -29
  161. package/esm/src/signing/_signTypedData/window.d.ts.map +0 -1
  162. package/esm/src/signing/_signTypedData/window.js +0 -30
  163. package/script/src/signing/_signTypedData/window.d.ts +0 -29
  164. package/script/src/signing/_signTypedData/window.d.ts.map +0 -1
  165. package/script/src/signing/_signTypedData/window.js +0 -34
@@ -1,103 +1,101 @@
1
1
  import type { IRequestTransport } from "../transports/base.js";
2
- import type { BlockDetailsRequest, TxDetailsRequest, UserDetailsRequest } from "../types/explorer/requests.js";
3
- import type { BlockDetails, TxDetails } from "../types/explorer/responses.js";
4
- import type { ExtraAgent, LegalCheck, MultiSigSigners, PerpsClearinghouseState, PortfolioPeriods, PreTransferCheck, Referral, SpotClearinghouseState, SubAccount, UserFees, UserFundingUpdate, UserNonFundingLedgerUpdate, UserRateLimit, UserRole } from "../types/info/accounts.js";
5
- import type { AllMids, Candle, FundingHistory, MarginTable, PerpDex, PerpsMeta, PerpsMetaAndAssetCtxs, PredictedFunding, SpotMeta, SpotMetaAndAssetCtxs, TokenDetails } from "../types/info/assets.js";
6
- import type { Delegation, DelegatorReward, DelegatorSummary, DelegatorUpdate, ValidatorSummary } from "../types/info/validators.js";
7
- import type { DeployAuctionStatus, ExchangeStatus, SpotDeployState } from "../types/info/markets.js";
8
- import type { Book, Fill, FrontendOrder, Order, OrderLookup, OrderStatus, TwapHistory, TwapSliceFill } from "../types/info/orders.js";
9
- import type { AllMidsRequest, CandleSnapshotRequest, ClearinghouseStateRequest, DelegationsRequest, DelegatorHistoryRequest, DelegatorRewardsRequest, DelegatorSummaryRequest, ExtraAgentsRequest, FrontendOpenOrdersRequest, FundingHistoryRequest, HistoricalOrdersRequest, IsVipRequest, L2BookRequest, LeadingVaultsRequest, LegalCheckRequest, MarginTableRequest, MaxBuilderFeeRequest, MetaRequest, OpenOrdersRequest, OrderStatusRequest, PortfolioRequest, PreTransferCheckRequest, ReferralRequest, SpotClearinghouseStateRequest, SpotDeployStateRequest, SubAccountsRequest, TokenDetailsRequest, TwapHistoryRequest, UserFeesRequest, UserFillsByTimeRequest, UserFillsRequest, UserFundingRequest, UserNonFundingLedgerUpdatesRequest, UserRateLimitRequest, UserRoleRequest, UserToMultiSigSignersRequest, UserTwapSliceFillsByTimeRequest, UserTwapSliceFillsRequest, UserVaultEquitiesRequest, VaultDetailsRequest } from "../types/info/requests.js";
10
- import type { VaultDetails, VaultEquity, VaultLeading, VaultSummary } from "../types/info/vaults.js";
2
+ import type { ActiveAssetData, ActiveAssetDataRequest, AllMids, AllMidsRequest, BlockDetails, BlockDetailsRequest, Book, Candle, CandleSnapshotRequest, ClearinghouseStateRequest, Delegation, DelegationsRequest, DelegatorHistoryRequest, DelegatorReward, DelegatorRewardsRequest, DelegatorSummary, DelegatorSummaryRequest, DelegatorUpdate, DeployAuctionStatus, ExchangeStatus, ExtraAgent, ExtraAgentsRequest, Fill, FrontendOpenOrdersRequest, FrontendOrder, FundingHistory, FundingHistoryRequest, HistoricalOrdersRequest, IsVipRequest, L2BookRequest, LeadingVaultsRequest, LegalCheck, LegalCheckRequest, MarginTable, MarginTableRequest, MaxBuilderFeeRequest, MetaRequest, MultiSigSigners, OpenOrdersRequest, Order, OrderLookup, OrderStatus, OrderStatusRequest, PerpDex, PerpsClearinghouseState, PerpsMeta, PerpsMetaAndAssetCtxs, PortfolioPeriods, PortfolioRequest, PredictedFunding, PreTransferCheck, PreTransferCheckRequest, Referral, ReferralRequest, SpotClearinghouseState, SpotClearinghouseStateRequest, SpotDeployState, SpotDeployStateRequest, SpotMeta, SpotMetaAndAssetCtxs, SubAccount, SubAccountsRequest, TokenDetails, TokenDetailsRequest, TwapHistory, TwapHistoryRequest, TwapSliceFill, TxDetails, TxDetailsRequest, UserDetailsRequest, UserFees, UserFeesRequest, UserFillsByTimeRequest, UserFillsRequest, UserFundingRequest, UserFundingUpdate, UserNonFundingLedgerUpdate, UserNonFundingLedgerUpdatesRequest, UserRateLimit, UserRateLimitRequest, UserRole, UserRoleRequest, UserToMultiSigSignersRequest, UserTwapSliceFillsByTimeRequest, UserTwapSliceFillsRequest, UserVaultEquitiesRequest, ValidatorSummary, VaultDetails, VaultDetailsRequest, VaultEquity, VaultLeading, VaultSummary } from "../types/mod.js";
3
+ /** @see https://github.com/microsoft/TypeScript/issues/13923#issuecomment-2191862501 */
4
+ type DeepImmutable<T> = {
5
+ readonly [K in keyof T]: DeepImmutable<T[K]>;
6
+ };
11
7
  /** Parameters for the {@linkcode InfoClient} constructor. */
12
8
  export interface InfoClientParameters<T extends IRequestTransport = IRequestTransport> {
13
9
  /** The transport used to connect to the Hyperliquid API. */
14
10
  transport: T;
15
11
  }
16
- /** Parameters for the {@linkcode InfoClient.allMids} method. */
12
+ /** Request parameters for the {@linkcode InfoClient.activeAssetData} method. */
13
+ export type ActiveAssetDataParameters = Omit<ActiveAssetDataRequest, "type">;
14
+ /** Request parameters for the {@linkcode InfoClient.allMids} method. */
17
15
  export type AllMidsParameters = Omit<AllMidsRequest, "type">;
18
- /** Parameters for the {@linkcode InfoClient.blockDetails} method. */
16
+ /** Request parameters for the {@linkcode InfoClient.blockDetails} method. */
19
17
  export type BlockDetailsParameters = Omit<BlockDetailsRequest, "type">;
20
- /** Parameters for the {@linkcode InfoClient.candleSnapshot} method. */
18
+ /** Request parameters for the {@linkcode InfoClient.candleSnapshot} method. */
21
19
  export type CandleSnapshotParameters = CandleSnapshotRequest["req"];
22
- /** Parameters for the {@linkcode InfoClient.clearinghouseState} method. */
20
+ /** Request parameters for the {@linkcode InfoClient.clearinghouseState} method. */
23
21
  export type ClearinghouseStateParameters = Omit<ClearinghouseStateRequest, "type">;
24
- /** Parameters for the {@linkcode InfoClient.delegations} method. */
22
+ /** Request parameters for the {@linkcode InfoClient.delegations} method. */
25
23
  export type DelegationsParameters = Omit<DelegationsRequest, "type">;
26
- /** Parameters for the {@linkcode InfoClient.delegatorHistory} method. */
24
+ /** Request parameters for the {@linkcode InfoClient.delegatorHistory} method. */
27
25
  export type DelegatorHistoryParameters = Omit<DelegatorHistoryRequest, "type">;
28
- /** Parameters for the {@linkcode InfoClient.delegatorRewards} method. */
26
+ /** Request parameters for the {@linkcode InfoClient.delegatorRewards} method. */
29
27
  export type DelegatorRewardsParameters = Omit<DelegatorRewardsRequest, "type">;
30
- /** Parameters for the {@linkcode InfoClient.delegatorSummary} method. */
28
+ /** Request parameters for the {@linkcode InfoClient.delegatorSummary} method. */
31
29
  export type DelegatorSummaryParameters = Omit<DelegatorSummaryRequest, "type">;
32
- /** Parameters for the {@linkcode InfoClient.extraAgents} method. */
30
+ /** Request parameters for the {@linkcode InfoClient.extraAgents} method. */
33
31
  export type ExtraAgentsParameters = Omit<ExtraAgentsRequest, "type">;
34
- /** Parameters for the {@linkcode InfoClient.frontendOpenOrders} method. */
32
+ /** Request parameters for the {@linkcode InfoClient.frontendOpenOrders} method. */
35
33
  export type FrontendOpenOrdersParameters = Omit<FrontendOpenOrdersRequest, "type">;
36
- /** Parameters for the {@linkcode InfoClient.fundingHistory} method. */
34
+ /** Request parameters for the {@linkcode InfoClient.fundingHistory} method. */
37
35
  export type FundingHistoryParameters = Omit<FundingHistoryRequest, "type">;
38
- /** Parameters for the {@linkcode InfoClient.historicalOrders} method. */
36
+ /** Request parameters for the {@linkcode InfoClient.historicalOrders} method. */
39
37
  export type HistoricalOrdersParameters = Omit<HistoricalOrdersRequest, "type">;
40
- /** Parameters for the {@linkcode InfoClient.isVip} method. */
38
+ /** Request parameters for the {@linkcode InfoClient.isVip} method. */
41
39
  export type IsVipParameters = Omit<IsVipRequest, "type">;
42
- /** Parameters for the {@linkcode InfoClient.l2Book} method. */
40
+ /** Request parameters for the {@linkcode InfoClient.l2Book} method. */
43
41
  export type L2BookParameters = Omit<L2BookRequest, "type">;
44
- /** Parameters for the {@linkcode InfoClient.leadingVaults} method. */
42
+ /** Request parameters for the {@linkcode InfoClient.leadingVaults} method. */
45
43
  export type LeadingVaultsParameters = Omit<LeadingVaultsRequest, "type">;
46
- /** Parameters for the {@linkcode InfoClient.legalCheck} method. */
44
+ /** Request parameters for the {@linkcode InfoClient.legalCheck} method. */
47
45
  export type LegalCheckParameters = Omit<LegalCheckRequest, "type">;
48
- /** Parameters for the {@linkcode InfoClient.marginTable} method. */
46
+ /** Request parameters for the {@linkcode InfoClient.marginTable} method. */
49
47
  export type MarginTableParameters = Omit<MarginTableRequest, "type">;
50
- /** Parameters for the {@linkcode InfoClient.maxBuilderFee} method. */
48
+ /** Request parameters for the {@linkcode InfoClient.maxBuilderFee} method. */
51
49
  export type MaxBuilderFeeParameters = Omit<MaxBuilderFeeRequest, "type">;
52
- /** Parameters for the {@linkcode InfoClient.meta} method. */
50
+ /** Request parameters for the {@linkcode InfoClient.meta} method. */
53
51
  export type MetaParameters = Omit<MetaRequest, "type">;
54
- /** Parameters for the {@linkcode InfoClient.openOrders} method. */
52
+ /** Request parameters for the {@linkcode InfoClient.openOrders} method. */
55
53
  export type OpenOrdersParameters = Omit<OpenOrdersRequest, "type">;
56
- /** Parameters for the {@linkcode InfoClient.orderStatus} method. */
54
+ /** Request parameters for the {@linkcode InfoClient.orderStatus} method. */
57
55
  export type OrderStatusParameters = Omit<OrderStatusRequest, "type">;
58
- /** Parameters for the {@linkcode InfoClient.portfolio} method. */
56
+ /** Request parameters for the {@linkcode InfoClient.portfolio} method. */
59
57
  export type PortfolioParameters = Omit<PortfolioRequest, "type">;
60
- /** Parameters for the {@linkcode InfoClient.preTransferCheck} method. */
58
+ /** Request parameters for the {@linkcode InfoClient.preTransferCheck} method. */
61
59
  export type PreTransferCheckParameters = Omit<PreTransferCheckRequest, "type">;
62
- /** Parameters for the {@linkcode InfoClient.referral} method. */
60
+ /** Request parameters for the {@linkcode InfoClient.referral} method. */
63
61
  export type ReferralParameters = Omit<ReferralRequest, "type">;
64
- /** Parameters for the {@linkcode InfoClient.spotClearinghouseState} method. */
62
+ /** Request parameters for the {@linkcode InfoClient.spotClearinghouseState} method. */
65
63
  export type SpotClearinghouseStateParameters = Omit<SpotClearinghouseStateRequest, "type">;
66
- /** Parameters for the {@linkcode InfoClient.spotDeployState} method. */
64
+ /** Request parameters for the {@linkcode InfoClient.spotDeployState} method. */
67
65
  export type SpotDeployStateParameters = Omit<SpotDeployStateRequest, "type">;
68
- /** Parameters for the {@linkcode InfoClient.subAccounts} method. */
66
+ /** Request parameters for the {@linkcode InfoClient.subAccounts} method. */
69
67
  export type SubAccountsParameters = Omit<SubAccountsRequest, "type">;
70
- /** Parameters for the {@linkcode InfoClient.tokenDetails} method. */
68
+ /** Request parameters for the {@linkcode InfoClient.tokenDetails} method. */
71
69
  export type TokenDetailsParameters = Omit<TokenDetailsRequest, "type">;
72
- /** Parameters for the {@linkcode InfoClient.twapHistory} method. */
70
+ /** Request parameters for the {@linkcode InfoClient.twapHistory} method. */
73
71
  export type TwapHistoryParameters = Omit<TwapHistoryRequest, "type">;
74
- /** Parameters for the {@linkcode InfoClient.txDetails} method. */
72
+ /** Request parameters for the {@linkcode InfoClient.txDetails} method. */
75
73
  export type TxDetailsParameters = Omit<TxDetailsRequest, "type">;
76
- /** Parameters for the {@linkcode InfoClient.userDetails} method. */
74
+ /** Request parameters for the {@linkcode InfoClient.userDetails} method. */
77
75
  export type UserDetailsParameters = Omit<UserDetailsRequest, "type">;
78
- /** Parameters for the {@linkcode InfoClient.userFees} method. */
76
+ /** Request parameters for the {@linkcode InfoClient.userFees} method. */
79
77
  export type UserFeesParameters = Omit<UserFeesRequest, "type">;
80
- /** Parameters for the {@linkcode InfoClient.userFills} method. */
78
+ /** Request parameters for the {@linkcode InfoClient.userFills} method. */
81
79
  export type UserFillsParameters = Omit<UserFillsRequest, "type">;
82
- /** Parameters for the {@linkcode InfoClient.userFillsByTime} method. */
80
+ /** Request parameters for the {@linkcode InfoClient.userFillsByTime} method. */
83
81
  export type UserFillsByTimeParameters = Omit<UserFillsByTimeRequest, "type">;
84
- /** Parameters for the {@linkcode InfoClient.userFunding} method. */
82
+ /** Request parameters for the {@linkcode InfoClient.userFunding} method. */
85
83
  export type UserFundingParameters = Omit<UserFundingRequest, "type">;
86
- /** Parameters for the {@linkcode InfoClient.userNonFundingLedgerUpdates} method. */
84
+ /** Request parameters for the {@linkcode InfoClient.userNonFundingLedgerUpdates} method. */
87
85
  export type UserNonFundingLedgerUpdatesParameters = Omit<UserNonFundingLedgerUpdatesRequest, "type">;
88
- /** Parameters for the {@linkcode InfoClient.userRateLimit} method. */
86
+ /** Request parameters for the {@linkcode InfoClient.userRateLimit} method. */
89
87
  export type UserRateLimitParameters = Omit<UserRateLimitRequest, "type">;
90
- /** Parameters for the {@linkcode InfoClient.userRole} method. */
88
+ /** Request parameters for the {@linkcode InfoClient.userRole} method. */
91
89
  export type UserRoleParameters = Omit<UserRoleRequest, "type">;
92
- /** Parameters for the {@linkcode InfoClient.userToMultiSigSigners} method. */
90
+ /** Request parameters for the {@linkcode InfoClient.userToMultiSigSigners} method. */
93
91
  export type UserToMultiSigSignersParameters = Omit<UserToMultiSigSignersRequest, "type">;
94
- /** Parameters for the {@linkcode InfoClient.userTwapSliceFills} method. */
92
+ /** Request parameters for the {@linkcode InfoClient.userTwapSliceFills} method. */
95
93
  export type UserTwapSliceFillsParameters = Omit<UserTwapSliceFillsRequest, "type">;
96
- /** Parameters for the {@linkcode InfoClient.userTwapSliceFillsByTime} method. */
94
+ /** Request parameters for the {@linkcode InfoClient.userTwapSliceFillsByTime} method. */
97
95
  export type UserTwapSliceFillsByTimeParameters = Omit<UserTwapSliceFillsByTimeRequest, "type">;
98
- /** Parameters for the {@linkcode InfoClient.userVaultEquities} method. */
96
+ /** Request parameters for the {@linkcode InfoClient.userVaultEquities} method. */
99
97
  export type UserVaultEquitiesParameters = Omit<UserVaultEquitiesRequest, "type">;
100
- /** Parameters for the {@linkcode InfoClient.vaultDetails} method. */
98
+ /** Request parameters for the {@linkcode InfoClient.vaultDetails} method. */
101
99
  export type VaultDetailsParameters = Omit<VaultDetailsRequest, "type">;
102
100
  /**
103
101
  * Info client for interacting with the Hyperliquid API.
@@ -118,10 +116,30 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
118
116
  * ```
119
117
  */
120
118
  constructor(args: InfoClientParameters<T>);
119
+ /**
120
+ * Request user active asset data.
121
+ * @param params - An optional request-specific parameters.
122
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
123
+ * @returns User active asset data.
124
+ *
125
+ * @throws {TransportError} When the transport layer throws an error.
126
+ *
127
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-active-asset-data
128
+ * @example
129
+ * ```ts
130
+ * import * as hl from "@nktkas/hyperliquid";
131
+ *
132
+ * const transport = new hl.HttpTransport(); // or WebSocketTransport
133
+ * const infoClient = new hl.InfoClient({ transport });
134
+ *
135
+ * const data = await infoClient.activeAssetData({ user: "0x...", coin: "BTC" });
136
+ * ```
137
+ */
138
+ activeAssetData(params: DeepImmutable<ActiveAssetDataParameters>, signal?: AbortSignal): Promise<ActiveAssetData>;
121
139
  /**
122
140
  * Request mid coin prices.
123
- * @param args - An optional parameters for the request.
124
- * @param signal - An optional abort signal.
141
+ * @param params - An optional request-specific parameters.
142
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
125
143
  * @returns Mapping of coin symbols to mid prices.
126
144
  *
127
145
  * @throws {TransportError} When the transport layer throws an error.
@@ -137,12 +155,12 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
137
155
  * const data = await infoClient.allMids();
138
156
  * ```
139
157
  */
140
- allMids(args?: AllMidsParameters, signal?: AbortSignal): Promise<AllMids>;
158
+ allMids(params?: DeepImmutable<AllMidsParameters>, signal?: AbortSignal): Promise<AllMids>;
141
159
  allMids(signal?: AbortSignal): Promise<AllMids>;
142
160
  /**
143
161
  * Block details by block height.
144
- * @param args - The parameters for the request.
145
- * @param signal - An optional abort signal.
162
+ * @param params - Request-specific parameters.
163
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
146
164
  * @returns Block details.
147
165
  *
148
166
  * @throws {TransportError} When the transport layer throws an error.
@@ -152,17 +170,19 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
152
170
  * ```ts
153
171
  * import * as hl from "@nktkas/hyperliquid";
154
172
  *
155
- * const transport = new hl.HttpTransport(); // or WebSocketTransport
173
+ * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this method
156
174
  * const infoClient = new hl.InfoClient({ transport });
157
175
  *
158
176
  * const data = await infoClient.blockDetails({ height: 123 });
159
177
  * ```
160
178
  */
161
- blockDetails(args: BlockDetailsParameters, signal?: AbortSignal): Promise<BlockDetails>;
179
+ blockDetails(this: T extends {
180
+ request(endpoint: "explorer", ...args: unknown[]): unknown;
181
+ } ? this : never, params: DeepImmutable<BlockDetailsParameters>, signal?: AbortSignal): Promise<BlockDetails>;
162
182
  /**
163
183
  * Request candlestick snapshots.
164
- * @param args - The parameters for the request.
165
- * @param signal - An optional abort signal.
184
+ * @param params - Request-specific parameters.
185
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
166
186
  * @returns Array of candlestick data points.
167
187
  *
168
188
  * @throws {TransportError} When the transport layer throws an error.
@@ -182,11 +202,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
182
202
  * });
183
203
  * ```
184
204
  */
185
- candleSnapshot(args: CandleSnapshotParameters, signal?: AbortSignal): Promise<Candle[]>;
205
+ candleSnapshot(params: DeepImmutable<CandleSnapshotParameters>, signal?: AbortSignal): Promise<Candle[]>;
186
206
  /**
187
207
  * Request clearinghouse state.
188
- * @param args - The parameters for the request.
189
- * @param signal - An optional abort signal.
208
+ * @param params - Request-specific parameters.
209
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
190
210
  * @returns Account summary for perpetual trading.
191
211
  *
192
212
  * @throws {TransportError} When the transport layer throws an error.
@@ -202,11 +222,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
202
222
  * const data = await infoClient.clearinghouseState({ user: "0x..." });
203
223
  * ```
204
224
  */
205
- clearinghouseState(args: ClearinghouseStateParameters, signal?: AbortSignal): Promise<PerpsClearinghouseState>;
225
+ clearinghouseState(params: DeepImmutable<ClearinghouseStateParameters>, signal?: AbortSignal): Promise<PerpsClearinghouseState>;
206
226
  /**
207
227
  * Request user staking delegations.
208
- * @param args - The parameters for the request.
209
- * @param signal - An optional abort signal.
228
+ * @param params - Request-specific parameters.
229
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
210
230
  * @returns Array of user's delegations to validators.
211
231
  *
212
232
  * @throws {TransportError} When the transport layer throws an error.
@@ -222,11 +242,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
222
242
  * const data = await infoClient.delegations({ user: "0x..." });
223
243
  * ```
224
244
  */
225
- delegations(args: DelegationsParameters, signal?: AbortSignal): Promise<Delegation[]>;
245
+ delegations(params: DeepImmutable<DelegationsParameters>, signal?: AbortSignal): Promise<Delegation[]>;
226
246
  /**
227
247
  * Request user staking history.
228
- * @param args - The parameters for the request.
229
- * @param signal - An optional abort signal.
248
+ * @param params - Request-specific parameters.
249
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
230
250
  * @returns Array of user's staking updates.
231
251
  *
232
252
  * @throws {TransportError} When the transport layer throws an error.
@@ -242,11 +262,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
242
262
  * const data = await infoClient.delegatorHistory({ user: "0x..." });
243
263
  * ```
244
264
  */
245
- delegatorHistory(args: DelegatorHistoryParameters, signal?: AbortSignal): Promise<DelegatorUpdate[]>;
265
+ delegatorHistory(params: DeepImmutable<DelegatorHistoryParameters>, signal?: AbortSignal): Promise<DelegatorUpdate[]>;
246
266
  /**
247
267
  * Request user staking rewards.
248
- * @param args - The parameters for the request.
249
- * @param signal - An optional abort signal.
268
+ * @param params - Request-specific parameters.
269
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
250
270
  * @returns Array of user's staking rewards.
251
271
  *
252
272
  * @throws {TransportError} When the transport layer throws an error.
@@ -262,11 +282,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
262
282
  * const data = await infoClient.delegatorRewards({ user: "0x..." });
263
283
  * ```
264
284
  */
265
- delegatorRewards(args: DelegatorRewardsParameters, signal?: AbortSignal): Promise<DelegatorReward[]>;
285
+ delegatorRewards(params: DeepImmutable<DelegatorRewardsParameters>, signal?: AbortSignal): Promise<DelegatorReward[]>;
266
286
  /**
267
287
  * Request user staking summary.
268
- * @param args - The parameters for the request.
269
- * @param signal - An optional abort signal.
288
+ * @param params - Request-specific parameters.
289
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
270
290
  * @returns Summary of a user's staking delegations.
271
291
  *
272
292
  * @throws {TransportError} When the transport layer throws an error.
@@ -282,15 +302,15 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
282
302
  * const data = await infoClient.delegatorSummary({ user: "0x..." });
283
303
  * ```
284
304
  */
285
- delegatorSummary(args: DelegatorSummaryParameters, signal?: AbortSignal): Promise<DelegatorSummary>;
305
+ delegatorSummary(params: DeepImmutable<DelegatorSummaryParameters>, signal?: AbortSignal): Promise<DelegatorSummary>;
286
306
  /**
287
307
  * Request exchange status information.
288
- * @param signal - An optional abort signal.
308
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
289
309
  * @returns Exchange system status information.
290
310
  *
291
311
  * @throws {TransportError} When the transport layer throws an error.
292
312
  *
293
- * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-summary
313
+ * @see null
294
314
  * @example
295
315
  * ```ts
296
316
  * import * as hl from "@nktkas/hyperliquid";
@@ -304,8 +324,8 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
304
324
  exchangeStatus(signal?: AbortSignal): Promise<ExchangeStatus>;
305
325
  /**
306
326
  * Request user's extra agents.
307
- * @param args - The parameters for the request.
308
- * @param signal - An optional abort signal.
327
+ * @param params - Request-specific parameters.
328
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
309
329
  * @returns User's extra agents.
310
330
  *
311
331
  * @throws {TransportError} When the transport layer throws an error.
@@ -321,11 +341,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
321
341
  * const data = await infoClient.extraAgents({ user: "0x..." });
322
342
  * ```
323
343
  */
324
- extraAgents(args: ExtraAgentsParameters, signal?: AbortSignal): Promise<ExtraAgent[]>;
344
+ extraAgents(params: DeepImmutable<ExtraAgentsParameters>, signal?: AbortSignal): Promise<ExtraAgent[]>;
325
345
  /**
326
346
  * Request frontend open orders.
327
- * @param args - The parameters for the request.
328
- * @param signal - An optional abort signal.
347
+ * @param params - Request-specific parameters.
348
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
329
349
  * @returns Array of open orders with additional frontend information.
330
350
  *
331
351
  * @throws {TransportError} When the transport layer throws an error.
@@ -341,11 +361,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
341
361
  * const data = await infoClient.frontendOpenOrders({ user: "0x..." });
342
362
  * ```
343
363
  */
344
- frontendOpenOrders(args: FrontendOpenOrdersParameters, signal?: AbortSignal): Promise<FrontendOrder[]>;
364
+ frontendOpenOrders(params: DeepImmutable<FrontendOpenOrdersParameters>, signal?: AbortSignal): Promise<FrontendOrder[]>;
345
365
  /**
346
366
  * Request funding history.
347
- * @param args - The parameters for the request.
348
- * @param signal - An optional abort signal.
367
+ * @param params - Request-specific parameters.
368
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
349
369
  * @returns Array of historical funding rate data for an asset.
350
370
  *
351
371
  * @throws {TransportError} When the transport layer throws an error.
@@ -364,11 +384,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
364
384
  * });
365
385
  * ```
366
386
  */
367
- fundingHistory(args: FundingHistoryParameters, signal?: AbortSignal): Promise<FundingHistory[]>;
387
+ fundingHistory(params: DeepImmutable<FundingHistoryParameters>, signal?: AbortSignal): Promise<FundingHistory[]>;
368
388
  /**
369
389
  * Request user's historical orders.
370
- * @param args - The parameters for the request.
371
- * @param signal - An optional abort signal.
390
+ * @param params - Request-specific parameters.
391
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
372
392
  * @returns Array of user's historical orders.
373
393
  *
374
394
  * @throws {TransportError} When the transport layer throws an error.
@@ -384,11 +404,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
384
404
  * const data = await infoClient.historicalOrders({ user: "0x..." });
385
405
  * ```
386
406
  */
387
- historicalOrders(args: HistoricalOrdersParameters, signal?: AbortSignal): Promise<OrderStatus<FrontendOrder>[]>;
407
+ historicalOrders(params: DeepImmutable<HistoricalOrdersParameters>, signal?: AbortSignal): Promise<OrderStatus<FrontendOrder>[]>;
388
408
  /**
389
409
  * Request to check if a user is a VIP.
390
- * @param args - The parameters for the request.
391
- * @param signal - An optional abort signal.
410
+ * @param params - Request-specific parameters.
411
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
392
412
  * @returns Boolean indicating user's VIP status.
393
413
  *
394
414
  * @throws {TransportError} When the transport layer throws an error.
@@ -404,11 +424,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
404
424
  * const data = await infoClient.isVip({ user: "0x..." });
405
425
  * ```
406
426
  */
407
- isVip(args: IsVipParameters, signal?: AbortSignal): Promise<boolean>;
427
+ isVip(params: DeepImmutable<IsVipParameters>, signal?: AbortSignal): Promise<boolean | null>;
408
428
  /**
409
429
  * Request L2 order book.
410
- * @param args - The parameters for the request.
411
- * @param signal - An optional abort signal.
430
+ * @param params - Request-specific parameters.
431
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
412
432
  * @returns L2 order book snapshot.
413
433
  *
414
434
  * @throws {TransportError} When the transport layer throws an error.
@@ -424,11 +444,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
424
444
  * const data = await infoClient.l2Book({ coin: "ETH", nSigFigs: 2 });
425
445
  * ```
426
446
  */
427
- l2Book(args: L2BookParameters, signal?: AbortSignal): Promise<Book>;
447
+ l2Book(params: DeepImmutable<L2BookParameters>, signal?: AbortSignal): Promise<Book>;
428
448
  /**
429
449
  * Request leading vaults for a user.
430
- * @param args - The parameters for the request.
431
- * @param signal - An optional abort signal.
450
+ * @param params - Request-specific parameters.
451
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
432
452
  * @returns
433
453
  *
434
454
  * @throws {TransportError} When the transport layer throws an error.
@@ -444,11 +464,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
444
464
  * const data = await infoClient.leadingVaults({ user: "0x..." });
445
465
  * ```
446
466
  */
447
- leadingVaults(args: LeadingVaultsParameters, signal?: AbortSignal): Promise<VaultLeading[]>;
467
+ leadingVaults(params: DeepImmutable<LeadingVaultsParameters>, signal?: AbortSignal): Promise<VaultLeading[]>;
448
468
  /**
449
469
  * Request legal verification status of a user.
450
- * @param args - The parameters for the request.
451
- * @param signal - An optional abort signal.
470
+ * @param params - Request-specific parameters.
471
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
452
472
  * @returns Legal verification status for a user.
453
473
  *
454
474
  * @throws {TransportError} When the transport layer throws an error.
@@ -464,15 +484,15 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
464
484
  * const data = await infoClient.legalCheck({ user: "0x..." });
465
485
  * ```
466
486
  */
467
- legalCheck(args: LegalCheckParameters, signal?: AbortSignal): Promise<LegalCheck>;
487
+ legalCheck(params: DeepImmutable<LegalCheckParameters>, signal?: AbortSignal): Promise<LegalCheck>;
468
488
  /**
469
- * Request liquidatable (unknown).
470
- * @param signal - An optional abort signal.
489
+ * Request liquidatable.
490
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
471
491
  * @returns
472
492
  *
473
493
  * @throws {TransportError} When the transport layer throws an error.
474
494
  *
475
- * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-summary
495
+ * @see null
476
496
  * @example
477
497
  * ```ts
478
498
  * import * as hl from "@nktkas/hyperliquid";
@@ -486,13 +506,13 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
486
506
  liquidatable(signal?: AbortSignal): Promise<unknown[]>;
487
507
  /**
488
508
  * Request margin table data.
489
- * @param args - The parameters for the request.
490
- * @param signal - An optional abort signal.
509
+ * @param params - Request-specific parameters.
510
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
491
511
  * @returns Margin requirements table with multiple tiers.
492
512
  *
493
513
  * @throws {TransportError} When the transport layer throws an error.
494
514
  *
495
- * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-summary
515
+ * @see null
496
516
  * @example
497
517
  * ```ts
498
518
  * import * as hl from "@nktkas/hyperliquid";
@@ -503,11 +523,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
503
523
  * const data = await infoClient.marginTable({ id: 1 });
504
524
  * ```
505
525
  */
506
- marginTable(args: MarginTableParameters, signal?: AbortSignal): Promise<MarginTable>;
526
+ marginTable(params: DeepImmutable<MarginTableParameters>, signal?: AbortSignal): Promise<MarginTable>;
507
527
  /**
508
528
  * Request builder fee approval.
509
- * @param args - The parameters for the request.
510
- * @param signal - An optional abort signal.
529
+ * @param params - Request-specific parameters.
530
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
511
531
  * @returns Maximum builder fee approval.
512
532
  *
513
533
  * @throws {TransportError} When the transport layer throws an error.
@@ -523,15 +543,15 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
523
543
  * const data = await infoClient.maxBuilderFee({ user: "0x...", builder: "0x..." });
524
544
  * ```
525
545
  */
526
- maxBuilderFee(args: MaxBuilderFeeParameters, signal?: AbortSignal): Promise<number>;
546
+ maxBuilderFee(params: DeepImmutable<MaxBuilderFeeParameters>, signal?: AbortSignal): Promise<number>;
527
547
  /**
528
548
  * Request maximum market order notionals.
529
- * @param signal - An optional abort signal.
549
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
530
550
  * @returns
531
551
  *
532
552
  * @throws {TransportError} When the transport layer throws an error.
533
553
  *
534
- * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-summary
554
+ * @see null
535
555
  * @example
536
556
  * ```ts
537
557
  * import * as hl from "@nktkas/hyperliquid";
@@ -545,8 +565,8 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
545
565
  maxMarketOrderNtls(signal?: AbortSignal): Promise<[number, string][]>;
546
566
  /**
547
567
  * Request trading metadata.
548
- * @param args - An optional parameters for the request.
549
- * @param signal - An optional abort signal.
568
+ * @param params - An optional request-specific parameters.
569
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
550
570
  * @returns Metadata for perpetual assets.
551
571
  *
552
572
  * @throws {TransportError} When the transport layer throws an error.
@@ -562,11 +582,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
562
582
  * const data = await infoClient.meta();
563
583
  * ```
564
584
  */
565
- meta(args?: MetaParameters, signal?: AbortSignal): Promise<PerpsMeta>;
585
+ meta(params?: DeepImmutable<MetaParameters>, signal?: AbortSignal): Promise<PerpsMeta>;
566
586
  meta(signal?: AbortSignal): Promise<PerpsMeta>;
567
587
  /**
568
588
  * Request metadata and asset contexts.
569
- * @param signal - An optional abort signal.
589
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
570
590
  * @returns Metadata and context for perpetual assets.
571
591
  *
572
592
  * @throws {TransportError} When the transport layer throws an error.
@@ -585,8 +605,8 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
585
605
  metaAndAssetCtxs(signal?: AbortSignal): Promise<PerpsMetaAndAssetCtxs>;
586
606
  /**
587
607
  * Request open orders.
588
- * @param args - The parameters for the request.
589
- * @param signal - An optional abort signal.
608
+ * @param params - Request-specific parameters.
609
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
590
610
  * @returns Array of open order.
591
611
  *
592
612
  * @throws {TransportError} When the transport layer throws an error.
@@ -602,11 +622,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
602
622
  * const data = await infoClient.openOrders({ user: "0x..." });
603
623
  * ```
604
624
  */
605
- openOrders(args: OpenOrdersParameters, signal?: AbortSignal): Promise<Order[]>;
625
+ openOrders(params: DeepImmutable<OpenOrdersParameters>, signal?: AbortSignal): Promise<Order[]>;
606
626
  /**
607
627
  * Request order status.
608
- * @param args - The parameters for the request.
609
- * @param signal - An optional abort signal.
628
+ * @param params - Request-specific parameters.
629
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
610
630
  * @returns Result of an order status lookup.
611
631
  *
612
632
  * @throws {TransportError} When the transport layer throws an error.
@@ -622,10 +642,10 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
622
642
  * const data = await infoClient.orderStatus({ user: "0x...", oid: 12345 });
623
643
  * ```
624
644
  */
625
- orderStatus(args: OrderStatusParameters, signal?: AbortSignal): Promise<OrderLookup>;
645
+ orderStatus(params: DeepImmutable<OrderStatusParameters>, signal?: AbortSignal): Promise<OrderLookup>;
626
646
  /**
627
647
  * Request for the status of the perpetual deploy auction.
628
- * @param signal - An optional abort signal.
648
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
629
649
  * @returns Status of the perpetual deploy auction.
630
650
  *
631
651
  * @throws {TransportError} When the transport layer throws an error.
@@ -644,7 +664,7 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
644
664
  perpDeployAuctionStatus(signal?: AbortSignal): Promise<DeployAuctionStatus>;
645
665
  /**
646
666
  * Request all perpetual dexs.
647
- * @param signal - An optional abort signal.
667
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
648
668
  * @returns Array of perpetual dexes (null is main dex).
649
669
  *
650
670
  * @throws {TransportError} When the transport layer throws an error.
@@ -663,7 +683,7 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
663
683
  perpDexs(signal?: AbortSignal): Promise<(PerpDex | null)[]>;
664
684
  /**
665
685
  * Request perpetuals at open interest cap.
666
- * @param signal - An optional abort signal.
686
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
667
687
  * @returns Array of perpetuals at open interest caps.
668
688
  *
669
689
  * @throws {TransportError} When the transport layer throws an error.
@@ -682,8 +702,8 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
682
702
  perpsAtOpenInterestCap(signal?: AbortSignal): Promise<string[]>;
683
703
  /**
684
704
  * Request user portfolio.
685
- * @param args - The parameters for the request.
686
- * @param signal - An optional abort signal.
705
+ * @param params - Request-specific parameters.
706
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
687
707
  * @returns Portfolio metrics grouped by time periods.
688
708
  *
689
709
  * @throws {TransportError} When the transport layer throws an error.
@@ -699,10 +719,10 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
699
719
  * const data = await infoClient.portfolio({ user: "0x..." });
700
720
  * ```
701
721
  */
702
- portfolio(args: PortfolioParameters, signal?: AbortSignal): Promise<PortfolioPeriods>;
722
+ portfolio(params: DeepImmutable<PortfolioParameters>, signal?: AbortSignal): Promise<PortfolioPeriods>;
703
723
  /**
704
724
  * Request predicted funding rates.
705
- * @param signal - An optional abort signal.
725
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
706
726
  * @returns Array of predicted funding rates.
707
727
  *
708
728
  * @throws {TransportError} When the transport layer throws an error.
@@ -721,8 +741,8 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
721
741
  predictedFundings(signal?: AbortSignal): Promise<PredictedFunding[]>;
722
742
  /**
723
743
  * Request user's existence check before transfer.
724
- * @param args - The parameters for the request.
725
- * @param signal - An optional abort signal.
744
+ * @param params - Request-specific parameters.
745
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
726
746
  * @returns Pre-transfer user existence check result.
727
747
  *
728
748
  * @throws {TransportError} When the transport layer throws an error.
@@ -738,11 +758,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
738
758
  * const data = await infoClient.preTransferCheck({ user: "0x...", source: "0x..." });
739
759
  * ```
740
760
  */
741
- preTransferCheck(args: PreTransferCheckParameters, signal?: AbortSignal): Promise<PreTransferCheck>;
761
+ preTransferCheck(params: DeepImmutable<PreTransferCheckParameters>, signal?: AbortSignal): Promise<PreTransferCheck>;
742
762
  /**
743
763
  * Request user referral.
744
- * @param args - The parameters for the request.
745
- * @param signal - An optional abort signal.
764
+ * @param params - Request-specific parameters.
765
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
746
766
  * @returns Referral information for a user.
747
767
  *
748
768
  * @throws {TransportError} When the transport layer throws an error.
@@ -758,11 +778,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
758
778
  * const data = await infoClient.referral({ user: "0x..." });
759
779
  * ```
760
780
  */
761
- referral(args: ReferralParameters, signal?: AbortSignal): Promise<Referral>;
781
+ referral(params: DeepImmutable<ReferralParameters>, signal?: AbortSignal): Promise<Referral>;
762
782
  /**
763
783
  * Request spot clearinghouse state.
764
- * @param args - The parameters for the request.
765
- * @param signal - An optional abort signal.
784
+ * @param params - Request-specific parameters.
785
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
766
786
  * @returns Account summary for spot trading.
767
787
  *
768
788
  * @throws {TransportError} When the transport layer throws an error.
@@ -778,11 +798,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
778
798
  * const data = await infoClient.spotClearinghouseState({ user: "0x..." });
779
799
  * ```
780
800
  */
781
- spotClearinghouseState(args: SpotClearinghouseStateParameters, signal?: AbortSignal): Promise<SpotClearinghouseState>;
801
+ spotClearinghouseState(params: DeepImmutable<SpotClearinghouseStateParameters>, signal?: AbortSignal): Promise<SpotClearinghouseState>;
782
802
  /**
783
803
  * Request spot deploy state.
784
- * @param args - The parameters for the request.
785
- * @param signal - An optional abort signal.
804
+ * @param params - Request-specific parameters.
805
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
786
806
  * @returns Deploy state for spot tokens.
787
807
  *
788
808
  * @throws {TransportError} When the transport layer throws an error.
@@ -798,10 +818,10 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
798
818
  * const data = await infoClient.spotDeployState({ user: "0x..." });
799
819
  * ```
800
820
  */
801
- spotDeployState(args: SpotDeployStateParameters, signal?: AbortSignal): Promise<SpotDeployState>;
821
+ spotDeployState(params: DeepImmutable<SpotDeployStateParameters>, signal?: AbortSignal): Promise<SpotDeployState>;
802
822
  /**
803
823
  * Request spot trading metadata.
804
- * @param signal - An optional abort signal.
824
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
805
825
  * @returns Metadata for spot assets.
806
826
  *
807
827
  * @throws {TransportError} When the transport layer throws an error.
@@ -820,7 +840,7 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
820
840
  spotMeta(signal?: AbortSignal): Promise<SpotMeta>;
821
841
  /**
822
842
  * Request spot metadata and asset contexts.
823
- * @param signal - An optional abort signal.
843
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
824
844
  * @returns Metadata and context for spot assets.
825
845
  *
826
846
  * @throws {TransportError} When the transport layer throws an error.
@@ -839,8 +859,8 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
839
859
  spotMetaAndAssetCtxs(signal?: AbortSignal): Promise<SpotMetaAndAssetCtxs>;
840
860
  /**
841
861
  * Request user sub-accounts.
842
- * @param args - The parameters for the request.
843
- * @param signal - An optional abort signal.
862
+ * @param params - Request-specific parameters.
863
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
844
864
  * @returns Array of user sub-account or null if the user does not have any sub-accounts.
845
865
  *
846
866
  * @throws {TransportError} When the transport layer throws an error.
@@ -856,11 +876,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
856
876
  * const data = await infoClient.subAccounts({ user: "0x..." });
857
877
  * ```
858
878
  */
859
- subAccounts(args: SubAccountsParameters, signal?: AbortSignal): Promise<SubAccount[] | null>;
879
+ subAccounts(params: DeepImmutable<SubAccountsParameters>, signal?: AbortSignal): Promise<SubAccount[] | null>;
860
880
  /**
861
881
  * Request token details.
862
- * @param args - The parameters for the request.
863
- * @param signal - An optional abort signal.
882
+ * @param params - Request-specific parameters.
883
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
864
884
  * @returns Details of a token.
865
885
  *
866
886
  * @throws {TransportError} When the transport layer throws an error.
@@ -876,11 +896,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
876
896
  * const data = await infoClient.tokenDetails({ tokenId: "0x..." });
877
897
  * ```
878
898
  */
879
- tokenDetails(args: TokenDetailsParameters, signal?: AbortSignal): Promise<TokenDetails>;
899
+ tokenDetails(params: DeepImmutable<TokenDetailsParameters>, signal?: AbortSignal): Promise<TokenDetails>;
880
900
  /**
881
901
  * Request twap history of a user.
882
- * @param args - The parameters for the request.
883
- * @param signal - An optional abort signal.
902
+ * @param params - Request-specific parameters.
903
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
884
904
  * @returns Array of user's TWAP history.
885
905
  *
886
906
  * @throws {TransportError} When the transport layer throws an error.
@@ -896,11 +916,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
896
916
  * const data = await infoClient.twapHistory({ user: "0x..." });
897
917
  * ```
898
918
  */
899
- twapHistory(args: TwapHistoryParameters, signal?: AbortSignal): Promise<TwapHistory[]>;
919
+ twapHistory(params: DeepImmutable<TwapHistoryParameters>, signal?: AbortSignal): Promise<TwapHistory[]>;
900
920
  /**
901
921
  * Request transaction details by transaction hash.
902
- * @param args - The parameters for the request.
903
- * @param signal - An optional abort signal.
922
+ * @param params - Request-specific parameters.
923
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
904
924
  * @returns Transaction details.
905
925
  *
906
926
  * @throws {TransportError} When the transport layer throws an error.
@@ -910,17 +930,19 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
910
930
  * ```ts
911
931
  * import * as hl from "@nktkas/hyperliquid";
912
932
  *
913
- * const transport = new hl.HttpTransport(); // or WebSocketTransport
933
+ * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this method
914
934
  * const infoClient = new hl.InfoClient({ transport });
915
935
  *
916
936
  * const data = await infoClient.txDetails({ hash: "0x..." });
917
937
  * ```
918
938
  */
919
- txDetails(args: TxDetailsParameters, signal?: AbortSignal): Promise<TxDetails>;
939
+ txDetails(this: T extends {
940
+ request(endpoint: "explorer", ...args: unknown[]): unknown;
941
+ } ? this : never, params: DeepImmutable<TxDetailsParameters>, signal?: AbortSignal): Promise<TxDetails>;
920
942
  /**
921
943
  * Request user details by user's address.
922
- * @param args - The parameters for the request.
923
- * @param signal - An optional abort signal.
944
+ * @param params - Request-specific parameters.
945
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
924
946
  * @returns User details.
925
947
  *
926
948
  * @throws {TransportError} When the transport layer throws an error.
@@ -930,17 +952,19 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
930
952
  * ```ts
931
953
  * import * as hl from "@nktkas/hyperliquid";
932
954
  *
933
- * const transport = new hl.HttpTransport(); // or WebSocketTransport
955
+ * const transport = new hl.HttpTransport(); // only `HttpTransport` supports this method
934
956
  * const infoClient = new hl.InfoClient({ transport });
935
957
  *
936
958
  * const data = await infoClient.userDetails({ user: "0x..." });
937
959
  * ```
938
960
  */
939
- userDetails(args: UserDetailsParameters, signal?: AbortSignal): Promise<TxDetails[]>;
961
+ userDetails(this: T extends {
962
+ request(endpoint: "explorer", ...args: unknown[]): unknown;
963
+ } ? this : never, params: DeepImmutable<UserDetailsParameters>, signal?: AbortSignal): Promise<TxDetails[]>;
940
964
  /**
941
965
  * Request user fees.
942
- * @param args - The parameters for the request.
943
- * @param signal - An optional abort signal.
966
+ * @param params - Request-specific parameters.
967
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
944
968
  * @returns User fees.
945
969
  *
946
970
  * @throws {TransportError} When the transport layer throws an error.
@@ -956,11 +980,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
956
980
  * const data = await infoClient.userFees({ user: "0x..." });
957
981
  * ```
958
982
  */
959
- userFees(args: UserFeesParameters, signal?: AbortSignal): Promise<UserFees>;
983
+ userFees(params: DeepImmutable<UserFeesParameters>, signal?: AbortSignal): Promise<UserFees>;
960
984
  /**
961
985
  * Request user fills.
962
- * @param args - The parameters for the request.
963
- * @param signal - An optional abort signal.
986
+ * @param params - Request-specific parameters.
987
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
964
988
  * @returns Array of user's trade fill.
965
989
  *
966
990
  * @throws {TransportError} When the transport layer throws an error.
@@ -976,11 +1000,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
976
1000
  * const data = await infoClient.userFills({ user: "0x..." });
977
1001
  * ```
978
1002
  */
979
- userFills(args: UserFillsParameters, signal?: AbortSignal): Promise<Fill[]>;
1003
+ userFills(params: DeepImmutable<UserFillsParameters>, signal?: AbortSignal): Promise<Fill[]>;
980
1004
  /**
981
1005
  * Request user fills by time.
982
- * @param args - The parameters for the request.
983
- * @param signal - An optional abort signal.
1006
+ * @param params - Request-specific parameters.
1007
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
984
1008
  * @returns Array of user's trade fill.
985
1009
  *
986
1010
  * @throws {TransportError} When the transport layer throws an error.
@@ -999,11 +1023,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
999
1023
  * });
1000
1024
  * ```
1001
1025
  */
1002
- userFillsByTime(args: UserFillsByTimeParameters, signal?: AbortSignal): Promise<Fill[]>;
1026
+ userFillsByTime(params: DeepImmutable<UserFillsByTimeParameters>, signal?: AbortSignal): Promise<Fill[]>;
1003
1027
  /**
1004
1028
  * Request user funding.
1005
- * @param args - The parameters for the request.
1006
- * @param signal - An optional abort signal.
1029
+ * @param params - Request-specific parameters.
1030
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1007
1031
  * @returns Array of user's funding ledger update.
1008
1032
  *
1009
1033
  * @throws {TransportError} When the transport layer throws an error.
@@ -1022,11 +1046,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1022
1046
  * });
1023
1047
  * ```
1024
1048
  */
1025
- userFunding(args: UserFundingParameters, signal?: AbortSignal): Promise<UserFundingUpdate[]>;
1049
+ userFunding(params: DeepImmutable<UserFundingParameters>, signal?: AbortSignal): Promise<UserFundingUpdate[]>;
1026
1050
  /**
1027
1051
  * Request user non-funding ledger updates.
1028
- * @param args - The parameters for the request.
1029
- * @param signal - An optional abort signal.
1052
+ * @param params - Request-specific parameters.
1053
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1030
1054
  * @returns Array of user's non-funding ledger update.
1031
1055
  *
1032
1056
  * @throws {TransportError} When the transport layer throws an error.
@@ -1045,11 +1069,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1045
1069
  * });
1046
1070
  * ```
1047
1071
  */
1048
- userNonFundingLedgerUpdates(args: UserNonFundingLedgerUpdatesParameters, signal?: AbortSignal): Promise<UserNonFundingLedgerUpdate[]>;
1072
+ userNonFundingLedgerUpdates(params: DeepImmutable<UserNonFundingLedgerUpdatesParameters>, signal?: AbortSignal): Promise<UserNonFundingLedgerUpdate[]>;
1049
1073
  /**
1050
1074
  * Request user rate limits.
1051
- * @param args - The parameters for the request.
1052
- * @param signal - An optional abort signal.
1075
+ * @param params - Request-specific parameters.
1076
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1053
1077
  * @returns User's rate limits.
1054
1078
  *
1055
1079
  * @throws {TransportError} When the transport layer throws an error.
@@ -1065,11 +1089,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1065
1089
  * const data = await infoClient.userRateLimit({ user: "0x..." });
1066
1090
  * ```
1067
1091
  */
1068
- userRateLimit(args: UserRateLimitParameters, signal?: AbortSignal): Promise<UserRateLimit>;
1092
+ userRateLimit(params: DeepImmutable<UserRateLimitParameters>, signal?: AbortSignal): Promise<UserRateLimit>;
1069
1093
  /**
1070
1094
  * Request user role.
1071
- * @param args - The parameters for the request.
1072
- * @param signal - An optional abort signal.
1095
+ * @param params - Request-specific parameters.
1096
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1073
1097
  * @returns User's role.
1074
1098
  *
1075
1099
  * @throws {TransportError} When the transport layer throws an error.
@@ -1085,11 +1109,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1085
1109
  * const data = await infoClient.userRole({ user: "0x..." });
1086
1110
  * ```
1087
1111
  */
1088
- userRole(args: UserRoleParameters, signal?: AbortSignal): Promise<UserRole>;
1112
+ userRole(params: DeepImmutable<UserRoleParameters>, signal?: AbortSignal): Promise<UserRole>;
1089
1113
  /**
1090
1114
  * Request multi-sig signers for a user.
1091
- * @param args - The parameters for the request.
1092
- * @param signal - An optional abort signal.
1115
+ * @param params - Request-specific parameters.
1116
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1093
1117
  * @returns Multi-sig signers for a user or null if the user does not have any multi-sig signers.
1094
1118
  *
1095
1119
  * @throws {TransportError} When the transport layer throws an error.
@@ -1105,11 +1129,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1105
1129
  * const data = await infoClient.userToMultiSigSigners({ user: "0x..." });
1106
1130
  * ```
1107
1131
  */
1108
- userToMultiSigSigners(args: UserToMultiSigSignersParameters, signal?: AbortSignal): Promise<MultiSigSigners | null>;
1132
+ userToMultiSigSigners(params: DeepImmutable<UserToMultiSigSignersParameters>, signal?: AbortSignal): Promise<MultiSigSigners | null>;
1109
1133
  /**
1110
1134
  * Request user twap slice fills.
1111
- * @param args - The parameters for the request.
1112
- * @param signal - An optional abort signal.
1135
+ * @param params - Request-specific parameters.
1136
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1113
1137
  * @returns Array of user's twap slice fill.
1114
1138
  *
1115
1139
  * @throws {TransportError} When the transport layer throws an error.
@@ -1125,11 +1149,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1125
1149
  * const data = await infoClient.userTwapSliceFills({ user: "0x..." });
1126
1150
  * ```
1127
1151
  */
1128
- userTwapSliceFills(args: UserTwapSliceFillsParameters, signal?: AbortSignal): Promise<TwapSliceFill[]>;
1152
+ userTwapSliceFills(params: DeepImmutable<UserTwapSliceFillsParameters>, signal?: AbortSignal): Promise<TwapSliceFill[]>;
1129
1153
  /**
1130
1154
  * Request user twap slice fills by time.
1131
- * @param args - The parameters for the request.
1132
- * @param signal - An optional abort signal.
1155
+ * @param params - Request-specific parameters.
1156
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1133
1157
  * @returns Array of user's twap slice fill.
1134
1158
  *
1135
1159
  * @throws {TransportError} When the transport layer throws an error.
@@ -1148,11 +1172,11 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1148
1172
  * });
1149
1173
  * ```
1150
1174
  */
1151
- userTwapSliceFillsByTime(args: UserTwapSliceFillsByTimeParameters, signal?: AbortSignal): Promise<TwapSliceFill[]>;
1175
+ userTwapSliceFillsByTime(params: DeepImmutable<UserTwapSliceFillsByTimeParameters>, signal?: AbortSignal): Promise<TwapSliceFill[]>;
1152
1176
  /**
1153
1177
  * Request user vault deposits.
1154
- * @param args - The parameters for the request.
1155
- * @param signal - An optional abort signal.
1178
+ * @param params - Request-specific parameters.
1179
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1156
1180
  * @returns Array of user's vault deposits.
1157
1181
  *
1158
1182
  * @throws {TransportError} When the transport layer throws an error.
@@ -1168,15 +1192,15 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1168
1192
  * const data = await infoClient.userVaultEquities({ user: "0x..." });
1169
1193
  * ```
1170
1194
  */
1171
- userVaultEquities(args: UserVaultEquitiesParameters, signal?: AbortSignal): Promise<VaultEquity[]>;
1195
+ userVaultEquities(params: DeepImmutable<UserVaultEquitiesParameters>, signal?: AbortSignal): Promise<VaultEquity[]>;
1172
1196
  /**
1173
1197
  * Request validator L1 votes.
1174
- * @param signal - An optional abort signal.
1198
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1175
1199
  * @returns
1176
1200
  *
1177
1201
  * @throws {TransportError} When the transport layer throws an error.
1178
1202
  *
1179
- * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-summary
1203
+ * @see null
1180
1204
  * @example
1181
1205
  * ```ts
1182
1206
  * import * as hl from "@nktkas/hyperliquid";
@@ -1190,7 +1214,7 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1190
1214
  validatorL1Votes(signal?: AbortSignal): Promise<unknown[]>;
1191
1215
  /**
1192
1216
  * Request validator summaries.
1193
- * @param signal - An optional abort signal.
1217
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1194
1218
  * @returns Array of validator summaries.
1195
1219
  *
1196
1220
  * @throws {TransportError} When the transport layer throws an error.
@@ -1209,8 +1233,8 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1209
1233
  validatorSummaries(signal?: AbortSignal): Promise<ValidatorSummary[]>;
1210
1234
  /**
1211
1235
  * Request details of a vault.
1212
- * @param args - The parameters for the request.
1213
- * @param signal - An optional abort signal.
1236
+ * @param params - Request-specific parameters.
1237
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1214
1238
  * @returns Details of a vault or null if the vault does not exist.
1215
1239
  *
1216
1240
  * @throws {TransportError} When the transport layer throws an error.
@@ -1226,10 +1250,10 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1226
1250
  * const data = await infoClient.vaultDetails({ vaultAddress: "0x..." });
1227
1251
  * ```
1228
1252
  */
1229
- vaultDetails(args: VaultDetailsParameters, signal?: AbortSignal): Promise<VaultDetails | null>;
1253
+ vaultDetails(params: DeepImmutable<VaultDetailsParameters>, signal?: AbortSignal): Promise<VaultDetails | null>;
1230
1254
  /**
1231
1255
  * Request a list of vaults less than 2 hours old.
1232
- * @param signal - An optional abort signal.
1256
+ * @param signal - An {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal}. If this option is set, the request can be canceled by calling {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort | abort()} on the corresponding {@linkcode https://developer.mozilla.org/en-US/docs/Web/API/AbortController | AbortController}.
1233
1257
  * @returns Array of vault summaries.
1234
1258
  *
1235
1259
  * @throws {TransportError} When the transport layer throws an error.
@@ -1248,4 +1272,5 @@ export declare class InfoClient<T extends IRequestTransport = IRequestTransport>
1248
1272
  vaultSummaries(signal?: AbortSignal): Promise<VaultSummary[]>;
1249
1273
  [Symbol.asyncDispose](): Promise<void>;
1250
1274
  }
1275
+ export {};
1251
1276
  //# sourceMappingURL=info.d.ts.map