bulk-keychain-wasm 0.1.26 → 0.1.28
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 +71 -16
- package/bulk_keychain_wasm.js +323 -99
- package/bulk_keychain_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/bulk_keychain_wasm.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
+
export interface SolanaInstruction {
|
|
5
|
+
programId: string;
|
|
6
|
+
accounts: Array<{ pubkey: string; isSigner: boolean; isWritable: boolean }>;
|
|
7
|
+
data: number[];
|
|
8
|
+
}
|
|
9
|
+
/** Mainnet USDC only; amount is an exact decimal u64 string in base units. */
|
|
10
|
+
export function buildDepositInstruction(owner: string, amount: string): SolanaInstruction;
|
|
11
|
+
/** Signals a mainnet USDC withdrawal; this instruction transfers no tokens. */
|
|
12
|
+
export function buildWithdrawIntentInstruction(owner: string, amount: string): SolanaInstruction;
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
4
16
|
/**
|
|
5
17
|
* WASM wrapper for Keypair
|
|
6
18
|
*/
|
|
@@ -16,9 +28,9 @@ export class WasmKeypair {
|
|
|
16
28
|
*/
|
|
17
29
|
static fromBytes(bytes: Uint8Array): WasmKeypair;
|
|
18
30
|
/**
|
|
19
|
-
*
|
|
31
|
+
* Import a base58 key or Uint8Array (32/64 bytes); omitted key generates a random keypair.
|
|
20
32
|
*/
|
|
21
|
-
constructor();
|
|
33
|
+
constructor(key?: string | Uint8Array);
|
|
22
34
|
/**
|
|
23
35
|
* Get the secret key as bytes (32 bytes)
|
|
24
36
|
*/
|
|
@@ -47,16 +59,16 @@ export class WasmPreparedMessage {
|
|
|
47
59
|
private constructor();
|
|
48
60
|
free(): void;
|
|
49
61
|
[Symbol.dispose](): void;
|
|
62
|
+
/**
|
|
63
|
+
* Finalize with signature bytes (Uint8Array)
|
|
64
|
+
*/
|
|
65
|
+
finalizeBytes(signature: Uint8Array): any;
|
|
50
66
|
/**
|
|
51
67
|
* Finalize with a signature (base58 string)
|
|
52
68
|
*
|
|
53
69
|
* Call this after your wallet signs the messageBytes.
|
|
54
70
|
*/
|
|
55
71
|
finalize(signature: string): any;
|
|
56
|
-
/**
|
|
57
|
-
* Finalize with signature bytes (Uint8Array)
|
|
58
|
-
*/
|
|
59
|
-
finalizeBytes(signature: Uint8Array): any;
|
|
60
72
|
/**
|
|
61
73
|
* Get the account public key (base58)
|
|
62
74
|
*/
|
|
@@ -129,10 +141,6 @@ export class WasmSigner {
|
|
|
129
141
|
* Enable/disable single-order ID computation.
|
|
130
142
|
*/
|
|
131
143
|
setComputeOrderId(enabled: boolean): void;
|
|
132
|
-
/**
|
|
133
|
-
* Sign a single order/cancel/cancelAll
|
|
134
|
-
*/
|
|
135
|
-
sign(order: any, nonce?: string | null): any;
|
|
136
144
|
/**
|
|
137
145
|
* Sign agent wallet creation/deletion
|
|
138
146
|
*/
|
|
@@ -257,10 +265,18 @@ export class WasmSigner {
|
|
|
257
265
|
* Sign user settings update
|
|
258
266
|
*/
|
|
259
267
|
signUserSettings(settings: any, nonce?: string | null): any;
|
|
268
|
+
/**
|
|
269
|
+
* Sign an explicit wallet mode using this signer's key and configured network.
|
|
270
|
+
*/
|
|
271
|
+
signWalletPrepared(wallet: WasmWalletPreparedMessage): any;
|
|
260
272
|
/**
|
|
261
273
|
* Sign whitelist/un-whitelist faucet access (`whitelistFaucet`)
|
|
262
274
|
*/
|
|
263
275
|
signWhitelistFaucet(target_pubkey: string, whitelist: boolean, nonce?: string | null): any;
|
|
276
|
+
/**
|
|
277
|
+
* Sign a single order/cancel/cancelAll
|
|
278
|
+
*/
|
|
279
|
+
sign(order: any, nonce?: string | null): any;
|
|
264
280
|
/**
|
|
265
281
|
* Create a signer with nonce management
|
|
266
282
|
*/
|
|
@@ -271,6 +287,19 @@ export class WasmSigner {
|
|
|
271
287
|
readonly pubkey: string;
|
|
272
288
|
}
|
|
273
289
|
|
|
290
|
+
/**
|
|
291
|
+
* Explicit wallet signing bytes and the retained original Bulk preparation.
|
|
292
|
+
*/
|
|
293
|
+
export class WasmWalletPreparedMessage {
|
|
294
|
+
private constructor();
|
|
295
|
+
free(): void;
|
|
296
|
+
[Symbol.dispose](): void;
|
|
297
|
+
readonly clearSignMessage: string | undefined;
|
|
298
|
+
readonly messageBytes: Uint8Array;
|
|
299
|
+
readonly prepared: WasmPreparedMessage;
|
|
300
|
+
readonly signatureMode: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
274
303
|
/**
|
|
275
304
|
* Compute SHA256 hash from raw bytes.
|
|
276
305
|
*
|
|
@@ -283,6 +312,16 @@ export function computeOrderId(wincode_bytes: Uint8Array): string;
|
|
|
283
312
|
*/
|
|
284
313
|
export function currentTimestamp(): string;
|
|
285
314
|
|
|
315
|
+
/**
|
|
316
|
+
* Export a base64 unsigned mainnet USDC deposit transaction for wallet signing.
|
|
317
|
+
*/
|
|
318
|
+
export function exportDepositTransaction(owner: string, amount: string, recent_blockhash: string): string;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Export a base64 unsigned mainnet USDC withdrawal-intent transaction for wallet signing.
|
|
322
|
+
*/
|
|
323
|
+
export function exportWithdrawIntentTransaction(owner: string, amount: string, recent_blockhash: string): string;
|
|
324
|
+
|
|
286
325
|
/**
|
|
287
326
|
* Finalize a prepared message with a signature
|
|
288
327
|
*
|
|
@@ -291,6 +330,8 @@ export function currentTimestamp(): string;
|
|
|
291
330
|
*/
|
|
292
331
|
export function finalizeTransaction(prepared: any, signature: string): any;
|
|
293
332
|
|
|
333
|
+
export function finalizeWalletMessage(wallet: WasmWalletPreparedMessage, signature: string): any;
|
|
334
|
+
|
|
294
335
|
/**
|
|
295
336
|
* Initialize the WASM module
|
|
296
337
|
*/
|
|
@@ -468,6 +509,8 @@ export function prepareUpdateMultisigPolicy(multisig: string, signers: any, thre
|
|
|
468
509
|
*/
|
|
469
510
|
export function prepareUpdateUserSettings(settings: any, options: any): WasmPreparedMessage;
|
|
470
511
|
|
|
512
|
+
export function prepareWalletMessage(prepared: WasmPreparedMessage, mode: string): WasmWalletPreparedMessage;
|
|
513
|
+
|
|
471
514
|
/**
|
|
472
515
|
* Prepare a portfolio withdraw for external signing
|
|
473
516
|
*
|
|
@@ -511,12 +554,20 @@ export interface InitOutput {
|
|
|
511
554
|
readonly __wbg_wasmkeypair_free: (a: number, b: number) => void;
|
|
512
555
|
readonly __wbg_wasmpreparedmessage_free: (a: number, b: number) => void;
|
|
513
556
|
readonly __wbg_wasmsigner_free: (a: number, b: number) => void;
|
|
557
|
+
readonly __wbg_wasmwalletpreparedmessage_free: (a: number, b: number) => void;
|
|
558
|
+
readonly buildDepositInstruction: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
559
|
+
readonly buildWithdrawIntentInstruction: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
514
560
|
readonly computeOrderId: (a: number, b: number) => [number, number];
|
|
515
561
|
readonly currentTimestamp: () => [number, number];
|
|
562
|
+
readonly exportDepositTransaction: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
563
|
+
readonly exportWithdrawIntentTransaction: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
516
564
|
readonly finalizeTransaction: (a: any, b: number, c: number) => [number, number, number];
|
|
565
|
+
readonly finalizeWalletMessage: (a: number, b: number, c: number) => [number, number, number];
|
|
566
|
+
readonly init: () => void;
|
|
517
567
|
readonly prepareAgentWallet: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
518
568
|
readonly prepareAll: (a: any, b: any) => [number, number, number, number];
|
|
519
569
|
readonly prepareApproveBuilderCode: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
570
|
+
readonly prepareApproveCommissionFee: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
520
571
|
readonly prepareCreateMultisig: (a: any, b: number, c: any) => [number, number, number];
|
|
521
572
|
readonly prepareCreateSubAccount: (a: number, b: number, c: any) => [number, number, number];
|
|
522
573
|
readonly prepareFaucet: (a: any) => [number, number, number];
|
|
@@ -530,10 +581,12 @@ export interface InitOutput {
|
|
|
530
581
|
readonly prepareRemoveSubAccount: (a: number, b: number, c: any) => [number, number, number];
|
|
531
582
|
readonly prepareRenameSubAccount: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
|
|
532
583
|
readonly prepareRevokeBuilderCode: (a: number, b: number, c: any) => [number, number, number];
|
|
584
|
+
readonly prepareRevokeCommissionFee: (a: number, b: number, c: any) => [number, number, number];
|
|
533
585
|
readonly prepareTransfer: (a: number, b: number, c: number, d: number, e: number, f: any) => [number, number, number];
|
|
534
586
|
readonly prepareUpdateLiquidatorConfig: (a: any, b: any) => [number, number, number];
|
|
535
587
|
readonly prepareUpdateMultisigPolicy: (a: number, b: number, c: any, d: number, e: any) => [number, number, number];
|
|
536
588
|
readonly prepareUpdateUserSettings: (a: any, b: any) => [number, number, number];
|
|
589
|
+
readonly prepareWalletMessage: (a: number, b: number, c: number) => [number, number, number];
|
|
537
590
|
readonly prepareWithdraw: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: any) => [number, number, number];
|
|
538
591
|
readonly prepareWithdrawLockRecover: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
|
|
539
592
|
readonly randomHash: () => [number, number];
|
|
@@ -541,15 +594,15 @@ export interface InitOutput {
|
|
|
541
594
|
readonly validatePubkey: (a: number, b: number) => number;
|
|
542
595
|
readonly wasmkeypair_fromBase58: (a: number, b: number) => [number, number, number];
|
|
543
596
|
readonly wasmkeypair_fromBytes: (a: number, b: number) => [number, number, number];
|
|
544
|
-
readonly wasmkeypair_new: () => number;
|
|
597
|
+
readonly wasmkeypair_new: (a: any) => [number, number, number];
|
|
545
598
|
readonly wasmkeypair_pubkey: (a: number) => [number, number];
|
|
546
599
|
readonly wasmkeypair_secretKey: (a: number) => [number, number];
|
|
547
600
|
readonly wasmkeypair_toBase58: (a: number) => [number, number];
|
|
548
601
|
readonly wasmkeypair_toBytes: (a: number) => [number, number];
|
|
549
602
|
readonly wasmpreparedmessage_account: (a: number) => [number, number];
|
|
550
603
|
readonly wasmpreparedmessage_actions: (a: number) => any;
|
|
551
|
-
readonly wasmpreparedmessage_finalize: (a: number, b: number, c: number) =>
|
|
552
|
-
readonly wasmpreparedmessage_finalizeBytes: (a: number, b: number, c: number) =>
|
|
604
|
+
readonly wasmpreparedmessage_finalize: (a: number, b: number, c: number) => [number, number, number];
|
|
605
|
+
readonly wasmpreparedmessage_finalizeBytes: (a: number, b: number, c: number) => [number, number, number];
|
|
553
606
|
readonly wasmpreparedmessage_messageBase58: (a: number) => [number, number];
|
|
554
607
|
readonly wasmpreparedmessage_messageBase64: (a: number) => [number, number];
|
|
555
608
|
readonly wasmpreparedmessage_messageBytes: (a: number) => [number, number];
|
|
@@ -593,11 +646,13 @@ export interface InitOutput {
|
|
|
593
646
|
readonly wasmsigner_signUpdateLiquidatorConfig: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
594
647
|
readonly wasmsigner_signUpdateMultisigPolicy: (a: number, b: number, c: number, d: any, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
595
648
|
readonly wasmsigner_signUserSettings: (a: number, b: any, c: number, d: number) => [number, number, number];
|
|
649
|
+
readonly wasmsigner_signWalletPrepared: (a: number, b: number) => [number, number, number];
|
|
596
650
|
readonly wasmsigner_signWhitelistFaucet: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
597
651
|
readonly wasmsigner_withNonceManager: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
598
|
-
readonly
|
|
599
|
-
readonly
|
|
600
|
-
readonly
|
|
652
|
+
readonly wasmwalletpreparedmessage_clearSignMessage: (a: number) => [number, number];
|
|
653
|
+
readonly wasmwalletpreparedmessage_messageBytes: (a: number) => [number, number];
|
|
654
|
+
readonly wasmwalletpreparedmessage_prepared: (a: number) => number;
|
|
655
|
+
readonly wasmwalletpreparedmessage_signatureMode: (a: number) => [number, number];
|
|
601
656
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
602
657
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
603
658
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/bulk_keychain_wasm.js
CHANGED
|
@@ -49,11 +49,15 @@ export class WasmKeypair {
|
|
|
49
49
|
return WasmKeypair.__wrap(ret[0]);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Import a base58 key or Uint8Array (32/64 bytes); omitted key generates a random keypair.
|
|
53
|
+
* @param {string | Uint8Array} [key]
|
|
53
54
|
*/
|
|
54
|
-
constructor() {
|
|
55
|
-
const ret = wasm.wasmkeypair_new();
|
|
56
|
-
|
|
55
|
+
constructor(key) {
|
|
56
|
+
const ret = wasm.wasmkeypair_new(key);
|
|
57
|
+
if (ret[2]) {
|
|
58
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
59
|
+
}
|
|
60
|
+
this.__wbg_ptr = ret[0];
|
|
57
61
|
WasmKeypairFinalization.register(this, this.__wbg_ptr, this);
|
|
58
62
|
return this;
|
|
59
63
|
}
|
|
@@ -159,6 +163,20 @@ export class WasmPreparedMessage {
|
|
|
159
163
|
const ret = wasm.wasmpreparedmessage_actions(this.__wbg_ptr);
|
|
160
164
|
return ret;
|
|
161
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Finalize with signature bytes (Uint8Array)
|
|
168
|
+
* @param {Uint8Array} signature
|
|
169
|
+
* @returns {any}
|
|
170
|
+
*/
|
|
171
|
+
finalizeBytes(signature) {
|
|
172
|
+
const ptr0 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
173
|
+
const len0 = WASM_VECTOR_LEN;
|
|
174
|
+
const ret = wasm.wasmpreparedmessage_finalizeBytes(this.__wbg_ptr, ptr0, len0);
|
|
175
|
+
if (ret[2]) {
|
|
176
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
177
|
+
}
|
|
178
|
+
return takeFromExternrefTable0(ret[0]);
|
|
179
|
+
}
|
|
162
180
|
/**
|
|
163
181
|
* Finalize with a signature (base58 string)
|
|
164
182
|
*
|
|
@@ -170,18 +188,10 @@ export class WasmPreparedMessage {
|
|
|
170
188
|
const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
171
189
|
const len0 = WASM_VECTOR_LEN;
|
|
172
190
|
const ret = wasm.wasmpreparedmessage_finalize(this.__wbg_ptr, ptr0, len0);
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
* @param {Uint8Array} signature
|
|
178
|
-
* @returns {any}
|
|
179
|
-
*/
|
|
180
|
-
finalizeBytes(signature) {
|
|
181
|
-
const ptr0 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
182
|
-
const len0 = WASM_VECTOR_LEN;
|
|
183
|
-
const ret = wasm.wasmpreparedmessage_finalizeBytes(this.__wbg_ptr, ptr0, len0);
|
|
184
|
-
return ret;
|
|
191
|
+
if (ret[2]) {
|
|
192
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
193
|
+
}
|
|
194
|
+
return takeFromExternrefTable0(ret[0]);
|
|
185
195
|
}
|
|
186
196
|
/**
|
|
187
197
|
* Get message as base58 string
|
|
@@ -402,21 +412,6 @@ export class WasmSigner {
|
|
|
402
412
|
setComputeOrderId(enabled) {
|
|
403
413
|
wasm.wasmsigner_setComputeOrderId(this.__wbg_ptr, enabled);
|
|
404
414
|
}
|
|
405
|
-
/**
|
|
406
|
-
* Sign a single order/cancel/cancelAll
|
|
407
|
-
* @param {any} order
|
|
408
|
-
* @param {string | null} [nonce]
|
|
409
|
-
* @returns {any}
|
|
410
|
-
*/
|
|
411
|
-
sign(order, nonce) {
|
|
412
|
-
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
413
|
-
var len0 = WASM_VECTOR_LEN;
|
|
414
|
-
const ret = wasm.wasmsigner_sign(this.__wbg_ptr, order, ptr0, len0);
|
|
415
|
-
if (ret[2]) {
|
|
416
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
417
|
-
}
|
|
418
|
-
return takeFromExternrefTable0(ret[0]);
|
|
419
|
-
}
|
|
420
415
|
/**
|
|
421
416
|
* Sign agent wallet creation/deletion
|
|
422
417
|
* @param {string} agent_pubkey
|
|
@@ -895,6 +890,19 @@ export class WasmSigner {
|
|
|
895
890
|
}
|
|
896
891
|
return takeFromExternrefTable0(ret[0]);
|
|
897
892
|
}
|
|
893
|
+
/**
|
|
894
|
+
* Sign an explicit wallet mode using this signer's key and configured network.
|
|
895
|
+
* @param {WasmWalletPreparedMessage} wallet
|
|
896
|
+
* @returns {any}
|
|
897
|
+
*/
|
|
898
|
+
signWalletPrepared(wallet) {
|
|
899
|
+
_assertClass(wallet, WasmWalletPreparedMessage);
|
|
900
|
+
const ret = wasm.wasmsigner_signWalletPrepared(this.__wbg_ptr, wallet.__wbg_ptr);
|
|
901
|
+
if (ret[2]) {
|
|
902
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
903
|
+
}
|
|
904
|
+
return takeFromExternrefTable0(ret[0]);
|
|
905
|
+
}
|
|
898
906
|
/**
|
|
899
907
|
* Sign whitelist/un-whitelist faucet access (`whitelistFaucet`)
|
|
900
908
|
* @param {string} target_pubkey
|
|
@@ -913,6 +921,21 @@ export class WasmSigner {
|
|
|
913
921
|
}
|
|
914
922
|
return takeFromExternrefTable0(ret[0]);
|
|
915
923
|
}
|
|
924
|
+
/**
|
|
925
|
+
* Sign a single order/cancel/cancelAll
|
|
926
|
+
* @param {any} order
|
|
927
|
+
* @param {string | null} [nonce]
|
|
928
|
+
* @returns {any}
|
|
929
|
+
*/
|
|
930
|
+
sign(order, nonce) {
|
|
931
|
+
var ptr0 = isLikeNone(nonce) ? 0 : passStringToWasm0(nonce, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
932
|
+
var len0 = WASM_VECTOR_LEN;
|
|
933
|
+
const ret = wasm.wasmsigner_sign(this.__wbg_ptr, order, ptr0, len0);
|
|
934
|
+
if (ret[2]) {
|
|
935
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
936
|
+
}
|
|
937
|
+
return takeFromExternrefTable0(ret[0]);
|
|
938
|
+
}
|
|
916
939
|
/**
|
|
917
940
|
* Create a signer with nonce management
|
|
918
941
|
* @param {WasmKeypair} keypair
|
|
@@ -935,6 +958,108 @@ export class WasmSigner {
|
|
|
935
958
|
}
|
|
936
959
|
if (Symbol.dispose) WasmSigner.prototype[Symbol.dispose] = WasmSigner.prototype.free;
|
|
937
960
|
|
|
961
|
+
/**
|
|
962
|
+
* Explicit wallet signing bytes and the retained original Bulk preparation.
|
|
963
|
+
*/
|
|
964
|
+
export class WasmWalletPreparedMessage {
|
|
965
|
+
static __wrap(ptr) {
|
|
966
|
+
const obj = Object.create(WasmWalletPreparedMessage.prototype);
|
|
967
|
+
obj.__wbg_ptr = ptr;
|
|
968
|
+
WasmWalletPreparedMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
969
|
+
return obj;
|
|
970
|
+
}
|
|
971
|
+
__destroy_into_raw() {
|
|
972
|
+
const ptr = this.__wbg_ptr;
|
|
973
|
+
this.__wbg_ptr = 0;
|
|
974
|
+
WasmWalletPreparedMessageFinalization.unregister(this);
|
|
975
|
+
return ptr;
|
|
976
|
+
}
|
|
977
|
+
free() {
|
|
978
|
+
const ptr = this.__destroy_into_raw();
|
|
979
|
+
wasm.__wbg_wasmwalletpreparedmessage_free(ptr, 0);
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* @returns {string | undefined}
|
|
983
|
+
*/
|
|
984
|
+
get clearSignMessage() {
|
|
985
|
+
const ret = wasm.wasmwalletpreparedmessage_clearSignMessage(this.__wbg_ptr);
|
|
986
|
+
let v1;
|
|
987
|
+
if (ret[0] !== 0) {
|
|
988
|
+
v1 = getStringFromWasm0(ret[0], ret[1]);
|
|
989
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
990
|
+
}
|
|
991
|
+
return v1;
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* @returns {Uint8Array}
|
|
995
|
+
*/
|
|
996
|
+
get messageBytes() {
|
|
997
|
+
const ret = wasm.wasmwalletpreparedmessage_messageBytes(this.__wbg_ptr);
|
|
998
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
999
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1000
|
+
return v1;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* @returns {WasmPreparedMessage}
|
|
1004
|
+
*/
|
|
1005
|
+
get prepared() {
|
|
1006
|
+
const ret = wasm.wasmwalletpreparedmessage_prepared(this.__wbg_ptr);
|
|
1007
|
+
return WasmPreparedMessage.__wrap(ret);
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* @returns {string}
|
|
1011
|
+
*/
|
|
1012
|
+
get signatureMode() {
|
|
1013
|
+
let deferred1_0;
|
|
1014
|
+
let deferred1_1;
|
|
1015
|
+
try {
|
|
1016
|
+
const ret = wasm.wasmwalletpreparedmessage_signatureMode(this.__wbg_ptr);
|
|
1017
|
+
deferred1_0 = ret[0];
|
|
1018
|
+
deferred1_1 = ret[1];
|
|
1019
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1020
|
+
} finally {
|
|
1021
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
if (Symbol.dispose) WasmWalletPreparedMessage.prototype[Symbol.dispose] = WasmWalletPreparedMessage.prototype.free;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Build an unsigned mainnet USDC deposit instruction from an exact base-unit amount.
|
|
1029
|
+
* @param {string} owner
|
|
1030
|
+
* @param {string} amount
|
|
1031
|
+
* @returns {any}
|
|
1032
|
+
*/
|
|
1033
|
+
export function buildDepositInstruction(owner, amount) {
|
|
1034
|
+
const ptr0 = passStringToWasm0(owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1035
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1036
|
+
const ptr1 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1037
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1038
|
+
const ret = wasm.buildDepositInstruction(ptr0, len0, ptr1, len1);
|
|
1039
|
+
if (ret[2]) {
|
|
1040
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1041
|
+
}
|
|
1042
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Build an unsigned mainnet USDC withdrawal intent; no tokens transfer in this instruction.
|
|
1047
|
+
* @param {string} owner
|
|
1048
|
+
* @param {string} amount
|
|
1049
|
+
* @returns {any}
|
|
1050
|
+
*/
|
|
1051
|
+
export function buildWithdrawIntentInstruction(owner, amount) {
|
|
1052
|
+
const ptr0 = passStringToWasm0(owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1053
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1054
|
+
const ptr1 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1055
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1056
|
+
const ret = wasm.buildWithdrawIntentInstruction(ptr0, len0, ptr1, len1);
|
|
1057
|
+
if (ret[2]) {
|
|
1058
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1059
|
+
}
|
|
1060
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
938
1063
|
/**
|
|
939
1064
|
* Compute SHA256 hash from raw bytes.
|
|
940
1065
|
*
|
|
@@ -974,6 +1099,70 @@ export function currentTimestamp() {
|
|
|
974
1099
|
}
|
|
975
1100
|
}
|
|
976
1101
|
|
|
1102
|
+
/**
|
|
1103
|
+
* Export a base64 unsigned mainnet USDC deposit transaction for wallet signing.
|
|
1104
|
+
* @param {string} owner
|
|
1105
|
+
* @param {string} amount
|
|
1106
|
+
* @param {string} recent_blockhash
|
|
1107
|
+
* @returns {string}
|
|
1108
|
+
*/
|
|
1109
|
+
export function exportDepositTransaction(owner, amount, recent_blockhash) {
|
|
1110
|
+
let deferred5_0;
|
|
1111
|
+
let deferred5_1;
|
|
1112
|
+
try {
|
|
1113
|
+
const ptr0 = passStringToWasm0(owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1114
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1115
|
+
const ptr1 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1116
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1117
|
+
const ptr2 = passStringToWasm0(recent_blockhash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1118
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1119
|
+
const ret = wasm.exportDepositTransaction(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1120
|
+
var ptr4 = ret[0];
|
|
1121
|
+
var len4 = ret[1];
|
|
1122
|
+
if (ret[3]) {
|
|
1123
|
+
ptr4 = 0; len4 = 0;
|
|
1124
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1125
|
+
}
|
|
1126
|
+
deferred5_0 = ptr4;
|
|
1127
|
+
deferred5_1 = len4;
|
|
1128
|
+
return getStringFromWasm0(ptr4, len4);
|
|
1129
|
+
} finally {
|
|
1130
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Export a base64 unsigned mainnet USDC withdrawal-intent transaction for wallet signing.
|
|
1136
|
+
* @param {string} owner
|
|
1137
|
+
* @param {string} amount
|
|
1138
|
+
* @param {string} recent_blockhash
|
|
1139
|
+
* @returns {string}
|
|
1140
|
+
*/
|
|
1141
|
+
export function exportWithdrawIntentTransaction(owner, amount, recent_blockhash) {
|
|
1142
|
+
let deferred5_0;
|
|
1143
|
+
let deferred5_1;
|
|
1144
|
+
try {
|
|
1145
|
+
const ptr0 = passStringToWasm0(owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1146
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1147
|
+
const ptr1 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1148
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1149
|
+
const ptr2 = passStringToWasm0(recent_blockhash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1150
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1151
|
+
const ret = wasm.exportWithdrawIntentTransaction(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1152
|
+
var ptr4 = ret[0];
|
|
1153
|
+
var len4 = ret[1];
|
|
1154
|
+
if (ret[3]) {
|
|
1155
|
+
ptr4 = 0; len4 = 0;
|
|
1156
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1157
|
+
}
|
|
1158
|
+
deferred5_0 = ptr4;
|
|
1159
|
+
deferred5_1 = len4;
|
|
1160
|
+
return getStringFromWasm0(ptr4, len4);
|
|
1161
|
+
} finally {
|
|
1162
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
977
1166
|
/**
|
|
978
1167
|
* Finalize a prepared message with a signature
|
|
979
1168
|
*
|
|
@@ -993,6 +1182,22 @@ export function finalizeTransaction(prepared, signature) {
|
|
|
993
1182
|
return takeFromExternrefTable0(ret[0]);
|
|
994
1183
|
}
|
|
995
1184
|
|
|
1185
|
+
/**
|
|
1186
|
+
* @param {WasmWalletPreparedMessage} wallet
|
|
1187
|
+
* @param {string} signature
|
|
1188
|
+
* @returns {any}
|
|
1189
|
+
*/
|
|
1190
|
+
export function finalizeWalletMessage(wallet, signature) {
|
|
1191
|
+
_assertClass(wallet, WasmWalletPreparedMessage);
|
|
1192
|
+
const ptr0 = passStringToWasm0(signature, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1193
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1194
|
+
const ret = wasm.finalizeWalletMessage(wallet.__wbg_ptr, ptr0, len0);
|
|
1195
|
+
if (ret[2]) {
|
|
1196
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1197
|
+
}
|
|
1198
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
996
1201
|
/**
|
|
997
1202
|
* Initialize the WASM module
|
|
998
1203
|
*/
|
|
@@ -1419,6 +1624,22 @@ export function prepareUpdateUserSettings(settings, options) {
|
|
|
1419
1624
|
return WasmPreparedMessage.__wrap(ret[0]);
|
|
1420
1625
|
}
|
|
1421
1626
|
|
|
1627
|
+
/**
|
|
1628
|
+
* @param {WasmPreparedMessage} prepared
|
|
1629
|
+
* @param {string} mode
|
|
1630
|
+
* @returns {WasmWalletPreparedMessage}
|
|
1631
|
+
*/
|
|
1632
|
+
export function prepareWalletMessage(prepared, mode) {
|
|
1633
|
+
_assertClass(prepared, WasmPreparedMessage);
|
|
1634
|
+
const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1635
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1636
|
+
const ret = wasm.prepareWalletMessage(prepared.__wbg_ptr, ptr0, len0);
|
|
1637
|
+
if (ret[2]) {
|
|
1638
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1639
|
+
}
|
|
1640
|
+
return WasmWalletPreparedMessage.__wrap(ret[0]);
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1422
1643
|
/**
|
|
1423
1644
|
* Prepare a portfolio withdraw for external signing
|
|
1424
1645
|
*
|
|
@@ -1518,11 +1739,11 @@ export function validatePubkey(s) {
|
|
|
1518
1739
|
function __wbg_get_imports() {
|
|
1519
1740
|
const import0 = {
|
|
1520
1741
|
__proto__: null,
|
|
1521
|
-
|
|
1742
|
+
__wbg_Error_67e7344beaa85059: function(arg0, arg1) {
|
|
1522
1743
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1523
1744
|
return ret;
|
|
1524
1745
|
},
|
|
1525
|
-
|
|
1746
|
+
__wbg_Number_c54e7112a3fa7e3e: function(arg0) {
|
|
1526
1747
|
const ret = Number(arg0);
|
|
1527
1748
|
return ret;
|
|
1528
1749
|
},
|
|
@@ -1533,64 +1754,64 @@ function __wbg_get_imports() {
|
|
|
1533
1754
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1534
1755
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1535
1756
|
},
|
|
1536
|
-
|
|
1757
|
+
__wbg___wbindgen_bigint_get_as_i64_b482365c149396c8: function(arg0, arg1) {
|
|
1537
1758
|
const v = arg1;
|
|
1538
1759
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1539
1760
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1540
1761
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1541
1762
|
},
|
|
1542
|
-
|
|
1763
|
+
__wbg___wbindgen_boolean_get_7a12af2b3f899c5a: function(arg0) {
|
|
1543
1764
|
const v = arg0;
|
|
1544
1765
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1545
1766
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1546
1767
|
},
|
|
1547
|
-
|
|
1768
|
+
__wbg___wbindgen_debug_string_0e68cf47c9cbd9b0: function(arg0, arg1) {
|
|
1548
1769
|
const ret = debugString(arg1);
|
|
1549
1770
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1550
1771
|
const len1 = WASM_VECTOR_LEN;
|
|
1551
1772
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1552
1773
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1553
1774
|
},
|
|
1554
|
-
|
|
1775
|
+
__wbg___wbindgen_in_50072d4d6e45c193: function(arg0, arg1) {
|
|
1555
1776
|
const ret = arg0 in arg1;
|
|
1556
1777
|
return ret;
|
|
1557
1778
|
},
|
|
1558
|
-
|
|
1779
|
+
__wbg___wbindgen_is_bigint_60fc0336cb14f5d7: function(arg0) {
|
|
1559
1780
|
const ret = typeof(arg0) === 'bigint';
|
|
1560
1781
|
return ret;
|
|
1561
1782
|
},
|
|
1562
|
-
|
|
1783
|
+
__wbg___wbindgen_is_function_fcda5e3902d732fe: function(arg0) {
|
|
1563
1784
|
const ret = typeof(arg0) === 'function';
|
|
1564
1785
|
return ret;
|
|
1565
1786
|
},
|
|
1566
|
-
|
|
1787
|
+
__wbg___wbindgen_is_object_edb6b15aa3afe12e: function(arg0) {
|
|
1567
1788
|
const val = arg0;
|
|
1568
1789
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1569
1790
|
return ret;
|
|
1570
1791
|
},
|
|
1571
|
-
|
|
1792
|
+
__wbg___wbindgen_is_string_c4f7cb494a2a21f1: function(arg0) {
|
|
1572
1793
|
const ret = typeof(arg0) === 'string';
|
|
1573
1794
|
return ret;
|
|
1574
1795
|
},
|
|
1575
|
-
|
|
1796
|
+
__wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) {
|
|
1576
1797
|
const ret = arg0 === undefined;
|
|
1577
1798
|
return ret;
|
|
1578
1799
|
},
|
|
1579
|
-
|
|
1800
|
+
__wbg___wbindgen_jsval_eq_9fdcd3c0a860dd3b: function(arg0, arg1) {
|
|
1580
1801
|
const ret = arg0 === arg1;
|
|
1581
1802
|
return ret;
|
|
1582
1803
|
},
|
|
1583
|
-
|
|
1804
|
+
__wbg___wbindgen_jsval_loose_eq_3c30021c243b64cd: function(arg0, arg1) {
|
|
1584
1805
|
const ret = arg0 == arg1;
|
|
1585
1806
|
return ret;
|
|
1586
1807
|
},
|
|
1587
|
-
|
|
1808
|
+
__wbg___wbindgen_number_get_1dc732b810cb937c: function(arg0, arg1) {
|
|
1588
1809
|
const obj = arg1;
|
|
1589
1810
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1590
1811
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1591
1812
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1592
1813
|
},
|
|
1593
|
-
|
|
1814
|
+
__wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) {
|
|
1594
1815
|
const obj = arg1;
|
|
1595
1816
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1596
1817
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1598,14 +1819,14 @@ function __wbg_get_imports() {
|
|
|
1598
1819
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1599
1820
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1600
1821
|
},
|
|
1601
|
-
|
|
1822
|
+
__wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
|
|
1602
1823
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1603
1824
|
},
|
|
1604
|
-
|
|
1825
|
+
__wbg_call_269c5566fbede3eb: function() { return handleError(function (arg0, arg1) {
|
|
1605
1826
|
const ret = arg0.call(arg1);
|
|
1606
1827
|
return ret;
|
|
1607
1828
|
}, arguments); },
|
|
1608
|
-
|
|
1829
|
+
__wbg_call_6bcf8d3e20937e46: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1609
1830
|
const ret = arg0.call(arg1, arg2);
|
|
1610
1831
|
return ret;
|
|
1611
1832
|
}, arguments); },
|
|
@@ -1613,11 +1834,11 @@ function __wbg_get_imports() {
|
|
|
1613
1834
|
const ret = arg0.crypto;
|
|
1614
1835
|
return ret;
|
|
1615
1836
|
},
|
|
1616
|
-
|
|
1837
|
+
__wbg_done_cffed884d87aa22e: function(arg0) {
|
|
1617
1838
|
const ret = arg0.done;
|
|
1618
1839
|
return ret;
|
|
1619
1840
|
},
|
|
1620
|
-
|
|
1841
|
+
__wbg_entries_972a87586902cf87: function(arg0) {
|
|
1621
1842
|
const ret = Object.entries(arg0);
|
|
1622
1843
|
return ret;
|
|
1623
1844
|
},
|
|
@@ -1635,15 +1856,15 @@ function __wbg_get_imports() {
|
|
|
1635
1856
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1636
1857
|
arg0.getRandomValues(arg1);
|
|
1637
1858
|
}, arguments); },
|
|
1638
|
-
|
|
1639
|
-
const ret = arg0[arg1 >>> 0];
|
|
1640
|
-
return ret;
|
|
1641
|
-
},
|
|
1642
|
-
__wbg_get_d173c0308df22d37: function() { return handleError(function (arg0, arg1) {
|
|
1859
|
+
__wbg_get_6cf5a4d4d8ad3c5a: function() { return handleError(function (arg0, arg1) {
|
|
1643
1860
|
const ret = Reflect.get(arg0, arg1);
|
|
1644
1861
|
return ret;
|
|
1645
1862
|
}, arguments); },
|
|
1646
|
-
|
|
1863
|
+
__wbg_get_b1f0ab13c737f856: function(arg0, arg1) {
|
|
1864
|
+
const ret = arg0[arg1 >>> 0];
|
|
1865
|
+
return ret;
|
|
1866
|
+
},
|
|
1867
|
+
__wbg_get_unchecked_363572bdd397d473: function(arg0, arg1) {
|
|
1647
1868
|
const ret = arg0[arg1 >>> 0];
|
|
1648
1869
|
return ret;
|
|
1649
1870
|
},
|
|
@@ -1651,7 +1872,7 @@ function __wbg_get_imports() {
|
|
|
1651
1872
|
const ret = arg0[arg1];
|
|
1652
1873
|
return ret;
|
|
1653
1874
|
},
|
|
1654
|
-
|
|
1875
|
+
__wbg_instanceof_ArrayBuffer_d4ff01f8247925ae: function(arg0) {
|
|
1655
1876
|
let result;
|
|
1656
1877
|
try {
|
|
1657
1878
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -1661,7 +1882,7 @@ function __wbg_get_imports() {
|
|
|
1661
1882
|
const ret = result;
|
|
1662
1883
|
return ret;
|
|
1663
1884
|
},
|
|
1664
|
-
|
|
1885
|
+
__wbg_instanceof_Map_1ff6a2b54c899f0d: function(arg0) {
|
|
1665
1886
|
let result;
|
|
1666
1887
|
try {
|
|
1667
1888
|
result = arg0 instanceof Map;
|
|
@@ -1671,7 +1892,7 @@ function __wbg_get_imports() {
|
|
|
1671
1892
|
const ret = result;
|
|
1672
1893
|
return ret;
|
|
1673
1894
|
},
|
|
1674
|
-
|
|
1895
|
+
__wbg_instanceof_Uint8Array_598adc0fef426aa8: function(arg0) {
|
|
1675
1896
|
let result;
|
|
1676
1897
|
try {
|
|
1677
1898
|
result = arg0 instanceof Uint8Array;
|
|
@@ -1681,23 +1902,23 @@ function __wbg_get_imports() {
|
|
|
1681
1902
|
const ret = result;
|
|
1682
1903
|
return ret;
|
|
1683
1904
|
},
|
|
1684
|
-
|
|
1905
|
+
__wbg_isArray_5674713bb7b79043: function(arg0) {
|
|
1685
1906
|
const ret = Array.isArray(arg0);
|
|
1686
1907
|
return ret;
|
|
1687
1908
|
},
|
|
1688
|
-
|
|
1909
|
+
__wbg_isSafeInteger_8f51c743827d1ec5: function(arg0) {
|
|
1689
1910
|
const ret = Number.isSafeInteger(arg0);
|
|
1690
1911
|
return ret;
|
|
1691
1912
|
},
|
|
1692
|
-
|
|
1913
|
+
__wbg_iterator_22ddeb808cf55a6f: function() {
|
|
1693
1914
|
const ret = Symbol.iterator;
|
|
1694
1915
|
return ret;
|
|
1695
1916
|
},
|
|
1696
|
-
|
|
1917
|
+
__wbg_length_31bdaf014f5fbde2: function(arg0) {
|
|
1697
1918
|
const ret = arg0.length;
|
|
1698
1919
|
return ret;
|
|
1699
1920
|
},
|
|
1700
|
-
|
|
1921
|
+
__wbg_length_4e1adc0d42e23620: function(arg0) {
|
|
1701
1922
|
const ret = arg0.length;
|
|
1702
1923
|
return ret;
|
|
1703
1924
|
},
|
|
@@ -1705,43 +1926,43 @@ function __wbg_get_imports() {
|
|
|
1705
1926
|
const ret = arg0.msCrypto;
|
|
1706
1927
|
return ret;
|
|
1707
1928
|
},
|
|
1708
|
-
|
|
1709
|
-
const ret = new
|
|
1929
|
+
__wbg_new_1da3429bc3c4541c: function(arg0) {
|
|
1930
|
+
const ret = new Uint8Array(arg0);
|
|
1710
1931
|
return ret;
|
|
1711
1932
|
},
|
|
1712
1933
|
__wbg_new_227d7c05414eb861: function() {
|
|
1713
1934
|
const ret = new Error();
|
|
1714
1935
|
return ret;
|
|
1715
1936
|
},
|
|
1716
|
-
|
|
1717
|
-
const ret = new Uint8Array(arg0);
|
|
1718
|
-
return ret;
|
|
1719
|
-
},
|
|
1720
|
-
__wbg_new_cdf041679ded4c5f: function() {
|
|
1937
|
+
__wbg_new_8d36e20aa758e411: function() {
|
|
1721
1938
|
const ret = new Map();
|
|
1722
1939
|
return ret;
|
|
1723
1940
|
},
|
|
1724
|
-
|
|
1941
|
+
__wbg_new_bebc3f4757acf305: function() {
|
|
1725
1942
|
const ret = new Object();
|
|
1726
1943
|
return ret;
|
|
1727
1944
|
},
|
|
1728
|
-
|
|
1729
|
-
const ret = new
|
|
1945
|
+
__wbg_new_ffa92086ea89f79c: function() {
|
|
1946
|
+
const ret = new Array();
|
|
1730
1947
|
return ret;
|
|
1731
1948
|
},
|
|
1732
|
-
|
|
1733
|
-
const ret = arg0
|
|
1949
|
+
__wbg_new_with_length_5ffeddb9d9fbb96f: function(arg0) {
|
|
1950
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1734
1951
|
return ret;
|
|
1735
|
-
},
|
|
1736
|
-
|
|
1952
|
+
},
|
|
1953
|
+
__wbg_next_95053e306b1c3aed: function(arg0) {
|
|
1737
1954
|
const ret = arg0.next;
|
|
1738
1955
|
return ret;
|
|
1739
1956
|
},
|
|
1957
|
+
__wbg_next_f31ecb8646d2c605: function() { return handleError(function (arg0) {
|
|
1958
|
+
const ret = arg0.next();
|
|
1959
|
+
return ret;
|
|
1960
|
+
}, arguments); },
|
|
1740
1961
|
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1741
1962
|
const ret = arg0.node;
|
|
1742
1963
|
return ret;
|
|
1743
1964
|
},
|
|
1744
|
-
|
|
1965
|
+
__wbg_now_d1fb6650485d7f3e: function() {
|
|
1745
1966
|
const ret = Date.now();
|
|
1746
1967
|
return ret;
|
|
1747
1968
|
},
|
|
@@ -1749,7 +1970,7 @@ function __wbg_get_imports() {
|
|
|
1749
1970
|
const ret = arg0.process;
|
|
1750
1971
|
return ret;
|
|
1751
1972
|
},
|
|
1752
|
-
|
|
1973
|
+
__wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
|
|
1753
1974
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1754
1975
|
},
|
|
1755
1976
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
@@ -1759,15 +1980,15 @@ function __wbg_get_imports() {
|
|
|
1759
1980
|
const ret = module.require;
|
|
1760
1981
|
return ret;
|
|
1761
1982
|
}, arguments); },
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
return ret;
|
|
1983
|
+
__wbg_set_13d25b81ab403f5e: function(arg0, arg1, arg2) {
|
|
1984
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1765
1985
|
},
|
|
1766
1986
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1767
1987
|
arg0[arg1] = arg2;
|
|
1768
1988
|
},
|
|
1769
|
-
|
|
1770
|
-
|
|
1989
|
+
__wbg_set_bf6dde4923b9b059: function(arg0, arg1, arg2) {
|
|
1990
|
+
const ret = arg0.set(arg1, arg2);
|
|
1991
|
+
return ret;
|
|
1771
1992
|
},
|
|
1772
1993
|
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
1773
1994
|
const ret = arg1.stack;
|
|
@@ -1776,27 +1997,27 @@ function __wbg_get_imports() {
|
|
|
1776
1997
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1777
1998
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1778
1999
|
},
|
|
1779
|
-
|
|
1780
|
-
const ret = typeof
|
|
2000
|
+
__wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() {
|
|
2001
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1781
2002
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1782
2003
|
},
|
|
1783
|
-
|
|
1784
|
-
const ret = typeof
|
|
2004
|
+
__wbg_static_accessor_GLOBAL_THIS_1e7044f654e934db: function() {
|
|
2005
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1785
2006
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1786
2007
|
},
|
|
1787
|
-
|
|
2008
|
+
__wbg_static_accessor_SELF_d8b50611246a6d92: function() {
|
|
1788
2009
|
const ret = typeof self === 'undefined' ? null : self;
|
|
1789
2010
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1790
2011
|
},
|
|
1791
|
-
|
|
2012
|
+
__wbg_static_accessor_WINDOW_fd0bc376bf0f8b42: function() {
|
|
1792
2013
|
const ret = typeof window === 'undefined' ? null : window;
|
|
1793
2014
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1794
2015
|
},
|
|
1795
|
-
|
|
2016
|
+
__wbg_subarray_1daff70dde20c145: function(arg0, arg1, arg2) {
|
|
1796
2017
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1797
2018
|
return ret;
|
|
1798
2019
|
},
|
|
1799
|
-
|
|
2020
|
+
__wbg_value_c227f843d21da141: function(arg0) {
|
|
1800
2021
|
const ret = arg0.value;
|
|
1801
2022
|
return ret;
|
|
1802
2023
|
},
|
|
@@ -1808,27 +2029,27 @@ function __wbg_get_imports() {
|
|
|
1808
2029
|
const ret = WasmPreparedMessage.__wrap(arg0);
|
|
1809
2030
|
return ret;
|
|
1810
2031
|
},
|
|
1811
|
-
|
|
2032
|
+
__wbindgen_generic_0000000000000001: function(arg0) {
|
|
1812
2033
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1813
2034
|
const ret = arg0;
|
|
1814
2035
|
return ret;
|
|
1815
2036
|
},
|
|
1816
|
-
|
|
2037
|
+
__wbindgen_generic_0000000000000002: function(arg0) {
|
|
1817
2038
|
// Cast intrinsic for `I64 -> Externref`.
|
|
1818
2039
|
const ret = arg0;
|
|
1819
2040
|
return ret;
|
|
1820
2041
|
},
|
|
1821
|
-
|
|
2042
|
+
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
1822
2043
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1823
2044
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1824
2045
|
return ret;
|
|
1825
2046
|
},
|
|
1826
|
-
|
|
2047
|
+
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
1827
2048
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1828
2049
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1829
2050
|
return ret;
|
|
1830
2051
|
},
|
|
1831
|
-
|
|
2052
|
+
__wbindgen_generic_0000000000000005: function(arg0) {
|
|
1832
2053
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1833
2054
|
const ret = BigInt.asUintN(64, arg0);
|
|
1834
2055
|
return ret;
|
|
@@ -1858,6 +2079,9 @@ const WasmPreparedMessageFinalization = (typeof FinalizationRegistry === 'undefi
|
|
|
1858
2079
|
const WasmSignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1859
2080
|
? { register: () => {}, unregister: () => {} }
|
|
1860
2081
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmsigner_free(ptr, 1));
|
|
2082
|
+
const WasmWalletPreparedMessageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2083
|
+
? { register: () => {}, unregister: () => {} }
|
|
2084
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmwalletpreparedmessage_free(ptr, 1));
|
|
1861
2085
|
|
|
1862
2086
|
function addToExternrefTable0(obj) {
|
|
1863
2087
|
const idx = wasm.__externref_table_alloc();
|
|
Binary file
|
package/package.json
CHANGED