@n1xyz/nord-ts 0.0.14 → 0.0.16-29f6652

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 (186) hide show
  1. package/.prettierignore +1 -0
  2. package/README.md +9 -6
  3. package/dist/bridge/client.d.ts +8 -7
  4. package/dist/bridge/client.js +39 -37
  5. package/dist/bridge/index.d.ts +1 -2
  6. package/dist/bridge/index.js +2 -2
  7. package/dist/bridge/types.d.ts +7 -3
  8. package/dist/bridge/types.js +3 -1
  9. package/dist/gen/common.js +1 -1
  10. package/dist/gen/nord.d.ts +74 -25
  11. package/dist/gen/nord.js +498 -78
  12. package/dist/idl/bridge.json +1493 -0
  13. package/dist/idl/index.d.ts +585 -0
  14. package/dist/idl/index.js +8 -0
  15. package/dist/nord/api/core.js +7 -5
  16. package/dist/nord/api/metrics.js +7 -4
  17. package/dist/nord/client/Nord.d.ts +19 -5
  18. package/dist/nord/client/Nord.js +50 -23
  19. package/dist/nord/client/NordUser.d.ts +1 -1
  20. package/dist/nord/client/NordUser.js +19 -16
  21. package/dist/types.d.ts +3 -3
  22. package/dist/websocket/NordWebSocketClient.js +0 -2
  23. package/docs/assets/hierarchy.js +1 -1
  24. package/docs/assets/navigation.js +1 -1
  25. package/docs/assets/search.js +1 -1
  26. package/docs/classes/Nord.html +99 -100
  27. package/docs/classes/NordError.html +6 -6
  28. package/docs/classes/NordUser.html +49 -54
  29. package/docs/classes/NordWebSocketClient.html +6 -11
  30. package/docs/classes/SolanaBridgeClient.html +32 -27
  31. package/docs/classes/Subscriber.html +3 -3
  32. package/docs/enums/FillMode.html +2 -2
  33. package/docs/enums/KeyType.html +2 -2
  34. package/docs/enums/MetricPeriod.html +2 -2
  35. package/docs/enums/PdaSeedType.html +5 -3
  36. package/docs/enums/PeakTpsPeriodUnit.html +2 -2
  37. package/docs/enums/Side.html +2 -2
  38. package/docs/enums/WebSocketMessageType.html +3 -3
  39. package/docs/functions/actionQueryRollman.html +1 -1
  40. package/docs/functions/actionsQueryRollman.html +1 -1
  41. package/docs/functions/aggregateMetrics-1.html +1 -1
  42. package/docs/functions/assert.html +1 -1
  43. package/docs/functions/bigIntToProtoU128.html +1 -1
  44. package/docs/functions/bridgeToBN.html +1 -1
  45. package/docs/functions/bufferToHex.html +1 -1
  46. package/docs/functions/cancelOrder.html +1 -1
  47. package/docs/functions/checkPubKeyLength.html +1 -1
  48. package/docs/functions/checkedFetch.html +1 -1
  49. package/docs/functions/createSession.html +1 -1
  50. package/docs/functions/decodeLengthDelimited.html +1 -1
  51. package/docs/functions/encodeLengthDelimited.html +1 -1
  52. package/docs/functions/fillModeToProtoFillMode.html +1 -1
  53. package/docs/functions/findMarket.html +1 -1
  54. package/docs/functions/findPda.html +1 -1
  55. package/docs/functions/findToken.html +1 -1
  56. package/docs/functions/fromBN.html +1 -1
  57. package/docs/functions/getAccount.html +1 -1
  58. package/docs/functions/getActionNonce.html +1 -1
  59. package/docs/functions/getCurrentTps.html +1 -1
  60. package/docs/functions/getInfo.html +1 -1
  61. package/docs/functions/{queryLastNBlocks.html → getLastActionId.html} +3 -3
  62. package/docs/functions/getMedianLatency.html +1 -1
  63. package/docs/functions/getOrderbook.html +1 -1
  64. package/docs/functions/getPeakTps.html +1 -1
  65. package/docs/functions/getTimestamp.html +1 -1
  66. package/docs/functions/getTotalTransactions.html +1 -1
  67. package/docs/functions/getTrades.html +1 -1
  68. package/docs/functions/getUserAccountIds.html +1 -1
  69. package/docs/functions/hexToBuffer.html +1 -1
  70. package/docs/functions/initWebSocketClient.html +9 -9
  71. package/docs/functions/keypairFromPrivateKey.html +1 -1
  72. package/docs/functions/makeSigningFunction.html +1 -1
  73. package/docs/functions/makeWalletSignFn.html +1 -1
  74. package/docs/functions/marketsStats.html +1 -1
  75. package/docs/functions/optExpect.html +1 -1
  76. package/docs/functions/optMap.html +1 -1
  77. package/docs/functions/optUnwrap.html +1 -1
  78. package/docs/functions/panic.html +1 -1
  79. package/docs/functions/placeOrder.html +1 -1
  80. package/docs/functions/queryAction.html +1 -1
  81. package/docs/functions/queryPrometheus.html +1 -1
  82. package/docs/functions/queryRecentActions.html +4 -3
  83. package/docs/functions/revokeSession.html +1 -1
  84. package/docs/functions/shortenPublicKey.html +1 -1
  85. package/docs/functions/signAction.html +1 -1
  86. package/docs/functions/toBN.html +1 -1
  87. package/docs/functions/toScaledU128.html +1 -1
  88. package/docs/functions/toScaledU64.html +1 -1
  89. package/docs/functions/transfer.html +1 -1
  90. package/docs/functions/withdraw.html +1 -1
  91. package/docs/hierarchy.html +1 -1
  92. package/docs/index.html +2 -2
  93. package/docs/interfaces/Account.html +2 -2
  94. package/docs/interfaces/ActionInfo.html +2 -2
  95. package/docs/interfaces/ActionNonceResponse.html +2 -2
  96. package/docs/interfaces/ActionQuery.html +2 -2
  97. package/docs/interfaces/ActionResponse.html +2 -2
  98. package/docs/interfaces/ActionsExtendedInfo.html +2 -2
  99. package/docs/interfaces/ActionsQuery.html +2 -2
  100. package/docs/interfaces/ActionsResponse.html +2 -2
  101. package/docs/interfaces/AggregateMetrics.html +2 -2
  102. package/docs/interfaces/BlockFacts.html +5 -5
  103. package/docs/interfaces/BlockQuery.html +2 -2
  104. package/docs/interfaces/BlockResponse.html +2 -2
  105. package/docs/interfaces/BlockSummary.html +2 -2
  106. package/docs/interfaces/BlockSummaryResponse.html +2 -2
  107. package/docs/interfaces/DeltaEvent.html +2 -2
  108. package/docs/interfaces/DepositSplParams.html +6 -6
  109. package/docs/interfaces/Info.html +2 -2
  110. package/docs/interfaces/Market.html +2 -2
  111. package/docs/interfaces/MarketStats.html +2 -2
  112. package/docs/interfaces/MarketsStatsResponse.html +2 -2
  113. package/docs/interfaces/NordConfig.html +19 -9
  114. package/docs/interfaces/NordWebSocketClientEvents.html +2 -2
  115. package/docs/interfaces/NordWebSocketEvents.html +3 -3
  116. package/docs/interfaces/Order.html +2 -2
  117. package/docs/interfaces/OrderInfo.html +2 -2
  118. package/docs/interfaces/OrderbookEntry.html +2 -2
  119. package/docs/interfaces/OrderbookQuery.html +2 -2
  120. package/docs/interfaces/OrderbookResponse.html +2 -2
  121. package/docs/interfaces/OrderbookSubscription.html +5 -5
  122. package/docs/interfaces/PerpMarketStats.html +2 -2
  123. package/docs/interfaces/RollmanActionExtendedInfo.html +2 -2
  124. package/docs/interfaces/RollmanActionInfo.html +2 -2
  125. package/docs/interfaces/RollmanActionResponse.html +2 -2
  126. package/docs/interfaces/RollmanActionsResponse.html +2 -2
  127. package/docs/interfaces/RollmanBlockResponse.html +2 -2
  128. package/docs/interfaces/SPLTokenInfo.html +5 -5
  129. package/docs/interfaces/SolanaBridgeConfig.html +8 -6
  130. package/docs/interfaces/StateFacts.html +5 -5
  131. package/docs/interfaces/SubscriberConfig.html +2 -2
  132. package/docs/interfaces/TimestampResponse.html +2 -2
  133. package/docs/interfaces/Token.html +2 -2
  134. package/docs/interfaces/TokenInfo.html +3 -2
  135. package/docs/interfaces/Trade.html +2 -2
  136. package/docs/interfaces/TradeSubscription.html +5 -5
  137. package/docs/interfaces/Trades.html +2 -2
  138. package/docs/interfaces/TradesQuery.html +2 -2
  139. package/docs/interfaces/TradesResponse.html +2 -2
  140. package/docs/interfaces/TransferParams.html +4 -4
  141. package/docs/interfaces/UserAccountIdsQuery.html +2 -2
  142. package/docs/interfaces/UserAccountIdsResponse.html +2 -2
  143. package/docs/interfaces/WebSocketAccountUpdate.html +6 -0
  144. package/docs/interfaces/WebSocketDeltaUpdate.html +3 -3
  145. package/docs/interfaces/WebSocketSubscription.html +3 -3
  146. package/docs/interfaces/WebSocketTradeUpdate.html +3 -3
  147. package/docs/interfaces/WithdrawalClaim.html +7 -7
  148. package/docs/interfaces/WithdrawalParams.html +4 -4
  149. package/docs/modules.html +1 -1
  150. package/docs/types/BigIntValue.html +1 -1
  151. package/docs/types/SubscriptionPattern.html +4 -0
  152. package/docs/types/SubscriptionType.html +2 -0
  153. package/docs/types/WebSocketMessage.html +1 -1
  154. package/docs/variables/DEBUG_KEYS.html +1 -1
  155. package/docs/variables/DEFAULT_FUNDING_AMOUNTS.html +1 -1
  156. package/docs/variables/DEV_TOKEN_INFOS.html +1 -1
  157. package/docs/variables/DEV_URL.html +1 -1
  158. package/docs/variables/MAX_BUFFER_LEN.html +1 -1
  159. package/docs/variables/SESSION_TTL.html +1 -1
  160. package/docs/variables/WEBSERVER_DEV_URL.html +1 -1
  161. package/docs/variables/ZERO_DECIMAL.html +1 -1
  162. package/docs/variables/_private.html +1 -1
  163. package/idl-generate.sh +4 -0
  164. package/package.json +6 -3
  165. package/src/bridge/client.ts +55 -43
  166. package/src/bridge/index.ts +1 -2
  167. package/src/bridge/types.ts +7 -3
  168. package/src/gen/common.ts +1 -1
  169. package/src/gen/nord.ts +567 -75
  170. package/src/idl/bridge.json +1493 -0
  171. package/src/idl/index.ts +2 -0
  172. package/src/nord/api/core.ts +1 -3
  173. package/src/nord/api/metrics.ts +2 -0
  174. package/src/nord/client/Nord.ts +49 -13
  175. package/src/nord/client/NordUser.ts +52 -59
  176. package/src/types.ts +2 -2
  177. package/src/websocket/NordWebSocketClient.ts +0 -2
  178. package/tsconfig.json +1 -1
  179. package/dist/idl/bridge.d.ts +0 -2
  180. package/dist/idl/bridge.js +0 -930
  181. package/docs/functions/blockQueryRollman.html +0 -6
  182. package/docs/functions/blockSummaryQueryRollman.html +0 -6
  183. package/docs/functions/queryBlock.html +0 -6
  184. package/docs/functions/queryRecentBlocks.html +0 -6
  185. package/docs/interfaces/WebSocketUserUpdate.html +0 -6
  186. package/src/idl/bridge.ts +0 -929
