@nktkas/hyperliquid 0.22.0 → 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 +122 -147
- package/esm/src/clients/multiSign.d.ts +129 -282
- package/esm/src/clients/multiSign.d.ts.map +1 -1
- package/esm/src/clients/multiSign.js +125 -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} +1 -401
- 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/esm/src/types/exchange/requests.d.ts +1 -1
- package/esm/src/types/exchange/requests.d.ts.map +1 -1
- 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 +206 -231
- package/script/src/clients/multiSign.d.ts +129 -282
- package/script/src/clients/multiSign.d.ts.map +1 -1
- package/script/src/clients/multiSign.js +170 -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} +2 -410
- 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/script/src/types/exchange/requests.d.ts +1 -1
- package/script/src/types/exchange/requests.d.ts.map +1 -1
- 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,17 +2,20 @@ 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
|
-
export interface MultiSignClientParameters<T extends IRequestTransport = IRequestTransport, S extends [AbstractWalletWithAddress, ...AbstractWallet[]] = [
|
|
8
|
+
export interface MultiSignClientParameters<T extends IRequestTransport = IRequestTransport, S extends readonly [AbstractWalletWithAddress, ...AbstractWallet[]] = [
|
|
9
|
+
AbstractWalletWithAddress,
|
|
10
|
+
...AbstractWallet[]
|
|
11
|
+
]> extends Omit<ExchangeClientParameters<T, S[0]>, "wallet"> {
|
|
9
12
|
/** The multi-signature account address. */
|
|
10
13
|
multiSignAddress: Hex;
|
|
11
14
|
/** Array of wallets used for multi-signature operations. The first wallet acts as the leader. */
|
|
12
15
|
signers: S;
|
|
13
16
|
}
|
|
14
17
|
/** Abstract interface for a wallet that can sign typed data and has wallet address. */
|
|
15
|
-
export type AbstractWalletWithAddress = AbstractViemWalletClientWithAddress | AbstractEthersSignerWithAddress | AbstractEthersV5SignerWithAddress | AbstractWindowEthereum;
|
|
18
|
+
export type AbstractWalletWithAddress = Hex | AbstractViemWalletClientWithAddress | AbstractEthersSignerWithAddress | AbstractEthersV5SignerWithAddress | AbstractWindowEthereum;
|
|
16
19
|
/** Abstract interface for a [viem wallet](https://viem.sh/docs/clients/wallet) with wallet address. */
|
|
17
20
|
export interface AbstractViemWalletClientWithAddress extends AbstractViemWalletClient {
|
|
18
21
|
address: Hex;
|
|
@@ -30,7 +33,10 @@ export interface AbstractEthersV5SignerWithAddress extends AbstractEthersV5Signe
|
|
|
30
33
|
* @typeParam T The transport used to connect to the Hyperliquid API.
|
|
31
34
|
* @typeParam S Array of wallets where the first wallet acts as the leader.
|
|
32
35
|
*/
|
|
33
|
-
export declare class MultiSignClient<T extends IRequestTransport = IRequestTransport, S extends [AbstractWalletWithAddress, ...AbstractWallet[]] = [
|
|
36
|
+
export declare class MultiSignClient<T extends IRequestTransport = IRequestTransport, S extends readonly [AbstractWalletWithAddress, ...AbstractWallet[]] = [
|
|
37
|
+
AbstractWalletWithAddress,
|
|
38
|
+
...AbstractWallet[]
|
|
39
|
+
]> extends ExchangeClient<T, S[0]> implements MultiSignClientParameters<T, S> {
|
|
34
40
|
multiSignAddress: Hex;
|
|
35
41
|
signers: S;
|
|
36
42
|
/**
|
|
@@ -44,14 +50,11 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
44
50
|
* @example
|
|
45
51
|
* ```ts
|
|
46
52
|
* import * as hl from "@nktkas/hyperliquid";
|
|
47
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
48
53
|
*
|
|
49
54
|
* const multiSignAddress = "0x...";
|
|
50
55
|
* const signers = [
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* privateKeyToAccount("0x..."),
|
|
54
|
-
* ];
|
|
56
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
57
|
+
* ] as const;
|
|
55
58
|
*
|
|
56
59
|
* const transport = new hl.HttpTransport();
|
|
57
60
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
@@ -68,17 +71,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
68
71
|
* @example
|
|
69
72
|
* ```ts
|
|
70
73
|
* import * as hl from "@nktkas/hyperliquid";
|
|
71
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
72
74
|
*
|
|
73
75
|
* const multiSignAddress = "0x...";
|
|
74
76
|
* const signers = [
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* // ...
|
|
78
|
-
* privateKeyToAccount("0x..."),
|
|
79
|
-
* ];
|
|
77
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
78
|
+
* ] as const;
|
|
80
79
|
*
|
|
81
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
80
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
82
81
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
83
82
|
*
|
|
84
83
|
* const data = await multiSignClient.approveAgent({ agentAddress: "0x...", agentName: "agentName" });
|
|
@@ -95,17 +94,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
95
94
|
* @example
|
|
96
95
|
* ```ts
|
|
97
96
|
* import * as hl from "@nktkas/hyperliquid";
|
|
98
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
99
97
|
*
|
|
100
98
|
* const multiSignAddress = "0x...";
|
|
101
99
|
* const signers = [
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* // ...
|
|
105
|
-
* privateKeyToAccount("0x..."),
|
|
106
|
-
* ];
|
|
100
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
101
|
+
* ] as const;
|
|
107
102
|
*
|
|
108
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
103
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
109
104
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
110
105
|
*
|
|
111
106
|
* const data = await multiSignClient.approveBuilderFee({ maxFeeRate: "0.01%", builder: "0x..." });
|
|
@@ -122,17 +117,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
122
117
|
* @example
|
|
123
118
|
* ```ts
|
|
124
119
|
* import * as hl from "@nktkas/hyperliquid";
|
|
125
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
126
120
|
*
|
|
127
121
|
* const multiSignAddress = "0x...";
|
|
128
122
|
* const signers = [
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* // ...
|
|
132
|
-
* privateKeyToAccount("0x..."),
|
|
133
|
-
* ];
|
|
123
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
124
|
+
* ] as const;
|
|
134
125
|
*
|
|
135
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
126
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
136
127
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
137
128
|
*
|
|
138
129
|
* const data = await multiSignClient.batchModify({
|
|
@@ -166,17 +157,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
166
157
|
* @example
|
|
167
158
|
* ```ts
|
|
168
159
|
* import * as hl from "@nktkas/hyperliquid";
|
|
169
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
170
160
|
*
|
|
171
161
|
* const multiSignAddress = "0x...";
|
|
172
162
|
* const signers = [
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* // ...
|
|
176
|
-
* privateKeyToAccount("0x..."),
|
|
177
|
-
* ];
|
|
163
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
164
|
+
* ] as const;
|
|
178
165
|
*
|
|
179
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
166
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
180
167
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
181
168
|
*
|
|
182
169
|
* const data = await multiSignClient.cancel({
|
|
@@ -198,17 +185,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
198
185
|
* @example
|
|
199
186
|
* ```ts
|
|
200
187
|
* import * as hl from "@nktkas/hyperliquid";
|
|
201
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
202
188
|
*
|
|
203
189
|
* const multiSignAddress = "0x...";
|
|
204
190
|
* const signers = [
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* // ...
|
|
208
|
-
* privateKeyToAccount("0x..."),
|
|
209
|
-
* ];
|
|
191
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
192
|
+
* ] as const;
|
|
210
193
|
*
|
|
211
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
194
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
212
195
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
213
196
|
*
|
|
214
197
|
* const data = await multiSignClient.cancelByCloid({
|
|
@@ -229,17 +212,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
229
212
|
* @example
|
|
230
213
|
* ```ts
|
|
231
214
|
* import * as hl from "@nktkas/hyperliquid";
|
|
232
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
233
215
|
*
|
|
234
216
|
* const multiSignAddress = "0x...";
|
|
235
217
|
* const signers = [
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* // ...
|
|
239
|
-
* privateKeyToAccount("0x..."),
|
|
240
|
-
* ];
|
|
218
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
219
|
+
* ] as const;
|
|
241
220
|
*
|
|
242
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
221
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
243
222
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
244
223
|
*
|
|
245
224
|
* const data = await multiSignClient.cDeposit({ wei: 1 * 1e8 });
|
|
@@ -256,17 +235,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
256
235
|
* @example
|
|
257
236
|
* ```ts
|
|
258
237
|
* import * as hl from "@nktkas/hyperliquid";
|
|
259
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
260
238
|
*
|
|
261
239
|
* const multiSignAddress = "0x...";
|
|
262
240
|
* const signers = [
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* // ...
|
|
266
|
-
* privateKeyToAccount("0x..."),
|
|
267
|
-
* ];
|
|
241
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
242
|
+
* ] as const;
|
|
268
243
|
*
|
|
269
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
244
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
270
245
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
271
246
|
*
|
|
272
247
|
* const data = await multiSignClient.claimRewards();
|
|
@@ -283,17 +258,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
283
258
|
* @example
|
|
284
259
|
* ```ts
|
|
285
260
|
* import * as hl from "@nktkas/hyperliquid";
|
|
286
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
287
261
|
*
|
|
288
262
|
* const multiSignAddress = "0x...";
|
|
289
263
|
* const signers = [
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
* // ...
|
|
293
|
-
* privateKeyToAccount("0x..."),
|
|
294
|
-
* ];
|
|
264
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
265
|
+
* ] as const;
|
|
295
266
|
*
|
|
296
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
267
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
297
268
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
298
269
|
*
|
|
299
270
|
* const data = await multiSignClient.convertToMultiSigUser({ // convert to normal user
|
|
@@ -313,17 +284,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
313
284
|
* @example
|
|
314
285
|
* ```ts
|
|
315
286
|
* import * as hl from "@nktkas/hyperliquid";
|
|
316
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
317
287
|
*
|
|
318
288
|
* const multiSignAddress = "0x...";
|
|
319
289
|
* const signers = [
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
* // ...
|
|
323
|
-
* privateKeyToAccount("0x..."),
|
|
324
|
-
* ];
|
|
290
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
291
|
+
* ] as const;
|
|
325
292
|
*
|
|
326
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
293
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
327
294
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
328
295
|
*
|
|
329
296
|
* const data = await multiSignClient.createSubAccount({ name: "subAccountName" });
|
|
@@ -340,17 +307,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
340
307
|
* @example
|
|
341
308
|
* ```ts
|
|
342
309
|
* import * as hl from "@nktkas/hyperliquid";
|
|
343
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
344
310
|
*
|
|
345
311
|
* const multiSignAddress = "0x...";
|
|
346
312
|
* const signers = [
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
* // ...
|
|
350
|
-
* privateKeyToAccount("0x..."),
|
|
351
|
-
* ];
|
|
313
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
314
|
+
* ] as const;
|
|
352
315
|
*
|
|
353
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
316
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
354
317
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
355
318
|
*
|
|
356
319
|
* const data = await multiSignClient.createVault({
|
|
@@ -371,17 +334,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
371
334
|
* @example
|
|
372
335
|
* ```ts
|
|
373
336
|
* import * as hl from "@nktkas/hyperliquid";
|
|
374
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
375
337
|
*
|
|
376
338
|
* const multiSignAddress = "0x...";
|
|
377
339
|
* const signers = [
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
* // ...
|
|
381
|
-
* privateKeyToAccount("0x..."),
|
|
382
|
-
* ];
|
|
340
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
341
|
+
* ] as const;
|
|
383
342
|
*
|
|
384
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
343
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
385
344
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
386
345
|
*
|
|
387
346
|
* // Jail self
|
|
@@ -402,17 +361,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
402
361
|
* @example
|
|
403
362
|
* ```ts
|
|
404
363
|
* import * as hl from "@nktkas/hyperliquid";
|
|
405
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
406
364
|
*
|
|
407
365
|
* const multiSignAddress = "0x...";
|
|
408
366
|
* const signers = [
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
* // ...
|
|
412
|
-
* privateKeyToAccount("0x..."),
|
|
413
|
-
* ];
|
|
367
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
368
|
+
* ] as const;
|
|
414
369
|
*
|
|
415
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
370
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
416
371
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
417
372
|
*
|
|
418
373
|
* // Change validator profile
|
|
@@ -438,17 +393,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
438
393
|
* @example
|
|
439
394
|
* ```ts
|
|
440
395
|
* import * as hl from "@nktkas/hyperliquid";
|
|
441
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
442
396
|
*
|
|
443
397
|
* const multiSignAddress = "0x...";
|
|
444
398
|
* const signers = [
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
* // ...
|
|
448
|
-
* privateKeyToAccount("0x..."),
|
|
449
|
-
* ];
|
|
399
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
400
|
+
* ] as const;
|
|
450
401
|
*
|
|
451
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
402
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
452
403
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
453
404
|
*
|
|
454
405
|
* const data = await multiSignClient.cWithdraw({ wei: 1 * 1e8 });
|
|
@@ -465,17 +416,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
465
416
|
* @example
|
|
466
417
|
* ```ts
|
|
467
418
|
* import * as hl from "@nktkas/hyperliquid";
|
|
468
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
469
419
|
*
|
|
470
420
|
* const multiSignAddress = "0x...";
|
|
471
421
|
* const signers = [
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
* // ...
|
|
475
|
-
* privateKeyToAccount("0x..."),
|
|
476
|
-
* ];
|
|
422
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
423
|
+
* ] as const;
|
|
477
424
|
*
|
|
478
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
425
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
479
426
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
480
427
|
*
|
|
481
428
|
* const data = await multiSignClient.evmUserModify({ usingBigBlocks: true });
|
|
@@ -492,17 +439,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
492
439
|
* @example
|
|
493
440
|
* ```ts
|
|
494
441
|
* import * as hl from "@nktkas/hyperliquid";
|
|
495
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
496
442
|
*
|
|
497
443
|
* const multiSignAddress = "0x...";
|
|
498
444
|
* const signers = [
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
* // ...
|
|
502
|
-
* privateKeyToAccount("0x..."),
|
|
503
|
-
* ];
|
|
445
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
446
|
+
* ] as const;
|
|
504
447
|
*
|
|
505
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
448
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
506
449
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
507
450
|
*
|
|
508
451
|
* const data = await multiSignClient.modify({
|
|
@@ -538,17 +481,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
538
481
|
* @example
|
|
539
482
|
* ```ts
|
|
540
483
|
* import * as hl from "@nktkas/hyperliquid";
|
|
541
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
542
484
|
*
|
|
543
485
|
* const multiSignAddress = "0x...";
|
|
544
486
|
* const signers = [
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
* // ...
|
|
548
|
-
* privateKeyToAccount("0x..."),
|
|
549
|
-
* ];
|
|
487
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
488
|
+
* ] as const;
|
|
550
489
|
*
|
|
551
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
490
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
552
491
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
553
492
|
*
|
|
554
493
|
* const data = await multiSignClient.order({
|
|
@@ -580,17 +519,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
580
519
|
* @example
|
|
581
520
|
* ```ts
|
|
582
521
|
* import * as hl from "@nktkas/hyperliquid";
|
|
583
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
584
522
|
*
|
|
585
523
|
* const multiSignAddress = "0x...";
|
|
586
524
|
* const signers = [
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
* // ...
|
|
590
|
-
* privateKeyToAccount("0x..."),
|
|
591
|
-
* ];
|
|
525
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
526
|
+
* ] as const;
|
|
592
527
|
*
|
|
593
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
528
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
594
529
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
595
530
|
*
|
|
596
531
|
* const data = await multiSignClient.perpDeploy({
|
|
@@ -620,17 +555,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
620
555
|
* @example
|
|
621
556
|
* ```ts
|
|
622
557
|
* import * as hl from "@nktkas/hyperliquid";
|
|
623
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
624
558
|
*
|
|
625
559
|
* const multiSignAddress = "0x...";
|
|
626
560
|
* const signers = [
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
* // ...
|
|
630
|
-
* privateKeyToAccount("0x..."),
|
|
631
|
-
* ];
|
|
561
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
562
|
+
* ] as const;
|
|
632
563
|
*
|
|
633
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
564
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
634
565
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
635
566
|
*
|
|
636
567
|
* const data = await multiSignClient.perpDexClassTransfer({
|
|
@@ -652,17 +583,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
652
583
|
* @example
|
|
653
584
|
* ```ts
|
|
654
585
|
* import * as hl from "@nktkas/hyperliquid";
|
|
655
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
656
586
|
*
|
|
657
587
|
* const multiSignAddress = "0x...";
|
|
658
588
|
* const signers = [
|
|
659
|
-
*
|
|
660
|
-
*
|
|
661
|
-
* // ...
|
|
662
|
-
* privateKeyToAccount("0x..."),
|
|
663
|
-
* ];
|
|
589
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
590
|
+
* ] as const;
|
|
664
591
|
*
|
|
665
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
592
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
666
593
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
667
594
|
*
|
|
668
595
|
* const data = await multiSignClient.registerReferrer({ code: "TEST" });
|
|
@@ -679,17 +606,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
679
606
|
* @example
|
|
680
607
|
* ```ts
|
|
681
608
|
* import * as hl from "@nktkas/hyperliquid";
|
|
682
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
683
609
|
*
|
|
684
610
|
* const multiSignAddress = "0x...";
|
|
685
611
|
* const signers = [
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
* // ...
|
|
689
|
-
* privateKeyToAccount("0x..."),
|
|
690
|
-
* ];
|
|
612
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
613
|
+
* ] as const;
|
|
691
614
|
*
|
|
692
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
615
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
693
616
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
694
617
|
*
|
|
695
618
|
* const data = await multiSignClient.reserveRequestWeight({ weight: 10 });
|
|
@@ -706,17 +629,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
706
629
|
* @example
|
|
707
630
|
* ```ts
|
|
708
631
|
* import * as hl from "@nktkas/hyperliquid";
|
|
709
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
710
632
|
*
|
|
711
633
|
* const multiSignAddress = "0x...";
|
|
712
634
|
* const signers = [
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
* // ...
|
|
716
|
-
* privateKeyToAccount("0x..."),
|
|
717
|
-
* ];
|
|
635
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
636
|
+
* ] as const;
|
|
718
637
|
*
|
|
719
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
638
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
720
639
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
721
640
|
*
|
|
722
641
|
* const data = await multiSignClient.scheduleCancel({ time: Date.now() + 3600000 });
|
|
@@ -734,17 +653,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
734
653
|
* @example
|
|
735
654
|
* ```ts
|
|
736
655
|
* import * as hl from "@nktkas/hyperliquid";
|
|
737
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
738
656
|
*
|
|
739
657
|
* const multiSignAddress = "0x...";
|
|
740
658
|
* const signers = [
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
* // ...
|
|
744
|
-
* privateKeyToAccount("0x..."),
|
|
745
|
-
* ];
|
|
659
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
660
|
+
* ] as const;
|
|
746
661
|
*
|
|
747
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
662
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
748
663
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
749
664
|
*
|
|
750
665
|
* const data = await multiSignClient.setDisplayName({ displayName: "My Name" });
|
|
@@ -761,17 +676,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
761
676
|
* @example
|
|
762
677
|
* ```ts
|
|
763
678
|
* import * as hl from "@nktkas/hyperliquid";
|
|
764
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
765
679
|
*
|
|
766
680
|
* const multiSignAddress = "0x...";
|
|
767
681
|
* const signers = [
|
|
768
|
-
*
|
|
769
|
-
*
|
|
770
|
-
* // ...
|
|
771
|
-
* privateKeyToAccount("0x..."),
|
|
772
|
-
* ];
|
|
682
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
683
|
+
* ] as const;
|
|
773
684
|
*
|
|
774
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
685
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
775
686
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
776
687
|
*
|
|
777
688
|
* const data = await multiSignClient.setReferrer({ code: "TEST" });
|
|
@@ -788,17 +699,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
788
699
|
* @example
|
|
789
700
|
* ```ts
|
|
790
701
|
* import * as hl from "@nktkas/hyperliquid";
|
|
791
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
792
702
|
*
|
|
793
703
|
* const multiSignAddress = "0x...";
|
|
794
704
|
* const signers = [
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
* // ...
|
|
798
|
-
* privateKeyToAccount("0x..."),
|
|
799
|
-
* ];
|
|
705
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
706
|
+
* ] as const;
|
|
800
707
|
*
|
|
801
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
708
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
802
709
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
803
710
|
*
|
|
804
711
|
* const data = await multiSignClient.spotDeploy({
|
|
@@ -830,17 +737,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
830
737
|
* @example
|
|
831
738
|
* ```ts
|
|
832
739
|
* import * as hl from "@nktkas/hyperliquid";
|
|
833
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
834
740
|
*
|
|
835
741
|
* const multiSignAddress = "0x...";
|
|
836
742
|
* const signers = [
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
* // ...
|
|
840
|
-
* privateKeyToAccount("0x..."),
|
|
841
|
-
* ];
|
|
743
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
744
|
+
* ] as const;
|
|
842
745
|
*
|
|
843
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
746
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
844
747
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
845
748
|
*
|
|
846
749
|
* const data = await multiSignClient.spotSend({
|
|
@@ -861,17 +764,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
861
764
|
* @example
|
|
862
765
|
* ```ts
|
|
863
766
|
* import * as hl from "@nktkas/hyperliquid";
|
|
864
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
865
767
|
*
|
|
866
768
|
* const multiSignAddress = "0x...";
|
|
867
769
|
* const signers = [
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
* // ...
|
|
871
|
-
* privateKeyToAccount("0x..."),
|
|
872
|
-
* ];
|
|
770
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
771
|
+
* ] as const;
|
|
873
772
|
*
|
|
874
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
773
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
875
774
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
876
775
|
*
|
|
877
776
|
* const data = await multiSignClient.spotUser({ toggleSpotDusting: { optOut: false } });
|
|
@@ -888,17 +787,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
888
787
|
* @example
|
|
889
788
|
* ```ts
|
|
890
789
|
* import * as hl from "@nktkas/hyperliquid";
|
|
891
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
892
790
|
*
|
|
893
791
|
* const multiSignAddress = "0x...";
|
|
894
792
|
* const signers = [
|
|
895
|
-
*
|
|
896
|
-
*
|
|
897
|
-
* // ...
|
|
898
|
-
* privateKeyToAccount("0x..."),
|
|
899
|
-
* ];
|
|
793
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
794
|
+
* ] as const;
|
|
900
795
|
*
|
|
901
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
796
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
902
797
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
903
798
|
*
|
|
904
799
|
* const data = await multiSignClient.subAccountSpotTransfer({
|
|
@@ -920,17 +815,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
920
815
|
* @example
|
|
921
816
|
* ```ts
|
|
922
817
|
* import * as hl from "@nktkas/hyperliquid";
|
|
923
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
924
818
|
*
|
|
925
819
|
* const multiSignAddress = "0x...";
|
|
926
820
|
* const signers = [
|
|
927
|
-
*
|
|
928
|
-
*
|
|
929
|
-
* // ...
|
|
930
|
-
* privateKeyToAccount("0x..."),
|
|
931
|
-
* ];
|
|
821
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
822
|
+
* ] as const;
|
|
932
823
|
*
|
|
933
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
824
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
934
825
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
935
826
|
*
|
|
936
827
|
* const data = await multiSignClient.subAccountTransfer({
|
|
@@ -951,17 +842,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
951
842
|
* @example
|
|
952
843
|
* ```ts
|
|
953
844
|
* import * as hl from "@nktkas/hyperliquid";
|
|
954
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
955
845
|
*
|
|
956
846
|
* const multiSignAddress = "0x...";
|
|
957
847
|
* const signers = [
|
|
958
|
-
*
|
|
959
|
-
*
|
|
960
|
-
* // ...
|
|
961
|
-
* privateKeyToAccount("0x..."),
|
|
962
|
-
* ];
|
|
848
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
849
|
+
* ] as const;
|
|
963
850
|
*
|
|
964
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
851
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
965
852
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
966
853
|
*
|
|
967
854
|
* const data = await multiSignClient.tokenDelegate({
|
|
@@ -982,17 +869,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
982
869
|
* @example
|
|
983
870
|
* ```ts
|
|
984
871
|
* import * as hl from "@nktkas/hyperliquid";
|
|
985
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
986
872
|
*
|
|
987
873
|
* const multiSignAddress = "0x...";
|
|
988
874
|
* const signers = [
|
|
989
|
-
*
|
|
990
|
-
*
|
|
991
|
-
* // ...
|
|
992
|
-
* privateKeyToAccount("0x..."),
|
|
993
|
-
* ];
|
|
875
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
876
|
+
* ] as const;
|
|
994
877
|
*
|
|
995
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
878
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
996
879
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
997
880
|
*
|
|
998
881
|
* const data = await multiSignClient.twapCancel({
|
|
@@ -1012,17 +895,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1012
895
|
* @example
|
|
1013
896
|
* ```ts
|
|
1014
897
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1015
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1016
898
|
*
|
|
1017
899
|
* const multiSignAddress = "0x...";
|
|
1018
900
|
* const signers = [
|
|
1019
|
-
*
|
|
1020
|
-
*
|
|
1021
|
-
* // ...
|
|
1022
|
-
* privateKeyToAccount("0x..."),
|
|
1023
|
-
* ];
|
|
901
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
902
|
+
* ] as const;
|
|
1024
903
|
*
|
|
1025
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
904
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1026
905
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1027
906
|
*
|
|
1028
907
|
* const data = await multiSignClient.twapOrder({
|
|
@@ -1046,17 +925,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1046
925
|
* @example
|
|
1047
926
|
* ```ts
|
|
1048
927
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1049
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1050
928
|
*
|
|
1051
929
|
* const multiSignAddress = "0x...";
|
|
1052
930
|
* const signers = [
|
|
1053
|
-
*
|
|
1054
|
-
*
|
|
1055
|
-
* // ...
|
|
1056
|
-
* privateKeyToAccount("0x..."),
|
|
1057
|
-
* ];
|
|
931
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
932
|
+
* ] as const;
|
|
1058
933
|
*
|
|
1059
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
934
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1060
935
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1061
936
|
*
|
|
1062
937
|
* const data = await multiSignClient.updateIsolatedMargin({
|
|
@@ -1077,17 +952,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1077
952
|
* @example
|
|
1078
953
|
* ```ts
|
|
1079
954
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1080
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1081
955
|
*
|
|
1082
956
|
* const multiSignAddress = "0x...";
|
|
1083
957
|
* const signers = [
|
|
1084
|
-
*
|
|
1085
|
-
*
|
|
1086
|
-
* // ...
|
|
1087
|
-
* privateKeyToAccount("0x..."),
|
|
1088
|
-
* ];
|
|
958
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
959
|
+
* ] as const;
|
|
1089
960
|
*
|
|
1090
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
961
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1091
962
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1092
963
|
*
|
|
1093
964
|
* const data = await multiSignClient.updateLeverage({
|
|
@@ -1108,17 +979,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1108
979
|
* @example
|
|
1109
980
|
* ```ts
|
|
1110
981
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1111
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1112
982
|
*
|
|
1113
983
|
* const multiSignAddress = "0x...";
|
|
1114
984
|
* const signers = [
|
|
1115
|
-
*
|
|
1116
|
-
*
|
|
1117
|
-
* // ...
|
|
1118
|
-
* privateKeyToAccount("0x..."),
|
|
1119
|
-
* ];
|
|
985
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
986
|
+
* ] as const;
|
|
1120
987
|
*
|
|
1121
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
988
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1122
989
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1123
990
|
*
|
|
1124
991
|
* const data = await multiSignClient.usdClassTransfer({ amount: "1", toPerp: true });
|
|
@@ -1135,17 +1002,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1135
1002
|
* @example
|
|
1136
1003
|
* ```ts
|
|
1137
1004
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1138
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1139
1005
|
*
|
|
1140
1006
|
* const multiSignAddress = "0x...";
|
|
1141
1007
|
* const signers = [
|
|
1142
|
-
*
|
|
1143
|
-
*
|
|
1144
|
-
* // ...
|
|
1145
|
-
* privateKeyToAccount("0x..."),
|
|
1146
|
-
* ];
|
|
1008
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1009
|
+
* ] as const;
|
|
1147
1010
|
*
|
|
1148
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1011
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1149
1012
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1150
1013
|
*
|
|
1151
1014
|
* const data = await multiSignClient.usdSend({ destination: "0x...", amount: "1" });
|
|
@@ -1162,17 +1025,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1162
1025
|
* @example
|
|
1163
1026
|
* ```ts
|
|
1164
1027
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1165
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1166
1028
|
*
|
|
1167
1029
|
* const multiSignAddress = "0x...";
|
|
1168
1030
|
* const signers = [
|
|
1169
|
-
*
|
|
1170
|
-
*
|
|
1171
|
-
* // ...
|
|
1172
|
-
* privateKeyToAccount("0x..."),
|
|
1173
|
-
* ];
|
|
1031
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1032
|
+
* ] as const;
|
|
1174
1033
|
*
|
|
1175
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1034
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1176
1035
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1177
1036
|
*
|
|
1178
1037
|
* const data = await multiSignClient.vaultDistribute({ vaultAddress: "0x...", usd: 10 * 1e6 });
|
|
@@ -1189,17 +1048,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1189
1048
|
* @example
|
|
1190
1049
|
* ```ts
|
|
1191
1050
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1192
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1193
1051
|
*
|
|
1194
1052
|
* const multiSignAddress = "0x...";
|
|
1195
1053
|
* const signers = [
|
|
1196
|
-
*
|
|
1197
|
-
*
|
|
1198
|
-
* // ...
|
|
1199
|
-
* privateKeyToAccount("0x..."),
|
|
1200
|
-
* ];
|
|
1054
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1055
|
+
* ] as const;
|
|
1201
1056
|
*
|
|
1202
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1057
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1203
1058
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1204
1059
|
*
|
|
1205
1060
|
* const data = await multiSignClient.vaultModify({
|
|
@@ -1220,17 +1075,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1220
1075
|
* @example
|
|
1221
1076
|
* ```ts
|
|
1222
1077
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1223
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1224
1078
|
*
|
|
1225
1079
|
* const multiSignAddress = "0x...";
|
|
1226
1080
|
* const signers = [
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1229
|
-
* // ...
|
|
1230
|
-
* privateKeyToAccount("0x..."),
|
|
1231
|
-
* ];
|
|
1081
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1082
|
+
* ] as const;
|
|
1232
1083
|
*
|
|
1233
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1084
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1234
1085
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1235
1086
|
*
|
|
1236
1087
|
* const data = await multiSignClient.vaultTransfer({
|
|
@@ -1251,17 +1102,13 @@ export declare class MultiSignClient<T extends IRequestTransport = IRequestTrans
|
|
|
1251
1102
|
* @example
|
|
1252
1103
|
* ```ts
|
|
1253
1104
|
* import * as hl from "@nktkas/hyperliquid";
|
|
1254
|
-
* import { privateKeyToAccount } from "viem/accounts";
|
|
1255
1105
|
*
|
|
1256
1106
|
* const multiSignAddress = "0x...";
|
|
1257
1107
|
* const signers = [
|
|
1258
|
-
*
|
|
1259
|
-
*
|
|
1260
|
-
* // ...
|
|
1261
|
-
* privateKeyToAccount("0x..."),
|
|
1262
|
-
* ];
|
|
1108
|
+
* "0x...", // Private key; or any other wallet libraries
|
|
1109
|
+
* ] as const;
|
|
1263
1110
|
*
|
|
1264
|
-
* const transport = new hl.HttpTransport(); // or WebSocketTransport
|
|
1111
|
+
* const transport = new hl.HttpTransport(); // or `WebSocketTransport`
|
|
1265
1112
|
* const multiSignClient = new hl.MultiSignClient({ transport, multiSignAddress, signers });
|
|
1266
1113
|
*
|
|
1267
1114
|
* const data = await multiSignClient.withdraw3({ destination: "0x...", amount: "1" });
|