@starknetfoundation/krusty-kms-wasm 0.0.0 → 0.4.4
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 +34 -2
- package/krusty_kms_wasm.d.ts +1913 -0
- package/krusty_kms_wasm.js +6903 -0
- package/krusty_kms_wasm_bg.wasm +0 -0
- package/package.json +23 -5
|
@@ -0,0 +1,1913 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* WASM-accessible Tongo account.
|
|
6
|
+
*
|
|
7
|
+
* Wraps the internal SDK account with JavaScript-friendly methods.
|
|
8
|
+
* Handles key management and state tracking for confidential transactions.
|
|
9
|
+
*/
|
|
10
|
+
export class WasmAccount {
|
|
11
|
+
private constructor();
|
|
12
|
+
free(): void;
|
|
13
|
+
[Symbol.dispose](): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get the contract address as hex string.
|
|
16
|
+
*/
|
|
17
|
+
contractAddress(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Decrypt an ElGamal ciphertext and recover the balance value.
|
|
20
|
+
*
|
|
21
|
+
* This performs full decryption including discrete log recovery using
|
|
22
|
+
* brute force search. For large balances, this may be slow.
|
|
23
|
+
*
|
|
24
|
+
* # Arguments
|
|
25
|
+
* * `ciphertext` - The ciphertext to decrypt
|
|
26
|
+
* * `max_search` - Maximum value to search for (default: 1,000,000)
|
|
27
|
+
*
|
|
28
|
+
* # Returns
|
|
29
|
+
* The decrypted balance as a string (for large number support in JS)
|
|
30
|
+
*/
|
|
31
|
+
decryptBalance(ciphertext: WasmCiphertext, max_search?: bigint | null): string;
|
|
32
|
+
/**
|
|
33
|
+
* Decrypt an ElGamal ciphertext using the account key.
|
|
34
|
+
*
|
|
35
|
+
* Returns the decrypted point as `g^m`. The caller must perform discrete
|
|
36
|
+
* log recovery to obtain the actual value `m`.
|
|
37
|
+
*
|
|
38
|
+
* # Arguments
|
|
39
|
+
* * `ciphertext` - The ciphertext to decrypt
|
|
40
|
+
*
|
|
41
|
+
* # Returns
|
|
42
|
+
* The decrypted point, including the identity point when the balance is zero
|
|
43
|
+
*/
|
|
44
|
+
decryptToPoint(ciphertext: WasmCiphertext): WasmDecryptedPoint;
|
|
45
|
+
/**
|
|
46
|
+
* Create a new account from a BIP-39 mnemonic phrase.
|
|
47
|
+
*
|
|
48
|
+
* # Arguments
|
|
49
|
+
* * `mnemonic` - 12 or 24 word BIP-39 mnemonic
|
|
50
|
+
* * `address_index` - HD wallet address index (default: 0)
|
|
51
|
+
* * `account_index` - HD wallet account index (default: 0)
|
|
52
|
+
* * `contract_address` - Tongo contract address (hex string)
|
|
53
|
+
* * `passphrase` - Optional BIP-39 passphrase
|
|
54
|
+
*
|
|
55
|
+
* # Returns
|
|
56
|
+
* New WasmAccount instance or error
|
|
57
|
+
*/
|
|
58
|
+
static fromMnemonic(mnemonic: string, address_index: number, account_index: number, contract_address: string, passphrase?: string | null): WasmAccount;
|
|
59
|
+
/**
|
|
60
|
+
* Create a new account from a private key.
|
|
61
|
+
* # Arguments
|
|
62
|
+
* * `private_key` - Private key as hex string (0x-prefixed)
|
|
63
|
+
* * `contract_address` - Tongo contract address (hex string)
|
|
64
|
+
*/
|
|
65
|
+
static fromPrivateKey(private_key: string, contract_address: string): WasmAccount;
|
|
66
|
+
/**
|
|
67
|
+
* Get current account state.
|
|
68
|
+
*/
|
|
69
|
+
getState(): WasmAccountState;
|
|
70
|
+
/**
|
|
71
|
+
* Check if account has sufficient balance for an operation.
|
|
72
|
+
*/
|
|
73
|
+
hasSufficientBalance(amount: string): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Get the owner (spending) public key as hex string.
|
|
76
|
+
*/
|
|
77
|
+
ownerPublicKeyHex(): string;
|
|
78
|
+
/**
|
|
79
|
+
* Get total balance (available + pending).
|
|
80
|
+
*/
|
|
81
|
+
totalBalance(): string;
|
|
82
|
+
/**
|
|
83
|
+
* Update account state from on-chain data.
|
|
84
|
+
*/
|
|
85
|
+
updateState(state: WasmAccountState): void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Account state returned from on-chain queries.
|
|
90
|
+
*/
|
|
91
|
+
export class WasmAccountState {
|
|
92
|
+
free(): void;
|
|
93
|
+
[Symbol.dispose](): void;
|
|
94
|
+
/**
|
|
95
|
+
* Create a new account state.
|
|
96
|
+
*/
|
|
97
|
+
constructor(balance: string, pending_balance: string, nonce: bigint);
|
|
98
|
+
/**
|
|
99
|
+
* Get total balance (available + pending).
|
|
100
|
+
*/
|
|
101
|
+
totalBalance(): string;
|
|
102
|
+
/**
|
|
103
|
+
* Available balance (can be spent immediately)
|
|
104
|
+
*/
|
|
105
|
+
balance: string;
|
|
106
|
+
/**
|
|
107
|
+
* Current nonce for replay protection
|
|
108
|
+
*/
|
|
109
|
+
nonce: bigint;
|
|
110
|
+
/**
|
|
111
|
+
* Pending balance (requires rollover to become available)
|
|
112
|
+
*/
|
|
113
|
+
pending_balance: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* ElGamal ciphertext (L, R points).
|
|
118
|
+
*/
|
|
119
|
+
export class WasmCiphertext {
|
|
120
|
+
free(): void;
|
|
121
|
+
[Symbol.dispose](): void;
|
|
122
|
+
constructor(l_x: string, l_y: string, r_x: string, r_y: string);
|
|
123
|
+
l_x: string;
|
|
124
|
+
l_y: string;
|
|
125
|
+
r_x: string;
|
|
126
|
+
r_y: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Decrypted point result that can explicitly represent the identity point.
|
|
131
|
+
*/
|
|
132
|
+
export class WasmDecryptedPoint {
|
|
133
|
+
free(): void;
|
|
134
|
+
[Symbol.dispose](): void;
|
|
135
|
+
constructor(is_identity: boolean, x?: string | null, y?: string | null);
|
|
136
|
+
is_identity: boolean;
|
|
137
|
+
get x(): string | undefined;
|
|
138
|
+
set x(value: string | null | undefined);
|
|
139
|
+
get y(): string | undefined;
|
|
140
|
+
set y(value: string | null | undefined);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Encrypted private key returned to JavaScript (all fields hex-encoded).
|
|
145
|
+
*/
|
|
146
|
+
export class WasmEncryptedKey {
|
|
147
|
+
private constructor();
|
|
148
|
+
free(): void;
|
|
149
|
+
[Symbol.dispose](): void;
|
|
150
|
+
/**
|
|
151
|
+
* Hex-encoded ciphertext (includes Poly1305 tag).
|
|
152
|
+
*/
|
|
153
|
+
encryptedKey: string;
|
|
154
|
+
/**
|
|
155
|
+
* Hex-encoded 24-byte nonce.
|
|
156
|
+
*/
|
|
157
|
+
nonce: string;
|
|
158
|
+
/**
|
|
159
|
+
* Hex-encoded 16-byte salt.
|
|
160
|
+
*/
|
|
161
|
+
salt: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Encrypted payload returned to JavaScript (all fields hex-encoded).
|
|
166
|
+
*/
|
|
167
|
+
export class WasmEncryptedPayload {
|
|
168
|
+
private constructor();
|
|
169
|
+
free(): void;
|
|
170
|
+
[Symbol.dispose](): void;
|
|
171
|
+
/**
|
|
172
|
+
* Hex-encoded ciphertext (includes Poly1305 tag).
|
|
173
|
+
*/
|
|
174
|
+
ciphertext: string;
|
|
175
|
+
/**
|
|
176
|
+
* Hex-encoded 24-byte nonce.
|
|
177
|
+
*/
|
|
178
|
+
nonce: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Parameters for generating a fund proof.
|
|
183
|
+
*/
|
|
184
|
+
export class WasmFundParams {
|
|
185
|
+
free(): void;
|
|
186
|
+
[Symbol.dispose](): void;
|
|
187
|
+
constructor(amount: string, nonce: string, chain_id: string, tongo_address: string, sender_address: string, current_cipher_l_x: string, current_cipher_l_y: string, current_cipher_r_x: string, current_cipher_r_y: string);
|
|
188
|
+
withAuditor(auditor_public_key: string): WasmFundParams;
|
|
189
|
+
/**
|
|
190
|
+
* Amount to deposit (string for large numbers)
|
|
191
|
+
*/
|
|
192
|
+
amount: string;
|
|
193
|
+
/**
|
|
194
|
+
* Optional auditor public key (hex, concatenated x||y)
|
|
195
|
+
*/
|
|
196
|
+
get auditor_public_key(): string | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* Optional auditor public key (hex, concatenated x||y)
|
|
199
|
+
*/
|
|
200
|
+
set auditor_public_key(value: string | null | undefined);
|
|
201
|
+
/**
|
|
202
|
+
* Chain ID (hex)
|
|
203
|
+
*/
|
|
204
|
+
chain_id: string;
|
|
205
|
+
/**
|
|
206
|
+
* Current balance ciphertext
|
|
207
|
+
*/
|
|
208
|
+
current_cipher_l_x: string;
|
|
209
|
+
current_cipher_l_y: string;
|
|
210
|
+
current_cipher_r_x: string;
|
|
211
|
+
current_cipher_r_y: string;
|
|
212
|
+
/**
|
|
213
|
+
* Transaction nonce (hex)
|
|
214
|
+
*/
|
|
215
|
+
nonce: string;
|
|
216
|
+
/**
|
|
217
|
+
* Sender address (hex) - from get_caller_address()
|
|
218
|
+
*/
|
|
219
|
+
sender_address: string;
|
|
220
|
+
/**
|
|
221
|
+
* Tongo contract address (hex)
|
|
222
|
+
*/
|
|
223
|
+
tongo_address: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Result of a fund proof generation.
|
|
228
|
+
*/
|
|
229
|
+
export class WasmFundProofResult {
|
|
230
|
+
private constructor();
|
|
231
|
+
free(): void;
|
|
232
|
+
[Symbol.dispose](): void;
|
|
233
|
+
/**
|
|
234
|
+
* Amount funded
|
|
235
|
+
*/
|
|
236
|
+
amount: string;
|
|
237
|
+
/**
|
|
238
|
+
* Audit data as JSON (if auditor configured)
|
|
239
|
+
*/
|
|
240
|
+
get audit_json(): string | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* Audit data as JSON (if auditor configured)
|
|
243
|
+
*/
|
|
244
|
+
set audit_json(value: string | null | undefined);
|
|
245
|
+
/**
|
|
246
|
+
* PoE proof as JSON
|
|
247
|
+
*/
|
|
248
|
+
proof_json: string;
|
|
249
|
+
/**
|
|
250
|
+
* Public key Y point (x coordinate)
|
|
251
|
+
*/
|
|
252
|
+
y_x: string;
|
|
253
|
+
/**
|
|
254
|
+
* Public key Y point (y coordinate)
|
|
255
|
+
*/
|
|
256
|
+
y_y: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Keypair for Tongo operations.
|
|
261
|
+
*/
|
|
262
|
+
export class WasmKeypair {
|
|
263
|
+
free(): void;
|
|
264
|
+
[Symbol.dispose](): void;
|
|
265
|
+
constructor(private_key: string, public_key_x: string, public_key_y: string);
|
|
266
|
+
/**
|
|
267
|
+
* Get the full public key as "0x{x}{y}" concatenated hex.
|
|
268
|
+
*/
|
|
269
|
+
publicKeyHex(): string;
|
|
270
|
+
/**
|
|
271
|
+
* Private key as hex string (0x-prefixed)
|
|
272
|
+
*/
|
|
273
|
+
private_key: string;
|
|
274
|
+
/**
|
|
275
|
+
* Public key X coordinate as hex string
|
|
276
|
+
*/
|
|
277
|
+
public_key_x: string;
|
|
278
|
+
/**
|
|
279
|
+
* Public key Y coordinate as hex string
|
|
280
|
+
*/
|
|
281
|
+
public_key_y: string;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Nostr keypair (secp256k1, x-only public key).
|
|
286
|
+
*
|
|
287
|
+
* Used for NIP-04/NIP-44 encrypted messaging.
|
|
288
|
+
* Public key is x-only (32 bytes, BIP-340 format).
|
|
289
|
+
*/
|
|
290
|
+
export class WasmNostrKeypair {
|
|
291
|
+
free(): void;
|
|
292
|
+
[Symbol.dispose](): void;
|
|
293
|
+
constructor(private_key: string, public_key: string);
|
|
294
|
+
/**
|
|
295
|
+
* Private key as hex string (64 hex chars, no 0x prefix)
|
|
296
|
+
*/
|
|
297
|
+
private_key: string;
|
|
298
|
+
/**
|
|
299
|
+
* Public key as x-only hex string (64 hex chars, no 0x prefix)
|
|
300
|
+
*/
|
|
301
|
+
public_key: string;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Nostr BIP-340 Schnorr signature result.
|
|
306
|
+
*/
|
|
307
|
+
export class WasmNostrSignature {
|
|
308
|
+
private constructor();
|
|
309
|
+
free(): void;
|
|
310
|
+
[Symbol.dispose](): void;
|
|
311
|
+
/**
|
|
312
|
+
* x-only public key (64 hex chars, no 0x prefix)
|
|
313
|
+
*/
|
|
314
|
+
publicKey: string;
|
|
315
|
+
/**
|
|
316
|
+
* BIP-340 signature (128 hex chars, no 0x prefix)
|
|
317
|
+
*/
|
|
318
|
+
signature: string;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Point on the Stark curve (serialized as hex strings).
|
|
323
|
+
*/
|
|
324
|
+
export class WasmPoint {
|
|
325
|
+
free(): void;
|
|
326
|
+
[Symbol.dispose](): void;
|
|
327
|
+
constructor(x: string, y: string);
|
|
328
|
+
x: string;
|
|
329
|
+
y: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Parameters for generating a ragequit proof.
|
|
334
|
+
*/
|
|
335
|
+
export class WasmRagequitParams {
|
|
336
|
+
free(): void;
|
|
337
|
+
[Symbol.dispose](): void;
|
|
338
|
+
constructor(recipient_address: string, nonce: string, chain_id: string, tongo_address: string, sender_address: string, current_cipher_l_x: string, current_cipher_l_y: string, current_cipher_r_x: string, current_cipher_r_y: string);
|
|
339
|
+
withAuditor(auditor_public_key: string): WasmRagequitParams;
|
|
340
|
+
/**
|
|
341
|
+
* Optional auditor public key
|
|
342
|
+
*/
|
|
343
|
+
get auditor_public_key(): string | undefined;
|
|
344
|
+
/**
|
|
345
|
+
* Optional auditor public key
|
|
346
|
+
*/
|
|
347
|
+
set auditor_public_key(value: string | null | undefined);
|
|
348
|
+
/**
|
|
349
|
+
* Chain ID (hex)
|
|
350
|
+
*/
|
|
351
|
+
chain_id: string;
|
|
352
|
+
/**
|
|
353
|
+
* Current balance ciphertext
|
|
354
|
+
*/
|
|
355
|
+
current_cipher_l_x: string;
|
|
356
|
+
current_cipher_l_y: string;
|
|
357
|
+
current_cipher_r_x: string;
|
|
358
|
+
current_cipher_r_y: string;
|
|
359
|
+
/**
|
|
360
|
+
* Transaction nonce (hex)
|
|
361
|
+
*/
|
|
362
|
+
nonce: string;
|
|
363
|
+
/**
|
|
364
|
+
* Recipient address for withdrawn funds (hex)
|
|
365
|
+
*/
|
|
366
|
+
recipient_address: string;
|
|
367
|
+
/**
|
|
368
|
+
* Sender address (hex)
|
|
369
|
+
*/
|
|
370
|
+
sender_address: string;
|
|
371
|
+
/**
|
|
372
|
+
* Tongo contract address (hex)
|
|
373
|
+
*/
|
|
374
|
+
tongo_address: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Result of a ragequit proof generation.
|
|
379
|
+
*/
|
|
380
|
+
export class WasmRagequitProofResult {
|
|
381
|
+
private constructor();
|
|
382
|
+
free(): void;
|
|
383
|
+
[Symbol.dispose](): void;
|
|
384
|
+
/**
|
|
385
|
+
* Commitment A_r = R0^kx
|
|
386
|
+
*/
|
|
387
|
+
a_r_x: string;
|
|
388
|
+
a_r_y: string;
|
|
389
|
+
/**
|
|
390
|
+
* Commitment A_x = g^kx
|
|
391
|
+
*/
|
|
392
|
+
a_x_x: string;
|
|
393
|
+
a_x_y: string;
|
|
394
|
+
/**
|
|
395
|
+
* Full balance amount
|
|
396
|
+
*/
|
|
397
|
+
amount: string;
|
|
398
|
+
/**
|
|
399
|
+
* Audit data as JSON (if auditor configured)
|
|
400
|
+
*/
|
|
401
|
+
get audit_json(): string | undefined;
|
|
402
|
+
/**
|
|
403
|
+
* Audit data as JSON (if auditor configured)
|
|
404
|
+
*/
|
|
405
|
+
set audit_json(value: string | null | undefined);
|
|
406
|
+
/**
|
|
407
|
+
* Recipient address
|
|
408
|
+
*/
|
|
409
|
+
recipient: string;
|
|
410
|
+
/**
|
|
411
|
+
* Scalar response sx
|
|
412
|
+
*/
|
|
413
|
+
sx: string;
|
|
414
|
+
/**
|
|
415
|
+
* Public key Y point
|
|
416
|
+
*/
|
|
417
|
+
y_x: string;
|
|
418
|
+
y_y: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Parameters for generating a rollover proof.
|
|
423
|
+
*/
|
|
424
|
+
export class WasmRolloverParams {
|
|
425
|
+
free(): void;
|
|
426
|
+
[Symbol.dispose](): void;
|
|
427
|
+
constructor(nonce: string, chain_id: string, tongo_address: string, sender_address: string);
|
|
428
|
+
/**
|
|
429
|
+
* Chain ID (hex)
|
|
430
|
+
*/
|
|
431
|
+
chain_id: string;
|
|
432
|
+
/**
|
|
433
|
+
* Transaction nonce (hex)
|
|
434
|
+
*/
|
|
435
|
+
nonce: string;
|
|
436
|
+
/**
|
|
437
|
+
* Sender address (hex)
|
|
438
|
+
*/
|
|
439
|
+
sender_address: string;
|
|
440
|
+
/**
|
|
441
|
+
* Tongo contract address (hex)
|
|
442
|
+
*/
|
|
443
|
+
tongo_address: string;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Result of a rollover proof generation.
|
|
448
|
+
*/
|
|
449
|
+
export class WasmRolloverProofResult {
|
|
450
|
+
private constructor();
|
|
451
|
+
free(): void;
|
|
452
|
+
[Symbol.dispose](): void;
|
|
453
|
+
/**
|
|
454
|
+
* Pending amount that was rolled over
|
|
455
|
+
*/
|
|
456
|
+
pending_amount: string;
|
|
457
|
+
/**
|
|
458
|
+
* PoE proof as JSON
|
|
459
|
+
*/
|
|
460
|
+
proof_json: string;
|
|
461
|
+
/**
|
|
462
|
+
* Public key Y point
|
|
463
|
+
*/
|
|
464
|
+
y_x: string;
|
|
465
|
+
y_y: string;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Stark ECDSA signature result.
|
|
470
|
+
*/
|
|
471
|
+
export class WasmStarkSignature {
|
|
472
|
+
private constructor();
|
|
473
|
+
free(): void;
|
|
474
|
+
[Symbol.dispose](): void;
|
|
475
|
+
/**
|
|
476
|
+
* Public key (hex)
|
|
477
|
+
*/
|
|
478
|
+
publicKey: string;
|
|
479
|
+
/**
|
|
480
|
+
* Signature r component (hex)
|
|
481
|
+
*/
|
|
482
|
+
r: string;
|
|
483
|
+
/**
|
|
484
|
+
* Signature s component (hex)
|
|
485
|
+
*/
|
|
486
|
+
s: string;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Parameters for generating a transfer proof.
|
|
491
|
+
*/
|
|
492
|
+
export class WasmTransferParams {
|
|
493
|
+
free(): void;
|
|
494
|
+
[Symbol.dispose](): void;
|
|
495
|
+
constructor(recipient_public_key: string, amount: string, nonce: string, chain_id: string, tongo_address: string, sender_address: string, current_cipher_l_x: string, current_cipher_l_y: string, current_cipher_r_x: string, current_cipher_r_y: string);
|
|
496
|
+
withAuditor(auditor_public_key: string): WasmTransferParams;
|
|
497
|
+
withBitSize(bit_size: number): WasmTransferParams;
|
|
498
|
+
/**
|
|
499
|
+
* Amount to transfer
|
|
500
|
+
*/
|
|
501
|
+
amount: string;
|
|
502
|
+
/**
|
|
503
|
+
* Optional auditor public key
|
|
504
|
+
*/
|
|
505
|
+
get auditor_public_key(): string | undefined;
|
|
506
|
+
/**
|
|
507
|
+
* Optional auditor public key
|
|
508
|
+
*/
|
|
509
|
+
set auditor_public_key(value: string | null | undefined);
|
|
510
|
+
/**
|
|
511
|
+
* Bit size for range proof (default: 40)
|
|
512
|
+
*/
|
|
513
|
+
get bit_size(): number | undefined;
|
|
514
|
+
/**
|
|
515
|
+
* Bit size for range proof (default: 40)
|
|
516
|
+
*/
|
|
517
|
+
set bit_size(value: number | null | undefined);
|
|
518
|
+
/**
|
|
519
|
+
* Chain ID (hex)
|
|
520
|
+
*/
|
|
521
|
+
chain_id: string;
|
|
522
|
+
/**
|
|
523
|
+
* Current balance ciphertext
|
|
524
|
+
*/
|
|
525
|
+
current_cipher_l_x: string;
|
|
526
|
+
current_cipher_l_y: string;
|
|
527
|
+
current_cipher_r_x: string;
|
|
528
|
+
current_cipher_r_y: string;
|
|
529
|
+
/**
|
|
530
|
+
* Transaction nonce (hex)
|
|
531
|
+
*/
|
|
532
|
+
nonce: string;
|
|
533
|
+
/**
|
|
534
|
+
* Recipient's Tongo public key
|
|
535
|
+
*/
|
|
536
|
+
recipient_public_key: string;
|
|
537
|
+
/**
|
|
538
|
+
* Sender address (hex)
|
|
539
|
+
*/
|
|
540
|
+
sender_address: string;
|
|
541
|
+
/**
|
|
542
|
+
* Tongo contract address (hex)
|
|
543
|
+
*/
|
|
544
|
+
tongo_address: string;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Result of a transfer proof generation.
|
|
549
|
+
*/
|
|
550
|
+
export class WasmTransferProofResult {
|
|
551
|
+
private constructor();
|
|
552
|
+
free(): void;
|
|
553
|
+
[Symbol.dispose](): void;
|
|
554
|
+
/**
|
|
555
|
+
* Audit for balance (if auditor configured)
|
|
556
|
+
*/
|
|
557
|
+
get audit_balance_json(): string | undefined;
|
|
558
|
+
/**
|
|
559
|
+
* Audit for balance (if auditor configured)
|
|
560
|
+
*/
|
|
561
|
+
set audit_balance_json(value: string | null | undefined);
|
|
562
|
+
/**
|
|
563
|
+
* Audit for transfer (if auditor configured)
|
|
564
|
+
*/
|
|
565
|
+
get audit_transfer_json(): string | undefined;
|
|
566
|
+
/**
|
|
567
|
+
* Audit for transfer (if auditor configured)
|
|
568
|
+
*/
|
|
569
|
+
set audit_transfer_json(value: string | null | undefined);
|
|
570
|
+
/**
|
|
571
|
+
* Auxiliar cipher 2 (R_aux2 = g^r2)
|
|
572
|
+
*/
|
|
573
|
+
aux2_r_x: string;
|
|
574
|
+
aux2_r_y: string;
|
|
575
|
+
/**
|
|
576
|
+
* Auxiliar cipher 2 (V2 = g^b_left*h^r2)
|
|
577
|
+
*/
|
|
578
|
+
aux2_v_x: string;
|
|
579
|
+
aux2_v_y: string;
|
|
580
|
+
/**
|
|
581
|
+
* Auxiliar cipher (R_aux = g^r)
|
|
582
|
+
*/
|
|
583
|
+
aux_r_x: string;
|
|
584
|
+
aux_r_y: string;
|
|
585
|
+
/**
|
|
586
|
+
* Auxiliar cipher (V = g^b*h^r)
|
|
587
|
+
*/
|
|
588
|
+
aux_v_x: string;
|
|
589
|
+
aux_v_y: string;
|
|
590
|
+
/**
|
|
591
|
+
* New balance cipher (L)
|
|
592
|
+
*/
|
|
593
|
+
new_balance_l_x: string;
|
|
594
|
+
new_balance_l_y: string;
|
|
595
|
+
/**
|
|
596
|
+
* New balance cipher (R)
|
|
597
|
+
*/
|
|
598
|
+
new_balance_r_x: string;
|
|
599
|
+
new_balance_r_y: string;
|
|
600
|
+
/**
|
|
601
|
+
* Complete transfer proof as JSON
|
|
602
|
+
*/
|
|
603
|
+
proof_json: string;
|
|
604
|
+
/**
|
|
605
|
+
* Transfer cipher for self (L)
|
|
606
|
+
*/
|
|
607
|
+
self_l_x: string;
|
|
608
|
+
self_l_y: string;
|
|
609
|
+
/**
|
|
610
|
+
* Transfer cipher for self (R)
|
|
611
|
+
*/
|
|
612
|
+
self_r_x: string;
|
|
613
|
+
self_r_y: string;
|
|
614
|
+
/**
|
|
615
|
+
* Transfer cipher for recipient (L)
|
|
616
|
+
*/
|
|
617
|
+
transfer_l_x: string;
|
|
618
|
+
transfer_l_y: string;
|
|
619
|
+
/**
|
|
620
|
+
* Transfer cipher for recipient (R)
|
|
621
|
+
*/
|
|
622
|
+
transfer_r_x: string;
|
|
623
|
+
transfer_r_y: string;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Transaction type enum for Tongo operations.
|
|
628
|
+
*/
|
|
629
|
+
export enum WasmTxType {
|
|
630
|
+
Fund = 0,
|
|
631
|
+
Transfer = 1,
|
|
632
|
+
Rollover = 2,
|
|
633
|
+
Withdraw = 3,
|
|
634
|
+
Ragequit = 4,
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Parameters for generating a withdraw proof.
|
|
639
|
+
*/
|
|
640
|
+
export class WasmWithdrawParams {
|
|
641
|
+
free(): void;
|
|
642
|
+
[Symbol.dispose](): void;
|
|
643
|
+
constructor(recipient_address: string, amount: string, nonce: string, chain_id: string, tongo_address: string, sender_address: string, current_cipher_l_x: string, current_cipher_l_y: string, current_cipher_r_x: string, current_cipher_r_y: string);
|
|
644
|
+
withAuditor(auditor_public_key: string): WasmWithdrawParams;
|
|
645
|
+
withBitSize(bit_size: number): WasmWithdrawParams;
|
|
646
|
+
/**
|
|
647
|
+
* Amount to withdraw
|
|
648
|
+
*/
|
|
649
|
+
amount: string;
|
|
650
|
+
/**
|
|
651
|
+
* Optional auditor public key
|
|
652
|
+
*/
|
|
653
|
+
get auditor_public_key(): string | undefined;
|
|
654
|
+
/**
|
|
655
|
+
* Optional auditor public key
|
|
656
|
+
*/
|
|
657
|
+
set auditor_public_key(value: string | null | undefined);
|
|
658
|
+
/**
|
|
659
|
+
* Bit size for range proof (default: 40)
|
|
660
|
+
*/
|
|
661
|
+
get bit_size(): number | undefined;
|
|
662
|
+
/**
|
|
663
|
+
* Bit size for range proof (default: 40)
|
|
664
|
+
*/
|
|
665
|
+
set bit_size(value: number | null | undefined);
|
|
666
|
+
/**
|
|
667
|
+
* Chain ID (hex)
|
|
668
|
+
*/
|
|
669
|
+
chain_id: string;
|
|
670
|
+
/**
|
|
671
|
+
* Current balance ciphertext
|
|
672
|
+
*/
|
|
673
|
+
current_cipher_l_x: string;
|
|
674
|
+
current_cipher_l_y: string;
|
|
675
|
+
current_cipher_r_x: string;
|
|
676
|
+
current_cipher_r_y: string;
|
|
677
|
+
/**
|
|
678
|
+
* Transaction nonce (hex)
|
|
679
|
+
*/
|
|
680
|
+
nonce: string;
|
|
681
|
+
/**
|
|
682
|
+
* Recipient address for withdrawn funds (hex)
|
|
683
|
+
*/
|
|
684
|
+
recipient_address: string;
|
|
685
|
+
/**
|
|
686
|
+
* Sender address (hex)
|
|
687
|
+
*/
|
|
688
|
+
sender_address: string;
|
|
689
|
+
/**
|
|
690
|
+
* Tongo contract address (hex)
|
|
691
|
+
*/
|
|
692
|
+
tongo_address: string;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Result of a withdraw proof generation.
|
|
697
|
+
*/
|
|
698
|
+
export class WasmWithdrawProofResult {
|
|
699
|
+
private constructor();
|
|
700
|
+
free(): void;
|
|
701
|
+
[Symbol.dispose](): void;
|
|
702
|
+
a_r_x: string;
|
|
703
|
+
a_r_y: string;
|
|
704
|
+
a_v_x: string;
|
|
705
|
+
a_v_y: string;
|
|
706
|
+
a_x2: string;
|
|
707
|
+
/**
|
|
708
|
+
* Commitments
|
|
709
|
+
*/
|
|
710
|
+
a_x_x: string;
|
|
711
|
+
a_x_y: string;
|
|
712
|
+
a_y2: string;
|
|
713
|
+
/**
|
|
714
|
+
* Amount withdrawn
|
|
715
|
+
*/
|
|
716
|
+
amount: string;
|
|
717
|
+
/**
|
|
718
|
+
* Audit data as JSON (if auditor configured)
|
|
719
|
+
*/
|
|
720
|
+
get audit_json(): string | undefined;
|
|
721
|
+
/**
|
|
722
|
+
* Audit data as JSON (if auditor configured)
|
|
723
|
+
*/
|
|
724
|
+
set audit_json(value: string | null | undefined);
|
|
725
|
+
/**
|
|
726
|
+
* Auxiliar cipher (R_aux = g^r)
|
|
727
|
+
*/
|
|
728
|
+
aux_r_x: string;
|
|
729
|
+
aux_r_y: string;
|
|
730
|
+
/**
|
|
731
|
+
* Auxiliar cipher (V = g^b_left*h^r)
|
|
732
|
+
*/
|
|
733
|
+
aux_v_x: string;
|
|
734
|
+
aux_v_y: string;
|
|
735
|
+
/**
|
|
736
|
+
* Range proof as JSON
|
|
737
|
+
*/
|
|
738
|
+
range_json: string;
|
|
739
|
+
/**
|
|
740
|
+
* Recipient address
|
|
741
|
+
*/
|
|
742
|
+
recipient: string;
|
|
743
|
+
sb: string;
|
|
744
|
+
sr: string;
|
|
745
|
+
/**
|
|
746
|
+
* Scalar responses
|
|
747
|
+
*/
|
|
748
|
+
sx: string;
|
|
749
|
+
/**
|
|
750
|
+
* Public key Y point
|
|
751
|
+
*/
|
|
752
|
+
y_x: string;
|
|
753
|
+
y_y: string;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Calculate a Starknet contract address from deployment parameters.
|
|
758
|
+
*
|
|
759
|
+
* Implements the standard contract address derivation formula using
|
|
760
|
+
* `computeHashOnElements`.
|
|
761
|
+
*
|
|
762
|
+
* # Arguments
|
|
763
|
+
* * `salt` - Salt value (hex string)
|
|
764
|
+
* * `class_hash` - Contract class hash (hex string)
|
|
765
|
+
* * `constructor_calldata` - Array of hex strings for constructor calldata
|
|
766
|
+
* * `deployer_address` - Deployer address (hex string, typically "0x0")
|
|
767
|
+
*
|
|
768
|
+
* # Returns
|
|
769
|
+
* The calculated contract address as hex string
|
|
770
|
+
*/
|
|
771
|
+
export function calculateContractAddress(salt: string, class_hash: string, constructor_calldata: string[], deployer_address: string): string;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Compile an array of calls into the Starknet multicall `__execute__` ABI
|
|
775
|
+
* format.
|
|
776
|
+
*
|
|
777
|
+
* The returned vector of hex strings encodes:
|
|
778
|
+
* ```text
|
|
779
|
+
* [
|
|
780
|
+
* call_array_len,
|
|
781
|
+
* // per call: to, selector, data_offset, data_len
|
|
782
|
+
* ...,
|
|
783
|
+
* total_calldata_len,
|
|
784
|
+
* // all calldata values concatenated
|
|
785
|
+
* ...
|
|
786
|
+
* ]
|
|
787
|
+
* ```
|
|
788
|
+
*
|
|
789
|
+
* # Arguments
|
|
790
|
+
* * `calls_json` — a JSON array of `Call` objects:
|
|
791
|
+
* ```json
|
|
792
|
+
* [{ "contractAddress": "0x…", "entrypoint": "transfer", "calldata": ["0x1", "0x2"] }]
|
|
793
|
+
* ```
|
|
794
|
+
*
|
|
795
|
+
* # Errors
|
|
796
|
+
* Returns `JsValue` (string) on invalid JSON, invalid hex, etc.
|
|
797
|
+
*/
|
|
798
|
+
export function compileCalls(calls_json: string): string[];
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Compute the hash of a declare transaction (v2).
|
|
802
|
+
*/
|
|
803
|
+
export function computeDeclareTransactionHashV2(sender_address: string, class_hash: string, max_fee: string, chain_id: string, nonce: string, compiled_class_hash: string): string;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Compute the hash of a declare transaction (v3).
|
|
807
|
+
*/
|
|
808
|
+
export function computeDeclareTransactionHashV3(sender_address: string, class_hash: string, chain_id: string, nonce: string, compiled_class_hash: string, tip: string, resource_bounds: any, paymaster_data: string[], nonce_data_availability_mode: number, fee_data_availability_mode: number, account_deployment_data: string[]): string;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* Compute the hash of a deploy account transaction (v1).
|
|
812
|
+
*/
|
|
813
|
+
export function computeDeployAccountTransactionHashV1(contract_address: string, class_hash: string, constructor_calldata: string[], salt: string, max_fee: string, chain_id: string, nonce: string): string;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Compute the hash of a deploy account transaction (v3).
|
|
817
|
+
*/
|
|
818
|
+
export function computeDeployAccountTransactionHashV3(contract_address: string, class_hash: string, constructor_calldata: string[], salt: string, chain_id: string, nonce: string, tip: string, resource_bounds: any, paymaster_data: string[], nonce_data_availability_mode: number, fee_data_availability_mode: number): string;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Compute the hash of an invoke transaction (v1).
|
|
822
|
+
*
|
|
823
|
+
* All felt arguments are hex strings (e.g. `"0x1234"`).
|
|
824
|
+
*/
|
|
825
|
+
export function computeInvokeTransactionHashV1(sender_address: string, calldata: string[], max_fee: string, chain_id: string, nonce: string): string;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Compute the hash of an invoke transaction (v3).
|
|
829
|
+
*/
|
|
830
|
+
export function computeInvokeTransactionHashV3(sender_address: string, calldata: string[], chain_id: string, nonce: string, tip: string, resource_bounds: any, paymaster_data: string[], nonce_data_availability_mode: number, fee_data_availability_mode: number, account_deployment_data: string[], proof_facts?: string[] | null): string;
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Compute the SNIP-12 typed data message hash.
|
|
834
|
+
*
|
|
835
|
+
* # Arguments
|
|
836
|
+
* * `typed_data_json` - JSON string conforming to the SNIP-12 typed data schema.
|
|
837
|
+
* * `account_address` - Hex-encoded Starknet account address.
|
|
838
|
+
*
|
|
839
|
+
* # Returns
|
|
840
|
+
* The message hash as a hex string.
|
|
841
|
+
*/
|
|
842
|
+
export function computeTypedDataMessageHash(typed_data_json: string, account_address: string): string;
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Decode a Cairo short-string Felt back to a UTF-8 string.
|
|
846
|
+
*
|
|
847
|
+
* # Arguments
|
|
848
|
+
* * `felt_hex` — `0x`-prefixed hex representation of the felt.
|
|
849
|
+
*
|
|
850
|
+
* # Returns
|
|
851
|
+
* The decoded string.
|
|
852
|
+
*/
|
|
853
|
+
export function decodeShortString(felt_hex: string): string;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Decrypt an ethers.js / Web3 Secret Storage keystore (version 3, scrypt KDF).
|
|
857
|
+
*
|
|
858
|
+
* @param keystoreJson - JSON keystore string in ethers.js format
|
|
859
|
+
* @param password - The password used during encryption
|
|
860
|
+
* @returns Decrypted content as hex string (typically a private key)
|
|
861
|
+
*/
|
|
862
|
+
export function decryptEthersKeystore(keystore_json: string, password: string): string;
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* Decrypt a krusty-kms keystore (version 1) to recover the mnemonic.
|
|
866
|
+
*
|
|
867
|
+
* @param keystoreJson - JSON keystore string
|
|
868
|
+
* @param password - The password used during encryption
|
|
869
|
+
* @returns Decrypted mnemonic phrase
|
|
870
|
+
*/
|
|
871
|
+
export function decryptKeystore(keystore_json: string, password: string): string;
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Decrypt a private key that was encrypted with `encryptPrivateKey`.
|
|
875
|
+
*
|
|
876
|
+
* @param nonce - Hex-encoded 24-byte nonce
|
|
877
|
+
* @param salt - Hex-encoded 16-byte salt
|
|
878
|
+
* @param encryptedKey - Hex-encoded ciphertext
|
|
879
|
+
* @param password - The password used during encryption
|
|
880
|
+
* @param scryptN - The same scrypt cost parameter used during encryption
|
|
881
|
+
* @returns Hex-encoded private key (no 0x prefix)
|
|
882
|
+
*/
|
|
883
|
+
export function decryptPrivateKey(nonce: string, salt: string, encrypted_key: string, password: string, scrypt_n: number): string;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Decrypt data that was encrypted with `encryptWithKey`.
|
|
887
|
+
*
|
|
888
|
+
* @param nonce - Hex-encoded 24-byte nonce
|
|
889
|
+
* @param ciphertext - Hex-encoded ciphertext
|
|
890
|
+
* @param keyHex - Hex-encoded 32-byte key (64 hex chars)
|
|
891
|
+
* @returns Decrypted plaintext as a UTF-8 string
|
|
892
|
+
*/
|
|
893
|
+
export function decryptWithKey(nonce: string, ciphertext: string, key_hex: string): string;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Derive an Argent account contract address from a public key.
|
|
897
|
+
*
|
|
898
|
+
* Uses the standard Argent constructor calldata format `(0, public_key, 0)`.
|
|
899
|
+
*
|
|
900
|
+
* # Arguments
|
|
901
|
+
* * `public_key` - The Stark public key (hex string)
|
|
902
|
+
* * `class_hash` - Optional custom class hash (hex string). Defaults to the
|
|
903
|
+
* standard Argent v0.4.0 class hash.
|
|
904
|
+
*
|
|
905
|
+
* # Returns
|
|
906
|
+
* The derived account contract address as hex string
|
|
907
|
+
*/
|
|
908
|
+
export function deriveArgentAccountAddress(public_key: string, class_hash?: string | null): string;
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Derive a Starknet keypair using old Argent's "double derivation" scheme.
|
|
912
|
+
*
|
|
913
|
+
* Old Argent wallets use a two-step derivation:
|
|
914
|
+
* 1. Derive ETH private key at `m/44'/60'/0'/0/0` (raw, no grindKey)
|
|
915
|
+
* 2. Use ETH key as BIP-32 seed, derive `m/44'/9004'/0'/0/{index}`, then grindKey
|
|
916
|
+
*
|
|
917
|
+
* This is needed to recover keys for accounts created with old Argent-X.
|
|
918
|
+
* Braavos and new Argent use direct `m/44'/9004'/0'/0/{index}` derivation instead.
|
|
919
|
+
*
|
|
920
|
+
* # Arguments
|
|
921
|
+
* * `mnemonic` - 12 or 24 word BIP-39 mnemonic
|
|
922
|
+
* * `address_index` - HD wallet address index (default: 0)
|
|
923
|
+
* * `account_index` - HD wallet account index (default: 0)
|
|
924
|
+
*/
|
|
925
|
+
export function deriveArgentLegacyKeypair(mnemonic: string, address_index: number, account_index: number): WasmKeypair;
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Derive a Braavos account contract address from a public key.
|
|
929
|
+
*
|
|
930
|
+
* Uses the standard Braavos constructor calldata format `(public_key)`.
|
|
931
|
+
*
|
|
932
|
+
* # Arguments
|
|
933
|
+
* * `public_key` - The Stark public key (hex string)
|
|
934
|
+
* * `class_hash` - Optional custom class hash (hex string). Defaults to the
|
|
935
|
+
* standard Braavos v1.0.0 class hash.
|
|
936
|
+
*
|
|
937
|
+
* # Returns
|
|
938
|
+
* The derived account contract address as hex string
|
|
939
|
+
*/
|
|
940
|
+
export function deriveBraavosAccountAddress(public_key: string, class_hash?: string | null): string;
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Derive all unique keypairs for a mnemonic without computing addresses.
|
|
944
|
+
*
|
|
945
|
+
* Returns one keypair per derivation scheme per index:
|
|
946
|
+
* - **Direct**: `m/44'/9004'/0'/0/{index}` — shared by Braavos, new Argent, OpenZeppelin
|
|
947
|
+
* - **ArgentLegacy**: double derivation via ETH key — used by legacy Argent wallets
|
|
948
|
+
*
|
|
949
|
+
* This is cheaper than `generateAccountCandidates` since it skips address computation.
|
|
950
|
+
* Use these public keys to query external APIs (e.g., Argent's smart account
|
|
951
|
+
* discovery endpoint) for accounts whose addresses can't be derived locally.
|
|
952
|
+
*
|
|
953
|
+
* # Returns
|
|
954
|
+
* JSON string: array of objects with fields:
|
|
955
|
+
* - `derivationType`: "Direct" | "ArgentLegacy"
|
|
956
|
+
* - `publicKey`: hex string
|
|
957
|
+
* - `privateKey`: hex string (handle with care!)
|
|
958
|
+
* - `derivationIndex`: number
|
|
959
|
+
* - `derivationPath`: string
|
|
960
|
+
*
|
|
961
|
+
* # Example (JavaScript)
|
|
962
|
+
* ```javascript
|
|
963
|
+
* const keypairs = JSON.parse(deriveDiscoveryKeypairs(mnemonic, 5));
|
|
964
|
+
*
|
|
965
|
+
* // Use public keys to query Argent's smart account API
|
|
966
|
+
* for (const kp of keypairs) {
|
|
967
|
+
* const smartAccounts = await argentApi.findAccountsByPublicKey(kp.publicKey);
|
|
968
|
+
* // smartAccounts contains addresses with server-provided salts
|
|
969
|
+
* }
|
|
970
|
+
* ```
|
|
971
|
+
*/
|
|
972
|
+
export function deriveDiscoveryKeypairs(mnemonic: string, max_index?: number | null): string;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Derive a keypair from mnemonic (for external use).
|
|
976
|
+
*/
|
|
977
|
+
export function deriveKeypair(mnemonic: string, address_index: number, account_index: number, passphrase?: string | null): WasmKeypair;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Derive a Nostr keypair from mnemonic (coin type 1237).
|
|
981
|
+
*
|
|
982
|
+
* Uses secp256k1 curve (not Stark curve). The public key is x-only
|
|
983
|
+
* (32 bytes) as per BIP-340/Nostr convention.
|
|
984
|
+
*
|
|
985
|
+
* Derivation path: m/44'/1237'/{account_index}'/0/{address_index}
|
|
986
|
+
*
|
|
987
|
+
* # Arguments
|
|
988
|
+
* * `mnemonic` - 12 or 24 word BIP-39 mnemonic
|
|
989
|
+
* * `address_index` - HD wallet address index (default: 0)
|
|
990
|
+
* * `account_index` - HD wallet account index (default: 0)
|
|
991
|
+
* * `passphrase` - Optional BIP-39 passphrase
|
|
992
|
+
*
|
|
993
|
+
* # Returns
|
|
994
|
+
* Nostr keypair with private key and x-only public key (both 64 hex chars)
|
|
995
|
+
*/
|
|
996
|
+
export function deriveNostrKeypair(mnemonic: string, address_index: number, account_index: number, passphrase?: string | null): WasmNostrKeypair;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Derive an OpenZeppelin account contract address from a public key.
|
|
1000
|
+
*
|
|
1001
|
+
* This calculates the counterfactual address for an OpenZeppelin account
|
|
1002
|
+
* using the standard contract address derivation formula.
|
|
1003
|
+
*
|
|
1004
|
+
* # Arguments
|
|
1005
|
+
* * `public_key_x` - The x-coordinate of the Stark public key (hex string)
|
|
1006
|
+
* * `class_hash` - The OpenZeppelin account class hash (hex string)
|
|
1007
|
+
* * `salt` - Optional salt for address derivation (hex string, defaults to "0x0")
|
|
1008
|
+
*
|
|
1009
|
+
* # Returns
|
|
1010
|
+
* The derived account contract address as hex string
|
|
1011
|
+
*/
|
|
1012
|
+
export function deriveOzAccountAddress(public_key_x: string, class_hash: string, salt?: string | null): string;
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Derive a Starknet account keypair from mnemonic (coin type 9004).
|
|
1016
|
+
*
|
|
1017
|
+
* This is used for signing Starknet transactions and deriving the
|
|
1018
|
+
* OpenZeppelin account contract address.
|
|
1019
|
+
*
|
|
1020
|
+
* # Arguments
|
|
1021
|
+
* * `mnemonic` - 12 or 24 word BIP-39 mnemonic
|
|
1022
|
+
* * `address_index` - HD wallet address index (default: 0)
|
|
1023
|
+
* * `account_index` - HD wallet account index (default: 0)
|
|
1024
|
+
* * `passphrase` - Optional BIP-39 passphrase
|
|
1025
|
+
*
|
|
1026
|
+
* # Returns
|
|
1027
|
+
* Keypair with private key and public key coordinates
|
|
1028
|
+
*/
|
|
1029
|
+
export function deriveStarknetKeypair(mnemonic: string, address_index: number, account_index: number, passphrase?: string | null): WasmKeypair;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Derive the STRK20 viewing key from a Stark private key.
|
|
1033
|
+
*
|
|
1034
|
+
* The viewing key is `Pedersen(starknet_keccak(DOMAIN), private_key) mod (n/2) + 1`,
|
|
1035
|
+
* matching the Starknet Privacy SDK's expected `[1, n/2]` range.
|
|
1036
|
+
*
|
|
1037
|
+
* # Arguments
|
|
1038
|
+
* * `private_key` - The Stark private key as a hex string.
|
|
1039
|
+
*
|
|
1040
|
+
* # Returns
|
|
1041
|
+
* The viewing key as a `0x`-prefixed hex string.
|
|
1042
|
+
*/
|
|
1043
|
+
export function deriveStrk20ViewingKey(private_key: string): string;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Deserialize a public key from hex format to (x, y) coordinates.
|
|
1047
|
+
*
|
|
1048
|
+
* # Arguments
|
|
1049
|
+
* * `hex` - Public key in "0x{x}{y}" format (128 hex chars after 0x)
|
|
1050
|
+
*
|
|
1051
|
+
* # Returns
|
|
1052
|
+
* Object with x and y properties
|
|
1053
|
+
*/
|
|
1054
|
+
export function deserializePublicKey(hex: string): WasmPoint;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* Perform full account discovery in a single call.
|
|
1058
|
+
*
|
|
1059
|
+
* Returns a JSON object with two fields:
|
|
1060
|
+
* - `keypairs`: array of DerivedKeypair objects (for API-based smart account lookup)
|
|
1061
|
+
* - `candidates`: array of CandidateAccount objects (for local address derivation)
|
|
1062
|
+
*
|
|
1063
|
+
* This combines `deriveDiscoveryKeypairs` and `generateAccountCandidates` into
|
|
1064
|
+
* a single WASM call, eliminating one JS→WASM round-trip.
|
|
1065
|
+
*/
|
|
1066
|
+
export function discoverAccountsFromMnemonic(mnemonic: string, max_index?: number | null): string;
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Encode a value as a Felt hex string.
|
|
1070
|
+
*
|
|
1071
|
+
* Supported input formats:
|
|
1072
|
+
* - Hex string (`"0x1a"`)
|
|
1073
|
+
* - Decimal number string (`"42"`)
|
|
1074
|
+
* - Boolean (`"true"` / `"false"`)
|
|
1075
|
+
*
|
|
1076
|
+
* # Returns
|
|
1077
|
+
* The Felt as a `0x`-prefixed hex string.
|
|
1078
|
+
*/
|
|
1079
|
+
export function encodeFelt(value: string): string;
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Encode a short ASCII string (<=31 chars) as a Cairo short-string Felt.
|
|
1083
|
+
*
|
|
1084
|
+
* # Returns
|
|
1085
|
+
* The Felt as a `0x`-prefixed hex string.
|
|
1086
|
+
*/
|
|
1087
|
+
export function encodeShortString(s: string): string;
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* Encrypt a mnemonic into a JSON keystore string (krusty-kms format, version 1).
|
|
1091
|
+
*
|
|
1092
|
+
* @param mnemonic - Mnemonic phrase to encrypt
|
|
1093
|
+
* @param password - Encryption password
|
|
1094
|
+
* @param scryptN - Scrypt cost parameter N (power of 2, e.g. 32768)
|
|
1095
|
+
* @returns JSON keystore string
|
|
1096
|
+
*/
|
|
1097
|
+
export function encryptKeystore(mnemonic: string, password: string, scrypt_n: number): string;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* Encrypt a hex-encoded private key with a password (scrypt + XChaCha20-Poly1305).
|
|
1101
|
+
*
|
|
1102
|
+
* @param privateKeyHex - Private key in hex (with or without 0x prefix)
|
|
1103
|
+
* @param password - Encryption password
|
|
1104
|
+
* @param scryptN - Scrypt cost parameter N (power of 2, e.g. 32768)
|
|
1105
|
+
* @returns Encrypted key with hex-encoded nonce, salt, and ciphertext
|
|
1106
|
+
*/
|
|
1107
|
+
export function encryptPrivateKey(private_key_hex: string, password: string, scrypt_n: number): WasmEncryptedKey;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Encrypt a plaintext string with a pre-derived 32-byte key.
|
|
1111
|
+
*
|
|
1112
|
+
* @param plaintext - UTF-8 string to encrypt
|
|
1113
|
+
* @param keyHex - Hex-encoded 32-byte key (64 hex chars)
|
|
1114
|
+
* @returns Encrypted payload with hex-encoded nonce and ciphertext
|
|
1115
|
+
*/
|
|
1116
|
+
export function encryptWithKey(plaintext: string, key_hex: string): WasmEncryptedPayload;
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* Generate a compact summary of candidate addresses grouped by derivation index.
|
|
1120
|
+
*
|
|
1121
|
+
* Returns a JSON object where keys are derivation indices and values are
|
|
1122
|
+
* objects mapping wallet type to address. Useful for quick discovery without
|
|
1123
|
+
* needing the full candidate details.
|
|
1124
|
+
*
|
|
1125
|
+
* # Returns
|
|
1126
|
+
* JSON string: `{ "0": { "Braavos": "0x...", "Argent": "0x...", ... }, "1": { ... } }`
|
|
1127
|
+
*/
|
|
1128
|
+
export function generateAccountAddresses(mnemonic: string, max_index?: number | null): string;
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Generate all candidate account addresses for a mnemonic.
|
|
1132
|
+
*
|
|
1133
|
+
* Returns a JSON array of candidate accounts across all known wallet types
|
|
1134
|
+
* (Braavos, Argent, Argent Legacy, Argent Cairo 0, OpenZeppelin).
|
|
1135
|
+
*
|
|
1136
|
+
* This is a pure cryptographic operation — no network calls are made.
|
|
1137
|
+
* Each candidate is a possible on-chain account address. To find which
|
|
1138
|
+
* ones are actually deployed, check each address via an RPC provider
|
|
1139
|
+
* (e.g., `provider.getClassHashAt(address)` in starknet.js).
|
|
1140
|
+
*
|
|
1141
|
+
* # Arguments
|
|
1142
|
+
* * `mnemonic` - BIP-39 mnemonic phrase (12 or 24 words)
|
|
1143
|
+
* * `max_index` - Maximum derivation index to scan (default: 5).
|
|
1144
|
+
* Higher values scan more potential accounts but take longer.
|
|
1145
|
+
*
|
|
1146
|
+
* # Returns
|
|
1147
|
+
* JSON string: array of objects with fields:
|
|
1148
|
+
* - `walletType`: "Braavos" | "Argent" | "ArgentLegacy" | "ArgentCairo0" | "OpenZeppelin"
|
|
1149
|
+
* - `classHash`: hex string
|
|
1150
|
+
* - `address`: hex string
|
|
1151
|
+
* - `publicKey`: hex string
|
|
1152
|
+
* - `privateKey`: hex string (handle with care!)
|
|
1153
|
+
* - `derivationIndex`: number
|
|
1154
|
+
* - `derivationPath`: string (e.g., "m/44'/9004'/0'/0/0")
|
|
1155
|
+
* - `classVersion`: string (e.g., "v0.4.0", "braavos-base")
|
|
1156
|
+
*
|
|
1157
|
+
* # Example (JavaScript)
|
|
1158
|
+
* ```javascript
|
|
1159
|
+
* const candidates = JSON.parse(generateAccountCandidates(mnemonic, 3));
|
|
1160
|
+
* for (const c of candidates) {
|
|
1161
|
+
* const deployed = await provider.getClassHashAt(c.address).catch(() => null);
|
|
1162
|
+
* if (deployed) {
|
|
1163
|
+
* console.log(`Found ${c.walletType} account at ${c.address}`);
|
|
1164
|
+
* }
|
|
1165
|
+
* }
|
|
1166
|
+
* ```
|
|
1167
|
+
*/
|
|
1168
|
+
export function generateAccountCandidates(mnemonic: string, max_index?: number | null): string;
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* Generate a fund (deposit) proof.
|
|
1172
|
+
*/
|
|
1173
|
+
export function generateFundProof(account: WasmAccount, params: WasmFundParams): WasmFundProofResult;
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* Generate a new random mnemonic phrase.
|
|
1177
|
+
*/
|
|
1178
|
+
export function generateMnemonic(word_count?: number | null): string;
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* Generate a ragequit (emergency exit) proof.
|
|
1182
|
+
*/
|
|
1183
|
+
export function generateRagequitProof(account: WasmAccount, params: WasmRagequitParams): WasmRagequitProofResult;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Generate a rollover proof.
|
|
1187
|
+
*/
|
|
1188
|
+
export function generateRolloverProof(account: WasmAccount, params: WasmRolloverParams): WasmRolloverProofResult;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Generate a transfer proof.
|
|
1192
|
+
*/
|
|
1193
|
+
export function generateTransferProof(account: WasmAccount, params: WasmTransferParams): WasmTransferProofResult;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* Generate a withdraw proof.
|
|
1197
|
+
*/
|
|
1198
|
+
export function generateWithdrawProof(account: WasmAccount, params: WasmWithdrawParams): WasmWithdrawProofResult;
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* Get known account class hashes for common Starknet account implementations.
|
|
1202
|
+
*
|
|
1203
|
+
* Returns a JSON string containing class hashes organized by account type
|
|
1204
|
+
* and version, covering OpenZeppelin, Argent, and Braavos accounts.
|
|
1205
|
+
*
|
|
1206
|
+
* # Returns
|
|
1207
|
+
* JSON string with nested object: `{ oz: { ... }, argent: { ... }, braavos: { ... } }`
|
|
1208
|
+
*/
|
|
1209
|
+
export function getAccountClassHashes(): string;
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Get build information.
|
|
1213
|
+
*/
|
|
1214
|
+
export function getBuildInfo(): any;
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* Get the Stark curve generator point.
|
|
1218
|
+
*/
|
|
1219
|
+
export function getGenerator(): WasmPoint;
|
|
1220
|
+
|
|
1221
|
+
/**
|
|
1222
|
+
* Get the Nostr coin type constant (1237).
|
|
1223
|
+
*/
|
|
1224
|
+
export function getNostrCoinType(): number;
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* Get a Starknet function selector from a function name.
|
|
1228
|
+
*
|
|
1229
|
+
* Equivalent to `starknet_keccak(name.as_bytes())`.
|
|
1230
|
+
*
|
|
1231
|
+
* # Arguments
|
|
1232
|
+
* * `name` - The function name (e.g. `"transfer"`)
|
|
1233
|
+
*
|
|
1234
|
+
* # Returns
|
|
1235
|
+
* The selector as a hex string
|
|
1236
|
+
*/
|
|
1237
|
+
export function getSelectorFromName(name: string): string;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Get the Starknet coin type constant (9004).
|
|
1241
|
+
*/
|
|
1242
|
+
export function getStarknetCoinType(): number;
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Get the Tongo coin type constant (5454).
|
|
1246
|
+
*/
|
|
1247
|
+
export function getTongoCoinType(): number;
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* Get the SDK version.
|
|
1251
|
+
*/
|
|
1252
|
+
export function getVersion(): string;
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Grind a 32-byte seed into a valid Stark private key.
|
|
1256
|
+
*
|
|
1257
|
+
* Implements the standard Stark key grinding algorithm that ensures
|
|
1258
|
+
* the output is a valid scalar on the Stark curve (less than the curve order).
|
|
1259
|
+
*
|
|
1260
|
+
* # Arguments
|
|
1261
|
+
* * `seed_hex` - Hex-encoded 32-byte seed (with or without `0x` prefix)
|
|
1262
|
+
*
|
|
1263
|
+
* # Returns
|
|
1264
|
+
* The ground key as a hex string
|
|
1265
|
+
*/
|
|
1266
|
+
export function grindKey(seed_hex: string): string;
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* Initialize the WASM module.
|
|
1270
|
+
*
|
|
1271
|
+
* Sets up panic hook for better error messages in console.
|
|
1272
|
+
* Call this before using any other functions.
|
|
1273
|
+
*/
|
|
1274
|
+
export function init(): void;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Check whether a hex string is a valid Stark field element.
|
|
1278
|
+
*
|
|
1279
|
+
* # Arguments
|
|
1280
|
+
* * `hex_str` - Hex string to validate (with or without `0x` prefix)
|
|
1281
|
+
*
|
|
1282
|
+
* # Returns
|
|
1283
|
+
* `true` if the string parses as a valid felt, `false` otherwise
|
|
1284
|
+
*/
|
|
1285
|
+
export function isValidFelt(hex_str: string): boolean;
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Check whether a hex string is a valid Stark private key.
|
|
1289
|
+
*
|
|
1290
|
+
* A valid private key must parse as a felt and must not be zero.
|
|
1291
|
+
*
|
|
1292
|
+
* # Arguments
|
|
1293
|
+
* * `hex_str` - Hex string to validate (with or without `0x` prefix)
|
|
1294
|
+
*
|
|
1295
|
+
* # Returns
|
|
1296
|
+
* `true` if the string is a non-zero valid felt, `false` otherwise
|
|
1297
|
+
*/
|
|
1298
|
+
export function isValidStarkPrivateKey(hex_str: string): boolean;
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* Derive the x-only Nostr public key for a secp256k1 private key.
|
|
1302
|
+
*
|
|
1303
|
+
* # Arguments
|
|
1304
|
+
* * `private_key` - 64 hex chars (no 0x prefix), secp256k1 private key
|
|
1305
|
+
*
|
|
1306
|
+
* # Returns
|
|
1307
|
+
* x-only public key as 64 hex chars (no 0x prefix)
|
|
1308
|
+
*/
|
|
1309
|
+
export function nostrPublicKey(private_key: string): string;
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* Compute the Pedersen hash of two field elements.
|
|
1313
|
+
*
|
|
1314
|
+
* # Arguments
|
|
1315
|
+
* * `a` - First element as a hex string
|
|
1316
|
+
* * `b` - Second element as a hex string
|
|
1317
|
+
*
|
|
1318
|
+
* # Returns
|
|
1319
|
+
* The Pedersen hash as a hex string
|
|
1320
|
+
*/
|
|
1321
|
+
export function pedersenHash(a: string, b: string): string;
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Compute `computeHashOnElements` over an array of field elements.
|
|
1325
|
+
*
|
|
1326
|
+
* This chains Pedersen hashes starting from zero:
|
|
1327
|
+
* `pedersen(pedersen(pedersen(0, e0), e1), ..., len)`
|
|
1328
|
+
*
|
|
1329
|
+
* # Arguments
|
|
1330
|
+
* * `felts` - Array of hex strings (felt values)
|
|
1331
|
+
*
|
|
1332
|
+
* # Returns
|
|
1333
|
+
* The hash as a hex string
|
|
1334
|
+
*/
|
|
1335
|
+
export function pedersenHashMany(felts: string[]): string;
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* Add two points on the Stark curve.
|
|
1339
|
+
*/
|
|
1340
|
+
export function pointAdd(p1_x: string, p1_y: string, p2_x: string, p2_y: string): WasmPoint;
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Compute Poseidon hash of exactly two field elements.
|
|
1344
|
+
*
|
|
1345
|
+
* # Arguments
|
|
1346
|
+
* * `a` - First input (hex string)
|
|
1347
|
+
* * `b` - Second input (hex string)
|
|
1348
|
+
*
|
|
1349
|
+
* # Returns
|
|
1350
|
+
* The Poseidon hash as a hex string
|
|
1351
|
+
*/
|
|
1352
|
+
export function poseidonHash(a: string, b: string): string;
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Compute a Poseidon hash of the given inputs.
|
|
1356
|
+
*
|
|
1357
|
+
* # Arguments
|
|
1358
|
+
* * `inputs` - Array of hex strings (felt values)
|
|
1359
|
+
*
|
|
1360
|
+
* # Returns
|
|
1361
|
+
* The hash as a hex string
|
|
1362
|
+
*/
|
|
1363
|
+
export function poseidonHashMany(inputs: string[]): string;
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* Generate random bytes and return them as a hex string.
|
|
1367
|
+
*
|
|
1368
|
+
* Uses a cryptographically secure random number generator.
|
|
1369
|
+
*
|
|
1370
|
+
* # Arguments
|
|
1371
|
+
* * `length` - Number of random bytes to generate
|
|
1372
|
+
*
|
|
1373
|
+
* # Returns
|
|
1374
|
+
* Hex-encoded bytes with `0x` prefix
|
|
1375
|
+
*/
|
|
1376
|
+
export function randomBytesHex(length: number): string;
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Generate a random field element.
|
|
1380
|
+
*/
|
|
1381
|
+
export function randomFelt(): string;
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* Multiply a point by a scalar.
|
|
1385
|
+
*
|
|
1386
|
+
* # Arguments
|
|
1387
|
+
* * `scalar` - Scalar value (hex string)
|
|
1388
|
+
* * `point_x` - Point X coordinate (hex string)
|
|
1389
|
+
* * `point_y` - Point Y coordinate (hex string)
|
|
1390
|
+
*
|
|
1391
|
+
* # Returns
|
|
1392
|
+
* Resulting point as {x, y} object
|
|
1393
|
+
*/
|
|
1394
|
+
export function scalarMul(scalar: string, point_x: string, point_y: string): WasmPoint;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* Multiply the generator point by a scalar.
|
|
1398
|
+
*
|
|
1399
|
+
* # Arguments
|
|
1400
|
+
* * `scalar` - Scalar value (hex string)
|
|
1401
|
+
*
|
|
1402
|
+
* # Returns
|
|
1403
|
+
* Resulting point as {x, y} object
|
|
1404
|
+
*/
|
|
1405
|
+
export function scalarMulGenerator(scalar: string): WasmPoint;
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* Serialize a public key point to the standard hex format.
|
|
1409
|
+
*
|
|
1410
|
+
* # Arguments
|
|
1411
|
+
* * `x` - X coordinate (hex string)
|
|
1412
|
+
* * `y` - Y coordinate (hex string)
|
|
1413
|
+
*
|
|
1414
|
+
* # Returns
|
|
1415
|
+
* Concatenated "0x{x}{y}" format used by Tongo protocol
|
|
1416
|
+
*/
|
|
1417
|
+
export function serializePublicKey(x: string, y: string): string;
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* Sign a 32-byte Nostr event id using BIP-340 Schnorr.
|
|
1421
|
+
*
|
|
1422
|
+
* # Arguments
|
|
1423
|
+
* * `private_key` - 64 hex chars (no 0x prefix), secp256k1 private key
|
|
1424
|
+
* * `event_id` - 64 hex chars (no 0x prefix), the event id to sign
|
|
1425
|
+
*
|
|
1426
|
+
* # Returns
|
|
1427
|
+
* Signature result with public key and signature (both hex, no 0x prefix)
|
|
1428
|
+
*/
|
|
1429
|
+
export function signNostrEventId(private_key: string, event_id: string): WasmNostrSignature;
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* Sign an arbitrary message using BIP-340 Schnorr.
|
|
1433
|
+
*
|
|
1434
|
+
* # Arguments
|
|
1435
|
+
* * `private_key` - 64 hex chars (no 0x prefix), secp256k1 private key
|
|
1436
|
+
* * `message` - hex-encoded bytes (may have optional 0x prefix)
|
|
1437
|
+
*
|
|
1438
|
+
* # Returns
|
|
1439
|
+
* Signature result with public key and signature (both hex, no 0x prefix)
|
|
1440
|
+
*/
|
|
1441
|
+
export function signNostrMessage(private_key: string, message: string): WasmNostrSignature;
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Sign a message hash using Stark ECDSA.
|
|
1445
|
+
*
|
|
1446
|
+
* Uses deterministic RFC-6979 nonce generation.
|
|
1447
|
+
*
|
|
1448
|
+
* # Arguments
|
|
1449
|
+
* * `private_key` - Stark private key as hex string (0x-prefixed)
|
|
1450
|
+
* * `msg_hash` - Message hash as hex string (0x-prefixed)
|
|
1451
|
+
*
|
|
1452
|
+
* # Returns
|
|
1453
|
+
* Signature with r, s components and public key (all 0x-prefixed hex)
|
|
1454
|
+
*/
|
|
1455
|
+
export function signStarkHash(private_key: string, msg_hash: string): WasmStarkSignature;
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* Derive the Stark public key corresponding to a private key.
|
|
1459
|
+
*
|
|
1460
|
+
* # Arguments
|
|
1461
|
+
* * `private_key` - Stark private key as hex string (0x-prefixed)
|
|
1462
|
+
*
|
|
1463
|
+
* # Returns
|
|
1464
|
+
* The public key as a hex string (0x-prefixed)
|
|
1465
|
+
*/
|
|
1466
|
+
export function starkPublicKey(private_key: string): string;
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* Compute Starknet keccak: Keccak-256 truncated to 250 bits.
|
|
1470
|
+
*
|
|
1471
|
+
* # Arguments
|
|
1472
|
+
* * `data` - Input data (interpreted according to `encoding`)
|
|
1473
|
+
* * `encoding` - `"hex"` to hex-decode `data`, or `"utf8"` / `None` to use raw bytes
|
|
1474
|
+
*
|
|
1475
|
+
* # Returns
|
|
1476
|
+
* The Starknet keccak hash as a hex string
|
|
1477
|
+
*/
|
|
1478
|
+
export function starknetKeccak(data: string, encoding?: string | null): string;
|
|
1479
|
+
|
|
1480
|
+
/**
|
|
1481
|
+
* Validate a mnemonic phrase.
|
|
1482
|
+
*/
|
|
1483
|
+
export function validateMnemonic(mnemonic: string): boolean;
|
|
1484
|
+
|
|
1485
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
1486
|
+
|
|
1487
|
+
export interface InitOutput {
|
|
1488
|
+
readonly memory: WebAssembly.Memory;
|
|
1489
|
+
readonly __wbg_get_wasmfundparams_amount: (a: number) => [number, number];
|
|
1490
|
+
readonly __wbg_get_wasmfundparams_auditor_public_key: (a: number) => [number, number];
|
|
1491
|
+
readonly __wbg_get_wasmfundparams_chain_id: (a: number) => [number, number];
|
|
1492
|
+
readonly __wbg_get_wasmfundparams_current_cipher_l_x: (a: number) => [number, number];
|
|
1493
|
+
readonly __wbg_get_wasmfundparams_current_cipher_l_y: (a: number) => [number, number];
|
|
1494
|
+
readonly __wbg_get_wasmfundparams_current_cipher_r_x: (a: number) => [number, number];
|
|
1495
|
+
readonly __wbg_get_wasmfundparams_current_cipher_r_y: (a: number) => [number, number];
|
|
1496
|
+
readonly __wbg_get_wasmfundparams_nonce: (a: number) => [number, number];
|
|
1497
|
+
readonly __wbg_get_wasmfundparams_sender_address: (a: number) => [number, number];
|
|
1498
|
+
readonly __wbg_get_wasmfundparams_tongo_address: (a: number) => [number, number];
|
|
1499
|
+
readonly __wbg_get_wasmfundproofresult_audit_json: (a: number) => [number, number];
|
|
1500
|
+
readonly __wbg_get_wasmtransferparams_auditor_public_key: (a: number) => [number, number];
|
|
1501
|
+
readonly __wbg_get_wasmtransferparams_bit_size: (a: number) => number;
|
|
1502
|
+
readonly __wbg_get_wasmtransferparams_current_cipher_r_y: (a: number) => [number, number];
|
|
1503
|
+
readonly __wbg_get_wasmtransferproofresult_audit_balance_json: (a: number) => [number, number];
|
|
1504
|
+
readonly __wbg_get_wasmtransferproofresult_audit_transfer_json: (a: number) => [number, number];
|
|
1505
|
+
readonly __wbg_get_wasmtransferproofresult_aux2_r_x: (a: number) => [number, number];
|
|
1506
|
+
readonly __wbg_get_wasmtransferproofresult_aux2_r_y: (a: number) => [number, number];
|
|
1507
|
+
readonly __wbg_get_wasmtransferproofresult_aux2_v_x: (a: number) => [number, number];
|
|
1508
|
+
readonly __wbg_get_wasmtransferproofresult_aux2_v_y: (a: number) => [number, number];
|
|
1509
|
+
readonly __wbg_get_wasmtransferproofresult_aux_r_x: (a: number) => [number, number];
|
|
1510
|
+
readonly __wbg_get_wasmtransferproofresult_aux_r_y: (a: number) => [number, number];
|
|
1511
|
+
readonly __wbg_get_wasmtransferproofresult_new_balance_l_x: (a: number) => [number, number];
|
|
1512
|
+
readonly __wbg_get_wasmtransferproofresult_new_balance_l_y: (a: number) => [number, number];
|
|
1513
|
+
readonly __wbg_get_wasmtransferproofresult_new_balance_r_x: (a: number) => [number, number];
|
|
1514
|
+
readonly __wbg_get_wasmtransferproofresult_new_balance_r_y: (a: number) => [number, number];
|
|
1515
|
+
readonly __wbg_get_wasmtransferproofresult_proof_json: (a: number) => [number, number];
|
|
1516
|
+
readonly __wbg_get_wasmwithdrawproofresult_audit_json: (a: number) => [number, number];
|
|
1517
|
+
readonly __wbg_set_wasmfundparams_amount: (a: number, b: number, c: number) => void;
|
|
1518
|
+
readonly __wbg_set_wasmfundparams_auditor_public_key: (a: number, b: number, c: number) => void;
|
|
1519
|
+
readonly __wbg_set_wasmfundparams_chain_id: (a: number, b: number, c: number) => void;
|
|
1520
|
+
readonly __wbg_set_wasmfundparams_current_cipher_l_x: (a: number, b: number, c: number) => void;
|
|
1521
|
+
readonly __wbg_set_wasmfundparams_current_cipher_l_y: (a: number, b: number, c: number) => void;
|
|
1522
|
+
readonly __wbg_set_wasmfundparams_current_cipher_r_x: (a: number, b: number, c: number) => void;
|
|
1523
|
+
readonly __wbg_set_wasmfundparams_current_cipher_r_y: (a: number, b: number, c: number) => void;
|
|
1524
|
+
readonly __wbg_set_wasmfundparams_nonce: (a: number, b: number, c: number) => void;
|
|
1525
|
+
readonly __wbg_set_wasmfundparams_sender_address: (a: number, b: number, c: number) => void;
|
|
1526
|
+
readonly __wbg_set_wasmfundparams_tongo_address: (a: number, b: number, c: number) => void;
|
|
1527
|
+
readonly __wbg_set_wasmfundproofresult_audit_json: (a: number, b: number, c: number) => void;
|
|
1528
|
+
readonly __wbg_set_wasmtransferparams_auditor_public_key: (a: number, b: number, c: number) => void;
|
|
1529
|
+
readonly __wbg_set_wasmtransferparams_bit_size: (a: number, b: number) => void;
|
|
1530
|
+
readonly __wbg_set_wasmtransferparams_current_cipher_r_y: (a: number, b: number, c: number) => void;
|
|
1531
|
+
readonly __wbg_set_wasmtransferproofresult_audit_balance_json: (a: number, b: number, c: number) => void;
|
|
1532
|
+
readonly __wbg_set_wasmtransferproofresult_audit_transfer_json: (a: number, b: number, c: number) => void;
|
|
1533
|
+
readonly __wbg_set_wasmtransferproofresult_aux2_r_x: (a: number, b: number, c: number) => void;
|
|
1534
|
+
readonly __wbg_set_wasmtransferproofresult_aux2_r_y: (a: number, b: number, c: number) => void;
|
|
1535
|
+
readonly __wbg_set_wasmtransferproofresult_aux2_v_x: (a: number, b: number, c: number) => void;
|
|
1536
|
+
readonly __wbg_set_wasmtransferproofresult_aux2_v_y: (a: number, b: number, c: number) => void;
|
|
1537
|
+
readonly __wbg_set_wasmtransferproofresult_aux_r_x: (a: number, b: number, c: number) => void;
|
|
1538
|
+
readonly __wbg_set_wasmtransferproofresult_aux_r_y: (a: number, b: number, c: number) => void;
|
|
1539
|
+
readonly __wbg_set_wasmtransferproofresult_new_balance_l_x: (a: number, b: number, c: number) => void;
|
|
1540
|
+
readonly __wbg_set_wasmtransferproofresult_new_balance_l_y: (a: number, b: number, c: number) => void;
|
|
1541
|
+
readonly __wbg_set_wasmtransferproofresult_new_balance_r_x: (a: number, b: number, c: number) => void;
|
|
1542
|
+
readonly __wbg_set_wasmtransferproofresult_new_balance_r_y: (a: number, b: number, c: number) => void;
|
|
1543
|
+
readonly __wbg_set_wasmtransferproofresult_proof_json: (a: number, b: number, c: number) => void;
|
|
1544
|
+
readonly __wbg_set_wasmwithdrawproofresult_audit_json: (a: number, b: number, c: number) => void;
|
|
1545
|
+
readonly __wbg_wasmfundparams_free: (a: number, b: number) => void;
|
|
1546
|
+
readonly __wbg_wasmfundproofresult_free: (a: number, b: number) => void;
|
|
1547
|
+
readonly __wbg_wasmragequitparams_free: (a: number, b: number) => void;
|
|
1548
|
+
readonly __wbg_wasmragequitproofresult_free: (a: number, b: number) => void;
|
|
1549
|
+
readonly __wbg_wasmrolloverparams_free: (a: number, b: number) => void;
|
|
1550
|
+
readonly __wbg_wasmrolloverproofresult_free: (a: number, b: number) => void;
|
|
1551
|
+
readonly __wbg_wasmtransferparams_free: (a: number, b: number) => void;
|
|
1552
|
+
readonly __wbg_wasmtransferproofresult_free: (a: number, b: number) => void;
|
|
1553
|
+
readonly __wbg_wasmwithdrawparams_free: (a: number, b: number) => void;
|
|
1554
|
+
readonly __wbg_wasmwithdrawproofresult_free: (a: number, b: number) => void;
|
|
1555
|
+
readonly generateFundProof: (a: number, b: number) => [number, number, number];
|
|
1556
|
+
readonly generateRagequitProof: (a: number, b: number) => [number, number, number];
|
|
1557
|
+
readonly generateRolloverProof: (a: number, b: number) => [number, number, number];
|
|
1558
|
+
readonly generateTransferProof: (a: number, b: number) => [number, number, number];
|
|
1559
|
+
readonly generateWithdrawProof: (a: number, b: number) => [number, number, number];
|
|
1560
|
+
readonly wasmfundparams_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number) => number;
|
|
1561
|
+
readonly wasmfundparams_withAuditor: (a: number, b: number, c: number) => number;
|
|
1562
|
+
readonly wasmrolloverparams_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
1563
|
+
readonly wasmtransferparams_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number) => number;
|
|
1564
|
+
readonly wasmtransferparams_withAuditor: (a: number, b: number, c: number) => number;
|
|
1565
|
+
readonly wasmtransferparams_withBitSize: (a: number, b: number) => number;
|
|
1566
|
+
readonly __wbg_get_wasmragequitparams_auditor_public_key: (a: number) => [number, number];
|
|
1567
|
+
readonly __wbg_get_wasmragequitproofresult_audit_json: (a: number) => [number, number];
|
|
1568
|
+
readonly __wbg_get_wasmwithdrawparams_auditor_public_key: (a: number) => [number, number];
|
|
1569
|
+
readonly __wbg_set_wasmragequitparams_auditor_public_key: (a: number, b: number, c: number) => void;
|
|
1570
|
+
readonly __wbg_set_wasmragequitproofresult_audit_json: (a: number, b: number, c: number) => void;
|
|
1571
|
+
readonly __wbg_set_wasmwithdrawparams_auditor_public_key: (a: number, b: number, c: number) => void;
|
|
1572
|
+
readonly __wbg_get_wasmfundproofresult_amount: (a: number) => [number, number];
|
|
1573
|
+
readonly __wbg_get_wasmfundproofresult_proof_json: (a: number) => [number, number];
|
|
1574
|
+
readonly __wbg_get_wasmfundproofresult_y_x: (a: number) => [number, number];
|
|
1575
|
+
readonly __wbg_get_wasmfundproofresult_y_y: (a: number) => [number, number];
|
|
1576
|
+
readonly __wbg_get_wasmragequitparams_chain_id: (a: number) => [number, number];
|
|
1577
|
+
readonly __wbg_get_wasmragequitparams_current_cipher_l_x: (a: number) => [number, number];
|
|
1578
|
+
readonly __wbg_get_wasmragequitparams_current_cipher_l_y: (a: number) => [number, number];
|
|
1579
|
+
readonly __wbg_get_wasmragequitparams_current_cipher_r_x: (a: number) => [number, number];
|
|
1580
|
+
readonly __wbg_get_wasmragequitparams_current_cipher_r_y: (a: number) => [number, number];
|
|
1581
|
+
readonly __wbg_get_wasmragequitparams_nonce: (a: number) => [number, number];
|
|
1582
|
+
readonly __wbg_get_wasmragequitparams_recipient_address: (a: number) => [number, number];
|
|
1583
|
+
readonly __wbg_get_wasmragequitparams_sender_address: (a: number) => [number, number];
|
|
1584
|
+
readonly __wbg_get_wasmragequitparams_tongo_address: (a: number) => [number, number];
|
|
1585
|
+
readonly __wbg_get_wasmragequitproofresult_a_r_x: (a: number) => [number, number];
|
|
1586
|
+
readonly __wbg_get_wasmragequitproofresult_a_r_y: (a: number) => [number, number];
|
|
1587
|
+
readonly __wbg_get_wasmragequitproofresult_a_x_x: (a: number) => [number, number];
|
|
1588
|
+
readonly __wbg_get_wasmragequitproofresult_a_x_y: (a: number) => [number, number];
|
|
1589
|
+
readonly __wbg_get_wasmragequitproofresult_amount: (a: number) => [number, number];
|
|
1590
|
+
readonly __wbg_get_wasmragequitproofresult_recipient: (a: number) => [number, number];
|
|
1591
|
+
readonly __wbg_get_wasmragequitproofresult_sx: (a: number) => [number, number];
|
|
1592
|
+
readonly __wbg_get_wasmragequitproofresult_y_x: (a: number) => [number, number];
|
|
1593
|
+
readonly __wbg_get_wasmragequitproofresult_y_y: (a: number) => [number, number];
|
|
1594
|
+
readonly __wbg_get_wasmrolloverparams_chain_id: (a: number) => [number, number];
|
|
1595
|
+
readonly __wbg_get_wasmrolloverparams_nonce: (a: number) => [number, number];
|
|
1596
|
+
readonly __wbg_get_wasmrolloverparams_sender_address: (a: number) => [number, number];
|
|
1597
|
+
readonly __wbg_get_wasmrolloverparams_tongo_address: (a: number) => [number, number];
|
|
1598
|
+
readonly __wbg_get_wasmrolloverproofresult_pending_amount: (a: number) => [number, number];
|
|
1599
|
+
readonly __wbg_get_wasmrolloverproofresult_proof_json: (a: number) => [number, number];
|
|
1600
|
+
readonly __wbg_get_wasmrolloverproofresult_y_x: (a: number) => [number, number];
|
|
1601
|
+
readonly __wbg_get_wasmrolloverproofresult_y_y: (a: number) => [number, number];
|
|
1602
|
+
readonly __wbg_get_wasmtransferparams_amount: (a: number) => [number, number];
|
|
1603
|
+
readonly __wbg_get_wasmtransferparams_chain_id: (a: number) => [number, number];
|
|
1604
|
+
readonly __wbg_get_wasmtransferparams_current_cipher_l_x: (a: number) => [number, number];
|
|
1605
|
+
readonly __wbg_get_wasmtransferparams_current_cipher_l_y: (a: number) => [number, number];
|
|
1606
|
+
readonly __wbg_get_wasmtransferparams_current_cipher_r_x: (a: number) => [number, number];
|
|
1607
|
+
readonly __wbg_get_wasmtransferparams_nonce: (a: number) => [number, number];
|
|
1608
|
+
readonly __wbg_get_wasmtransferparams_recipient_public_key: (a: number) => [number, number];
|
|
1609
|
+
readonly __wbg_get_wasmtransferparams_sender_address: (a: number) => [number, number];
|
|
1610
|
+
readonly __wbg_get_wasmtransferparams_tongo_address: (a: number) => [number, number];
|
|
1611
|
+
readonly __wbg_get_wasmtransferproofresult_aux_v_x: (a: number) => [number, number];
|
|
1612
|
+
readonly __wbg_get_wasmtransferproofresult_aux_v_y: (a: number) => [number, number];
|
|
1613
|
+
readonly __wbg_get_wasmtransferproofresult_self_l_x: (a: number) => [number, number];
|
|
1614
|
+
readonly __wbg_get_wasmtransferproofresult_self_l_y: (a: number) => [number, number];
|
|
1615
|
+
readonly __wbg_get_wasmtransferproofresult_self_r_x: (a: number) => [number, number];
|
|
1616
|
+
readonly __wbg_get_wasmtransferproofresult_self_r_y: (a: number) => [number, number];
|
|
1617
|
+
readonly __wbg_get_wasmtransferproofresult_transfer_l_x: (a: number) => [number, number];
|
|
1618
|
+
readonly __wbg_get_wasmtransferproofresult_transfer_l_y: (a: number) => [number, number];
|
|
1619
|
+
readonly __wbg_get_wasmtransferproofresult_transfer_r_x: (a: number) => [number, number];
|
|
1620
|
+
readonly __wbg_get_wasmtransferproofresult_transfer_r_y: (a: number) => [number, number];
|
|
1621
|
+
readonly __wbg_get_wasmwithdrawparams_amount: (a: number) => [number, number];
|
|
1622
|
+
readonly __wbg_get_wasmwithdrawparams_chain_id: (a: number) => [number, number];
|
|
1623
|
+
readonly __wbg_get_wasmwithdrawparams_current_cipher_l_x: (a: number) => [number, number];
|
|
1624
|
+
readonly __wbg_get_wasmwithdrawparams_current_cipher_l_y: (a: number) => [number, number];
|
|
1625
|
+
readonly __wbg_get_wasmwithdrawparams_current_cipher_r_x: (a: number) => [number, number];
|
|
1626
|
+
readonly __wbg_get_wasmwithdrawparams_current_cipher_r_y: (a: number) => [number, number];
|
|
1627
|
+
readonly __wbg_get_wasmwithdrawparams_nonce: (a: number) => [number, number];
|
|
1628
|
+
readonly __wbg_get_wasmwithdrawparams_recipient_address: (a: number) => [number, number];
|
|
1629
|
+
readonly __wbg_get_wasmwithdrawparams_sender_address: (a: number) => [number, number];
|
|
1630
|
+
readonly __wbg_get_wasmwithdrawparams_tongo_address: (a: number) => [number, number];
|
|
1631
|
+
readonly __wbg_get_wasmwithdrawproofresult_a_r_x: (a: number) => [number, number];
|
|
1632
|
+
readonly __wbg_get_wasmwithdrawproofresult_a_r_y: (a: number) => [number, number];
|
|
1633
|
+
readonly __wbg_get_wasmwithdrawproofresult_a_v_x: (a: number) => [number, number];
|
|
1634
|
+
readonly __wbg_get_wasmwithdrawproofresult_a_v_y: (a: number) => [number, number];
|
|
1635
|
+
readonly __wbg_get_wasmwithdrawproofresult_a_x2: (a: number) => [number, number];
|
|
1636
|
+
readonly __wbg_get_wasmwithdrawproofresult_a_x_x: (a: number) => [number, number];
|
|
1637
|
+
readonly __wbg_get_wasmwithdrawproofresult_a_x_y: (a: number) => [number, number];
|
|
1638
|
+
readonly __wbg_get_wasmwithdrawproofresult_a_y2: (a: number) => [number, number];
|
|
1639
|
+
readonly __wbg_get_wasmwithdrawproofresult_amount: (a: number) => [number, number];
|
|
1640
|
+
readonly __wbg_get_wasmwithdrawproofresult_aux_r_x: (a: number) => [number, number];
|
|
1641
|
+
readonly __wbg_get_wasmwithdrawproofresult_aux_r_y: (a: number) => [number, number];
|
|
1642
|
+
readonly __wbg_get_wasmwithdrawproofresult_aux_v_x: (a: number) => [number, number];
|
|
1643
|
+
readonly __wbg_get_wasmwithdrawproofresult_aux_v_y: (a: number) => [number, number];
|
|
1644
|
+
readonly __wbg_get_wasmwithdrawproofresult_range_json: (a: number) => [number, number];
|
|
1645
|
+
readonly __wbg_get_wasmwithdrawproofresult_recipient: (a: number) => [number, number];
|
|
1646
|
+
readonly __wbg_get_wasmwithdrawproofresult_sb: (a: number) => [number, number];
|
|
1647
|
+
readonly __wbg_get_wasmwithdrawproofresult_sr: (a: number) => [number, number];
|
|
1648
|
+
readonly __wbg_get_wasmwithdrawproofresult_sx: (a: number) => [number, number];
|
|
1649
|
+
readonly __wbg_get_wasmwithdrawproofresult_y_x: (a: number) => [number, number];
|
|
1650
|
+
readonly __wbg_get_wasmwithdrawproofresult_y_y: (a: number) => [number, number];
|
|
1651
|
+
readonly wasmragequitparams_withAuditor: (a: number, b: number, c: number) => number;
|
|
1652
|
+
readonly wasmwithdrawparams_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number) => number;
|
|
1653
|
+
readonly __wbg_set_wasmwithdrawparams_bit_size: (a: number, b: number) => void;
|
|
1654
|
+
readonly __wbg_get_wasmwithdrawparams_bit_size: (a: number) => number;
|
|
1655
|
+
readonly wasmwithdrawparams_withAuditor: (a: number, b: number, c: number) => number;
|
|
1656
|
+
readonly wasmragequitparams_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number) => number;
|
|
1657
|
+
readonly __wbg_set_wasmfundproofresult_amount: (a: number, b: number, c: number) => void;
|
|
1658
|
+
readonly __wbg_set_wasmfundproofresult_proof_json: (a: number, b: number, c: number) => void;
|
|
1659
|
+
readonly __wbg_set_wasmfundproofresult_y_x: (a: number, b: number, c: number) => void;
|
|
1660
|
+
readonly __wbg_set_wasmfundproofresult_y_y: (a: number, b: number, c: number) => void;
|
|
1661
|
+
readonly __wbg_set_wasmragequitparams_chain_id: (a: number, b: number, c: number) => void;
|
|
1662
|
+
readonly __wbg_set_wasmragequitparams_current_cipher_l_x: (a: number, b: number, c: number) => void;
|
|
1663
|
+
readonly __wbg_set_wasmragequitparams_current_cipher_l_y: (a: number, b: number, c: number) => void;
|
|
1664
|
+
readonly __wbg_set_wasmragequitparams_current_cipher_r_x: (a: number, b: number, c: number) => void;
|
|
1665
|
+
readonly __wbg_set_wasmragequitparams_current_cipher_r_y: (a: number, b: number, c: number) => void;
|
|
1666
|
+
readonly __wbg_set_wasmragequitparams_nonce: (a: number, b: number, c: number) => void;
|
|
1667
|
+
readonly __wbg_set_wasmragequitparams_recipient_address: (a: number, b: number, c: number) => void;
|
|
1668
|
+
readonly __wbg_set_wasmragequitparams_sender_address: (a: number, b: number, c: number) => void;
|
|
1669
|
+
readonly __wbg_set_wasmragequitparams_tongo_address: (a: number, b: number, c: number) => void;
|
|
1670
|
+
readonly __wbg_set_wasmragequitproofresult_a_r_x: (a: number, b: number, c: number) => void;
|
|
1671
|
+
readonly __wbg_set_wasmragequitproofresult_a_r_y: (a: number, b: number, c: number) => void;
|
|
1672
|
+
readonly __wbg_set_wasmragequitproofresult_a_x_x: (a: number, b: number, c: number) => void;
|
|
1673
|
+
readonly __wbg_set_wasmragequitproofresult_a_x_y: (a: number, b: number, c: number) => void;
|
|
1674
|
+
readonly __wbg_set_wasmragequitproofresult_amount: (a: number, b: number, c: number) => void;
|
|
1675
|
+
readonly __wbg_set_wasmragequitproofresult_recipient: (a: number, b: number, c: number) => void;
|
|
1676
|
+
readonly __wbg_set_wasmragequitproofresult_sx: (a: number, b: number, c: number) => void;
|
|
1677
|
+
readonly __wbg_set_wasmragequitproofresult_y_x: (a: number, b: number, c: number) => void;
|
|
1678
|
+
readonly __wbg_set_wasmragequitproofresult_y_y: (a: number, b: number, c: number) => void;
|
|
1679
|
+
readonly __wbg_set_wasmrolloverparams_chain_id: (a: number, b: number, c: number) => void;
|
|
1680
|
+
readonly __wbg_set_wasmrolloverparams_nonce: (a: number, b: number, c: number) => void;
|
|
1681
|
+
readonly __wbg_set_wasmrolloverparams_sender_address: (a: number, b: number, c: number) => void;
|
|
1682
|
+
readonly __wbg_set_wasmrolloverparams_tongo_address: (a: number, b: number, c: number) => void;
|
|
1683
|
+
readonly __wbg_set_wasmrolloverproofresult_pending_amount: (a: number, b: number, c: number) => void;
|
|
1684
|
+
readonly __wbg_set_wasmrolloverproofresult_proof_json: (a: number, b: number, c: number) => void;
|
|
1685
|
+
readonly __wbg_set_wasmrolloverproofresult_y_x: (a: number, b: number, c: number) => void;
|
|
1686
|
+
readonly __wbg_set_wasmrolloverproofresult_y_y: (a: number, b: number, c: number) => void;
|
|
1687
|
+
readonly __wbg_set_wasmtransferparams_amount: (a: number, b: number, c: number) => void;
|
|
1688
|
+
readonly __wbg_set_wasmtransferparams_chain_id: (a: number, b: number, c: number) => void;
|
|
1689
|
+
readonly __wbg_set_wasmtransferparams_current_cipher_l_x: (a: number, b: number, c: number) => void;
|
|
1690
|
+
readonly __wbg_set_wasmtransferparams_current_cipher_l_y: (a: number, b: number, c: number) => void;
|
|
1691
|
+
readonly __wbg_set_wasmtransferparams_current_cipher_r_x: (a: number, b: number, c: number) => void;
|
|
1692
|
+
readonly __wbg_set_wasmtransferparams_nonce: (a: number, b: number, c: number) => void;
|
|
1693
|
+
readonly __wbg_set_wasmtransferparams_recipient_public_key: (a: number, b: number, c: number) => void;
|
|
1694
|
+
readonly __wbg_set_wasmtransferparams_sender_address: (a: number, b: number, c: number) => void;
|
|
1695
|
+
readonly __wbg_set_wasmtransferparams_tongo_address: (a: number, b: number, c: number) => void;
|
|
1696
|
+
readonly __wbg_set_wasmtransferproofresult_aux_v_x: (a: number, b: number, c: number) => void;
|
|
1697
|
+
readonly __wbg_set_wasmtransferproofresult_aux_v_y: (a: number, b: number, c: number) => void;
|
|
1698
|
+
readonly __wbg_set_wasmtransferproofresult_self_l_x: (a: number, b: number, c: number) => void;
|
|
1699
|
+
readonly __wbg_set_wasmtransferproofresult_self_l_y: (a: number, b: number, c: number) => void;
|
|
1700
|
+
readonly __wbg_set_wasmtransferproofresult_self_r_x: (a: number, b: number, c: number) => void;
|
|
1701
|
+
readonly __wbg_set_wasmtransferproofresult_self_r_y: (a: number, b: number, c: number) => void;
|
|
1702
|
+
readonly __wbg_set_wasmtransferproofresult_transfer_l_x: (a: number, b: number, c: number) => void;
|
|
1703
|
+
readonly __wbg_set_wasmtransferproofresult_transfer_l_y: (a: number, b: number, c: number) => void;
|
|
1704
|
+
readonly __wbg_set_wasmtransferproofresult_transfer_r_x: (a: number, b: number, c: number) => void;
|
|
1705
|
+
readonly __wbg_set_wasmtransferproofresult_transfer_r_y: (a: number, b: number, c: number) => void;
|
|
1706
|
+
readonly __wbg_set_wasmwithdrawparams_amount: (a: number, b: number, c: number) => void;
|
|
1707
|
+
readonly __wbg_set_wasmwithdrawparams_chain_id: (a: number, b: number, c: number) => void;
|
|
1708
|
+
readonly __wbg_set_wasmwithdrawparams_current_cipher_l_x: (a: number, b: number, c: number) => void;
|
|
1709
|
+
readonly __wbg_set_wasmwithdrawparams_current_cipher_l_y: (a: number, b: number, c: number) => void;
|
|
1710
|
+
readonly __wbg_set_wasmwithdrawparams_current_cipher_r_x: (a: number, b: number, c: number) => void;
|
|
1711
|
+
readonly __wbg_set_wasmwithdrawparams_current_cipher_r_y: (a: number, b: number, c: number) => void;
|
|
1712
|
+
readonly __wbg_set_wasmwithdrawparams_nonce: (a: number, b: number, c: number) => void;
|
|
1713
|
+
readonly __wbg_set_wasmwithdrawparams_recipient_address: (a: number, b: number, c: number) => void;
|
|
1714
|
+
readonly __wbg_set_wasmwithdrawparams_sender_address: (a: number, b: number, c: number) => void;
|
|
1715
|
+
readonly __wbg_set_wasmwithdrawparams_tongo_address: (a: number, b: number, c: number) => void;
|
|
1716
|
+
readonly __wbg_set_wasmwithdrawproofresult_a_r_x: (a: number, b: number, c: number) => void;
|
|
1717
|
+
readonly __wbg_set_wasmwithdrawproofresult_a_r_y: (a: number, b: number, c: number) => void;
|
|
1718
|
+
readonly __wbg_set_wasmwithdrawproofresult_a_v_x: (a: number, b: number, c: number) => void;
|
|
1719
|
+
readonly __wbg_set_wasmwithdrawproofresult_a_v_y: (a: number, b: number, c: number) => void;
|
|
1720
|
+
readonly __wbg_set_wasmwithdrawproofresult_a_x2: (a: number, b: number, c: number) => void;
|
|
1721
|
+
readonly __wbg_set_wasmwithdrawproofresult_a_x_x: (a: number, b: number, c: number) => void;
|
|
1722
|
+
readonly __wbg_set_wasmwithdrawproofresult_a_x_y: (a: number, b: number, c: number) => void;
|
|
1723
|
+
readonly __wbg_set_wasmwithdrawproofresult_a_y2: (a: number, b: number, c: number) => void;
|
|
1724
|
+
readonly __wbg_set_wasmwithdrawproofresult_amount: (a: number, b: number, c: number) => void;
|
|
1725
|
+
readonly __wbg_set_wasmwithdrawproofresult_aux_r_x: (a: number, b: number, c: number) => void;
|
|
1726
|
+
readonly __wbg_set_wasmwithdrawproofresult_aux_r_y: (a: number, b: number, c: number) => void;
|
|
1727
|
+
readonly __wbg_set_wasmwithdrawproofresult_aux_v_x: (a: number, b: number, c: number) => void;
|
|
1728
|
+
readonly __wbg_set_wasmwithdrawproofresult_aux_v_y: (a: number, b: number, c: number) => void;
|
|
1729
|
+
readonly __wbg_set_wasmwithdrawproofresult_range_json: (a: number, b: number, c: number) => void;
|
|
1730
|
+
readonly __wbg_set_wasmwithdrawproofresult_recipient: (a: number, b: number, c: number) => void;
|
|
1731
|
+
readonly __wbg_set_wasmwithdrawproofresult_sb: (a: number, b: number, c: number) => void;
|
|
1732
|
+
readonly __wbg_set_wasmwithdrawproofresult_sr: (a: number, b: number, c: number) => void;
|
|
1733
|
+
readonly __wbg_set_wasmwithdrawproofresult_sx: (a: number, b: number, c: number) => void;
|
|
1734
|
+
readonly __wbg_set_wasmwithdrawproofresult_y_x: (a: number, b: number, c: number) => void;
|
|
1735
|
+
readonly __wbg_set_wasmwithdrawproofresult_y_y: (a: number, b: number, c: number) => void;
|
|
1736
|
+
readonly wasmwithdrawparams_withBitSize: (a: number, b: number) => number;
|
|
1737
|
+
readonly __wbg_get_wasmaccountstate_balance: (a: number) => [number, number];
|
|
1738
|
+
readonly __wbg_get_wasmaccountstate_nonce: (a: number) => bigint;
|
|
1739
|
+
readonly __wbg_get_wasmaccountstate_pending_balance: (a: number) => [number, number];
|
|
1740
|
+
readonly __wbg_get_wasmciphertext_l_x: (a: number) => [number, number];
|
|
1741
|
+
readonly __wbg_get_wasmciphertext_r_y: (a: number) => [number, number];
|
|
1742
|
+
readonly __wbg_get_wasmdecryptedpoint_is_identity: (a: number) => number;
|
|
1743
|
+
readonly __wbg_get_wasmdecryptedpoint_x: (a: number) => [number, number];
|
|
1744
|
+
readonly __wbg_get_wasmdecryptedpoint_y: (a: number) => [number, number];
|
|
1745
|
+
readonly __wbg_set_wasmaccountstate_balance: (a: number, b: number, c: number) => void;
|
|
1746
|
+
readonly __wbg_set_wasmaccountstate_nonce: (a: number, b: bigint) => void;
|
|
1747
|
+
readonly __wbg_set_wasmaccountstate_pending_balance: (a: number, b: number, c: number) => void;
|
|
1748
|
+
readonly __wbg_set_wasmciphertext_l_x: (a: number, b: number, c: number) => void;
|
|
1749
|
+
readonly __wbg_set_wasmciphertext_l_y: (a: number, b: number, c: number) => void;
|
|
1750
|
+
readonly __wbg_set_wasmciphertext_r_y: (a: number, b: number, c: number) => void;
|
|
1751
|
+
readonly __wbg_set_wasmdecryptedpoint_is_identity: (a: number, b: number) => void;
|
|
1752
|
+
readonly __wbg_set_wasmdecryptedpoint_x: (a: number, b: number, c: number) => void;
|
|
1753
|
+
readonly __wbg_set_wasmdecryptedpoint_y: (a: number, b: number, c: number) => void;
|
|
1754
|
+
readonly __wbg_wasmaccountstate_free: (a: number, b: number) => void;
|
|
1755
|
+
readonly __wbg_wasmciphertext_free: (a: number, b: number) => void;
|
|
1756
|
+
readonly __wbg_wasmdecryptedpoint_free: (a: number, b: number) => void;
|
|
1757
|
+
readonly __wbg_wasmkeypair_free: (a: number, b: number) => void;
|
|
1758
|
+
readonly __wbg_wasmnostrkeypair_free: (a: number, b: number) => void;
|
|
1759
|
+
readonly __wbg_wasmnostrsignature_free: (a: number, b: number) => void;
|
|
1760
|
+
readonly __wbg_wasmpoint_free: (a: number, b: number) => void;
|
|
1761
|
+
readonly __wbg_wasmstarksignature_free: (a: number, b: number) => void;
|
|
1762
|
+
readonly wasmaccountstate_new: (a: number, b: number, c: number, d: number, e: bigint) => [number, number, number];
|
|
1763
|
+
readonly wasmaccountstate_totalBalance: (a: number) => [number, number, number, number];
|
|
1764
|
+
readonly wasmciphertext_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
1765
|
+
readonly wasmdecryptedpoint_new: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
1766
|
+
readonly wasmkeypair_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
1767
|
+
readonly wasmkeypair_publicKeyHex: (a: number) => [number, number];
|
|
1768
|
+
readonly wasmnostrkeypair_new: (a: number, b: number, c: number, d: number) => number;
|
|
1769
|
+
readonly wasmpoint_new: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
1770
|
+
readonly __wbg_get_wasmciphertext_l_y: (a: number) => [number, number];
|
|
1771
|
+
readonly __wbg_get_wasmciphertext_r_x: (a: number) => [number, number];
|
|
1772
|
+
readonly __wbg_get_wasmkeypair_private_key: (a: number) => [number, number];
|
|
1773
|
+
readonly __wbg_get_wasmkeypair_public_key_x: (a: number) => [number, number];
|
|
1774
|
+
readonly __wbg_get_wasmkeypair_public_key_y: (a: number) => [number, number];
|
|
1775
|
+
readonly __wbg_get_wasmnostrkeypair_private_key: (a: number) => [number, number];
|
|
1776
|
+
readonly __wbg_get_wasmnostrkeypair_public_key: (a: number) => [number, number];
|
|
1777
|
+
readonly __wbg_get_wasmnostrsignature_publicKey: (a: number) => [number, number];
|
|
1778
|
+
readonly __wbg_get_wasmnostrsignature_signature: (a: number) => [number, number];
|
|
1779
|
+
readonly __wbg_get_wasmpoint_x: (a: number) => [number, number];
|
|
1780
|
+
readonly __wbg_get_wasmpoint_y: (a: number) => [number, number];
|
|
1781
|
+
readonly __wbg_get_wasmstarksignature_publicKey: (a: number) => [number, number];
|
|
1782
|
+
readonly __wbg_get_wasmstarksignature_r: (a: number) => [number, number];
|
|
1783
|
+
readonly __wbg_get_wasmstarksignature_s: (a: number) => [number, number];
|
|
1784
|
+
readonly __wbg_set_wasmciphertext_r_x: (a: number, b: number, c: number) => void;
|
|
1785
|
+
readonly __wbg_set_wasmkeypair_private_key: (a: number, b: number, c: number) => void;
|
|
1786
|
+
readonly __wbg_set_wasmkeypair_public_key_x: (a: number, b: number, c: number) => void;
|
|
1787
|
+
readonly __wbg_set_wasmkeypair_public_key_y: (a: number, b: number, c: number) => void;
|
|
1788
|
+
readonly __wbg_set_wasmnostrkeypair_private_key: (a: number, b: number, c: number) => void;
|
|
1789
|
+
readonly __wbg_set_wasmnostrkeypair_public_key: (a: number, b: number, c: number) => void;
|
|
1790
|
+
readonly __wbg_set_wasmnostrsignature_publicKey: (a: number, b: number, c: number) => void;
|
|
1791
|
+
readonly __wbg_set_wasmnostrsignature_signature: (a: number, b: number, c: number) => void;
|
|
1792
|
+
readonly __wbg_set_wasmpoint_x: (a: number, b: number, c: number) => void;
|
|
1793
|
+
readonly __wbg_set_wasmpoint_y: (a: number, b: number, c: number) => void;
|
|
1794
|
+
readonly __wbg_set_wasmstarksignature_publicKey: (a: number, b: number, c: number) => void;
|
|
1795
|
+
readonly __wbg_set_wasmstarksignature_r: (a: number, b: number, c: number) => void;
|
|
1796
|
+
readonly __wbg_set_wasmstarksignature_s: (a: number, b: number, c: number) => void;
|
|
1797
|
+
readonly __wbg_wasmaccount_free: (a: number, b: number) => void;
|
|
1798
|
+
readonly calculateContractAddress: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number, number];
|
|
1799
|
+
readonly deriveArgentAccountAddress: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1800
|
+
readonly deriveArgentLegacyKeypair: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
1801
|
+
readonly deriveBraavosAccountAddress: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1802
|
+
readonly deriveKeypair: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1803
|
+
readonly deriveNostrKeypair: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1804
|
+
readonly deriveOzAccountAddress: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
1805
|
+
readonly deriveStarknetKeypair: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1806
|
+
readonly generateMnemonic: (a: number) => [number, number, number, number];
|
|
1807
|
+
readonly getAccountClassHashes: () => [number, number];
|
|
1808
|
+
readonly getNostrCoinType: () => number;
|
|
1809
|
+
readonly getStarknetCoinType: () => number;
|
|
1810
|
+
readonly getTongoCoinType: () => number;
|
|
1811
|
+
readonly validateMnemonic: (a: number, b: number) => number;
|
|
1812
|
+
readonly wasmaccount_contractAddress: (a: number) => [number, number];
|
|
1813
|
+
readonly wasmaccount_decryptBalance: (a: number, b: number, c: number, d: bigint) => [number, number, number, number];
|
|
1814
|
+
readonly wasmaccount_decryptToPoint: (a: number, b: number) => [number, number, number];
|
|
1815
|
+
readonly wasmaccount_fromMnemonic: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
1816
|
+
readonly wasmaccount_fromPrivateKey: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
1817
|
+
readonly wasmaccount_getState: (a: number) => number;
|
|
1818
|
+
readonly wasmaccount_hasSufficientBalance: (a: number, b: number, c: number) => [number, number, number];
|
|
1819
|
+
readonly wasmaccount_ownerPublicKeyHex: (a: number) => [number, number, number, number];
|
|
1820
|
+
readonly wasmaccount_totalBalance: (a: number) => [number, number, number, number];
|
|
1821
|
+
readonly wasmaccount_updateState: (a: number, b: number) => [number, number];
|
|
1822
|
+
readonly deserializePublicKey: (a: number, b: number) => [number, number, number];
|
|
1823
|
+
readonly getBuildInfo: () => any;
|
|
1824
|
+
readonly getGenerator: () => number;
|
|
1825
|
+
readonly getVersion: () => [number, number];
|
|
1826
|
+
readonly pointAdd: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
1827
|
+
readonly poseidonHash: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1828
|
+
readonly poseidonHashMany: (a: number, b: number) => [number, number, number, number];
|
|
1829
|
+
readonly randomFelt: () => [number, number];
|
|
1830
|
+
readonly scalarMul: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1831
|
+
readonly scalarMulGenerator: (a: number, b: number) => [number, number, number];
|
|
1832
|
+
readonly serializePublicKey: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1833
|
+
readonly init: () => void;
|
|
1834
|
+
readonly __wbg_get_wasmencryptedkey_encryptedKey: (a: number) => [number, number];
|
|
1835
|
+
readonly __wbg_get_wasmencryptedkey_nonce: (a: number) => [number, number];
|
|
1836
|
+
readonly __wbg_get_wasmencryptedkey_salt: (a: number) => [number, number];
|
|
1837
|
+
readonly __wbg_set_wasmencryptedkey_encryptedKey: (a: number, b: number, c: number) => void;
|
|
1838
|
+
readonly __wbg_set_wasmencryptedkey_nonce: (a: number, b: number, c: number) => void;
|
|
1839
|
+
readonly __wbg_set_wasmencryptedkey_salt: (a: number, b: number, c: number) => void;
|
|
1840
|
+
readonly __wbg_wasmencryptedkey_free: (a: number, b: number) => void;
|
|
1841
|
+
readonly __wbg_wasmencryptedpayload_free: (a: number, b: number) => void;
|
|
1842
|
+
readonly decryptEthersKeystore: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1843
|
+
readonly decryptKeystore: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1844
|
+
readonly decryptPrivateKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number, number];
|
|
1845
|
+
readonly decryptWithKey: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
1846
|
+
readonly encryptKeystore: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
1847
|
+
readonly encryptPrivateKey: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
1848
|
+
readonly encryptWithKey: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
1849
|
+
readonly grindKey: (a: number, b: number) => [number, number, number, number];
|
|
1850
|
+
readonly isValidFelt: (a: number, b: number) => number;
|
|
1851
|
+
readonly isValidStarkPrivateKey: (a: number, b: number) => number;
|
|
1852
|
+
readonly randomBytesHex: (a: number) => [number, number, number, number];
|
|
1853
|
+
readonly __wbg_get_wasmencryptedpayload_ciphertext: (a: number) => [number, number];
|
|
1854
|
+
readonly __wbg_get_wasmencryptedpayload_nonce: (a: number) => [number, number];
|
|
1855
|
+
readonly __wbg_set_wasmencryptedpayload_ciphertext: (a: number, b: number, c: number) => void;
|
|
1856
|
+
readonly __wbg_set_wasmencryptedpayload_nonce: (a: number, b: number, c: number) => void;
|
|
1857
|
+
readonly deriveDiscoveryKeypairs: (a: number, b: number, c: number) => [number, number, number, number];
|
|
1858
|
+
readonly discoverAccountsFromMnemonic: (a: number, b: number, c: number) => [number, number, number, number];
|
|
1859
|
+
readonly generateAccountAddresses: (a: number, b: number, c: number) => [number, number, number, number];
|
|
1860
|
+
readonly generateAccountCandidates: (a: number, b: number, c: number) => [number, number, number, number];
|
|
1861
|
+
readonly nostrPublicKey: (a: number, b: number) => [number, number, number, number];
|
|
1862
|
+
readonly signNostrEventId: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
1863
|
+
readonly signNostrMessage: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
1864
|
+
readonly signStarkHash: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
1865
|
+
readonly starkPublicKey: (a: number, b: number) => [number, number, number, number];
|
|
1866
|
+
readonly computeDeclareTransactionHashV2: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number, number, number];
|
|
1867
|
+
readonly computeDeclareTransactionHashV3: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: any, n: number, o: number, p: number, q: number, r: number, s: number) => [number, number, number, number];
|
|
1868
|
+
readonly computeDeployAccountTransactionHashV1: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => [number, number, number, number];
|
|
1869
|
+
readonly computeDeployAccountTransactionHashV3: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: any, p: number, q: number, r: number, s: number) => [number, number, number, number];
|
|
1870
|
+
readonly computeInvokeTransactionHashV1: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number, number];
|
|
1871
|
+
readonly computeInvokeTransactionHashV3: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: any, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number) => [number, number, number, number];
|
|
1872
|
+
readonly computeTypedDataMessageHash: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1873
|
+
readonly compileCalls: (a: number, b: number) => [number, number, number, number];
|
|
1874
|
+
readonly decodeShortString: (a: number, b: number) => [number, number, number, number];
|
|
1875
|
+
readonly deriveStrk20ViewingKey: (a: number, b: number) => [number, number, number, number];
|
|
1876
|
+
readonly encodeFelt: (a: number, b: number) => [number, number, number, number];
|
|
1877
|
+
readonly encodeShortString: (a: number, b: number) => [number, number, number, number];
|
|
1878
|
+
readonly getSelectorFromName: (a: number, b: number) => [number, number, number, number];
|
|
1879
|
+
readonly pedersenHash: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1880
|
+
readonly pedersenHashMany: (a: number, b: number) => [number, number, number, number];
|
|
1881
|
+
readonly starknetKeccak: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1882
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1883
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1884
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
1885
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1886
|
+
readonly __externref_table_alloc: () => number;
|
|
1887
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
1888
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
1889
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
1890
|
+
readonly __wbindgen_start: () => void;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1897
|
+
* a precompiled `WebAssembly.Module`.
|
|
1898
|
+
*
|
|
1899
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1900
|
+
*
|
|
1901
|
+
* @returns {InitOutput}
|
|
1902
|
+
*/
|
|
1903
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
1904
|
+
|
|
1905
|
+
/**
|
|
1906
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1907
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1908
|
+
*
|
|
1909
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1910
|
+
*
|
|
1911
|
+
* @returns {Promise<InitOutput>}
|
|
1912
|
+
*/
|
|
1913
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|