@@ -1,14 +1,9 @@
1
1
  <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>NordWebSocketClient | @n1xyz/nord-ts</title><meta name="description" content="Documentation for @n1xyz/nord-ts"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@n1xyz/nord-ts</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@n1xyz/nord-ts</a></li><li><a href="NordWebSocketClient.html">NordWebSocketClient</a></li></ul><h1>Class NordWebSocketClient</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>WebSocket client for Nord exchange</p>
2
2
  <p>This client connects to one of the specific Nord WebSocket endpoints:</p>
3
- <ul>
4
- <li>/ws/trades - For trade updates</li>
5
- <li>/ws/deltas - For orderbook delta updates</li>
6
- <li>/ws/user - For user-specific updates</li>
7
- </ul>
8
3
  <p>Each endpoint handles a specific type of data and subscriptions must match
9
4
  the endpoint type (e.g., only 'trades@BTCUSDC' subscriptions are valid on
10
5
  the /ws/trades endpoint).</p>
11
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel tsd-hierarchy" data-refl="1134"><h4>Hierarchy</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-signature-type">EventEmitter</span><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">NordWebSocketClient</span></li></ul></li></ul></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/NordWebSocketClientEvents.html" class="tsd-signature-type tsd-kind-interface">NordWebSocketClientEvents</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/websocket/NordWebSocketClient.ts#L47">src/websocket/NordWebSocketClient.ts:47</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="NordWebSocketClient.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
6
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel tsd-hierarchy" data-refl="1102"><h4>Hierarchy</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-signature-type">EventEmitter</span><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">NordWebSocketClient</span></li></ul></li></ul></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/NordWebSocketClientEvents.html" class="tsd-signature-type tsd-kind-interface">NordWebSocketClientEvents</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/29f6652df129a33b0ab106107649be2a93372fff/ts/src/websocket/NordWebSocketClient.ts#L44">src/websocket/NordWebSocketClient.ts:44</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="NordWebSocketClient.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
7
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="NordWebSocketClient.html#capturerejections" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejections</span></a>
13
8
  <a href="NordWebSocketClient.html#capturerejectionsymbol" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejection<wbr/>Symbol</span></a>
