@nktkas/hyperliquid 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +40 -50
  2. package/esm/mod.d.ts +3 -4
  3. package/esm/mod.d.ts.map +1 -1
  4. package/esm/mod.js +3 -4
  5. package/{script/src/clients/wallet.d.ts → esm/src/clients/exchange.d.ts} +100 -100
  6. package/esm/src/clients/exchange.d.ts.map +1 -0
  7. package/esm/src/clients/{wallet.js → exchange.js} +41 -41
  8. package/esm/src/clients/{public.d.ts → info.d.ts} +100 -100
  9. package/esm/src/clients/info.d.ts.map +1 -0
  10. package/esm/src/clients/{public.js → info.js} +51 -51
  11. package/{script/src/clients/event.d.ts → esm/src/clients/subscription.d.ts} +60 -78
  12. package/esm/src/clients/subscription.d.ts.map +1 -0
  13. package/esm/src/clients/{event.js → subscription.js} +57 -79
  14. package/esm/src/signing.d.ts +0 -1
  15. package/esm/src/signing.d.ts.map +1 -1
  16. package/esm/src/signing.js +0 -1
  17. package/esm/src/transports/base.d.ts +5 -7
  18. package/esm/src/transports/base.d.ts.map +1 -1
  19. package/esm/src/transports/websocket/_reconnecting_websocket.d.ts +3 -2
  20. package/esm/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
  21. package/esm/src/transports/websocket/_reconnecting_websocket.js +11 -5
  22. package/esm/src/transports/websocket/_websocket_async_request.d.ts +6 -4
  23. package/esm/src/transports/websocket/_websocket_async_request.d.ts.map +1 -1
  24. package/esm/src/transports/websocket/_websocket_async_request.js +47 -28
  25. package/esm/src/transports/websocket/websocket_transport.d.ts +24 -21
  26. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  27. package/esm/src/transports/websocket/websocket_transport.js +60 -57
  28. package/esm/src/types/info/accounts.d.ts +1 -0
  29. package/esm/src/types/info/accounts.d.ts.map +1 -1
  30. package/esm/src/types/mod.d.ts +0 -1
  31. package/esm/src/types/mod.d.ts.map +1 -1
  32. package/esm/src/types/mod.js +1 -1
  33. package/package.json +1 -1
  34. package/script/mod.d.ts +3 -4
  35. package/script/mod.d.ts.map +1 -1
  36. package/script/mod.js +4 -5
  37. package/{esm/src/clients/wallet.d.ts → script/src/clients/exchange.d.ts} +100 -100
  38. package/script/src/clients/exchange.d.ts.map +1 -0
  39. package/script/src/clients/{wallet.js → exchange.js} +43 -43
  40. package/script/src/clients/{public.d.ts → info.d.ts} +100 -100
  41. package/script/src/clients/info.d.ts.map +1 -0
  42. package/script/src/clients/{public.js → info.js} +53 -53
  43. package/{esm/src/clients/event.d.ts → script/src/clients/subscription.d.ts} +60 -78
  44. package/script/src/clients/subscription.d.ts.map +1 -0
  45. package/script/src/clients/{event.js → subscription.js} +59 -81
  46. package/script/src/signing.d.ts +0 -1
  47. package/script/src/signing.d.ts.map +1 -1
  48. package/script/src/signing.js +52 -53
  49. package/script/src/transports/base.d.ts +5 -7
  50. package/script/src/transports/base.d.ts.map +1 -1
  51. package/script/src/transports/websocket/_reconnecting_websocket.d.ts +3 -2
  52. package/script/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
  53. package/script/src/transports/websocket/_reconnecting_websocket.js +11 -5
  54. package/script/src/transports/websocket/_websocket_async_request.d.ts +6 -4
  55. package/script/src/transports/websocket/_websocket_async_request.d.ts.map +1 -1
  56. package/script/src/transports/websocket/_websocket_async_request.js +47 -28
  57. package/script/src/transports/websocket/websocket_transport.d.ts +24 -21
  58. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  59. package/script/src/transports/websocket/websocket_transport.js +60 -57
  60. package/script/src/types/info/accounts.d.ts +1 -0
  61. package/script/src/types/info/accounts.d.ts.map +1 -1
  62. package/script/src/types/mod.d.ts +0 -1
  63. package/script/src/types/mod.d.ts.map +1 -1
  64. package/script/src/types/mod.js +24 -25
  65. package/esm/_dnt.polyfills.d.ts +0 -20
  66. package/esm/_dnt.polyfills.d.ts.map +0 -1
  67. package/esm/_dnt.polyfills.js +0 -12
  68. package/esm/src/clients/event.d.ts.map +0 -1
  69. package/esm/src/clients/public.d.ts.map +0 -1
  70. package/esm/src/clients/wallet.d.ts.map +0 -1
  71. package/script/_dnt.polyfills.d.ts +0 -20
  72. package/script/_dnt.polyfills.d.ts.map +0 -1
  73. package/script/_dnt.polyfills.js +0 -23
  74. package/script/src/clients/event.d.ts.map +0 -1
  75. package/script/src/clients/public.d.ts.map +0 -1
  76. package/script/src/clients/wallet.d.ts.map +0 -1
