bulk-keychain-wasm 0.1.13 → 0.1.15
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/bulk_keychain_wasm.d.ts +100 -0
- package/bulk_keychain_wasm.js +354 -75
- package/bulk_keychain_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/bulk_keychain_wasm.d.ts
CHANGED
|
@@ -141,6 +141,10 @@ export class WasmSigner {
|
|
|
141
141
|
* Sign multiple orders - each becomes its own transaction (parallel)
|
|
142
142
|
*/
|
|
143
143
|
signAll(orders: any, base_nonce?: number | null): any;
|
|
144
|
+
/**
|
|
145
|
+
* Sign a multisig creation
|
|
146
|
+
*/
|
|
147
|
+
signCreateMultisig(signers: any, threshold: number, time_lock_secs?: number | null, proposal_lifetime_secs?: number | null, nonce?: number | null): any;
|
|
144
148
|
/**
|
|
145
149
|
* Sign a sub-account creation (optional initial margin transfer)
|
|
146
150
|
*/
|
|
@@ -153,6 +157,26 @@ export class WasmSigner {
|
|
|
153
157
|
* Sign multiple orders atomically in ONE transaction
|
|
154
158
|
*/
|
|
155
159
|
signGroup(orders: any, nonce?: number | null): any;
|
|
160
|
+
/**
|
|
161
|
+
* Sign a multisig approval
|
|
162
|
+
*/
|
|
163
|
+
signMultisigApprove(multisig: string, proposal_id: number, nonce?: number | null): any;
|
|
164
|
+
/**
|
|
165
|
+
* Sign a multisig cancellation
|
|
166
|
+
*/
|
|
167
|
+
signMultisigCancel(multisig: string, proposal_id: number, nonce?: number | null): any;
|
|
168
|
+
/**
|
|
169
|
+
* Sign a multisig execution
|
|
170
|
+
*/
|
|
171
|
+
signMultisigExecute(multisig: string, proposal_id: number, nonce?: number | null): any;
|
|
172
|
+
/**
|
|
173
|
+
* Sign a multisig proposal
|
|
174
|
+
*/
|
|
175
|
+
signMultisigPropose(multisig: string, actions: any, nonce?: number | null): any;
|
|
176
|
+
/**
|
|
177
|
+
* Sign a multisig rejection
|
|
178
|
+
*/
|
|
179
|
+
signMultisigReject(multisig: string, proposal_id: number, nonce?: number | null): any;
|
|
156
180
|
/**
|
|
157
181
|
* Sign one or more oracle price updates (`px`)
|
|
158
182
|
*/
|
|
@@ -176,6 +200,14 @@ export class WasmSigner {
|
|
|
176
200
|
* @param nonce - optional nonce
|
|
177
201
|
*/
|
|
178
202
|
signRemoveSubAccount(to_remove: string, nonce?: number | null): any;
|
|
203
|
+
/**
|
|
204
|
+
* Sign a sub-account rename
|
|
205
|
+
*
|
|
206
|
+
* @param subaccount - sub-account pubkey to rename (base58)
|
|
207
|
+
* @param name - new display name
|
|
208
|
+
* @param nonce - optional nonce
|
|
209
|
+
*/
|
|
210
|
+
signRenameSubAccount(subaccount: string, name: string, nonce?: number | null): any;
|
|
179
211
|
/**
|
|
180
212
|
* Sign a margin transfer between accounts
|
|
181
213
|
*
|
|
@@ -187,6 +219,10 @@ export class WasmSigner {
|
|
|
187
219
|
* @param nonce - optional nonce
|
|
188
220
|
*/
|
|
189
221
|
signTransfer(kind: string | null | undefined, from_pubkey: string, to_pubkey: string, margin_symbol: string, margin_amount: number, nonce?: number | null): any;
|
|
222
|
+
/**
|
|
223
|
+
* Sign a multisig policy update
|
|
224
|
+
*/
|
|
225
|
+
signUpdateMultisigPolicy(multisig: string, signers: any, threshold: number, time_lock_secs?: number | null, proposal_lifetime_secs?: number | null, nonce?: number | null): any;
|
|
190
226
|
/**
|
|
191
227
|
* Sign user settings update
|
|
192
228
|
*/
|
|
@@ -248,6 +284,15 @@ export function prepareAgentWallet(agent_pubkey: string, _delete: boolean, optio
|
|
|
248
284
|
*/
|
|
249
285
|
export function prepareAll(orders: any, options: any): WasmPreparedMessage[];
|
|
250
286
|
|
|
287
|
+
/**
|
|
288
|
+
* Prepare a multisig creation for external signing
|
|
289
|
+
*
|
|
290
|
+
* @param signers - signer pubkeys (base58)
|
|
291
|
+
* @param threshold - approvals required
|
|
292
|
+
* @param options - { account: string, signer?: string, nonce?: number, timeLockSecs?: number, proposalLifetimeSecs?: number }
|
|
293
|
+
*/
|
|
294
|
+
export function prepareCreateMultisig(signers: any, threshold: number, options: any): WasmPreparedMessage;
|
|
295
|
+
|
|
251
296
|
/**
|
|
252
297
|
* Prepare a sub-account creation for external signing
|
|
253
298
|
*
|
|
@@ -274,6 +319,31 @@ export function prepareFaucet(options: any): WasmPreparedMessage;
|
|
|
274
319
|
*/
|
|
275
320
|
export function prepareGroup(orders: any, options: any): WasmPreparedMessage;
|
|
276
321
|
|
|
322
|
+
/**
|
|
323
|
+
* Prepare a multisig approval for external signing
|
|
324
|
+
*/
|
|
325
|
+
export function prepareMultisigApprove(multisig: string, proposal_id: number, options: any): WasmPreparedMessage;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Prepare a multisig cancellation for external signing
|
|
329
|
+
*/
|
|
330
|
+
export function prepareMultisigCancel(multisig: string, proposal_id: number, options: any): WasmPreparedMessage;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Prepare a multisig execution for external signing
|
|
334
|
+
*/
|
|
335
|
+
export function prepareMultisigExecute(multisig: string, proposal_id: number, options: any): WasmPreparedMessage;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Prepare a multisig proposal for external signing
|
|
339
|
+
*/
|
|
340
|
+
export function prepareMultisigPropose(multisig: string, actions: any, options: any): WasmPreparedMessage;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Prepare a multisig rejection for external signing
|
|
344
|
+
*/
|
|
345
|
+
export function prepareMultisigReject(multisig: string, proposal_id: number, options: any): WasmPreparedMessage;
|
|
346
|
+
|
|
277
347
|
/**
|
|
278
348
|
* Prepare a single order for external wallet signing
|
|
279
349
|
*
|
|
@@ -301,6 +371,15 @@ export function prepareOrder(order: any, options: any): WasmPreparedMessage;
|
|
|
301
371
|
*/
|
|
302
372
|
export function prepareRemoveSubAccount(to_remove: string, options: any): WasmPreparedMessage;
|
|
303
373
|
|
|
374
|
+
/**
|
|
375
|
+
* Prepare a sub-account rename for external signing
|
|
376
|
+
*
|
|
377
|
+
* @param subaccount - sub-account pubkey to rename (base58)
|
|
378
|
+
* @param name - new display name
|
|
379
|
+
* @param options - { account: string, signer?: string, nonce?: number }
|
|
380
|
+
*/
|
|
381
|
+
export function prepareRenameSubAccount(subaccount: string, name: string, options: any): WasmPreparedMessage;
|
|
382
|
+
|
|
304
383
|
/**
|
|
305
384
|
* Prepare a margin transfer for external signing
|
|
306
385
|
*
|
|
@@ -312,6 +391,11 @@ export function prepareRemoveSubAccount(to_remove: string, options: any): WasmPr
|
|
|
312
391
|
*/
|
|
313
392
|
export function prepareTransfer(from_pubkey: string, to_pubkey: string, margin_symbol: string, margin_amount: number, options: any): WasmPreparedMessage;
|
|
314
393
|
|
|
394
|
+
/**
|
|
395
|
+
* Prepare a multisig policy update for external signing
|
|
396
|
+
*/
|
|
397
|
+
export function prepareUpdateMultisigPolicy(multisig: string, signers: any, threshold: number, options: any): WasmPreparedMessage;
|
|
398
|
+
|
|
315
399
|
/**
|
|
316
400
|
* Prepare user settings update for external signing
|
|
317
401
|
*
|
|
@@ -347,12 +431,20 @@ export interface InitOutput {
|
|
|
347
431
|
readonly finalizeTransaction: (a: any, b: number, c: number) => [number, number, number];
|
|
348
432
|
readonly prepareAgentWallet: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
349
433
|
readonly prepareAll: (a: any, b: any) => [number, number, number, number];
|
|
434
|
+
readonly prepareCreateMultisig: (a: any, b: number, c: any) => [number, number, number];
|
|
350
435
|
readonly prepareCreateSubAccount: (a: number, b: number, c: any) => [number, number, number];
|
|
351
436
|
readonly prepareFaucet: (a: any) => [number, number, number];
|
|
352
437
|
readonly prepareGroup: (a: any, b: any) => [number, number, number];
|
|
438
|
+
readonly prepareMultisigApprove: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
439
|
+
readonly prepareMultisigCancel: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
440
|
+
readonly prepareMultisigExecute: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
441
|
+
readonly prepareMultisigPropose: (a: number, b: number, c: any, d: any) => [number, number, number];
|
|
442
|
+
readonly prepareMultisigReject: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
353
443
|
readonly prepareOrder: (a: any, b: any) => [number, number, number];
|
|
354
444
|
readonly prepareRemoveSubAccount: (a: number, b: number, c: any) => [number, number, number];
|
|
445
|
+
readonly prepareRenameSubAccount: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
|
|
355
446
|
readonly prepareTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: any) => [number, number, number];
|
|
447
|
+
readonly prepareUpdateMultisigPolicy: (a: number, b: number, c: any, d: number, e: any) => [number, number, number];
|
|
356
448
|
readonly prepareUpdateUserSettings: (a: any, b: any) => [number, number, number];
|
|
357
449
|
readonly randomHash: () => [number, number];
|
|
358
450
|
readonly validateHash: (a: number, b: number) => number;
|
|
@@ -386,14 +478,22 @@ export interface InitOutput {
|
|
|
386
478
|
readonly wasmsigner_sign: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
387
479
|
readonly wasmsigner_signAgentWallet: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
388
480
|
readonly wasmsigner_signAll: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
481
|
+
readonly wasmsigner_signCreateMultisig: (a: number, b: any, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
389
482
|
readonly wasmsigner_signCreateSubAccount: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
390
483
|
readonly wasmsigner_signFaucet: (a: number, b: number, c: number) => [number, number, number];
|
|
391
484
|
readonly wasmsigner_signGroup: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
485
|
+
readonly wasmsigner_signMultisigApprove: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
486
|
+
readonly wasmsigner_signMultisigCancel: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
487
|
+
readonly wasmsigner_signMultisigExecute: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
488
|
+
readonly wasmsigner_signMultisigPropose: (a: number, b: number, c: number, d: any, e: number, f: number) => [number, number, number];
|
|
489
|
+
readonly wasmsigner_signMultisigReject: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
392
490
|
readonly wasmsigner_signOraclePrices: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
393
491
|
readonly wasmsigner_signOrdersBatch: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
394
492
|
readonly wasmsigner_signPythOracle: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
395
493
|
readonly wasmsigner_signRemoveSubAccount: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
494
|
+
readonly wasmsigner_signRenameSubAccount: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
396
495
|
readonly wasmsigner_signTransfer: (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];
|
|
496
|
+
readonly wasmsigner_signUpdateMultisigPolicy: (a: number, b: number, c: number, d: any, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
397
497
|
readonly wasmsigner_signUserSettings: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
398
498
|
readonly wasmsigner_signWhitelistFaucet: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
399
499
|
readonly wasmsigner_withNonceManager: (a: number, b: number, c: number) => [number, number, number];
|
package/bulk_keychain_wasm.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export class WasmKeypair {
|
|
7
7
|
static __wrap(ptr) {
|
|
8
|
-
ptr = ptr >>> 0;
|
|
9
8
|
const obj = Object.create(WasmKeypair.prototype);
|
|
10
9
|
obj.__wbg_ptr = ptr;
|
|
11
10
|
WasmKeypairFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -54,7 +53,7 @@ export class WasmKeypair {
|
|
|
54
53
|
*/
|
|
55
54
|
constructor() {
|
|
56
55
|
const ret = wasm.wasmkeypair_new();
|
|
57
|
-
this.__wbg_ptr = ret
|
|
56
|
+
this.__wbg_ptr = ret;
|
|
58
57
|
WasmKeypairFinalization.register(this, this.__wbg_ptr, this);
|
|
59
58
|
return this;
|
|
60
59
|
}
|
|
@@ -121,7 +120,6 @@ if (Symbol.dispose) WasmKeypair.prototype[Symbol.dispose] = WasmKeypair.prototyp
|
|
|
121
120
|
*/
|
|
122
121
|
export class WasmPreparedMessage {
|
|
123
122
|
static __wrap(ptr) {
|
|
124
|
-
ptr = ptr >>> 0;
|
|
125
123
|
const obj = Object.create(WasmPreparedMessage.prototype);
|
|
126
124
|
obj.__wbg_ptr = ptr;
|
|
127
125
|
WasmPreparedMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -301,7 +299,6 @@ if (Symbol.dispose) WasmPreparedMessage.prototype[Symbol.dispose] = WasmPrepared
|
|
|
301
299
|
*/
|
|
302
300
|
export class WasmSigner {
|
|
303
301
|
static __wrap(ptr) {
|
|
304
|
-
ptr = ptr >>> 0;
|
|
305
302
|
const obj = Object.create(WasmSigner.prototype);
|
|
306
303
|
obj.__wbg_ptr = ptr;
|
|
307
304
|
WasmSignerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -354,7 +351,7 @@ export class WasmSigner {
|
|
|
354
351
|
constructor(keypair) {
|
|
355
352
|
_assertClass(keypair, WasmKeypair);
|
|
356
353
|
const ret = wasm.wasmsigner_new(keypair.__wbg_ptr);
|
|
357
|
-
this.__wbg_ptr = ret
|
|
354
|
+
this.__wbg_ptr = ret;
|
|
358
355
|
WasmSignerFinalization.register(this, this.__wbg_ptr, this);
|
|
359
356
|
return this;
|
|
360
357
|
}
|
|
@@ -430,6 +427,22 @@ export class WasmSigner {
|
|
|
430
427
|
}
|
|
431
428
|
return takeFromExternrefTable0(ret[0]);
|
|
432
429
|
}
|
|
430
|
+
/**
|
|
431
|
+
* Sign a multisig creation
|
|
432
|
+
* @param {any} signers
|
|
433
|
+
* @param {number} threshold
|
|
434
|
+
* @param {number | null} [time_lock_secs]
|
|
435
|
+
* @param {number | null} [proposal_lifetime_secs]
|
|
436
|
+
* @param {number | null} [nonce]
|
|
437
|
+
* @returns {any}
|
|
438
|
+
*/
|
|
439
|
+
signCreateMultisig(signers, threshold, time_lock_secs, proposal_lifetime_secs, nonce) {
|
|
440
|
+
const ret = wasm.wasmsigner_signCreateMultisig(this.__wbg_ptr, signers, threshold, isLikeNone(time_lock_secs) ? Number.MAX_SAFE_INTEGER : (time_lock_secs) >>> 0, isLikeNone(proposal_lifetime_secs) ? Number.MAX_SAFE_INTEGER : (proposal_lifetime_secs) >>> 0, !isLikeNone(nonce), isLikeNone(nonce) ? 0 : nonce);
|
|
441
|
+
if (ret[2]) {
|
|
442
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
443
|
+
}
|
|
444
|
+
return takeFromExternrefTable0(ret[0]);
|
|
445
|
+
}
|
|
433
446
|
/**
|
|
434
447
|
* Sign a sub-account creation (optional initial margin transfer)
|
|
435
448
|
* @param {string} name
|
|
@@ -474,6 +487,86 @@ export class WasmSigner {
|
|
|
474
487
|
}
|
|
475
488
|
return takeFromExternrefTable0(ret[0]);
|
|
476
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* Sign a multisig approval
|
|
492
|
+
* @param {string} multisig
|
|
493
|
+
* @param {number} proposal_id
|
|
494
|
+
* @param {number | null} [nonce]
|
|
495
|
+
* @returns {any}
|
|
496
|
+
*/
|
|
497
|
+
signMultisigApprove(multisig, proposal_id, nonce) {
|
|
498
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
499
|
+
const len0 = WASM_VECTOR_LEN;
|
|
500
|
+
const ret = wasm.wasmsigner_signMultisigApprove(this.__wbg_ptr, ptr0, len0, proposal_id, !isLikeNone(nonce), isLikeNone(nonce) ? 0 : nonce);
|
|
501
|
+
if (ret[2]) {
|
|
502
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
503
|
+
}
|
|
504
|
+
return takeFromExternrefTable0(ret[0]);
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Sign a multisig cancellation
|
|
508
|
+
* @param {string} multisig
|
|
509
|
+
* @param {number} proposal_id
|
|
510
|
+
* @param {number | null} [nonce]
|
|
511
|
+
* @returns {any}
|
|
512
|
+
*/
|
|
513
|
+
signMultisigCancel(multisig, proposal_id, nonce) {
|
|
514
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
515
|
+
const len0 = WASM_VECTOR_LEN;
|
|
516
|
+
const ret = wasm.wasmsigner_signMultisigCancel(this.__wbg_ptr, ptr0, len0, proposal_id, !isLikeNone(nonce), isLikeNone(nonce) ? 0 : nonce);
|
|
517
|
+
if (ret[2]) {
|
|
518
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
519
|
+
}
|
|
520
|
+
return takeFromExternrefTable0(ret[0]);
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Sign a multisig execution
|
|
524
|
+
* @param {string} multisig
|
|
525
|
+
* @param {number} proposal_id
|
|
526
|
+
* @param {number | null} [nonce]
|
|
527
|
+
* @returns {any}
|
|
528
|
+
*/
|
|
529
|
+
signMultisigExecute(multisig, proposal_id, nonce) {
|
|
530
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
531
|
+
const len0 = WASM_VECTOR_LEN;
|
|
532
|
+
const ret = wasm.wasmsigner_signMultisigExecute(this.__wbg_ptr, ptr0, len0, proposal_id, !isLikeNone(nonce), isLikeNone(nonce) ? 0 : nonce);
|
|
533
|
+
if (ret[2]) {
|
|
534
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
535
|
+
}
|
|
536
|
+
return takeFromExternrefTable0(ret[0]);
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Sign a multisig proposal
|
|
540
|
+
* @param {string} multisig
|
|
541
|
+
* @param {any} actions
|
|
542
|
+
* @param {number | null} [nonce]
|
|
543
|
+
* @returns {any}
|
|
544
|
+
*/
|
|
545
|
+
signMultisigPropose(multisig, actions, nonce) {
|
|
546
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
547
|
+
const len0 = WASM_VECTOR_LEN;
|
|
548
|
+
const ret = wasm.wasmsigner_signMultisigPropose(this.__wbg_ptr, ptr0, len0, actions, !isLikeNone(nonce), isLikeNone(nonce) ? 0 : nonce);
|
|
549
|
+
if (ret[2]) {
|
|
550
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
551
|
+
}
|
|
552
|
+
return takeFromExternrefTable0(ret[0]);
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Sign a multisig rejection
|
|
556
|
+
* @param {string} multisig
|
|
557
|
+
* @param {number} proposal_id
|
|
558
|
+
* @param {number | null} [nonce]
|
|
559
|
+
* @returns {any}
|
|
560
|
+
*/
|
|
561
|
+
signMultisigReject(multisig, proposal_id, nonce) {
|
|
562
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
563
|
+
const len0 = WASM_VECTOR_LEN;
|
|
564
|
+
const ret = wasm.wasmsigner_signMultisigReject(this.__wbg_ptr, ptr0, len0, proposal_id, !isLikeNone(nonce), isLikeNone(nonce) ? 0 : nonce);
|
|
565
|
+
if (ret[2]) {
|
|
566
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
567
|
+
}
|
|
568
|
+
return takeFromExternrefTable0(ret[0]);
|
|
569
|
+
}
|
|
477
570
|
/**
|
|
478
571
|
* Sign one or more oracle price updates (`px`)
|
|
479
572
|
* @param {any} oracles
|
|
@@ -544,6 +637,28 @@ export class WasmSigner {
|
|
|
544
637
|
}
|
|
545
638
|
return takeFromExternrefTable0(ret[0]);
|
|
546
639
|
}
|
|
640
|
+
/**
|
|
641
|
+
* Sign a sub-account rename
|
|
642
|
+
*
|
|
643
|
+
* @param subaccount - sub-account pubkey to rename (base58)
|
|
644
|
+
* @param name - new display name
|
|
645
|
+
* @param nonce - optional nonce
|
|
646
|
+
* @param {string} subaccount
|
|
647
|
+
* @param {string} name
|
|
648
|
+
* @param {number | null} [nonce]
|
|
649
|
+
* @returns {any}
|
|
650
|
+
*/
|
|
651
|
+
signRenameSubAccount(subaccount, name, nonce) {
|
|
652
|
+
const ptr0 = passStringToWasm0(subaccount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
653
|
+
const len0 = WASM_VECTOR_LEN;
|
|
654
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
655
|
+
const len1 = WASM_VECTOR_LEN;
|
|
656
|
+
const ret = wasm.wasmsigner_signRenameSubAccount(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(nonce), isLikeNone(nonce) ? 0 : nonce);
|
|
657
|
+
if (ret[2]) {
|
|
658
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
659
|
+
}
|
|
660
|
+
return takeFromExternrefTable0(ret[0]);
|
|
661
|
+
}
|
|
547
662
|
/**
|
|
548
663
|
* Sign a margin transfer between accounts
|
|
549
664
|
*
|
|
@@ -576,6 +691,25 @@ export class WasmSigner {
|
|
|
576
691
|
}
|
|
577
692
|
return takeFromExternrefTable0(ret[0]);
|
|
578
693
|
}
|
|
694
|
+
/**
|
|
695
|
+
* Sign a multisig policy update
|
|
696
|
+
* @param {string} multisig
|
|
697
|
+
* @param {any} signers
|
|
698
|
+
* @param {number} threshold
|
|
699
|
+
* @param {number | null} [time_lock_secs]
|
|
700
|
+
* @param {number | null} [proposal_lifetime_secs]
|
|
701
|
+
* @param {number | null} [nonce]
|
|
702
|
+
* @returns {any}
|
|
703
|
+
*/
|
|
704
|
+
signUpdateMultisigPolicy(multisig, signers, threshold, time_lock_secs, proposal_lifetime_secs, nonce) {
|
|
705
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
706
|
+
const len0 = WASM_VECTOR_LEN;
|
|
707
|
+
const ret = wasm.wasmsigner_signUpdateMultisigPolicy(this.__wbg_ptr, ptr0, len0, signers, threshold, isLikeNone(time_lock_secs) ? Number.MAX_SAFE_INTEGER : (time_lock_secs) >>> 0, isLikeNone(proposal_lifetime_secs) ? Number.MAX_SAFE_INTEGER : (proposal_lifetime_secs) >>> 0, !isLikeNone(nonce), isLikeNone(nonce) ? 0 : nonce);
|
|
708
|
+
if (ret[2]) {
|
|
709
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
710
|
+
}
|
|
711
|
+
return takeFromExternrefTable0(ret[0]);
|
|
712
|
+
}
|
|
579
713
|
/**
|
|
580
714
|
* Sign user settings update
|
|
581
715
|
* @param {any} settings
|
|
@@ -722,6 +856,25 @@ export function prepareAll(orders, options) {
|
|
|
722
856
|
return v1;
|
|
723
857
|
}
|
|
724
858
|
|
|
859
|
+
/**
|
|
860
|
+
* Prepare a multisig creation for external signing
|
|
861
|
+
*
|
|
862
|
+
* @param signers - signer pubkeys (base58)
|
|
863
|
+
* @param threshold - approvals required
|
|
864
|
+
* @param options - { account: string, signer?: string, nonce?: number, timeLockSecs?: number, proposalLifetimeSecs?: number }
|
|
865
|
+
* @param {any} signers
|
|
866
|
+
* @param {number} threshold
|
|
867
|
+
* @param {any} options
|
|
868
|
+
* @returns {WasmPreparedMessage}
|
|
869
|
+
*/
|
|
870
|
+
export function prepareCreateMultisig(signers, threshold, options) {
|
|
871
|
+
const ret = wasm.prepareCreateMultisig(signers, threshold, options);
|
|
872
|
+
if (ret[2]) {
|
|
873
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
874
|
+
}
|
|
875
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
876
|
+
}
|
|
877
|
+
|
|
725
878
|
/**
|
|
726
879
|
* Prepare a sub-account creation for external signing
|
|
727
880
|
*
|
|
@@ -776,6 +929,91 @@ export function prepareGroup(orders, options) {
|
|
|
776
929
|
return WasmPreparedMessage.__wrap(ret[0]);
|
|
777
930
|
}
|
|
778
931
|
|
|
932
|
+
/**
|
|
933
|
+
* Prepare a multisig approval for external signing
|
|
934
|
+
* @param {string} multisig
|
|
935
|
+
* @param {number} proposal_id
|
|
936
|
+
* @param {any} options
|
|
937
|
+
* @returns {WasmPreparedMessage}
|
|
938
|
+
*/
|
|
939
|
+
export function prepareMultisigApprove(multisig, proposal_id, options) {
|
|
940
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
941
|
+
const len0 = WASM_VECTOR_LEN;
|
|
942
|
+
const ret = wasm.prepareMultisigApprove(ptr0, len0, proposal_id, options);
|
|
943
|
+
if (ret[2]) {
|
|
944
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
945
|
+
}
|
|
946
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Prepare a multisig cancellation for external signing
|
|
951
|
+
* @param {string} multisig
|
|
952
|
+
* @param {number} proposal_id
|
|
953
|
+
* @param {any} options
|
|
954
|
+
* @returns {WasmPreparedMessage}
|
|
955
|
+
*/
|
|
956
|
+
export function prepareMultisigCancel(multisig, proposal_id, options) {
|
|
957
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
958
|
+
const len0 = WASM_VECTOR_LEN;
|
|
959
|
+
const ret = wasm.prepareMultisigCancel(ptr0, len0, proposal_id, options);
|
|
960
|
+
if (ret[2]) {
|
|
961
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
962
|
+
}
|
|
963
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Prepare a multisig execution for external signing
|
|
968
|
+
* @param {string} multisig
|
|
969
|
+
* @param {number} proposal_id
|
|
970
|
+
* @param {any} options
|
|
971
|
+
* @returns {WasmPreparedMessage}
|
|
972
|
+
*/
|
|
973
|
+
export function prepareMultisigExecute(multisig, proposal_id, options) {
|
|
974
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
975
|
+
const len0 = WASM_VECTOR_LEN;
|
|
976
|
+
const ret = wasm.prepareMultisigExecute(ptr0, len0, proposal_id, options);
|
|
977
|
+
if (ret[2]) {
|
|
978
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
979
|
+
}
|
|
980
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Prepare a multisig proposal for external signing
|
|
985
|
+
* @param {string} multisig
|
|
986
|
+
* @param {any} actions
|
|
987
|
+
* @param {any} options
|
|
988
|
+
* @returns {WasmPreparedMessage}
|
|
989
|
+
*/
|
|
990
|
+
export function prepareMultisigPropose(multisig, actions, options) {
|
|
991
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
992
|
+
const len0 = WASM_VECTOR_LEN;
|
|
993
|
+
const ret = wasm.prepareMultisigPropose(ptr0, len0, actions, options);
|
|
994
|
+
if (ret[2]) {
|
|
995
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
996
|
+
}
|
|
997
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Prepare a multisig rejection for external signing
|
|
1002
|
+
* @param {string} multisig
|
|
1003
|
+
* @param {number} proposal_id
|
|
1004
|
+
* @param {any} options
|
|
1005
|
+
* @returns {WasmPreparedMessage}
|
|
1006
|
+
*/
|
|
1007
|
+
export function prepareMultisigReject(multisig, proposal_id, options) {
|
|
1008
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1009
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1010
|
+
const ret = wasm.prepareMultisigReject(ptr0, len0, proposal_id, options);
|
|
1011
|
+
if (ret[2]) {
|
|
1012
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1013
|
+
}
|
|
1014
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
1015
|
+
}
|
|
1016
|
+
|
|
779
1017
|
/**
|
|
780
1018
|
* Prepare a single order for external wallet signing
|
|
781
1019
|
*
|
|
@@ -823,6 +1061,29 @@ export function prepareRemoveSubAccount(to_remove, options) {
|
|
|
823
1061
|
return WasmPreparedMessage.__wrap(ret[0]);
|
|
824
1062
|
}
|
|
825
1063
|
|
|
1064
|
+
/**
|
|
1065
|
+
* Prepare a sub-account rename for external signing
|
|
1066
|
+
*
|
|
1067
|
+
* @param subaccount - sub-account pubkey to rename (base58)
|
|
1068
|
+
* @param name - new display name
|
|
1069
|
+
* @param options - { account: string, signer?: string, nonce?: number }
|
|
1070
|
+
* @param {string} subaccount
|
|
1071
|
+
* @param {string} name
|
|
1072
|
+
* @param {any} options
|
|
1073
|
+
* @returns {WasmPreparedMessage}
|
|
1074
|
+
*/
|
|
1075
|
+
export function prepareRenameSubAccount(subaccount, name, options) {
|
|
1076
|
+
const ptr0 = passStringToWasm0(subaccount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1077
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1078
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1079
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1080
|
+
const ret = wasm.prepareRenameSubAccount(ptr0, len0, ptr1, len1, options);
|
|
1081
|
+
if (ret[2]) {
|
|
1082
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1083
|
+
}
|
|
1084
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
826
1087
|
/**
|
|
827
1088
|
* Prepare a margin transfer for external signing
|
|
828
1089
|
*
|
|
@@ -852,6 +1113,24 @@ export function prepareTransfer(from_pubkey, to_pubkey, margin_symbol, margin_am
|
|
|
852
1113
|
return WasmPreparedMessage.__wrap(ret[0]);
|
|
853
1114
|
}
|
|
854
1115
|
|
|
1116
|
+
/**
|
|
1117
|
+
* Prepare a multisig policy update for external signing
|
|
1118
|
+
* @param {string} multisig
|
|
1119
|
+
* @param {any} signers
|
|
1120
|
+
* @param {number} threshold
|
|
1121
|
+
* @param {any} options
|
|
1122
|
+
* @returns {WasmPreparedMessage}
|
|
1123
|
+
*/
|
|
1124
|
+
export function prepareUpdateMultisigPolicy(multisig, signers, threshold, options) {
|
|
1125
|
+
const ptr0 = passStringToWasm0(multisig, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1126
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1127
|
+
const ret = wasm.prepareUpdateMultisigPolicy(ptr0, len0, signers, threshold, options);
|
|
1128
|
+
if (ret[2]) {
|
|
1129
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1130
|
+
}
|
|
1131
|
+
return WasmPreparedMessage.__wrap(ret[0]);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
855
1134
|
/**
|
|
856
1135
|
* Prepare user settings update for external signing
|
|
857
1136
|
*
|
|
@@ -912,11 +1191,11 @@ export function validatePubkey(s) {
|
|
|
912
1191
|
function __wbg_get_imports() {
|
|
913
1192
|
const import0 = {
|
|
914
1193
|
__proto__: null,
|
|
915
|
-
|
|
1194
|
+
__wbg_Error_3639a60ed15f87e7: function(arg0, arg1) {
|
|
916
1195
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
917
1196
|
return ret;
|
|
918
1197
|
},
|
|
919
|
-
|
|
1198
|
+
__wbg_Number_a3d737fd183f7dca: function(arg0) {
|
|
920
1199
|
const ret = Number(arg0);
|
|
921
1200
|
return ret;
|
|
922
1201
|
},
|
|
@@ -927,64 +1206,64 @@ function __wbg_get_imports() {
|
|
|
927
1206
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
928
1207
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
929
1208
|
},
|
|
930
|
-
|
|
1209
|
+
__wbg___wbindgen_bigint_get_as_i64_3af6d4ca77193a4b: function(arg0, arg1) {
|
|
931
1210
|
const v = arg1;
|
|
932
1211
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
933
1212
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
934
1213
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
935
1214
|
},
|
|
936
|
-
|
|
1215
|
+
__wbg___wbindgen_boolean_get_c3dd5c39f1b5a12b: function(arg0) {
|
|
937
1216
|
const v = arg0;
|
|
938
1217
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
939
1218
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
940
1219
|
},
|
|
941
|
-
|
|
1220
|
+
__wbg___wbindgen_debug_string_07cb72cfcc952e2b: function(arg0, arg1) {
|
|
942
1221
|
const ret = debugString(arg1);
|
|
943
1222
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
944
1223
|
const len1 = WASM_VECTOR_LEN;
|
|
945
1224
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
946
1225
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
947
1226
|
},
|
|
948
|
-
|
|
1227
|
+
__wbg___wbindgen_in_2617fa76397620d3: function(arg0, arg1) {
|
|
949
1228
|
const ret = arg0 in arg1;
|
|
950
1229
|
return ret;
|
|
951
1230
|
},
|
|
952
|
-
|
|
1231
|
+
__wbg___wbindgen_is_bigint_d6a8167cac401b95: function(arg0) {
|
|
953
1232
|
const ret = typeof(arg0) === 'bigint';
|
|
954
1233
|
return ret;
|
|
955
1234
|
},
|
|
956
|
-
|
|
1235
|
+
__wbg___wbindgen_is_function_2f0fd7ceb86e64c5: function(arg0) {
|
|
957
1236
|
const ret = typeof(arg0) === 'function';
|
|
958
1237
|
return ret;
|
|
959
1238
|
},
|
|
960
|
-
|
|
1239
|
+
__wbg___wbindgen_is_object_5b22ff2418063a9c: function(arg0) {
|
|
961
1240
|
const val = arg0;
|
|
962
1241
|
const ret = typeof(val) === 'object' && val !== null;
|
|
963
1242
|
return ret;
|
|
964
1243
|
},
|
|
965
|
-
|
|
1244
|
+
__wbg___wbindgen_is_string_eddc07a3efad52e6: function(arg0) {
|
|
966
1245
|
const ret = typeof(arg0) === 'string';
|
|
967
1246
|
return ret;
|
|
968
1247
|
},
|
|
969
|
-
|
|
1248
|
+
__wbg___wbindgen_is_undefined_244a92c34d3b6ec0: function(arg0) {
|
|
970
1249
|
const ret = arg0 === undefined;
|
|
971
1250
|
return ret;
|
|
972
1251
|
},
|
|
973
|
-
|
|
1252
|
+
__wbg___wbindgen_jsval_eq_403eaa3610500a25: function(arg0, arg1) {
|
|
974
1253
|
const ret = arg0 === arg1;
|
|
975
1254
|
return ret;
|
|
976
1255
|
},
|
|
977
|
-
|
|
1256
|
+
__wbg___wbindgen_jsval_loose_eq_1978f1e77b4bce62: function(arg0, arg1) {
|
|
978
1257
|
const ret = arg0 == arg1;
|
|
979
1258
|
return ret;
|
|
980
1259
|
},
|
|
981
|
-
|
|
1260
|
+
__wbg___wbindgen_number_get_dd6d69a6079f26f1: function(arg0, arg1) {
|
|
982
1261
|
const obj = arg1;
|
|
983
1262
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
984
1263
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
985
1264
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
986
1265
|
},
|
|
987
|
-
|
|
1266
|
+
__wbg___wbindgen_string_get_965592073e5d848c: function(arg0, arg1) {
|
|
988
1267
|
const obj = arg1;
|
|
989
1268
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
990
1269
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -992,26 +1271,26 @@ function __wbg_get_imports() {
|
|
|
992
1271
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
993
1272
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
994
1273
|
},
|
|
995
|
-
|
|
1274
|
+
__wbg___wbindgen_throw_9c75d47bf9e7731e: function(arg0, arg1) {
|
|
996
1275
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
997
1276
|
},
|
|
998
|
-
|
|
999
|
-
const ret = arg0.call(arg1);
|
|
1277
|
+
__wbg_call_a41d6421b30a32c5: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1278
|
+
const ret = arg0.call(arg1, arg2);
|
|
1000
1279
|
return ret;
|
|
1001
1280
|
}, arguments); },
|
|
1002
|
-
|
|
1003
|
-
const ret = arg0.call(arg1
|
|
1281
|
+
__wbg_call_add9e5a76382e668: function() { return handleError(function (arg0, arg1) {
|
|
1282
|
+
const ret = arg0.call(arg1);
|
|
1004
1283
|
return ret;
|
|
1005
1284
|
}, arguments); },
|
|
1006
1285
|
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
1007
1286
|
const ret = arg0.crypto;
|
|
1008
1287
|
return ret;
|
|
1009
1288
|
},
|
|
1010
|
-
|
|
1289
|
+
__wbg_done_b1afd6201ac045e0: function(arg0) {
|
|
1011
1290
|
const ret = arg0.done;
|
|
1012
1291
|
return ret;
|
|
1013
1292
|
},
|
|
1014
|
-
|
|
1293
|
+
__wbg_entries_bb9843ba73dc70d6: function(arg0) {
|
|
1015
1294
|
const ret = Object.entries(arg0);
|
|
1016
1295
|
return ret;
|
|
1017
1296
|
},
|
|
@@ -1029,15 +1308,15 @@ function __wbg_get_imports() {
|
|
|
1029
1308
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1030
1309
|
arg0.getRandomValues(arg1);
|
|
1031
1310
|
}, arguments); },
|
|
1032
|
-
|
|
1033
|
-
const ret = Reflect.get(arg0, arg1);
|
|
1034
|
-
return ret;
|
|
1035
|
-
}, arguments); },
|
|
1036
|
-
__wbg_get_8360291721e2339f: function(arg0, arg1) {
|
|
1311
|
+
__wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
|
|
1037
1312
|
const ret = arg0[arg1 >>> 0];
|
|
1038
1313
|
return ret;
|
|
1039
1314
|
},
|
|
1040
|
-
|
|
1315
|
+
__wbg_get_9cfea9b7bbf12a15: function() { return handleError(function (arg0, arg1) {
|
|
1316
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1317
|
+
return ret;
|
|
1318
|
+
}, arguments); },
|
|
1319
|
+
__wbg_get_unchecked_be562b1421656321: function(arg0, arg1) {
|
|
1041
1320
|
const ret = arg0[arg1 >>> 0];
|
|
1042
1321
|
return ret;
|
|
1043
1322
|
},
|
|
@@ -1045,7 +1324,7 @@ function __wbg_get_imports() {
|
|
|
1045
1324
|
const ret = arg0[arg1];
|
|
1046
1325
|
return ret;
|
|
1047
1326
|
},
|
|
1048
|
-
|
|
1327
|
+
__wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
|
|
1049
1328
|
let result;
|
|
1050
1329
|
try {
|
|
1051
1330
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -1055,7 +1334,7 @@ function __wbg_get_imports() {
|
|
|
1055
1334
|
const ret = result;
|
|
1056
1335
|
return ret;
|
|
1057
1336
|
},
|
|
1058
|
-
|
|
1337
|
+
__wbg_instanceof_Map_10d4edf60fcf9327: function(arg0) {
|
|
1059
1338
|
let result;
|
|
1060
1339
|
try {
|
|
1061
1340
|
result = arg0 instanceof Map;
|
|
@@ -1065,7 +1344,7 @@ function __wbg_get_imports() {
|
|
|
1065
1344
|
const ret = result;
|
|
1066
1345
|
return ret;
|
|
1067
1346
|
},
|
|
1068
|
-
|
|
1347
|
+
__wbg_instanceof_Uint8Array_57d77acd50e4c44d: function(arg0) {
|
|
1069
1348
|
let result;
|
|
1070
1349
|
try {
|
|
1071
1350
|
result = arg0 instanceof Uint8Array;
|
|
@@ -1075,23 +1354,23 @@ function __wbg_get_imports() {
|
|
|
1075
1354
|
const ret = result;
|
|
1076
1355
|
return ret;
|
|
1077
1356
|
},
|
|
1078
|
-
|
|
1357
|
+
__wbg_isArray_c6c6ef8308995bcf: function(arg0) {
|
|
1079
1358
|
const ret = Array.isArray(arg0);
|
|
1080
1359
|
return ret;
|
|
1081
1360
|
},
|
|
1082
|
-
|
|
1361
|
+
__wbg_isSafeInteger_3c56c421a5b4cce4: function(arg0) {
|
|
1083
1362
|
const ret = Number.isSafeInteger(arg0);
|
|
1084
1363
|
return ret;
|
|
1085
1364
|
},
|
|
1086
|
-
|
|
1365
|
+
__wbg_iterator_9d68985a1d096fc2: function() {
|
|
1087
1366
|
const ret = Symbol.iterator;
|
|
1088
1367
|
return ret;
|
|
1089
1368
|
},
|
|
1090
|
-
|
|
1369
|
+
__wbg_length_0a6ce016dc1460b0: function(arg0) {
|
|
1091
1370
|
const ret = arg0.length;
|
|
1092
1371
|
return ret;
|
|
1093
1372
|
},
|
|
1094
|
-
|
|
1373
|
+
__wbg_length_ba3c032602efe310: function(arg0) {
|
|
1095
1374
|
const ret = arg0.length;
|
|
1096
1375
|
return ret;
|
|
1097
1376
|
},
|
|
@@ -1099,38 +1378,38 @@ function __wbg_get_imports() {
|
|
|
1099
1378
|
const ret = arg0.msCrypto;
|
|
1100
1379
|
return ret;
|
|
1101
1380
|
},
|
|
1102
|
-
__wbg_new_0c7403db6e782f19: function(arg0) {
|
|
1103
|
-
const ret = new Uint8Array(arg0);
|
|
1104
|
-
return ret;
|
|
1105
|
-
},
|
|
1106
1381
|
__wbg_new_227d7c05414eb861: function() {
|
|
1107
1382
|
const ret = new Error();
|
|
1108
1383
|
return ret;
|
|
1109
1384
|
},
|
|
1110
|
-
|
|
1111
|
-
const ret = new
|
|
1385
|
+
__wbg_new_2fad8ca02fd00684: function() {
|
|
1386
|
+
const ret = new Object();
|
|
1112
1387
|
return ret;
|
|
1113
1388
|
},
|
|
1114
|
-
|
|
1389
|
+
__wbg_new_3baa8d9866155c79: function() {
|
|
1115
1390
|
const ret = new Array();
|
|
1116
1391
|
return ret;
|
|
1117
1392
|
},
|
|
1118
|
-
|
|
1119
|
-
const ret = new
|
|
1393
|
+
__wbg_new_46ae4e4ff2a07a64: function() {
|
|
1394
|
+
const ret = new Map();
|
|
1120
1395
|
return ret;
|
|
1121
1396
|
},
|
|
1122
|
-
|
|
1123
|
-
const ret = new Uint8Array(arg0
|
|
1397
|
+
__wbg_new_8454eee672b2ba6e: function(arg0) {
|
|
1398
|
+
const ret = new Uint8Array(arg0);
|
|
1124
1399
|
return ret;
|
|
1125
1400
|
},
|
|
1126
|
-
|
|
1127
|
-
const ret = arg0
|
|
1401
|
+
__wbg_new_with_length_9011f5da794bf5d9: function(arg0) {
|
|
1402
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1128
1403
|
return ret;
|
|
1129
|
-
},
|
|
1130
|
-
|
|
1404
|
+
},
|
|
1405
|
+
__wbg_next_261c3c48c6e309a5: function(arg0) {
|
|
1131
1406
|
const ret = arg0.next;
|
|
1132
1407
|
return ret;
|
|
1133
1408
|
},
|
|
1409
|
+
__wbg_next_aacee310bcfe6461: function() { return handleError(function (arg0) {
|
|
1410
|
+
const ret = arg0.next();
|
|
1411
|
+
return ret;
|
|
1412
|
+
}, arguments); },
|
|
1134
1413
|
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1135
1414
|
const ret = arg0.node;
|
|
1136
1415
|
return ret;
|
|
@@ -1139,7 +1418,7 @@ function __wbg_get_imports() {
|
|
|
1139
1418
|
const ret = arg0.process;
|
|
1140
1419
|
return ret;
|
|
1141
1420
|
},
|
|
1142
|
-
|
|
1421
|
+
__wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
|
|
1143
1422
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1144
1423
|
},
|
|
1145
1424
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
@@ -1149,16 +1428,16 @@ function __wbg_get_imports() {
|
|
|
1149
1428
|
const ret = module.require;
|
|
1150
1429
|
return ret;
|
|
1151
1430
|
}, arguments); },
|
|
1152
|
-
__wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
|
|
1153
|
-
arg0[arg1 >>> 0] = arg2;
|
|
1154
|
-
},
|
|
1155
1431
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1156
1432
|
arg0[arg1] = arg2;
|
|
1157
1433
|
},
|
|
1158
|
-
|
|
1434
|
+
__wbg_set_82f7a370f604db70: function(arg0, arg1, arg2) {
|
|
1159
1435
|
const ret = arg0.set(arg1, arg2);
|
|
1160
1436
|
return ret;
|
|
1161
1437
|
},
|
|
1438
|
+
__wbg_set_f614f6a0608d1d1d: function(arg0, arg1, arg2) {
|
|
1439
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1440
|
+
},
|
|
1162
1441
|
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
1163
1442
|
const ret = arg1.stack;
|
|
1164
1443
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1166,27 +1445,27 @@ function __wbg_get_imports() {
|
|
|
1166
1445
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1167
1446
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1168
1447
|
},
|
|
1169
|
-
|
|
1170
|
-
const ret = typeof
|
|
1448
|
+
__wbg_static_accessor_GLOBAL_THIS_1c7f1bd6c6941fdb: function() {
|
|
1449
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1171
1450
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1172
1451
|
},
|
|
1173
|
-
|
|
1174
|
-
const ret = typeof
|
|
1452
|
+
__wbg_static_accessor_GLOBAL_e039bc914f83e74e: function() {
|
|
1453
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1175
1454
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1176
1455
|
},
|
|
1177
|
-
|
|
1456
|
+
__wbg_static_accessor_SELF_8bf8c48c28420ad5: function() {
|
|
1178
1457
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1179
1458
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1180
1459
|
},
|
|
1181
|
-
|
|
1460
|
+
__wbg_static_accessor_WINDOW_6aeee9b51652ee0f: function() {
|
|
1182
1461
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1183
1462
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1184
1463
|
},
|
|
1185
|
-
|
|
1464
|
+
__wbg_subarray_fbe3cef290e1fa43: function(arg0, arg1, arg2) {
|
|
1186
1465
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1187
1466
|
return ret;
|
|
1188
1467
|
},
|
|
1189
|
-
|
|
1468
|
+
__wbg_value_f852716acdeb3e82: function(arg0) {
|
|
1190
1469
|
const ret = arg0.value;
|
|
1191
1470
|
return ret;
|
|
1192
1471
|
},
|
|
@@ -1241,13 +1520,13 @@ function __wbg_get_imports() {
|
|
|
1241
1520
|
|
|
1242
1521
|
const WasmKeypairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1243
1522
|
? { register: () => {}, unregister: () => {} }
|
|
1244
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmkeypair_free(ptr
|
|
1523
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmkeypair_free(ptr, 1));
|
|
1245
1524
|
const WasmPreparedMessageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1246
1525
|
? { register: () => {}, unregister: () => {} }
|
|
1247
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmpreparedmessage_free(ptr
|
|
1526
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmpreparedmessage_free(ptr, 1));
|
|
1248
1527
|
const WasmSignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1249
1528
|
? { register: () => {}, unregister: () => {} }
|
|
1250
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmsigner_free(ptr
|
|
1529
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmsigner_free(ptr, 1));
|
|
1251
1530
|
|
|
1252
1531
|
function addToExternrefTable0(obj) {
|
|
1253
1532
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1351,8 +1630,7 @@ function getDataViewMemory0() {
|
|
|
1351
1630
|
}
|
|
1352
1631
|
|
|
1353
1632
|
function getStringFromWasm0(ptr, len) {
|
|
1354
|
-
|
|
1355
|
-
return decodeText(ptr, len);
|
|
1633
|
+
return decodeText(ptr >>> 0, len);
|
|
1356
1634
|
}
|
|
1357
1635
|
|
|
1358
1636
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -1455,8 +1733,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
1455
1733
|
|
|
1456
1734
|
let WASM_VECTOR_LEN = 0;
|
|
1457
1735
|
|
|
1458
|
-
let wasmModule, wasm;
|
|
1736
|
+
let wasmModule, wasmInstance, wasm;
|
|
1459
1737
|
function __wbg_finalize_init(instance, module) {
|
|
1738
|
+
wasmInstance = instance;
|
|
1460
1739
|
wasm = instance.exports;
|
|
1461
1740
|
wasmModule = module;
|
|
1462
1741
|
cachedDataViewMemory0 = null;
|
|
Binary file
|
package/package.json
CHANGED