14
9
  <a href="NordWebSocketClient.html#defaultmaxlisteners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>default<wbr/>Max<wbr/>Listeners</span></a>
@@ -42,7 +37,7 @@ the /ws/trades endpoint).</p>
42
37
  <a href="NordWebSocketClient.html#setmaxlisteners-2" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a>
43
38
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructornordwebsocketclient" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">NordWebSocketClient</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">url</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="NordWebSocketClient.html" class="tsd-signature-type tsd-kind-class">NordWebSocketClient</a><a href="#constructornordwebsocketclient" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Create a new NordWebSocketClient</p>
44
39
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">url</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>WebSocket server URL</p>
45
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="NordWebSocketClient.html" class="tsd-signature-type tsd-kind-class">NordWebSocketClient</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides EventEmitter.constructor</p><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/websocket/NordWebSocketClient.ts#L65">src/websocket/NordWebSocketClient.ts:65</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="capturerejections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>capture<wbr/>Rejections</span><a href="#capturerejections" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">captureRejections</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Value: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type">boolean</a></p>
40
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="NordWebSocketClient.html" class="tsd-signature-type tsd-kind-class">NordWebSocketClient</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides EventEmitter.constructor</p><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/29f6652df129a33b0ab106107649be2a93372fff/ts/src/websocket/NordWebSocketClient.ts#L62">src/websocket/NordWebSocketClient.ts:62</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="capturerejections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>capture<wbr/>Rejections</span><a href="#capturerejections" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">captureRejections</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Value: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type">boolean</a></p>
46
41
  <p>Change the default <code>captureRejections</code> option on all new <code>EventEmitter</code> objects.</p>