@@ -54,11 +54,11 @@ class NonceManager {
54
54
  }
55
55
  }
56
56
  /**
57
- * Wallet client for interacting with the Hyperliquid API.
57
+ * Exchange client for interacting with the Hyperliquid API.
58
58
  * @typeParam T The transport used to connect to the Hyperliquid API.
59
59
  * @typeParam W The WalletClient/Account ([viem](https://viem.sh/docs/clients/wallet)) or Signer ([ethers.js](https://docs.ethers.io/v6/api/providers/#Signer)) used for signing transactions.
60
60
  */
61
- export class WalletClient {
61
+ export class ExchangeClient {
62
62
  transport;
63
63
  wallet;
64
64
  isTestnet;
@@ -78,7 +78,7 @@ export class WalletClient {
78
78
  * const wallet = privateKeyToAccount("0x...");
79
79
  *
80
80
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
81
- * const client = new hl.WalletClient({ wallet, transport });
81
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
82
82
  * ```
83
83
  *
84
84
  * @example Private key via [ethers.js](https://docs.ethers.org/v6/api/wallet/#Wallet) or [ethers.js v5](https://docs.ethers.org/v5/api/signer/#Wallet)
@@ -89,7 +89,7 @@ export class WalletClient {
89
89
  * const wallet = new ethers.Wallet("0x...");
90
90
  *
91
91
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
92
- * const client = new hl.WalletClient({ wallet, transport });
92
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
93
93
  * ```
94
94
  *
95
95
  * @example External wallet (e.g. MetaMask) via [viem](https://viem.sh/docs/clients/wallet#optional-hoist-the-account)
@@ -101,7 +101,7 @@ export class WalletClient {
101
101
  * const wallet = createWalletClient({ account, transport: custom(window.ethereum) });
102
102
  *
103
103
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
104
- * const client = new hl.WalletClient({ wallet, transport });
104
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
105
105
  * ```
106
106
  *
107
107
  * @example External wallet (e.g. MetaMask) via `window.ethereum` directly
@@ -109,7 +109,7 @@ export class WalletClient {
109
109
  * import * as hl from "@nktkas/hyperliquid";
110
110
  *
111
111
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
112
- * const client = new hl.WalletClient({ wallet: window.ethereum, transport });
112
+ * const exchClient = new hl.ExchangeClient({ wallet: window.ethereum, transport });
113
113
  * ```
114
114
  */
115
115
  constructor(args) {
@@ -136,7 +136,7 @@ export class WalletClient {
136
136
  *
137
137
  * const wallet = privateKeyToAccount("0x...");
138
138
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
139
- * const client = new hl.WalletClient({ wallet, transport });
139
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
140
140
  *
141
141
  * const result = await client.approveAgent({ agentAddress: "0x...", agentName: "agentName" });
142
142
  * ```
@@ -185,7 +185,7 @@ export class WalletClient {
185
185
  *
186
186
  * const wallet = privateKeyToAccount("0x...");
187
187
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
188
- * const client = new hl.WalletClient({ wallet, transport });
188
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
189
189
  *
190
190
  * const result = await client.approveBuilderFee({ maxFeeRate: "0.01%", builder: "0x..." });
191
191
  * ```
@@ -231,7 +231,7 @@ export class WalletClient {
231
231
  *
232
232
  * const wallet = privateKeyToAccount("0x...");
233
233
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
234
- * const client = new hl.WalletClient({ wallet, transport });
234
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
235
235
  *
236
236
  * const result = await client.batchModify({
237
237
  * modifies: [{
@@ -317,7 +317,7 @@ export class WalletClient {
317
317
  *
318
318
  * const wallet = privateKeyToAccount("0x...");
319
319
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
320
- * const client = new hl.WalletClient({ wallet, transport });
320
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
321
321
  *
322
322
  * const result = await client.cancel({
323
323
  * cancels: [{
@@ -366,7 +366,7 @@ export class WalletClient {
366
366
  *
367
367
  * const wallet = privateKeyToAccount("0x...");
368
368
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
369
- * const client = new hl.WalletClient({ wallet, transport });
369
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
370
370
  *
371
371
  * const result = await client.cancelByCloid({
372
372
  * cancels: [
@@ -414,7 +414,7 @@ export class WalletClient {
414
414
  *
415
415
  * const wallet = privateKeyToAccount("0x...");
416
416
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
417
- * const client = new hl.WalletClient({ wallet, transport });
417
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
418
418
  *
419
419
  * const result = await client.cDeposit({ wei: 1 * 1e8 });
420
420
  * ```
@@ -459,7 +459,7 @@ export class WalletClient {
459
459
  *
460
460
  * const wallet = privateKeyToAccount("0x...");
461
461
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
462
- * const client = new hl.WalletClient({ wallet, transport });
462
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
463
463
  *
464
464
  * const result = await client.claimRewards();
465
465
  * ```
@@ -493,7 +493,7 @@ export class WalletClient {
493
493
  *
494
494
  * const wallet = privateKeyToAccount("0x...");
495
495
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
496
- * const client = new hl.WalletClient({ wallet, transport });
496
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
497
497
  *
498
498
  * const result = await client.convertToMultiSigUser({
499
499
  * authorizedUsers: ["0x...", "0x..."],
@@ -541,7 +541,7 @@ export class WalletClient {
541
541
  *
542
542
  * const wallet = privateKeyToAccount("0x...");
543
543
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
544
- * const client = new hl.WalletClient({ wallet, transport });
544
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
545
545
  *
546
546
  * const result = await client.createSubAccount({ name: "subAccountName" });
547
547
  * ```
@@ -578,7 +578,7 @@ export class WalletClient {
578
578
  *
579
579
  * const wallet = privateKeyToAccount("0x...");
580
580
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
581
- * const client = new hl.WalletClient({ wallet, transport });
581
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
582
582
  *
583
583
  * const result = await client.createVault({
584
584
  * name: "VaultName",
@@ -696,7 +696,7 @@ export class WalletClient {
696
696
  *
697
697
  * const wallet = privateKeyToAccount("0x...");
698
698
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
699
- * const client = new hl.WalletClient({ wallet, transport });
699
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
700
700
  *
701
701
  * const result = await client.cWithdraw({ wei: 1 * 1e8 });
702
702
  * ```
@@ -741,7 +741,7 @@ export class WalletClient {
741
741
  *
742
742
  * const wallet = privateKeyToAccount("0x...");
743
743
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
744
- * const client = new hl.WalletClient({ wallet, transport });
744
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
745
745
  *
746
746
  * const result = await client.evmUserModify({ usingBigBlocks: true });
747
747
  * ```
@@ -778,7 +778,7 @@ export class WalletClient {
778
778
  *
779
779
  * const wallet = privateKeyToAccount("0x...");
780
780
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
781
- * const client = new hl.WalletClient({ wallet, transport });
781
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
782
782
  *
783
783
  * const result = await client.modify({
784
784
  * oid: 123,
@@ -857,7 +857,7 @@ export class WalletClient {
857
857
  *
858
858
  * const wallet = privateKeyToAccount("0x...");
859
859
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
860
- * const client = new hl.WalletClient({ wallet, transport });
860
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
861
861
  *
862
862
  * const multiSigUser = "0x..."; // Multi-sig user address
863
863
  *
@@ -932,7 +932,7 @@ export class WalletClient {
932
932
  *
933
933
  * const wallet = privateKeyToAccount("0x...");
934
934
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
935
- * const client = new hl.WalletClient({ wallet, transport });
935
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
936
936
  *
937
937
  * const result = await client.order({
938
938
  * orders: [{
@@ -1070,7 +1070,7 @@ export class WalletClient {
1070
1070
  *
1071
1071
  * const wallet = privateKeyToAccount("0x...");
1072
1072
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1073
- * const client = new hl.WalletClient({ wallet, transport });
1073
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1074
1074
  *
1075
1075
  * const result = await client.perpDexClassTransfer({
1076
1076
  * dex: "test",
@@ -1123,7 +1123,7 @@ export class WalletClient {
1123
1123
  *
1124
1124
  * const wallet = privateKeyToAccount("0x...");
1125
1125
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1126
- * const client = new hl.WalletClient({ wallet, transport });
1126
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1127
1127
  *
1128
1128
  * const result = await client.registerReferrer({ code: "TEST" });
1129
1129
  * ```
@@ -1160,7 +1160,7 @@ export class WalletClient {
1160
1160
  *
1161
1161
  * const wallet = privateKeyToAccount("0x...");
1162
1162
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1163
- * const client = new hl.WalletClient({ wallet, transport });
1163
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1164
1164
  *
1165
1165
  * const result = await client.reserveRequestWeight({ weight: 10 });
1166
1166
  * ```
@@ -1225,7 +1225,7 @@ export class WalletClient {
1225
1225
  *
1226
1226
  * const wallet = privateKeyToAccount("0x...");
1227
1227
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1228
- * const client = new hl.WalletClient({ wallet, transport });
1228
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1229
1229
  *
1230
1230
  * const result = await client.setDisplayName({ displayName: "My Name" });
1231
1231
  * ```
@@ -1262,7 +1262,7 @@ export class WalletClient {
1262
1262
  *
1263
1263
  * const wallet = privateKeyToAccount("0x...");
1264
1264
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1265
- * const client = new hl.WalletClient({ wallet, transport });
1265
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1266
1266
  *
1267
1267
  * const result = await client.setReferrer({ code: "TEST" });
1268
1268
  * ```
@@ -1389,7 +1389,7 @@ export class WalletClient {
1389
1389
  *
1390
1390
  * const wallet = privateKeyToAccount("0x...");
1391
1391
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1392
- * const client = new hl.WalletClient({ wallet, transport });
1392
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1393
1393
  *
1394
1394
  * const result = await client.spotSend({
1395
1395
  * destination: "0x...",
@@ -1440,7 +1440,7 @@ export class WalletClient {
1440
1440
  *
1441
1441
  * const wallet = privateKeyToAccount("0x...");
1442
1442
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1443
- * const client = new hl.WalletClient({ wallet, transport });
1443
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1444
1444
  *
1445
1445
  * const result = await client.spotUser({ toggleSpotDusting: { optOut: false } });
1446
1446
  * ```
@@ -1479,7 +1479,7 @@ export class WalletClient {
1479
1479
  *
1480
1480
  * const wallet = privateKeyToAccount("0x...");
1481
1481
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1482
- * const client = new hl.WalletClient({ wallet, transport });
1482
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1483
1483
  *
1484
1484
  * const result = await client.subAccountSpotTransfer({
1485
1485
  * subAccountUser: "0x...",
@@ -1524,7 +1524,7 @@ export class WalletClient {
1524
1524
  *
1525
1525
  * const wallet = privateKeyToAccount("0x...");
1526
1526
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1527
- * const client = new hl.WalletClient({ wallet, transport });
1527
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1528
1528
  *
1529
1529
  * const result = await client.subAccountTransfer({
1530
1530
  * subAccountUser: "0x...",
@@ -1567,7 +1567,7 @@ export class WalletClient {
1567
1567
  *
1568
1568
  * const wallet = privateKeyToAccount("0x...");
1569
1569
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1570
- * const client = new hl.WalletClient({ wallet, transport });
1570
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1571
1571
  *
1572
1572
  * const result = await client.tokenDelegate({
1573
1573
  * validator: "0x...",
@@ -1618,7 +1618,7 @@ export class WalletClient {
1618
1618
  *
1619
1619
  * const wallet = privateKeyToAccount("0x...");
1620
1620
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1621
- * const client = new hl.WalletClient({ wallet, transport });
1621
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1622
1622
  *
1623
1623
  * const result = await client.twapCancel({
1624
1624
  * a: 0, // Asset index
@@ -1663,7 +1663,7 @@ export class WalletClient {
1663
1663
  *
1664
1664
  * const wallet = privateKeyToAccount("0x...");
1665
1665
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1666
- * const client = new hl.WalletClient({ wallet, transport });
1666
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1667
1667
  *
1668
1668
  * const result = await client.twapOrder({
1669
1669
  * a: 0, // Asset index
@@ -1718,7 +1718,7 @@ export class WalletClient {
1718
1718
  *
1719
1719
  * const wallet = privateKeyToAccount("0x...");
1720
1720
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1721
- * const client = new hl.WalletClient({ wallet, transport });
1721
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1722
1722
  *
1723
1723
  * const result = await client.updateIsolatedMargin({ asset: 0, isBuy: true, ntli: 1 * 1e6 });
1724
1724
  * ```
@@ -1761,7 +1761,7 @@ export class WalletClient {
1761
1761
  *
1762
1762
  * const wallet = privateKeyToAccount("0x...");
1763
1763
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1764
- * const client = new hl.WalletClient({ wallet, transport });
1764
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1765
1765
  *
1766
1766
  * const result = await client.updateLeverage({ asset: 0, isCross: true, leverage: 5 });
1767
1767
  * ```
@@ -1804,7 +1804,7 @@ export class WalletClient {
1804
1804
  *
1805
1805
  * const wallet = privateKeyToAccount("0x...");
1806
1806
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1807
- * const client = new hl.WalletClient({ wallet, transport });
1807
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1808
1808
  *
1809
1809
  * const result = await client.usdClassTransfer({ amount: "1", toPerp: true });
1810
1810
  * ```
@@ -1850,7 +1850,7 @@ export class WalletClient {
1850
1850
  *
1851
1851
  * const wallet = privateKeyToAccount("0x...");
1852
1852
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1853
- * const client = new hl.WalletClient({ wallet, transport });
1853
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1854
1854
  *
1855
1855
  * const result = await client.usdSend({ destination: "0x...", amount: "1" });
1856
1856
  * ```
@@ -1896,7 +1896,7 @@ export class WalletClient {
1896
1896
  *
1897
1897
  * const wallet = privateKeyToAccount("0x...");
1898
1898
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1899
- * const client = new hl.WalletClient({ wallet, transport });
1899
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1900
1900
  *
1901
1901
  * const result = await client.vaultDistribute({ vaultAddress: "0x...", usd: 10 * 1e6 });
1902
1902
  * ```
@@ -1934,7 +1934,7 @@ export class WalletClient {
1934
1934
  *
1935
1935
  * const wallet = privateKeyToAccount("0x...");
1936
1936
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1937
- * const client = new hl.WalletClient({ wallet, transport });
1937
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1938
1938
  *
1939
1939
  * const result = await client.vaultModify({
1940
1940
  * vaultAddress: "0x...",
@@ -1977,7 +1977,7 @@ export class WalletClient {
1977
1977
  *
1978
1978
  * const wallet = privateKeyToAccount("0x...");
1979
1979
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
1980
- * const client = new hl.WalletClient({ wallet, transport });
1980
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
1981
1981
  *
1982
1982
  * const result = await client.vaultTransfer({
1983
1983
  * vaultAddress: "0x...",
@@ -2023,7 +2023,7 @@ export class WalletClient {
2023
2023
  *
2024
2024
  * const wallet = privateKeyToAccount("0x...");
2025
2025
  * const transport = new hl.HttpTransport(); // or WebSocketTransport
2026
- * const client = new hl.WalletClient({ wallet, transport });
2026
+ * const exchClient = new hl.ExchangeClient({ wallet, transport });
2027
2027
  *
2028
2028
  * const result = await client.withdraw3({ destination: "0x...", amount: "1" });
2029
2029
  * ```