@bitgo/wasm-utxo 1.7.0 → 1.8.0
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/dist/cjs/js/fixedScriptWallet/BitGoPsbt.d.ts +99 -0
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +122 -0
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +86 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +277 -25
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +21 -17
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +99 -0
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +122 -0
- package/dist/esm/js/wasm/wasm_utxo.d.ts +86 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +277 -25
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +21 -17
- package/dist/esm/test/fixedScript/fixtureUtil.d.ts +8 -0
- package/dist/esm/test/fixedScript/fixtureUtil.js +10 -0
- package/dist/esm/test/fixedScript/musig2Nonces.js +77 -0
- package/dist/esm/test/fixedScript/signAndVerifySignature.d.ts +1 -0
- package/dist/esm/test/fixedScript/{verifySignature.js → signAndVerifySignature.js} +105 -24
- package/dist/esm/test/fixedScript/walletKeys.util.d.ts +12 -0
- package/dist/esm/test/fixedScript/walletKeys.util.js +17 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- /package/dist/esm/test/fixedScript/{verifySignature.d.ts → musig2Nonces.d.ts} +0 -0
|
@@ -54,6 +54,18 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
54
54
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
function dropObject(idx) {
|
|
58
|
+
if (idx < 132) return;
|
|
59
|
+
heap[idx] = heap_next;
|
|
60
|
+
heap_next = idx;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function takeObject(idx) {
|
|
64
|
+
const ret = getObject(idx);
|
|
65
|
+
dropObject(idx);
|
|
66
|
+
return ret;
|
|
67
|
+
}
|
|
68
|
+
|
|
57
69
|
function isLikeNone(x) {
|
|
58
70
|
return x === undefined || x === null;
|
|
59
71
|
}
|
|
@@ -121,16 +133,21 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
121
133
|
return ptr;
|
|
122
134
|
}
|
|
123
135
|
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
136
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
137
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
138
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
139
|
+
WASM_VECTOR_LEN = arg.length;
|
|
140
|
+
return ptr;
|
|
128
141
|
}
|
|
129
142
|
|
|
130
|
-
function
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
143
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
144
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
145
|
+
const mem = getDataViewMemory0();
|
|
146
|
+
for (let i = 0; i < array.length; i++) {
|
|
147
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
148
|
+
}
|
|
149
|
+
WASM_VECTOR_LEN = array.length;
|
|
150
|
+
return ptr;
|
|
134
151
|
}
|
|
135
152
|
|
|
136
153
|
function _assertClass(instance, klass) {
|
|
@@ -139,13 +156,6 @@ function _assertClass(instance, klass) {
|
|
|
139
156
|
}
|
|
140
157
|
}
|
|
141
158
|
|
|
142
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
143
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
144
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
145
|
-
WASM_VECTOR_LEN = arg.length;
|
|
146
|
-
return ptr;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
159
|
let stack_pointer = 128;
|
|
150
160
|
|
|
151
161
|
function addBorrowedObject(obj) {
|
|
@@ -154,16 +164,6 @@ function addBorrowedObject(obj) {
|
|
|
154
164
|
return stack_pointer;
|
|
155
165
|
}
|
|
156
166
|
|
|
157
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
158
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
159
|
-
const mem = getDataViewMemory0();
|
|
160
|
-
for (let i = 0; i < array.length; i++) {
|
|
161
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
162
|
-
}
|
|
163
|
-
WASM_VECTOR_LEN = array.length;
|
|
164
|
-
return ptr;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
167
|
const AddressNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
168
168
|
? { register: () => {}, unregister: () => {} }
|
|
169
169
|
: new FinalizationRegistry(ptr => wasm.__wbg_addressnamespace_free(ptr >>> 0, 1));
|
|
@@ -319,6 +319,76 @@ class BitGoPsbt {
|
|
|
319
319
|
wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* Sign a single input with an extended private key (xpriv)
|
|
324
|
+
*
|
|
325
|
+
* This method signs a specific input using the provided xpriv. It accepts:
|
|
326
|
+
* - An xpriv (WasmBIP32) for wallet inputs - derives the key and signs
|
|
327
|
+
*
|
|
328
|
+
* This method automatically detects and handles different input types:
|
|
329
|
+
* - For regular inputs: uses standard PSBT signing
|
|
330
|
+
* - For MuSig2 inputs: uses the FirstRound state stored by generate_musig2_nonces()
|
|
331
|
+
* - For replay protection inputs: returns error (use sign_with_privkey instead)
|
|
332
|
+
*
|
|
333
|
+
* # Arguments
|
|
334
|
+
* - `input_index`: The index of the input to sign (0-based)
|
|
335
|
+
* - `xpriv`: The extended private key as a WasmBIP32 instance
|
|
336
|
+
*
|
|
337
|
+
* # Returns
|
|
338
|
+
* - `Ok(())` if signing was successful
|
|
339
|
+
* - `Err(WasmUtxoError)` if signing fails
|
|
340
|
+
* @param {number} input_index
|
|
341
|
+
* @param {WasmBIP32} xpriv
|
|
342
|
+
*/
|
|
343
|
+
sign_with_xpriv(input_index, xpriv) {
|
|
344
|
+
try {
|
|
345
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
346
|
+
_assertClass(xpriv, WasmBIP32);
|
|
347
|
+
wasm.bitgopsbt_sign_with_xpriv(retptr, this.__wbg_ptr, input_index, xpriv.__wbg_ptr);
|
|
348
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
349
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
350
|
+
if (r1) {
|
|
351
|
+
throw takeObject(r0);
|
|
352
|
+
}
|
|
353
|
+
} finally {
|
|
354
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Sign a single input with a raw private key
|
|
359
|
+
*
|
|
360
|
+
* This method signs a specific input using the provided ECPair. It accepts:
|
|
361
|
+
* - A raw privkey (WasmECPair) for replay protection inputs - signs directly
|
|
362
|
+
*
|
|
363
|
+
* This method automatically detects and handles different input types:
|
|
364
|
+
* - For replay protection inputs: signs with legacy P2SH sighash
|
|
365
|
+
* - For regular inputs: uses standard PSBT signing
|
|
366
|
+
* - For MuSig2 inputs: returns error (requires FirstRound, use sign_with_xpriv instead)
|
|
367
|
+
*
|
|
368
|
+
* # Arguments
|
|
369
|
+
* - `input_index`: The index of the input to sign (0-based)
|
|
370
|
+
* - `ecpair`: The ECPair containing the private key
|
|
371
|
+
*
|
|
372
|
+
* # Returns
|
|
373
|
+
* - `Ok(())` if signing was successful
|
|
374
|
+
* - `Err(WasmUtxoError)` if signing fails
|
|
375
|
+
* @param {number} input_index
|
|
376
|
+
* @param {WasmECPair} ecpair
|
|
377
|
+
*/
|
|
378
|
+
sign_with_privkey(input_index, ecpair) {
|
|
379
|
+
try {
|
|
380
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
381
|
+
_assertClass(ecpair, WasmECPair);
|
|
382
|
+
wasm.bitgopsbt_sign_with_privkey(retptr, this.__wbg_ptr, input_index, ecpair.__wbg_ptr);
|
|
383
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
384
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
385
|
+
if (r1) {
|
|
386
|
+
throw takeObject(r0);
|
|
387
|
+
}
|
|
388
|
+
} finally {
|
|
389
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
322
392
|
/**
|
|
323
393
|
* Extract the final transaction from a finalized PSBT
|
|
324
394
|
*
|
|
@@ -371,6 +441,83 @@ class BitGoPsbt {
|
|
|
371
441
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
372
442
|
}
|
|
373
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* Combine/merge data from another PSBT into this one
|
|
446
|
+
*
|
|
447
|
+
* This method copies MuSig2 nonces and signatures (proprietary key-value pairs) from the
|
|
448
|
+
* source PSBT to this PSBT. This is useful for merging PSBTs during the nonce exchange
|
|
449
|
+
* and signature collection phases.
|
|
450
|
+
*
|
|
451
|
+
* # Arguments
|
|
452
|
+
* * `source_psbt` - The source PSBT containing data to merge
|
|
453
|
+
*
|
|
454
|
+
* # Returns
|
|
455
|
+
* Ok(()) if data was successfully merged
|
|
456
|
+
*
|
|
457
|
+
* # Errors
|
|
458
|
+
* Returns error if networks don't match
|
|
459
|
+
* @param {BitGoPsbt} source_psbt
|
|
460
|
+
*/
|
|
461
|
+
combine_musig2_nonces(source_psbt) {
|
|
462
|
+
try {
|
|
463
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
464
|
+
_assertClass(source_psbt, BitGoPsbt);
|
|
465
|
+
wasm.bitgopsbt_combine_musig2_nonces(retptr, this.__wbg_ptr, source_psbt.__wbg_ptr);
|
|
466
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
467
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
468
|
+
if (r1) {
|
|
469
|
+
throw takeObject(r0);
|
|
470
|
+
}
|
|
471
|
+
} finally {
|
|
472
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Generate and store MuSig2 nonces for all MuSig2 inputs
|
|
477
|
+
*
|
|
478
|
+
* This method generates nonces using the State-Machine API and stores them in the PSBT.
|
|
479
|
+
* The nonces are stored as proprietary fields in the PSBT and will be included when serialized.
|
|
480
|
+
* After ALL participants have generated their nonces, they can sign MuSig2 inputs using
|
|
481
|
+
* sign_with_xpriv().
|
|
482
|
+
*
|
|
483
|
+
* # Arguments
|
|
484
|
+
* * `xpriv` - The extended private key (xpriv) for signing
|
|
485
|
+
* * `session_id_bytes` - Optional 32-byte session ID for nonce generation. **Only allowed on testnets**.
|
|
486
|
+
* On mainnets, a secure random session ID is always generated automatically.
|
|
487
|
+
* Must be unique per signing session.
|
|
488
|
+
*
|
|
489
|
+
* # Returns
|
|
490
|
+
* Ok(()) if nonces were successfully generated and stored
|
|
491
|
+
*
|
|
492
|
+
* # Errors
|
|
493
|
+
* Returns error if:
|
|
494
|
+
* - Nonce generation fails
|
|
495
|
+
* - session_id length is invalid
|
|
496
|
+
* - Custom session_id is provided on a mainnet (security restriction)
|
|
497
|
+
*
|
|
498
|
+
* # Security
|
|
499
|
+
* The session_id MUST be cryptographically random and unique for each signing session.
|
|
500
|
+
* Never reuse a session_id with the same key! On mainnets, session_id is always randomly
|
|
501
|
+
* generated for security. Custom session_id is only allowed on testnets for testing purposes.
|
|
502
|
+
* @param {WasmBIP32} xpriv
|
|
503
|
+
* @param {Uint8Array | null} [session_id_bytes]
|
|
504
|
+
*/
|
|
505
|
+
generate_musig2_nonces(xpriv, session_id_bytes) {
|
|
506
|
+
try {
|
|
507
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
508
|
+
_assertClass(xpriv, WasmBIP32);
|
|
509
|
+
var ptr0 = isLikeNone(session_id_bytes) ? 0 : passArray8ToWasm0(session_id_bytes, wasm.__wbindgen_export_1);
|
|
510
|
+
var len0 = WASM_VECTOR_LEN;
|
|
511
|
+
wasm.bitgopsbt_generate_musig2_nonces(retptr, this.__wbg_ptr, xpriv.__wbg_ptr, ptr0, len0);
|
|
512
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
513
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
514
|
+
if (r1) {
|
|
515
|
+
throw takeObject(r0);
|
|
516
|
+
}
|
|
517
|
+
} finally {
|
|
518
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
374
521
|
/**
|
|
375
522
|
* Verify if a valid signature exists for a given ECPair key at the specified input index
|
|
376
523
|
*
|
|
@@ -2196,6 +2343,25 @@ exports.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
|
|
|
2196
2343
|
return addHeapObject(ret);
|
|
2197
2344
|
};
|
|
2198
2345
|
|
|
2346
|
+
exports.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
|
|
2347
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
2348
|
+
return addHeapObject(ret);
|
|
2349
|
+
}, arguments) };
|
|
2350
|
+
|
|
2351
|
+
exports.__wbg_call_a5400b25a865cfd8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2352
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2353
|
+
return addHeapObject(ret);
|
|
2354
|
+
}, arguments) };
|
|
2355
|
+
|
|
2356
|
+
exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
2357
|
+
const ret = getObject(arg0).crypto;
|
|
2358
|
+
return addHeapObject(ret);
|
|
2359
|
+
};
|
|
2360
|
+
|
|
2361
|
+
exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
2362
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
2363
|
+
}, arguments) };
|
|
2364
|
+
|
|
2199
2365
|
exports.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
2200
2366
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
2201
2367
|
return addHeapObject(ret);
|
|
@@ -2206,6 +2372,11 @@ exports.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
|
|
|
2206
2372
|
return ret;
|
|
2207
2373
|
};
|
|
2208
2374
|
|
|
2375
|
+
exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
2376
|
+
const ret = getObject(arg0).msCrypto;
|
|
2377
|
+
return addHeapObject(ret);
|
|
2378
|
+
};
|
|
2379
|
+
|
|
2209
2380
|
exports.__wbg_new_19c25a3f2fa63a02 = function() {
|
|
2210
2381
|
const ret = new Object();
|
|
2211
2382
|
return addHeapObject(ret);
|
|
@@ -2231,6 +2402,26 @@ exports.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
|
|
|
2231
2402
|
return addHeapObject(ret);
|
|
2232
2403
|
};
|
|
2233
2404
|
|
|
2405
|
+
exports.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
|
|
2406
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2407
|
+
return addHeapObject(ret);
|
|
2408
|
+
};
|
|
2409
|
+
|
|
2410
|
+
exports.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
|
|
2411
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
2412
|
+
return addHeapObject(ret);
|
|
2413
|
+
};
|
|
2414
|
+
|
|
2415
|
+
exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
2416
|
+
const ret = getObject(arg0).node;
|
|
2417
|
+
return addHeapObject(ret);
|
|
2418
|
+
};
|
|
2419
|
+
|
|
2420
|
+
exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
2421
|
+
const ret = getObject(arg0).process;
|
|
2422
|
+
return addHeapObject(ret);
|
|
2423
|
+
};
|
|
2424
|
+
|
|
2234
2425
|
exports.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
|
|
2235
2426
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
2236
2427
|
};
|
|
@@ -2240,16 +2431,71 @@ exports.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
|
|
|
2240
2431
|
return ret;
|
|
2241
2432
|
};
|
|
2242
2433
|
|
|
2434
|
+
exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
2435
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
2436
|
+
}, arguments) };
|
|
2437
|
+
|
|
2438
|
+
exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
2439
|
+
const ret = module.require;
|
|
2440
|
+
return addHeapObject(ret);
|
|
2441
|
+
}, arguments) };
|
|
2442
|
+
|
|
2243
2443
|
exports.__wbg_set_453345bcda80b89a = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2244
2444
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
2245
2445
|
return ret;
|
|
2246
2446
|
}, arguments) };
|
|
2247
2447
|
|
|
2448
|
+
exports.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
|
|
2449
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
2450
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2451
|
+
};
|
|
2452
|
+
|
|
2453
|
+
exports.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
|
|
2454
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2455
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2456
|
+
};
|
|
2457
|
+
|
|
2458
|
+
exports.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
|
|
2459
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
2460
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2461
|
+
};
|
|
2462
|
+
|
|
2463
|
+
exports.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
|
|
2464
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
2465
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2466
|
+
};
|
|
2467
|
+
|
|
2468
|
+
exports.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
|
|
2469
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2470
|
+
return addHeapObject(ret);
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
2474
|
+
const ret = getObject(arg0).versions;
|
|
2475
|
+
return addHeapObject(ret);
|
|
2476
|
+
};
|
|
2477
|
+
|
|
2478
|
+
exports.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
|
|
2479
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
2480
|
+
return ret;
|
|
2481
|
+
};
|
|
2482
|
+
|
|
2248
2483
|
exports.__wbg_wbindgenisnull_f3037694abe4d97a = function(arg0) {
|
|
2249
2484
|
const ret = getObject(arg0) === null;
|
|
2250
2485
|
return ret;
|
|
2251
2486
|
};
|
|
2252
2487
|
|
|
2488
|
+
exports.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
|
|
2489
|
+
const val = getObject(arg0);
|
|
2490
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2491
|
+
return ret;
|
|
2492
|
+
};
|
|
2493
|
+
|
|
2494
|
+
exports.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
|
|
2495
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
2496
|
+
return ret;
|
|
2497
|
+
};
|
|
2498
|
+
|
|
2253
2499
|
exports.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
|
|
2254
2500
|
const ret = getObject(arg0) === undefined;
|
|
2255
2501
|
return ret;
|
|
@@ -2287,6 +2533,12 @@ exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
|
2287
2533
|
return addHeapObject(ret);
|
|
2288
2534
|
};
|
|
2289
2535
|
|
|
2536
|
+
exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
2537
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
2538
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2539
|
+
return addHeapObject(ret);
|
|
2540
|
+
};
|
|
2541
|
+
|
|
2290
2542
|
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
2291
2543
|
// Cast intrinsic for `F64 -> Externref`.
|
|
2292
2544
|
const ret = arg0;
|
|
Binary file
|
|
@@ -2,11 +2,25 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
7
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
8
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
9
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
11
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
12
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
13
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
14
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
15
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
16
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
17
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
18
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
5
19
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
6
20
|
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
7
21
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
22
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
23
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
24
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
11
25
|
export const wasmbip32_depth: (a: number) => number;
|
|
12
26
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -43,20 +57,21 @@ export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number
|
|
|
43
57
|
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
44
58
|
export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
45
59
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
46
|
-
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
47
60
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
61
|
+
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
48
62
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
49
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
50
63
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
51
|
-
export const
|
|
52
|
-
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
64
|
+
export const bitgopsbt_combine_musig2_nonces: (a: number, b: number, c: number) => void;
|
|
53
65
|
export const bitgopsbt_extract_transaction: (a: number, b: number) => void;
|
|
54
66
|
export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
|
|
55
67
|
export const bitgopsbt_from_bytes: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
68
|
+
export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
56
69
|
export const bitgopsbt_network: (a: number, b: number) => void;
|
|
57
70
|
export const bitgopsbt_parse_outputs_with_wallet_keys: (a: number, b: number, c: number) => void;
|
|
58
71
|
export const bitgopsbt_parse_transaction_with_wallet_keys: (a: number, b: number, c: number, d: number) => void;
|
|
59
72
|
export const bitgopsbt_serialize: (a: number, b: number) => void;
|
|
73
|
+
export const bitgopsbt_sign_with_privkey: (a: number, b: number, c: number, d: number) => void;
|
|
74
|
+
export const bitgopsbt_sign_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
60
75
|
export const bitgopsbt_unsigned_txid: (a: number, b: number) => void;
|
|
61
76
|
export const bitgopsbt_verify_replay_protection_signature: (a: number, b: number, c: number, d: number) => void;
|
|
62
77
|
export const bitgopsbt_verify_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -74,12 +89,6 @@ export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
|
74
89
|
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
75
90
|
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
76
91
|
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
77
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
78
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
79
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
80
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
81
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
82
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
83
92
|
export const wrappsbt_clone: (a: number) => number;
|
|
84
93
|
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
85
94
|
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
@@ -88,11 +97,6 @@ export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number)
|
|
|
88
97
|
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
89
98
|
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
90
99
|
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
91
|
-
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
92
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
93
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
94
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
95
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
96
100
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
97
101
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
98
102
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|