47
42
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since" class="tsd-anchor"></a>Since<a href="#since" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v13.4.0, v12.16.0</p>
48
43
  </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.captureRejections</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:459</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="capturerejectionsymbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code> <code class="tsd-tag">Readonly</code><span>capture<wbr/>Rejection<wbr/>Symbol</span><a href="#capturerejectionsymbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">captureRejectionSymbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <a href="NordWebSocketClient.html#capturerejectionsymbol" class="tsd-signature-type tsd-kind-property">captureRejectionSymbol</a></div><div class="tsd-comment tsd-typography"><p>Value: <code>Symbol.for('nodejs.rejection')</code></p>
@@ -80,8 +75,8 @@ regular <code>'error'</code> listener is installed.</p>
80
75
  </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.errorMonitor</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:445</li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="capturerejectionsymbol-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>[capture<wbr/>Rejection<wbr/>Symbol]</span><a href="#capturerejectionsymbol-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="capturerejectionsymbol-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">&quot;[captureRejectionSymbol]&quot;</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="NordWebSocketClient.html#capturerejectionsymbolk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AnyRest</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#capturerejectionsymbol-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="capturerejectionsymbolk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">Error</span></span></li><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">AnyRest</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from EventEmitter.[captureRejectionSymbol]</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:136</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="addlistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>add<wbr/>Listener</span><a href="#addlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="addlistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">addListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="NordWebSocketClient.html#addlistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#addlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Alias for <code>emitter.on(eventName, listener)</code>.</p>
