@nktkas/hyperliquid 0.22.1 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -27
- package/esm/mod.d.ts +1 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/src/clients/exchange.d.ts +136 -166
- package/esm/src/clients/exchange.d.ts.map +1 -1
- package/esm/src/clients/exchange.js +121 -146
- package/esm/src/clients/multiSign.d.ts +121 -280
- package/esm/src/clients/multiSign.d.ts.map +1 -1
- package/esm/src/clients/multiSign.js +123 -246
- package/esm/src/signing/_ethers.d.ts +33 -0
- package/esm/src/signing/_ethers.d.ts.map +1 -0
- package/esm/src/signing/_ethers.js +12 -0
- package/esm/src/signing/_private_key.d.ts +22 -0
- package/esm/src/signing/_private_key.d.ts.map +1 -0
- package/esm/src/signing/_private_key.js +124 -0
- package/esm/src/signing/_sorter.d.ts +154 -0
- package/esm/src/signing/_sorter.d.ts.map +1 -0
- package/esm/src/{signing.js → signing/_sorter.js} +0 -400
- package/esm/src/signing/_viem.d.ts +23 -0
- package/esm/src/signing/_viem.d.ts.map +1 -0
- package/esm/src/signing/_viem.js +6 -0
- package/esm/src/signing/_window.d.ts +23 -0
- package/esm/src/signing/_window.d.ts.map +1 -0
- package/esm/src/signing/_window.js +29 -0
- package/esm/src/signing/mod.d.ts +251 -0
- package/esm/src/signing/mod.d.ts.map +1 -0
- package/esm/src/signing/mod.js +352 -0
- package/package.json +6 -5
- package/script/mod.d.ts +1 -1
- package/script/mod.d.ts.map +1 -1
- package/script/src/clients/exchange.d.ts +136 -166
- package/script/src/clients/exchange.d.ts.map +1 -1
- package/script/src/clients/exchange.js +205 -230
- package/script/src/clients/multiSign.d.ts +121 -280
- package/script/src/clients/multiSign.d.ts.map +1 -1
- package/script/src/clients/multiSign.js +168 -291
- package/script/src/signing/_ethers.d.ts +33 -0
- package/script/src/signing/_ethers.d.ts.map +1 -0
- package/script/src/signing/_ethers.js +26 -0
- package/script/src/signing/_private_key.d.ts +22 -0
- package/script/src/signing/_private_key.d.ts.map +1 -0
- package/script/src/signing/_private_key.js +138 -0
- package/script/src/signing/_sorter.d.ts +154 -0
- package/script/src/signing/_sorter.d.ts.map +1 -0
- package/script/src/{signing.js → signing/_sorter.js} +1 -409
- package/script/src/signing/_viem.d.ts +23 -0
- package/script/src/signing/_viem.d.ts.map +1 -0
- package/script/src/signing/_viem.js +19 -0
- package/script/src/signing/_window.d.ts +23 -0
- package/script/src/signing/_window.d.ts.map +1 -0
- package/script/src/signing/_window.js +43 -0
- package/script/src/signing/mod.d.ts +251 -0
- package/script/src/signing/mod.d.ts.map +1 -0
- package/script/src/signing/mod.js +387 -0
- package/esm/src/signing.d.ts +0 -463
- package/esm/src/signing.d.ts.map +0 -1
- package/script/src/signing.d.ts +0 -463
- package/script/src/signing.d.ts.map +0 -1
|
@@ -2,7 +2,7 @@ import type { Hex } from "../base.js";
|
|
|
2
2
|
import type { IRequestTransport } from "../transports/base.js";
|
|
3
3
|
import type { BaseExchangeRequest } from "../types/exchange/requests.js";
|
|
4
4
|
import type { CreateSubAccountResponse, CreateVaultResponse, SuccessResponse } from "../types/exchange/responses.js";
|
|
5
|
-
import { type AbstractEthersSigner, type AbstractEthersV5Signer, type AbstractViemWalletClient, type AbstractWallet, type AbstractWindowEthereum, type Signature, userSignedActionEip712Types } from "../signing.js";
|
|
5
|
+
import { type AbstractEthersSigner, type AbstractEthersV5Signer, type AbstractViemWalletClient, type AbstractWallet, type AbstractWindowEthereum, type Signature, userSignedActionEip712Types } from "../signing/mod.js";
|
|
6
6
|
import { type CancelResponseSuccess, type CSignerActionParameters_JailSelf, type CSignerActionParameters_UnjailSelf, type CValidatorActionParameters_ChangeProfile, type CValidatorActionParameters_Register, type CValidatorActionParameters_Unregister, ExchangeClient, type ExchangeClientParameters, type OrderResponseSuccess, type PerpDeployParameters_RegisterAsset, type PerpDeployParameters_SetOracle, type ScheduleCancelParameters, type SpotDeployParameters_Genesis, type SpotDeployParameters_RegisterHyperliquidity, type SpotDeployParameters_RegisterSpot, type SpotDeployParameters_RegisterToken2, type SpotDeployParameters_SetDeployerTradingFeeShare, type SpotDeployParameters_UserGenesis, type TwapCancelResponseSuccess, type TwapOrderResponseSuccess } from "./exchange.js";
|
|
7
7
|
/** Parameters for the {@linkcode MultiSignClient} constructor. */
|
|
8
8
|
export interface MultiSignClientParameters<T extends IRequestTransport = IRequestTransport, S extends readonly [AbstractWalletWithAddress, ...AbstractWallet[]] = [
|
|
@@ -15,7 +15,7 @@ export interface MultiSignClientParameters<T extends IRequestTransport = IReques
|
|
|
15
15
|
signers: S;
|
|
16
16
|
}
|
|
17
17
|
/** Abstract interface for a wallet that can sign typed data and has wallet address. */
|
|
18
|
-
export type AbstractWalletWithAddress = AbstractViemWalletClientWithAddress | AbstractEthersSignerWithAddress | AbstractEthersV5SignerWithAddress | AbstractWindowEthereum;
|
|
18
|
+
export type AbstractWalletWithAddress = Hex | AbstractViemWalletClientWithAddress | AbstractEthersSignerWithAddress | AbstractEthersV5SignerWithAddress | AbstractWindowEthereum;
|
|
19
19
|
/** Abstract interface for a [viem wallet](https://viem.sh/docs/clients/wallet) with wallet address. */
|
|
20
20
|
export interface AbstractViemWalletClientWithAddress extends AbstractViemWalletClient {
|
|
21
21
|
address: Hex;
|
|
@@ -50,14 +50,11 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
50
50
|
* @example
|
|
51
51
|
* ```ts
|
|
52
52
|
* import * as hl from "@nktkas/hyperliquid";
|
|
53
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
54
53
|
*
|
|
55
54
|
* const multiSignAddress = "0x...";
|
|
56
55
|
* const signers = [
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* privateKeyToAccount("0x..."),
|
|
60
|
-
* ];
|
|
56
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
57
|
+
* ] as const;
|
|
61
58
|
*
|
|
62
59
|
* const transport = new hl.HttpTransport();
|
|
63
60
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
@@ -74,17 +71,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
74
71
|
* @example
|
|
75
72
|
* ```ts
|
|
76
73
|
* import * as hl from "@nktkas/hyperliquid";
|
|
77
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
78
74
|
*
|
|
79
75
|
* const multiSignAddress = "0x...";
|
|
80
76
|
* const signers = [
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* // ...
|
|
84
|
-
* privateKeyToAccount("0x..."),
|
|
85
|
-
* ];
|
|
77
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
78
|
+
* ] as const;
|
|
86
79
|
*
|
|
87
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
80
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
88
81
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
89
82
|
*
|
|
90
83
|
* const data = await multiSignClient.approveAgent({ agentAddress: "0x...", agentName: "agentName" });
|
|
@@ -101,17 +94,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
101
94
|
* @example
|
|
102
95
|
* ```ts
|
|
103
96
|
* import * as hl from "@nktkas/hyperliquid";
|
|
104
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
105
97
|
*
|
|
106
98
|
* const multiSignAddress = "0x...";
|
|
107
99
|
* const signers = [
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* // ...
|
|
111
|
-
* privateKeyToAccount("0x..."),
|
|
112
|
-
* ];
|
|
100
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
101
|
+
* ] as const;
|
|
113
102
|
*
|
|
114
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
103
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
115
104
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
116
105
|
*
|
|
117
106
|
* const data = await multiSignClient.approveBuilderFee({ maxFeeRate: "0.01%", builder: "0x..." });
|
|
@@ -128,17 +117,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
128
117
|
* @example
|
|
129
118
|
* ```ts
|
|
130
119
|
* import * as hl from "@nktkas/hyperliquid";
|
|
131
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
132
120
|
*
|
|
133
121
|
* const multiSignAddress = "0x...";
|
|
134
122
|
* const signers = [
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* // ...
|
|
138
|
-
* privateKeyToAccount("0x..."),
|
|
139
|
-
* ];
|
|
123
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
124
|
+
* ] as const;
|
|
140
125
|
*
|
|
141
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
126
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
142
127
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
143
128
|
*
|
|
144
129
|
* const data = await multiSignClient.batchModify({
|
|
@@ -172,17 +157,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
172
157
|
* @example
|
|
173
158
|
* ```ts
|
|
174
159
|
* import * as hl from "@nktkas/hyperliquid";
|
|
175
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
176
160
|
*
|
|
177
161
|
* const multiSignAddress = "0x...";
|
|
178
162
|
* const signers = [
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* // ...
|
|
182
|
-
* privateKeyToAccount("0x..."),
|
|
183
|
-
* ];
|
|
163
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
164
|
+
* ] as const;
|
|
184
165
|
*
|
|
185
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
166
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
186
167
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
187
168
|
*
|
|
188
169
|
* const data = await multiSignClient.cancel({
|
|
@@ -204,17 +185,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
204
185
|
* @example
|
|
205
186
|
* ```ts
|
|
206
187
|
* import * as hl from "@nktkas/hyperliquid";
|
|
207
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
208
188
|
*
|
|
209
189
|
* const multiSignAddress = "0x...";
|
|
210
190
|
* const signers = [
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
* // ...
|
|
214
|
-
* privateKeyToAccount("0x..."),
|
|
215
|
-
* ];
|
|
191
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
192
|
+
* ] as const;
|
|
216
193
|
*
|
|
217
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
194
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
218
195
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
219
196
|
*
|
|
220
197
|
* const data = await multiSignClient.cancelByCloid({
|
|
@@ -235,17 +212,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
235
212
|
* @example
|
|
236
213
|
* ```ts
|
|
237
214
|
* import * as hl from "@nktkas/hyperliquid";
|
|
238
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
239
215
|
*
|
|
240
216
|
* const multiSignAddress = "0x...";
|
|
241
217
|
* const signers = [
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* // ...
|
|
245
|
-
* privateKeyToAccount("0x..."),
|
|
246
|
-
* ];
|
|
218
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
219
|
+
* ] as const;
|
|
247
220
|
*
|
|
248
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
221
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
249
222
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
250
223
|
*
|
|
251
224
|
* const data = await multiSignClient.cDeposit({ wei: 1 * 1e8 });
|
|
@@ -262,17 +235,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
262
235
|
* @example
|
|
263
236
|
* ```ts
|
|
264
237
|
* import * as hl from "@nktkas/hyperliquid";
|
|
265
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
266
238
|
*
|
|
267
239
|
* const multiSignAddress = "0x...";
|
|
268
240
|
* const signers = [
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* // ...
|
|
272
|
-
* privateKeyToAccount("0x..."),
|
|
273
|
-
* ];
|
|
241
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
242
|
+
* ] as const;
|
|
274
243
|
*
|
|
275
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
244
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
276
245
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
277
246
|
*
|
|
278
247
|
* const data = await multiSignClient.claimRewards();
|
|
@@ -289,17 +258,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
289
258
|
* @example
|
|
290
259
|
* ```ts
|
|
291
260
|
* import * as hl from "@nktkas/hyperliquid";
|
|
292
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
293
261
|
*
|
|
294
262
|
* const multiSignAddress = "0x...";
|
|
295
263
|
* const signers = [
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
* // ...
|
|
299
|
-
* privateKeyToAccount("0x..."),
|
|
300
|
-
* ];
|
|
264
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
265
|
+
* ] as const;
|
|
301
266
|
*
|
|
302
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
267
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
303
268
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
304
269
|
*
|
|
305
270
|
* const data = await multiSignClient.convertToMultiSigUser({ // convert to normal user
|
|
@@ -319,17 +284,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
319
284
|
* @example
|
|
320
285
|
* ```ts
|
|
321
286
|
* import * as hl from "@nktkas/hyperliquid";
|
|
322
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
323
287
|
*
|
|
324
288
|
* const multiSignAddress = "0x...";
|
|
325
289
|
* const signers = [
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
* // ...
|
|
329
|
-
* privateKeyToAccount("0x..."),
|
|
330
|
-
* ];
|
|
290
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
291
|
+
* ] as const;
|
|
331
292
|
*
|
|
332
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
293
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
333
294
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
334
295
|
*
|
|
335
296
|
* const data = await multiSignClient.createSubAccount({ name: "subAccountName" });
|
|
@@ -346,17 +307,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
346
307
|
* @example
|
|
347
308
|
* ```ts
|
|
348
309
|
* import * as hl from "@nktkas/hyperliquid";
|
|
349
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
350
310
|
*
|
|
351
311
|
* const multiSignAddress = "0x...";
|
|
352
312
|
* const signers = [
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
* // ...
|
|
356
|
-
* privateKeyToAccount("0x..."),
|
|
357
|
-
* ];
|
|
313
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
314
|
+
* ] as const;
|
|
358
315
|
*
|
|
359
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
316
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
360
317
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
361
318
|
*
|
|
362
319
|
* const data = await multiSignClient.createVault({
|
|
@@ -377,17 +334,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
377
334
|
* @example
|
|
378
335
|
* ```ts
|
|
379
336
|
* import * as hl from "@nktkas/hyperliquid";
|
|
380
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
381
337
|
*
|
|
382
338
|
* const multiSignAddress = "0x...";
|
|
383
339
|
* const signers = [
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
* // ...
|
|
387
|
-
* privateKeyToAccount("0x..."),
|
|
388
|
-
* ];
|
|
340
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
341
|
+
* ] as const;
|
|
389
342
|
*
|
|
390
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
343
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
391
344
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
392
345
|
*
|
|
393
346
|
* // Jail self
|
|
@@ -408,17 +361,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
408
361
|
* @example
|
|
409
362
|
* ```ts
|
|
410
363
|
* import * as hl from "@nktkas/hyperliquid";
|
|
411
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
412
364
|
*
|
|
413
365
|
* const multiSignAddress = "0x...";
|
|
414
366
|
* const signers = [
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
* // ...
|
|
418
|
-
* privateKeyToAccount("0x..."),
|
|
419
|
-
* ];
|
|
367
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
368
|
+
* ] as const;
|
|
420
369
|
*
|
|
421
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
370
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
422
371
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
423
372
|
*
|
|
424
373
|
* // Change validator profile
|
|
@@ -444,17 +393,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
444
393
|
* @example
|
|
445
394
|
* ```ts
|
|
446
395
|
* import * as hl from "@nktkas/hyperliquid";
|
|
447
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
448
396
|
*
|
|
449
397
|
* const multiSignAddress = "0x...";
|
|
450
398
|
* const signers = [
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
* // ...
|
|
454
|
-
* privateKeyToAccount("0x..."),
|
|
455
|
-
* ];
|
|
399
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
400
|
+
* ] as const;
|
|
456
401
|
*
|
|
457
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
402
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
458
403
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
459
404
|
*
|
|
460
405
|
* const data = await multiSignClient.cWithdraw({ wei: 1 * 1e8 });
|
|
@@ -471,17 +416,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
471
416
|
* @example
|
|
472
417
|
* ```ts
|
|
473
418
|
* import * as hl from "@nktkas/hyperliquid";
|
|
474
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
475
419
|
*
|
|
476
420
|
* const multiSignAddress = "0x...";
|
|
477
421
|
* const signers = [
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
* // ...
|
|
481
|
-
* privateKeyToAccount("0x..."),
|
|
482
|
-
* ];
|
|
422
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
423
|
+
* ] as const;
|
|
483
424
|
*
|
|
484
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
425
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
485
426
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
486
427
|
*
|
|
487
428
|
* const data = await multiSignClient.evmUserModify({ usingBigBlocks: true });
|
|
@@ -498,17 +439,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
498
439
|
* @example
|
|
499
440
|
* ```ts
|
|
500
441
|
* import * as hl from "@nktkas/hyperliquid";
|
|
501
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
502
442
|
*
|
|
503
443
|
* const multiSignAddress = "0x...";
|
|
504
444
|
* const signers = [
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
* // ...
|
|
508
|
-
* privateKeyToAccount("0x..."),
|
|
509
|
-
* ];
|
|
445
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
446
|
+
* ] as const;
|
|
510
447
|
*
|
|
511
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
448
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
512
449
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
513
450
|
*
|
|
514
451
|
* const data = await multiSignClient.modify({
|
|
@@ -544,17 +481,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
544
481
|
* @example
|
|
545
482
|
* ```ts
|
|
546
483
|
* import * as hl from "@nktkas/hyperliquid";
|
|
547
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
548
484
|
*
|
|
549
485
|
* const multiSignAddress = "0x...";
|
|
550
486
|
* const signers = [
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
* // ...
|
|
554
|
-
* privateKeyToAccount("0x..."),
|
|
555
|
-
* ];
|
|
487
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
488
|
+
* ] as const;
|
|
556
489
|
*
|
|
557
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
490
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
558
491
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
559
492
|
*
|
|
560
493
|
* const data = await multiSignClient.order({
|
|
@@ -586,17 +519,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
586
519
|
* @example
|
|
587
520
|
* ```ts
|
|
588
521
|
* import * as hl from "@nktkas/hyperliquid";
|
|
589
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
590
522
|
*
|
|
591
523
|
* const multiSignAddress = "0x...";
|
|
592
524
|
* const signers = [
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
* // ...
|
|
596
|
-
* privateKeyToAccount("0x..."),
|
|
597
|
-
* ];
|
|
525
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
526
|
+
* ] as const;
|
|
598
527
|
*
|
|
599
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
528
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
600
529
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
601
530
|
*
|
|
602
531
|
* const data = await multiSignClient.perpDeploy({
|
|
@@ -626,17 +555,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
626
555
|
* @example
|
|
627
556
|
* ```ts
|
|
628
557
|
* import * as hl from "@nktkas/hyperliquid";
|
|
629
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
630
558
|
*
|
|
631
559
|
* const multiSignAddress = "0x...";
|
|
632
560
|
* const signers = [
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
* // ...
|
|
636
|
-
* privateKeyToAccount("0x..."),
|
|
637
|
-
* ];
|
|
561
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
562
|
+
* ] as const;
|
|
638
563
|
*
|
|
639
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
564
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
640
565
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
641
566
|
*
|
|
642
567
|
* const data = await multiSignClient.perpDexClassTransfer({
|
|
@@ -658,17 +583,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
658
583
|
* @example
|
|
659
584
|
* ```ts
|
|
660
585
|
* import * as hl from "@nktkas/hyperliquid";
|
|
661
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
662
586
|
*
|
|
663
587
|
* const multiSignAddress = "0x...";
|
|
664
588
|
* const signers = [
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
* // ...
|
|
668
|
-
* privateKeyToAccount("0x..."),
|
|
669
|
-
* ];
|
|
589
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
590
|
+
* ] as const;
|
|
670
591
|
*
|
|
671
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
592
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
672
593
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
673
594
|
*
|
|
674
595
|
* const data = await multiSignClient.registerReferrer({ code: "TEST" });
|
|
@@ -685,17 +606,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
685
606
|
* @example
|
|
686
607
|
* ```ts
|
|
687
608
|
* import * as hl from "@nktkas/hyperliquid";
|
|
688
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
689
609
|
*
|
|
690
610
|
* const multiSignAddress = "0x...";
|
|
691
611
|
* const signers = [
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
* // ...
|
|
695
|
-
* privateKeyToAccount("0x..."),
|
|
696
|
-
* ];
|
|
612
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
613
|
+
* ] as const;
|
|
697
614
|
*
|
|
698
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
615
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
699
616
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
700
617
|
*
|
|
701
618
|
* const data = await multiSignClient.reserveRequestWeight({ weight: 10 });
|
|
@@ -712,17 +629,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
712
629
|
* @example
|
|
713
630
|
* ```ts
|
|
714
631
|
* import * as hl from "@nktkas/hyperliquid";
|
|
715
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
716
632
|
*
|
|
717
633
|
* const multiSignAddress = "0x...";
|
|
718
634
|
* const signers = [
|
|
719
|
-
*
|
|
720
|
-
*
|
|
721
|
-
* // ...
|
|
722
|
-
* privateKeyToAccount("0x..."),
|
|
723
|
-
* ];
|
|
635
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
636
|
+
* ] as const;
|
|
724
637
|
*
|
|
725
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
638
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
726
639
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
727
640
|
*
|
|
728
641
|
* const data = await multiSignClient.scheduleCancel({ time: Date.now() + 3600000 });
|
|
@@ -740,17 +653,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
740
653
|
* @example
|
|
741
654
|
* ```ts
|
|
742
655
|
* import * as hl from "@nktkas/hyperliquid";
|
|
743
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
744
656
|
*
|
|
745
657
|
* const multiSignAddress = "0x...";
|
|
746
658
|
* const signers = [
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
* // ...
|
|
750
|
-
* privateKeyToAccount("0x..."),
|
|
751
|
-
* ];
|
|
659
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
660
|
+
* ] as const;
|
|
752
661
|
*
|
|
753
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
662
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
754
663
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
755
664
|
*
|
|
756
665
|
* const data = await multiSignClient.setDisplayName({ displayName: "My Name" });
|
|
@@ -767,17 +676,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
767
676
|
* @example
|
|
768
677
|
* ```ts
|
|
769
678
|
* import * as hl from "@nktkas/hyperliquid";
|
|
770
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
771
679
|
*
|
|
772
680
|
* const multiSignAddress = "0x...";
|
|
773
681
|
* const signers = [
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
* // ...
|
|
777
|
-
* privateKeyToAccount("0x..."),
|
|
778
|
-
* ];
|
|
682
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
683
|
+
* ] as const;
|
|
779
684
|
*
|
|
780
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
685
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
781
686
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
782
687
|
*
|
|
783
688
|
* const data = await multiSignClient.setReferrer({ code: "TEST" });
|
|
@@ -794,17 +699,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
794
699
|
* @example
|
|
795
700
|
* ```ts
|
|
796
701
|
* import * as hl from "@nktkas/hyperliquid";
|
|
797
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
798
702
|
*
|
|
799
703
|
* const multiSignAddress = "0x...";
|
|
800
704
|
* const signers = [
|
|
801
|
-
*
|
|
802
|
-
*
|
|
803
|
-
* // ...
|
|
804
|
-
* privateKeyToAccount("0x..."),
|
|
805
|
-
* ];
|
|
705
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
706
|
+
* ] as const;
|
|
806
707
|
*
|
|
807
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
708
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
808
709
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
809
710
|
*
|
|
810
711
|
* const data = await multiSignClient.spotDeploy({
|
|
@@ -836,17 +737,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
836
737
|
* @example
|
|
837
738
|
* ```ts
|
|
838
739
|
* import * as hl from "@nktkas/hyperliquid";
|
|
839
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
840
740
|
*
|
|
841
741
|
* const multiSignAddress = "0x...";
|
|
842
742
|
* const signers = [
|
|
843
|
-
*
|
|
844
|
-
*
|
|
845
|
-
* // ...
|
|
846
|
-
* privateKeyToAccount("0x..."),
|
|
847
|
-
* ];
|
|
743
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
744
|
+
* ] as const;
|
|
848
745
|
*
|
|
849
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
746
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
850
747
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
851
748
|
*
|
|
852
749
|
* const data = await multiSignClient.spotSend({
|
|
@@ -867,17 +764,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
867
764
|
* @example
|
|
868
765
|
* ```ts
|
|
869
766
|
* import * as hl from "@nktkas/hyperliquid";
|
|
870
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
871
767
|
*
|
|
872
768
|
* const multiSignAddress = "0x...";
|
|
873
769
|
* const signers = [
|
|
874
|
-
*
|
|
875
|
-
*
|
|
876
|
-
* // ...
|
|
877
|
-
* privateKeyToAccount("0x..."),
|
|
878
|
-
* ];
|
|
770
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
771
|
+
* ] as const;
|
|
879
772
|
*
|
|
880
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
773
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
881
774
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
882
775
|
*
|
|
883
776
|
* const data = await multiSignClient.spotUser({ toggleSpotDusting: { optOut: false } });
|
|
@@ -894,17 +787,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
894
787
|
* @example
|
|
895
788
|
* ```ts
|
|
896
789
|
* import * as hl from "@nktkas/hyperliquid";
|
|
897
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
898
790
|
*
|
|
899
791
|
* const multiSignAddress = "0x...";
|
|
900
792
|
* const signers = [
|
|
901
|
-
*
|
|
902
|
-
*
|
|
903
|
-
* // ...
|
|
904
|
-
* privateKeyToAccount("0x..."),
|
|
905
|
-
* ];
|
|
793
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
794
|
+
* ] as const;
|
|
906
795
|
*
|
|
907
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
796
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
908
797
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
909
798
|
*
|
|
910
799
|
* const data = await multiSignClient.subAccountSpotTransfer({
|
|
@@ -926,17 +815,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
926
815
|
* @example
|
|
927
816
|
* ```ts
|
|
928
817
|
* import * as hl from "@nktkas/hyperliquid";
|
|
929
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
930
818
|
*
|
|
931
819
|
* const multiSignAddress = "0x...";
|
|
932
820
|
* const signers = [
|
|
933
|
-
*
|
|
934
|
-
*
|
|
935
|
-
* // ...
|
|
936
|
-
* privateKeyToAccount("0x..."),
|
|
937
|
-
* ];
|
|
821
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
822
|
+
* ] as const;
|
|
938
823
|
*
|
|
939
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
824
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
940
825
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
941
826
|
*
|
|
942
827
|
* const data = await multiSignClient.subAccountTransfer({
|
|
@@ -957,17 +842,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
957
842
|
* @example
|
|
958
843
|
* ```ts
|
|
959
844
|
* import * as hl from "@nktkas/hyperliquid";
|
|
960
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
961
845
|
*
|
|
962
846
|
* const multiSignAddress = "0x...";
|
|
963
847
|
* const signers = [
|
|
964
|
-
*
|
|
965
|
-
*
|
|
966
|
-
* // ...
|
|
967
|
-
* privateKeyToAccount("0x..."),
|
|
968
|
-
* ];
|
|
848
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
849
|
+
* ] as const;
|
|
969
850
|
*
|
|
970
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
851
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
971
852
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
972
853
|
*
|
|
973
854
|
* const data = await multiSignClient.tokenDelegate({
|
|
@@ -988,17 +869,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
988
869
|
* @example
|
|
989
870
|
* ```ts
|
|
990
871
|
* import * as hl from "@nktkas/hyperliquid";
|
|
991
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
992
872
|
*
|
|
993
873
|
* const multiSignAddress = "0x...";
|
|
994
874
|
* const signers = [
|
|
995
|
-
*
|
|
996
|
-
*
|
|
997
|
-
* // ...
|
|
998
|
-
* privateKeyToAccount("0x..."),
|
|
999
|
-
* ];
|
|
875
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
876
|
+
* ] as const;
|
|
1000
877
|
*
|
|
1001
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
878
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1002
879
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1003
880
|
*
|
|
1004
881
|
* const data = await multiSignClient.twapCancel({
|
|
@@ -1018,17 +895,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1018
895
|
* @example
|
|
1019
896
|
* ```ts
|
|
1020
897
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1021
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1022
898
|
*
|
|
1023
899
|
* const multiSignAddress = "0x...";
|
|
1024
900
|
* const signers = [
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1027
|
-
* // ...
|
|
1028
|
-
* privateKeyToAccount("0x..."),
|
|
1029
|
-
* ];
|
|
901
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
902
|
+
* ] as const;
|
|
1030
903
|
*
|
|
1031
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
904
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1032
905
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1033
906
|
*
|
|
1034
907
|
* const data = await multiSignClient.twapOrder({
|
|
@@ -1052,17 +925,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1052
925
|
* @example
|
|
1053
926
|
* ```ts
|
|
1054
927
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1055
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1056
928
|
*
|
|
1057
929
|
* const multiSignAddress = "0x...";
|
|
1058
930
|
* const signers = [
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1061
|
-
* // ...
|
|
1062
|
-
* privateKeyToAccount("0x..."),
|
|
1063
|
-
* ];
|
|
931
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
932
|
+
* ] as const;
|
|
1064
933
|
*
|
|
1065
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
934
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1066
935
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1067
936
|
*
|
|
1068
937
|
* const data = await multiSignClient.updateIsolatedMargin({
|
|
@@ -1083,17 +952,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1083
952
|
* @example
|
|
1084
953
|
* ```ts
|
|
1085
954
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1086
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1087
955
|
*
|
|
1088
956
|
* const multiSignAddress = "0x...";
|
|
1089
957
|
* const signers = [
|
|
1090
|
-
*
|
|
1091
|
-
*
|
|
1092
|
-
* // ...
|
|
1093
|
-
* privateKeyToAccount("0x..."),
|
|
1094
|
-
* ];
|
|
958
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
959
|
+
* ] as const;
|
|
1095
960
|
*
|
|
1096
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
961
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1097
962
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1098
963
|
*
|
|
1099
964
|
* const data = await multiSignClient.updateLeverage({
|
|
@@ -1114,17 +979,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1114
979
|
* @example
|
|
1115
980
|
* ```ts
|
|
1116
981
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1117
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1118
982
|
*
|
|
1119
983
|
* const multiSignAddress = "0x...";
|
|
1120
984
|
* const signers = [
|
|
1121
|
-
*
|
|
1122
|
-
*
|
|
1123
|
-
* // ...
|
|
1124
|
-
* privateKeyToAccount("0x..."),
|
|
1125
|
-
* ];
|
|
985
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
986
|
+
* ] as const;
|
|
1126
987
|
*
|
|
1127
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
988
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1128
989
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1129
990
|
*
|
|
1130
991
|
* const data = await multiSignClient.usdClassTransfer({ amount: "1", toPerp: true });
|
|
@@ -1141,17 +1002,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1141
1002
|
* @example
|
|
1142
1003
|
* ```ts
|
|
1143
1004
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1144
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1145
1005
|
*
|
|
1146
1006
|
* const multiSignAddress = "0x...";
|
|
1147
1007
|
* const signers = [
|
|
1148
|
-
*
|
|
1149
|
-
*
|
|
1150
|
-
* // ...
|
|
1151
|
-
* privateKeyToAccount("0x..."),
|
|
1152
|
-
* ];
|
|
1008
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1009
|
+
* ] as const;
|
|
1153
1010
|
*
|
|
1154
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1011
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1155
1012
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1156
1013
|
*
|
|
1157
1014
|
* const data = await multiSignClient.usdSend({ destination: "0x...", amount: "1" });
|
|
@@ -1168,17 +1025,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1168
1025
|
* @example
|
|
1169
1026
|
* ```ts
|
|
1170
1027
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1171
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1172
1028
|
*
|
|
1173
1029
|
* const multiSignAddress = "0x...";
|
|
1174
1030
|
* const signers = [
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1177
|
-
* // ...
|
|
1178
|
-
* privateKeyToAccount("0x..."),
|
|
1179
|
-
* ];
|
|
1031
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1032
|
+
* ] as const;
|
|
1180
1033
|
*
|
|
1181
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1034
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1182
1035
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1183
1036
|
*
|
|
1184
1037
|
* const data = await multiSignClient.vaultDistribute({ vaultAddress: "0x...", usd: 10 * 1e6 });
|
|
@@ -1195,17 +1048,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1195
1048
|
* @example
|
|
1196
1049
|
* ```ts
|
|
1197
1050
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1198
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1199
1051
|
*
|
|
1200
1052
|
* const multiSignAddress = "0x...";
|
|
1201
1053
|
* const signers = [
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
* // ...
|
|
1205
|
-
* privateKeyToAccount("0x..."),
|
|
1206
|
-
* ];
|
|
1054
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1055
|
+
* ] as const;
|
|
1207
1056
|
*
|
|
1208
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1057
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1209
1058
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1210
1059
|
*
|
|
1211
1060
|
* const data = await multiSignClient.vaultModify({
|
|
@@ -1226,17 +1075,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1226
1075
|
* @example
|
|
1227
1076
|
* ```ts
|
|
1228
1077
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1229
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1230
1078
|
*
|
|
1231
1079
|
* const multiSignAddress = "0x...";
|
|
1232
1080
|
* const signers = [
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1235
|
-
* // ...
|
|
1236
|
-
* privateKeyToAccount("0x..."),
|
|
1237
|
-
* ];
|
|
1081
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1082
|
+
* ] as const;
|
|
1238
1083
|
*
|
|
1239
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1084
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1240
1085
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1241
1086
|
*
|
|
1242
1087
|
* const data = await multiSignClient.vaultTransfer({
|
|
@@ -1257,17 +1102,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1257
1102
|
* @example
|
|
1258
1103
|
* ```ts
|
|
1259
1104
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1260
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1261
1105
|
*
|
|
1262
1106
|
* const multiSignAddress = "0x...";
|
|
1263
1107
|
* const signers = [
|
|
1264
|
-
*
|
|
1265
|
-
*
|
|
1266
|
-
* // ...
|
|
1267
|
-
* privateKeyToAccount("0x..."),
|
|
1268
|
-
* ];
|
|
1108
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1109
|
+
* ] as const;
|
|
1269
1110
|
*
|
|
1270
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1111
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1271
1112
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1272
1113
|
*
|
|
1273
1114
|
* const data = await multiSignClient.withdraw3({ destination: "0x...", amount: "1" });
|