@nktkas/hyperliquid 0.23.1 → 0.24.1

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