81
76
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="addlistenerk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-4" class="tsd-anchor"></a>Since<a href="#since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
82
77
  </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.addListener</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:597</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="close" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>close</span><a href="#close" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="close-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">close</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#close-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Close the WebSocket connection</p>
83
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/websocket/NordWebSocketClient.ts#L377">src/websocket/NordWebSocketClient.ts:377</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="connect" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>connect</span><a href="#connect" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="connect-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">connect</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#connect-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Connect to the Nord WebSocket server</p>
84
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/websocket/NordWebSocketClient.ts#L166">src/websocket/NordWebSocketClient.ts:166</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="NordWebSocketClient.html#emitk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AnyRest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Synchronously calls each of the listeners registered for the event named <code>eventName</code>, in the order they were registered, passing the supplied arguments
78
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/29f6652df129a33b0ab106107649be2a93372fff/ts/src/websocket/NordWebSocketClient.ts#L372">src/websocket/NordWebSocketClient.ts:372</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="connect" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>connect</span><a href="#connect" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="connect-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">connect</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#connect-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Connect to the Nord WebSocket server</p>
79
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/29f6652df129a33b0ab106107649be2a93372fff/ts/src/websocket/NordWebSocketClient.ts#L161">src/websocket/NordWebSocketClient.ts:161</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="NordWebSocketClient.html#emitk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AnyRest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Synchronously calls each of the listeners registered for the event named <code>eventName</code>, in the order they were registered, passing the supplied arguments
85
80
  to each.</p>
86
81
  <p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p>
87
82
  <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">myEmitter</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">EventEmitter</span><span class="hl-2">();</span><br/><br/><span class="hl-0">// First listener</span><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-6">function</span><span class="hl-2"> </span><span class="hl-1">firstListener</span><span class="hl-2">() {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;Helloooo! first listener&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><span class="hl-0">// Second listener</span><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-6">function</span><span class="hl-2"> </span><span class="hl-1">secondListener</span><span class="hl-2">(</span><span class="hl-5">arg1</span><span class="hl-2">, </span><span class="hl-5">arg2</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`event with parameters </span><span class="hl-6">${</span><span class="hl-5">arg1</span><span class="hl-6">}</span><span class="hl-3">, </span><span class="hl-6">${</span><span class="hl-5">arg2</span><span class="hl-6">}</span><span class="hl-3"> in second listener`</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><span class="hl-0">// Third listener</span><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-6">function</span><span class="hl-2"> </span><span class="hl-1">thirdListener</span><span class="hl-2">(...</span><span class="hl-5">args</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">parameters</span><span class="hl-2"> = </span><span class="hl-5">args</span><span class="hl-2">.</span><span class="hl-1">join</span><span class="hl-2">(</span><span class="hl-3">&#39;, &#39;</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`event with parameters </span><span class="hl-6">${</span><span class="hl-5">parameters</span><span class="hl-6">}</span><span class="hl-3"> in third listener`</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">listeners</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">));</span><br/><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-8">1</span><span class="hl-2">, </span><span class="hl-8">2</span><span class="hl-2">, </span><span class="hl-8">3</span><span class="hl-2">, </span><span class="hl-8">4</span><span class="hl-2">, </span><span class="hl-8">5</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Prints:</span><br/><span class="hl-0">// [</span><br/><span class="hl-0">// [Function: firstListener],</span><br/><span class="hl-0">// [Function: secondListener],</span><br/><span class="hl-0">// [Function: thirdListener]</span><br/><span class="hl-0">// ]</span><br/><span class="hl-0">// Helloooo! first listener</span><br/><span class="hl-0">// event with parameters 1, 2 in second listener</span><br/><span class="hl-0">// event with parameters 1, 2, 3, 4, 5 in third listener</span>
@@ -207,9 +202,9 @@ modified for this specific <code>EventEmitter</code> instance. The value can be
207
202
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-18" class="tsd-anchor"></a>Since<a href="#since-18" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.3.5</p>
208
203
  </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.setMaxListeners</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:768</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="subscribe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>subscribe</span><a href="#subscribe" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="subscribe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">subscribe</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">streams</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#subscribe-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Subscribe to one or more streams</p>
209
204
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">streams</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>Array of streams to subscribe to (e.g. [&quot;trades@BTCUSDC&quot;, &quot;deltas@BTCUSDC&quot;])</p>
210
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/websocket/NordWebSocketClient.ts#L284">src/websocket/NordWebSocketClient.ts:284</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="unsubscribe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>unsubscribe</span><a href="#unsubscribe" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="unsubscribe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">unsubscribe</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">streams</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#unsubscribe-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Unsubscribe from one or more streams</p>
205
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/29f6652df129a33b0ab106107649be2a93372fff/ts/src/websocket/NordWebSocketClient.ts#L279">src/websocket/NordWebSocketClient.ts:279</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="unsubscribe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>unsubscribe</span><a href="#unsubscribe" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="unsubscribe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">unsubscribe</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">streams</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#unsubscribe-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Unsubscribe from one or more streams</p>
211
206
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">streams</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>Array of streams to unsubscribe from</p>
212
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/websocket/NordWebSocketClient.ts#L331">src/websocket/NordWebSocketClient.ts:331</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="addabortlistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>add<wbr/>Abort<wbr/>Listener</span><a href="#addabortlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="addabortlistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">addAbortListener</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">signal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AbortSignal</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">resource</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Disposable</span><a href="#addabortlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Experimental</code><div class="tsd-comment tsd-typography"><p>Listens once to the <code>abort</code> event on the provided <code>signal</code>.</p>
207
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/29f6652df129a33b0ab106107649be2a93372fff/ts/src/websocket/NordWebSocketClient.ts#L326">src/websocket/NordWebSocketClient.ts:326</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="addabortlistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>add<wbr/>Abort<wbr/>Listener</span><a href="#addabortlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="addabortlistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">addAbortListener</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">signal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AbortSignal</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">resource</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Disposable</span><a href="#addabortlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><code class="tsd-tag">Experimental</code><div class="tsd-comment tsd-typography"><p>Listens once to the <code>abort</code> event on the provided <code>signal</code>.</p>
213
208
  <p>Listening to the <code>abort</code> event on abort signals is unsafe and may
214
209
  lead to resource leaks since another third party with the signal can
215
210
  call <code>e.stopImmediatePropagation()</code>. Unfortunately Node.js cannot change