lwk_node 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lwk_wasm.d.ts +154 -20
- package/lwk_wasm.js +1125 -199
- package/lwk_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/lwk_wasm.js
CHANGED
|
@@ -106,6 +106,11 @@ function isLikeNone(x) {
|
|
|
106
106
|
return x === undefined || x === null;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
110
|
+
ptr = ptr >>> 0;
|
|
111
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
110
115
|
? { register: () => {}, unregister: () => {} }
|
|
111
116
|
: new FinalizationRegistry(state => {
|
|
@@ -208,17 +213,29 @@ function takeFromExternrefTable0(idx) {
|
|
|
208
213
|
return value;
|
|
209
214
|
}
|
|
210
215
|
|
|
211
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
212
|
-
ptr = ptr >>> 0;
|
|
213
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
216
|
function _assertClass(instance, klass) {
|
|
217
217
|
if (!(instance instanceof klass)) {
|
|
218
218
|
throw new Error(`expected instance of ${klass.name}`);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
223
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
224
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
225
|
+
WASM_VECTOR_LEN = arg.length;
|
|
226
|
+
return ptr;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
230
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
231
|
+
for (let i = 0; i < array.length; i++) {
|
|
232
|
+
const add = addToExternrefTable0(array[i]);
|
|
233
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
234
|
+
}
|
|
235
|
+
WASM_VECTOR_LEN = array.length;
|
|
236
|
+
return ptr;
|
|
237
|
+
}
|
|
238
|
+
|
|
222
239
|
let cachedUint32ArrayMemory0 = null;
|
|
223
240
|
|
|
224
241
|
function getUint32ArrayMemory0() {
|
|
@@ -235,16 +252,6 @@ function passArray32ToWasm0(arg, malloc) {
|
|
|
235
252
|
return ptr;
|
|
236
253
|
}
|
|
237
254
|
|
|
238
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
239
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
240
|
-
const mem = getDataViewMemory0();
|
|
241
|
-
for (let i = 0; i < array.length; i++) {
|
|
242
|
-
mem.setUint32(ptr + 4 * i, addToExternrefTable0(array[i]), true);
|
|
243
|
-
}
|
|
244
|
-
WASM_VECTOR_LEN = array.length;
|
|
245
|
-
return ptr;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
255
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
249
256
|
ptr = ptr >>> 0;
|
|
250
257
|
const mem = getDataViewMemory0();
|
|
@@ -256,23 +263,28 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
256
263
|
return result;
|
|
257
264
|
}
|
|
258
265
|
|
|
259
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
260
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
261
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
262
|
-
WASM_VECTOR_LEN = arg.length;
|
|
263
|
-
return ptr;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
266
|
function getArrayU32FromWasm0(ptr, len) {
|
|
267
267
|
ptr = ptr >>> 0;
|
|
268
268
|
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
269
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* @returns {Promise<HIDDevice>}
|
|
272
|
+
*/
|
|
273
|
+
module.exports.searchLedgerDevice = function() {
|
|
274
|
+
const ret = wasm.searchLedgerDevice();
|
|
275
|
+
return ret;
|
|
276
|
+
};
|
|
277
|
+
|
|
270
278
|
function __wbg_adapter_36(arg0, arg1, arg2) {
|
|
271
|
-
wasm.
|
|
279
|
+
wasm.closure285_externref_shim(arg0, arg1, arg2);
|
|
272
280
|
}
|
|
273
281
|
|
|
274
|
-
function
|
|
275
|
-
wasm.
|
|
282
|
+
function __wbg_adapter_43(arg0, arg1, arg2) {
|
|
283
|
+
wasm.closure1171_externref_shim(arg0, arg1, arg2);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function __wbg_adapter_481(arg0, arg1, arg2, arg3) {
|
|
287
|
+
wasm.closure1920_externref_shim(arg0, arg1, arg2, arg3);
|
|
276
288
|
}
|
|
277
289
|
|
|
278
290
|
/**
|
|
@@ -291,6 +303,8 @@ module.exports.Chain = Object.freeze({
|
|
|
291
303
|
Internal: 1, "1": "Internal",
|
|
292
304
|
});
|
|
293
305
|
|
|
306
|
+
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
307
|
+
|
|
294
308
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
295
309
|
|
|
296
310
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
@@ -324,6 +338,8 @@ class Address {
|
|
|
324
338
|
}
|
|
325
339
|
/**
|
|
326
340
|
* Creates an `Address`
|
|
341
|
+
*
|
|
342
|
+
* If you know the network, you can use [`Address::parse()`] to validate that the network is consistent.
|
|
327
343
|
* @param {string} s
|
|
328
344
|
*/
|
|
329
345
|
constructor(s) {
|
|
@@ -337,6 +353,22 @@ class Address {
|
|
|
337
353
|
AddressFinalization.register(this, this.__wbg_ptr, this);
|
|
338
354
|
return this;
|
|
339
355
|
}
|
|
356
|
+
/**
|
|
357
|
+
* Parses an `Address` ensuring is for the right network
|
|
358
|
+
* @param {string} s
|
|
359
|
+
* @param {Network} network
|
|
360
|
+
* @returns {Address}
|
|
361
|
+
*/
|
|
362
|
+
static parse(s, network) {
|
|
363
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
364
|
+
const len0 = WASM_VECTOR_LEN;
|
|
365
|
+
_assertClass(network, Network);
|
|
366
|
+
const ret = wasm.address_parse(ptr0, len0, network.__wbg_ptr);
|
|
367
|
+
if (ret[2]) {
|
|
368
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
369
|
+
}
|
|
370
|
+
return Address.__wrap(ret[0]);
|
|
371
|
+
}
|
|
340
372
|
/**
|
|
341
373
|
* @returns {Script}
|
|
342
374
|
*/
|
|
@@ -388,7 +420,7 @@ class Address {
|
|
|
388
420
|
* For max efficiency we suggest to pass `None` to `pixel_per_module`, get a very small image
|
|
389
421
|
* and use styling to scale up the image in the browser. eg
|
|
390
422
|
* `style="image-rendering: pixelated; border: 20px solid white;"`
|
|
391
|
-
* @param {number |
|
|
423
|
+
* @param {number | null} [pixel_per_module]
|
|
392
424
|
* @returns {string}
|
|
393
425
|
*/
|
|
394
426
|
QRCodeUri(pixel_per_module) {
|
|
@@ -598,6 +630,50 @@ class Amp2Descriptor {
|
|
|
598
630
|
}
|
|
599
631
|
module.exports.Amp2Descriptor = Amp2Descriptor;
|
|
600
632
|
|
|
633
|
+
const AssetAmountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
634
|
+
? { register: () => {}, unregister: () => {} }
|
|
635
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_assetamount_free(ptr >>> 0, 1));
|
|
636
|
+
/**
|
|
637
|
+
* Wrapper of [`lwk_wollet::AssetAmount`]
|
|
638
|
+
*/
|
|
639
|
+
class AssetAmount {
|
|
640
|
+
|
|
641
|
+
static __wrap(ptr) {
|
|
642
|
+
ptr = ptr >>> 0;
|
|
643
|
+
const obj = Object.create(AssetAmount.prototype);
|
|
644
|
+
obj.__wbg_ptr = ptr;
|
|
645
|
+
AssetAmountFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
646
|
+
return obj;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
__destroy_into_raw() {
|
|
650
|
+
const ptr = this.__wbg_ptr;
|
|
651
|
+
this.__wbg_ptr = 0;
|
|
652
|
+
AssetAmountFinalization.unregister(this);
|
|
653
|
+
return ptr;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
free() {
|
|
657
|
+
const ptr = this.__destroy_into_raw();
|
|
658
|
+
wasm.__wbg_assetamount_free(ptr, 0);
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* @returns {bigint}
|
|
662
|
+
*/
|
|
663
|
+
amount() {
|
|
664
|
+
const ret = wasm.assetamount_amount(this.__wbg_ptr);
|
|
665
|
+
return BigInt.asUintN(64, ret);
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* @returns {AssetId}
|
|
669
|
+
*/
|
|
670
|
+
asset() {
|
|
671
|
+
const ret = wasm.assetamount_asset(this.__wbg_ptr);
|
|
672
|
+
return AssetId.__wrap(ret);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
module.exports.AssetAmount = AssetAmount;
|
|
676
|
+
|
|
601
677
|
const AssetIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
602
678
|
? { register: () => {}, unregister: () => {} }
|
|
603
679
|
: new FinalizationRegistry(ptr => wasm.__wbg_assetid_free(ptr >>> 0, 1));
|
|
@@ -660,6 +736,48 @@ class AssetId {
|
|
|
660
736
|
}
|
|
661
737
|
module.exports.AssetId = AssetId;
|
|
662
738
|
|
|
739
|
+
const AssetMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
740
|
+
? { register: () => {}, unregister: () => {} }
|
|
741
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_assetmeta_free(ptr >>> 0, 1));
|
|
742
|
+
|
|
743
|
+
class AssetMeta {
|
|
744
|
+
|
|
745
|
+
static __wrap(ptr) {
|
|
746
|
+
ptr = ptr >>> 0;
|
|
747
|
+
const obj = Object.create(AssetMeta.prototype);
|
|
748
|
+
obj.__wbg_ptr = ptr;
|
|
749
|
+
AssetMetaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
750
|
+
return obj;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
__destroy_into_raw() {
|
|
754
|
+
const ptr = this.__wbg_ptr;
|
|
755
|
+
this.__wbg_ptr = 0;
|
|
756
|
+
AssetMetaFinalization.unregister(this);
|
|
757
|
+
return ptr;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
free() {
|
|
761
|
+
const ptr = this.__destroy_into_raw();
|
|
762
|
+
wasm.__wbg_assetmeta_free(ptr, 0);
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* @returns {Contract}
|
|
766
|
+
*/
|
|
767
|
+
contract() {
|
|
768
|
+
const ret = wasm.assetmeta_contract(this.__wbg_ptr);
|
|
769
|
+
return Contract.__wrap(ret);
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* @returns {Transaction}
|
|
773
|
+
*/
|
|
774
|
+
tx() {
|
|
775
|
+
const ret = wasm.assetmeta_tx(this.__wbg_ptr);
|
|
776
|
+
return Transaction.__wrap(ret);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
module.exports.AssetMeta = AssetMeta;
|
|
780
|
+
|
|
663
781
|
const BipFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
664
782
|
? { register: () => {}, unregister: () => {} }
|
|
665
783
|
: new FinalizationRegistry(ptr => wasm.__wbg_bip_free(ptr >>> 0, 1));
|
|
@@ -854,12 +972,13 @@ class EsploraClient {
|
|
|
854
972
|
* @param {Network} network
|
|
855
973
|
* @param {string} url
|
|
856
974
|
* @param {boolean} waterfalls
|
|
975
|
+
* @param {number} concurrency
|
|
857
976
|
*/
|
|
858
|
-
constructor(network, url, waterfalls) {
|
|
977
|
+
constructor(network, url, waterfalls, concurrency) {
|
|
859
978
|
_assertClass(network, Network);
|
|
860
979
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
861
980
|
const len0 = WASM_VECTOR_LEN;
|
|
862
|
-
const ret = wasm.esploraclient_new(network.__wbg_ptr, ptr0, len0, waterfalls);
|
|
981
|
+
const ret = wasm.esploraclient_new(network.__wbg_ptr, ptr0, len0, waterfalls, concurrency);
|
|
863
982
|
this.__wbg_ptr = ret >>> 0;
|
|
864
983
|
EsploraClientFinalization.register(this, this.__wbg_ptr, this);
|
|
865
984
|
return this;
|
|
@@ -1111,26 +1230,270 @@ class Jade {
|
|
|
1111
1230
|
* @param {Bip} bip
|
|
1112
1231
|
* @returns {Promise<string>}
|
|
1113
1232
|
*/
|
|
1114
|
-
keyoriginXpub(bip) {
|
|
1115
|
-
_assertClass(bip, Bip);
|
|
1116
|
-
|
|
1117
|
-
|
|
1233
|
+
keyoriginXpub(bip) {
|
|
1234
|
+
_assertClass(bip, Bip);
|
|
1235
|
+
const ret = wasm.jade_keyoriginXpub(this.__wbg_ptr, bip.__wbg_ptr);
|
|
1236
|
+
return ret;
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* @param {string} name
|
|
1240
|
+
* @param {WolletDescriptor} desc
|
|
1241
|
+
* @returns {Promise<boolean>}
|
|
1242
|
+
*/
|
|
1243
|
+
registerDescriptor(name, desc) {
|
|
1244
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1245
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1246
|
+
_assertClass(desc, WolletDescriptor);
|
|
1247
|
+
const ret = wasm.jade_registerDescriptor(this.__wbg_ptr, ptr0, len0, desc.__wbg_ptr);
|
|
1248
|
+
return ret;
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
module.exports.Jade = Jade;
|
|
1252
|
+
|
|
1253
|
+
const JadeWebSocketFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1254
|
+
? { register: () => {}, unregister: () => {} }
|
|
1255
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jadewebsocket_free(ptr >>> 0, 1));
|
|
1256
|
+
/**
|
|
1257
|
+
* WebSocket-based Wrapper of [`asyncr::Jade`]
|
|
1258
|
+
*/
|
|
1259
|
+
class JadeWebSocket {
|
|
1260
|
+
|
|
1261
|
+
static __wrap(ptr) {
|
|
1262
|
+
ptr = ptr >>> 0;
|
|
1263
|
+
const obj = Object.create(JadeWebSocket.prototype);
|
|
1264
|
+
obj.__wbg_ptr = ptr;
|
|
1265
|
+
JadeWebSocketFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1266
|
+
return obj;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
__destroy_into_raw() {
|
|
1270
|
+
const ptr = this.__wbg_ptr;
|
|
1271
|
+
this.__wbg_ptr = 0;
|
|
1272
|
+
JadeWebSocketFinalization.unregister(this);
|
|
1273
|
+
return ptr;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
free() {
|
|
1277
|
+
const ptr = this.__destroy_into_raw();
|
|
1278
|
+
wasm.__wbg_jadewebsocket_free(ptr, 0);
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* Creates a Jade from WebSocket for the given network
|
|
1282
|
+
*
|
|
1283
|
+
* The url should point to your WebSocket bridge that connects to the Docker Jade emulator
|
|
1284
|
+
* @param {Network} network
|
|
1285
|
+
* @param {string} url
|
|
1286
|
+
*/
|
|
1287
|
+
constructor(network, url) {
|
|
1288
|
+
_assertClass(network, Network);
|
|
1289
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1290
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1291
|
+
const ret = wasm.jadewebsocket_from_websocket(network.__wbg_ptr, ptr0, len0);
|
|
1292
|
+
return ret;
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* @returns {Promise<any>}
|
|
1296
|
+
*/
|
|
1297
|
+
getVersion() {
|
|
1298
|
+
const ret = wasm.jadewebsocket_getVersion(this.__wbg_ptr);
|
|
1299
|
+
return ret;
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* @returns {Promise<Xpub>}
|
|
1303
|
+
*/
|
|
1304
|
+
getMasterXpub() {
|
|
1305
|
+
const ret = wasm.jadewebsocket_getMasterXpub(this.__wbg_ptr);
|
|
1306
|
+
return ret;
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Return a single sig address with the given `variant` and `path` derivation
|
|
1310
|
+
* @param {Singlesig} variant
|
|
1311
|
+
* @param {Uint32Array} path
|
|
1312
|
+
* @returns {Promise<string>}
|
|
1313
|
+
*/
|
|
1314
|
+
getReceiveAddressSingle(variant, path) {
|
|
1315
|
+
_assertClass(variant, Singlesig);
|
|
1316
|
+
var ptr0 = variant.__destroy_into_raw();
|
|
1317
|
+
const ptr1 = passArray32ToWasm0(path, wasm.__wbindgen_malloc);
|
|
1318
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1319
|
+
const ret = wasm.jadewebsocket_getReceiveAddressSingle(this.__wbg_ptr, ptr0, ptr1, len1);
|
|
1320
|
+
return ret;
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* Return a multisig address of a registered `multisig_name` wallet
|
|
1324
|
+
*
|
|
1325
|
+
* This method accept `path` and `path_n` in place of a single `Vec<Vec<u32>>` because the
|
|
1326
|
+
* latter is not supported by wasm_bindgen (and neither `(u32, Vec<u32>)`). `path` and `path_n`
|
|
1327
|
+
* are converted internally to a `Vec<Vec<u32>>` with the caveat all the paths are the same,
|
|
1328
|
+
* which is almost always the case.
|
|
1329
|
+
* @param {string} multisig_name
|
|
1330
|
+
* @param {Uint32Array} path
|
|
1331
|
+
* @returns {Promise<string>}
|
|
1332
|
+
*/
|
|
1333
|
+
getReceiveAddressMulti(multisig_name, path) {
|
|
1334
|
+
const ptr0 = passStringToWasm0(multisig_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1335
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1336
|
+
const ptr1 = passArray32ToWasm0(path, wasm.__wbindgen_malloc);
|
|
1337
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1338
|
+
const ret = wasm.jadewebsocket_getReceiveAddressMulti(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1339
|
+
return ret;
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
* Sign and consume the given PSET, returning the signed one
|
|
1343
|
+
* @param {Pset} pset
|
|
1344
|
+
* @returns {Promise<Pset>}
|
|
1345
|
+
*/
|
|
1346
|
+
sign(pset) {
|
|
1347
|
+
_assertClass(pset, Pset);
|
|
1348
|
+
var ptr0 = pset.__destroy_into_raw();
|
|
1349
|
+
const ret = wasm.jadewebsocket_sign(this.__wbg_ptr, ptr0);
|
|
1350
|
+
return ret;
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
* @returns {Promise<WolletDescriptor>}
|
|
1354
|
+
*/
|
|
1355
|
+
wpkh() {
|
|
1356
|
+
const ret = wasm.jadewebsocket_wpkh(this.__wbg_ptr);
|
|
1357
|
+
return ret;
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* @returns {Promise<WolletDescriptor>}
|
|
1361
|
+
*/
|
|
1362
|
+
shWpkh() {
|
|
1363
|
+
const ret = wasm.jadewebsocket_shWpkh(this.__wbg_ptr);
|
|
1364
|
+
return ret;
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* @param {string} name
|
|
1368
|
+
* @returns {Promise<WolletDescriptor>}
|
|
1369
|
+
*/
|
|
1370
|
+
multi(name) {
|
|
1371
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1372
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1373
|
+
const ret = wasm.jadewebsocket_multi(this.__wbg_ptr, ptr0, len0);
|
|
1374
|
+
return ret;
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* @returns {Promise<any>}
|
|
1378
|
+
*/
|
|
1379
|
+
getRegisteredMultisigs() {
|
|
1380
|
+
const ret = wasm.jadewebsocket_getRegisteredMultisigs(this.__wbg_ptr);
|
|
1381
|
+
return ret;
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* @param {Bip} bip
|
|
1385
|
+
* @returns {Promise<string>}
|
|
1386
|
+
*/
|
|
1387
|
+
keyoriginXpub(bip) {
|
|
1388
|
+
_assertClass(bip, Bip);
|
|
1389
|
+
const ret = wasm.jadewebsocket_keyoriginXpub(this.__wbg_ptr, bip.__wbg_ptr);
|
|
1390
|
+
return ret;
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1393
|
+
* @param {string} name
|
|
1394
|
+
* @param {WolletDescriptor} desc
|
|
1395
|
+
* @returns {Promise<boolean>}
|
|
1396
|
+
*/
|
|
1397
|
+
registerDescriptor(name, desc) {
|
|
1398
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1399
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1400
|
+
_assertClass(desc, WolletDescriptor);
|
|
1401
|
+
const ret = wasm.jadewebsocket_registerDescriptor(this.__wbg_ptr, ptr0, len0, desc.__wbg_ptr);
|
|
1402
|
+
return ret;
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
module.exports.JadeWebSocket = JadeWebSocket;
|
|
1406
|
+
|
|
1407
|
+
const LedgerWebFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1408
|
+
? { register: () => {}, unregister: () => {} }
|
|
1409
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ledgerweb_free(ptr >>> 0, 1));
|
|
1410
|
+
|
|
1411
|
+
class LedgerWeb {
|
|
1412
|
+
|
|
1413
|
+
__destroy_into_raw() {
|
|
1414
|
+
const ptr = this.__wbg_ptr;
|
|
1415
|
+
this.__wbg_ptr = 0;
|
|
1416
|
+
LedgerWebFinalization.unregister(this);
|
|
1417
|
+
return ptr;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
free() {
|
|
1421
|
+
const ptr = this.__destroy_into_raw();
|
|
1422
|
+
wasm.__wbg_ledgerweb_free(ptr, 0);
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* hid_device must be already opened
|
|
1426
|
+
* @param {HIDDevice} hid_device
|
|
1427
|
+
* @param {Network} network
|
|
1428
|
+
*/
|
|
1429
|
+
constructor(hid_device, network) {
|
|
1430
|
+
_assertClass(network, Network);
|
|
1431
|
+
const ret = wasm.ledgerweb_new(hid_device, network.__wbg_ptr);
|
|
1432
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1433
|
+
LedgerWebFinalization.register(this, this.__wbg_ptr, this);
|
|
1434
|
+
return this;
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* @returns {Promise<string>}
|
|
1438
|
+
*/
|
|
1439
|
+
getVersion() {
|
|
1440
|
+
const ret = wasm.ledgerweb_getVersion(this.__wbg_ptr);
|
|
1441
|
+
return ret;
|
|
1442
|
+
}
|
|
1443
|
+
/**
|
|
1444
|
+
* @param {string} path
|
|
1445
|
+
* @returns {Promise<string>}
|
|
1446
|
+
*/
|
|
1447
|
+
deriveXpub(path) {
|
|
1448
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1449
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1450
|
+
const ret = wasm.ledgerweb_deriveXpub(this.__wbg_ptr, ptr0, len0);
|
|
1451
|
+
return ret;
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* @returns {Promise<string>}
|
|
1455
|
+
*/
|
|
1456
|
+
slip77MasterBlindingKey() {
|
|
1457
|
+
const ret = wasm.ledgerweb_slip77MasterBlindingKey(this.__wbg_ptr);
|
|
1458
|
+
return ret;
|
|
1459
|
+
}
|
|
1460
|
+
/**
|
|
1461
|
+
* @returns {Promise<string>}
|
|
1462
|
+
*/
|
|
1463
|
+
fingerprint() {
|
|
1464
|
+
const ret = wasm.ledgerweb_fingerprint(this.__wbg_ptr);
|
|
1465
|
+
return ret;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* TODO Should use Signer::wpkh_slip77_descriptor
|
|
1469
|
+
* @returns {Promise<WolletDescriptor>}
|
|
1470
|
+
*/
|
|
1471
|
+
wpkhSlip77Descriptor() {
|
|
1472
|
+
const ret = wasm.ledgerweb_wpkhSlip77Descriptor(this.__wbg_ptr);
|
|
1473
|
+
return ret;
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Sign and consume the given PSET, returning the signed one
|
|
1477
|
+
* @param {Pset} pset
|
|
1478
|
+
* @returns {Promise<Pset>}
|
|
1479
|
+
*/
|
|
1480
|
+
sign(pset) {
|
|
1481
|
+
_assertClass(pset, Pset);
|
|
1482
|
+
var ptr0 = pset.__destroy_into_raw();
|
|
1483
|
+
const ret = wasm.ledgerweb_sign(this.__wbg_ptr, ptr0);
|
|
1118
1484
|
return ret;
|
|
1119
1485
|
}
|
|
1120
1486
|
/**
|
|
1121
|
-
*
|
|
1122
|
-
* @param {
|
|
1123
|
-
* @returns {Promise<
|
|
1487
|
+
* Return a single sig address with the given `variant` and `index`
|
|
1488
|
+
* @param {number} index
|
|
1489
|
+
* @returns {Promise<string>}
|
|
1124
1490
|
*/
|
|
1125
|
-
|
|
1126
|
-
const
|
|
1127
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1128
|
-
_assertClass(desc, WolletDescriptor);
|
|
1129
|
-
const ret = wasm.jade_registerDescriptor(this.__wbg_ptr, ptr0, len0, desc.__wbg_ptr);
|
|
1491
|
+
getReceiveAddressSingle(index) {
|
|
1492
|
+
const ret = wasm.ledgerweb_getReceiveAddressSingle(this.__wbg_ptr, index);
|
|
1130
1493
|
return ret;
|
|
1131
1494
|
}
|
|
1132
1495
|
}
|
|
1133
|
-
module.exports.
|
|
1496
|
+
module.exports.LedgerWeb = LedgerWeb;
|
|
1134
1497
|
|
|
1135
1498
|
const MnemonicFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1136
1499
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1272,7 +1635,7 @@ class Network {
|
|
|
1272
1635
|
return Network.__wrap(ret);
|
|
1273
1636
|
}
|
|
1274
1637
|
/**
|
|
1275
|
-
* Creates the default regtest `Network`
|
|
1638
|
+
* Creates the default regtest `Network` with the policy asset `5ac9f65c0efcc4775e0baec4ec03abdde22473cd3cf33c0419ca290e0751b225`
|
|
1276
1639
|
* @returns {Network}
|
|
1277
1640
|
*/
|
|
1278
1641
|
static regtestDefault() {
|
|
@@ -1293,6 +1656,20 @@ class Network {
|
|
|
1293
1656
|
const ret = wasm.network_isMainnet(this.__wbg_ptr);
|
|
1294
1657
|
return ret !== 0;
|
|
1295
1658
|
}
|
|
1659
|
+
/**
|
|
1660
|
+
* @returns {boolean}
|
|
1661
|
+
*/
|
|
1662
|
+
isTestnet() {
|
|
1663
|
+
const ret = wasm.network_isTestnet(this.__wbg_ptr);
|
|
1664
|
+
return ret !== 0;
|
|
1665
|
+
}
|
|
1666
|
+
/**
|
|
1667
|
+
* @returns {boolean}
|
|
1668
|
+
*/
|
|
1669
|
+
isRegtest() {
|
|
1670
|
+
const ret = wasm.network_isRegtest(this.__wbg_ptr);
|
|
1671
|
+
return ret !== 0;
|
|
1672
|
+
}
|
|
1296
1673
|
/**
|
|
1297
1674
|
* @returns {string}
|
|
1298
1675
|
*/
|
|
@@ -1587,7 +1964,7 @@ class Pset {
|
|
|
1587
1964
|
}
|
|
1588
1965
|
}
|
|
1589
1966
|
/**
|
|
1590
|
-
* @returns {
|
|
1967
|
+
* @returns {PsetInput[]}
|
|
1591
1968
|
*/
|
|
1592
1969
|
inputs() {
|
|
1593
1970
|
const ret = wasm.pset_inputs(this.__wbg_ptr);
|
|
@@ -1595,6 +1972,15 @@ class Pset {
|
|
|
1595
1972
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1596
1973
|
return v1;
|
|
1597
1974
|
}
|
|
1975
|
+
/**
|
|
1976
|
+
* @returns {PsetOutput[]}
|
|
1977
|
+
*/
|
|
1978
|
+
outputs() {
|
|
1979
|
+
const ret = wasm.pset_outputs(this.__wbg_ptr);
|
|
1980
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1981
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1982
|
+
return v1;
|
|
1983
|
+
}
|
|
1598
1984
|
}
|
|
1599
1985
|
module.exports.Pset = Pset;
|
|
1600
1986
|
|
|
@@ -1644,7 +2030,7 @@ class PsetBalance {
|
|
|
1644
2030
|
return takeFromExternrefTable0(ret[0]);
|
|
1645
2031
|
}
|
|
1646
2032
|
/**
|
|
1647
|
-
* @returns {
|
|
2033
|
+
* @returns {Recipient[]}
|
|
1648
2034
|
*/
|
|
1649
2035
|
recipients() {
|
|
1650
2036
|
const ret = wasm.psetbalance_recipients(this.__wbg_ptr);
|
|
@@ -1691,7 +2077,7 @@ class PsetDetails {
|
|
|
1691
2077
|
}
|
|
1692
2078
|
/**
|
|
1693
2079
|
* For each input existing or missing signatures
|
|
1694
|
-
* @returns {
|
|
2080
|
+
* @returns {PsetSignatures[]}
|
|
1695
2081
|
*/
|
|
1696
2082
|
signatures() {
|
|
1697
2083
|
const ret = wasm.psetdetails_signatures(this.__wbg_ptr);
|
|
@@ -1700,7 +2086,7 @@ class PsetDetails {
|
|
|
1700
2086
|
return v1;
|
|
1701
2087
|
}
|
|
1702
2088
|
/**
|
|
1703
|
-
* @returns {
|
|
2089
|
+
* @returns {string[]}
|
|
1704
2090
|
*/
|
|
1705
2091
|
fingerprintsMissing() {
|
|
1706
2092
|
const ret = wasm.psetdetails_fingerprintsMissing(this.__wbg_ptr);
|
|
@@ -1709,7 +2095,7 @@ class PsetDetails {
|
|
|
1709
2095
|
return v1;
|
|
1710
2096
|
}
|
|
1711
2097
|
/**
|
|
1712
|
-
* @returns {
|
|
2098
|
+
* @returns {string[]}
|
|
1713
2099
|
*/
|
|
1714
2100
|
fingerprintsHas() {
|
|
1715
2101
|
const ret = wasm.psetdetails_fingerprintsHas(this.__wbg_ptr);
|
|
@@ -1719,7 +2105,7 @@ class PsetDetails {
|
|
|
1719
2105
|
}
|
|
1720
2106
|
/**
|
|
1721
2107
|
* Return an element for every input that could possibly be a issuance or a reissuance
|
|
1722
|
-
* @returns {
|
|
2108
|
+
* @returns {Issuance[]}
|
|
1723
2109
|
*/
|
|
1724
2110
|
inputsIssuances() {
|
|
1725
2111
|
const ret = wasm.psetdetails_inputsIssuances(this.__wbg_ptr);
|
|
@@ -1792,6 +2178,43 @@ class PsetInput {
|
|
|
1792
2178
|
}
|
|
1793
2179
|
module.exports.PsetInput = PsetInput;
|
|
1794
2180
|
|
|
2181
|
+
const PsetOutputFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2182
|
+
? { register: () => {}, unregister: () => {} }
|
|
2183
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_psetoutput_free(ptr >>> 0, 1));
|
|
2184
|
+
/**
|
|
2185
|
+
* PSET output
|
|
2186
|
+
*/
|
|
2187
|
+
class PsetOutput {
|
|
2188
|
+
|
|
2189
|
+
static __wrap(ptr) {
|
|
2190
|
+
ptr = ptr >>> 0;
|
|
2191
|
+
const obj = Object.create(PsetOutput.prototype);
|
|
2192
|
+
obj.__wbg_ptr = ptr;
|
|
2193
|
+
PsetOutputFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2194
|
+
return obj;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
__destroy_into_raw() {
|
|
2198
|
+
const ptr = this.__wbg_ptr;
|
|
2199
|
+
this.__wbg_ptr = 0;
|
|
2200
|
+
PsetOutputFinalization.unregister(this);
|
|
2201
|
+
return ptr;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
free() {
|
|
2205
|
+
const ptr = this.__destroy_into_raw();
|
|
2206
|
+
wasm.__wbg_psetoutput_free(ptr, 0);
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* @returns {Script}
|
|
2210
|
+
*/
|
|
2211
|
+
script_pubkey() {
|
|
2212
|
+
const ret = wasm.psetoutput_script_pubkey(this.__wbg_ptr);
|
|
2213
|
+
return Script.__wrap(ret);
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
module.exports.PsetOutput = PsetOutput;
|
|
2217
|
+
|
|
1795
2218
|
const PsetSignaturesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1796
2219
|
? { register: () => {}, unregister: () => {} }
|
|
1797
2220
|
: new FinalizationRegistry(ptr => wasm.__wbg_psetsignatures_free(ptr >>> 0, 1));
|
|
@@ -1895,6 +2318,128 @@ class Recipient {
|
|
|
1895
2318
|
}
|
|
1896
2319
|
module.exports.Recipient = Recipient;
|
|
1897
2320
|
|
|
2321
|
+
const RegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2322
|
+
? { register: () => {}, unregister: () => {} }
|
|
2323
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_registry_free(ptr >>> 0, 1));
|
|
2324
|
+
|
|
2325
|
+
class Registry {
|
|
2326
|
+
|
|
2327
|
+
static __wrap(ptr) {
|
|
2328
|
+
ptr = ptr >>> 0;
|
|
2329
|
+
const obj = Object.create(Registry.prototype);
|
|
2330
|
+
obj.__wbg_ptr = ptr;
|
|
2331
|
+
RegistryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2332
|
+
return obj;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
__destroy_into_raw() {
|
|
2336
|
+
const ptr = this.__wbg_ptr;
|
|
2337
|
+
this.__wbg_ptr = 0;
|
|
2338
|
+
RegistryFinalization.unregister(this);
|
|
2339
|
+
return ptr;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
free() {
|
|
2343
|
+
const ptr = this.__destroy_into_raw();
|
|
2344
|
+
wasm.__wbg_registry_free(ptr, 0);
|
|
2345
|
+
}
|
|
2346
|
+
/**
|
|
2347
|
+
* @param {string} url
|
|
2348
|
+
* @returns {Registry}
|
|
2349
|
+
*/
|
|
2350
|
+
static new(url) {
|
|
2351
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2352
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2353
|
+
const ret = wasm.registry_new(ptr0, len0);
|
|
2354
|
+
if (ret[2]) {
|
|
2355
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2356
|
+
}
|
|
2357
|
+
return Registry.__wrap(ret[0]);
|
|
2358
|
+
}
|
|
2359
|
+
/**
|
|
2360
|
+
* @param {Network} network
|
|
2361
|
+
* @returns {Registry}
|
|
2362
|
+
*/
|
|
2363
|
+
static defaultForNetwork(network) {
|
|
2364
|
+
_assertClass(network, Network);
|
|
2365
|
+
const ret = wasm.registry_defaultForNetwork(network.__wbg_ptr);
|
|
2366
|
+
if (ret[2]) {
|
|
2367
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2368
|
+
}
|
|
2369
|
+
return Registry.__wrap(ret[0]);
|
|
2370
|
+
}
|
|
2371
|
+
/**
|
|
2372
|
+
* @param {AssetId} asset_id
|
|
2373
|
+
* @param {EsploraClient} client
|
|
2374
|
+
* @returns {Promise<AssetMeta>}
|
|
2375
|
+
*/
|
|
2376
|
+
fetchWithTx(asset_id, client) {
|
|
2377
|
+
_assertClass(asset_id, AssetId);
|
|
2378
|
+
_assertClass(client, EsploraClient);
|
|
2379
|
+
const ret = wasm.registry_fetchWithTx(this.__wbg_ptr, asset_id.__wbg_ptr, client.__wbg_ptr);
|
|
2380
|
+
return ret;
|
|
2381
|
+
}
|
|
2382
|
+
/**
|
|
2383
|
+
* @param {RegistryPost} data
|
|
2384
|
+
* @returns {Promise<void>}
|
|
2385
|
+
*/
|
|
2386
|
+
post(data) {
|
|
2387
|
+
_assertClass(data, RegistryPost);
|
|
2388
|
+
const ret = wasm.registry_post(this.__wbg_ptr, data.__wbg_ptr);
|
|
2389
|
+
return ret;
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
module.exports.Registry = Registry;
|
|
2393
|
+
|
|
2394
|
+
const RegistryPostFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2395
|
+
? { register: () => {}, unregister: () => {} }
|
|
2396
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_registrypost_free(ptr >>> 0, 1));
|
|
2397
|
+
|
|
2398
|
+
class RegistryPost {
|
|
2399
|
+
|
|
2400
|
+
__destroy_into_raw() {
|
|
2401
|
+
const ptr = this.__wbg_ptr;
|
|
2402
|
+
this.__wbg_ptr = 0;
|
|
2403
|
+
RegistryPostFinalization.unregister(this);
|
|
2404
|
+
return ptr;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
free() {
|
|
2408
|
+
const ptr = this.__destroy_into_raw();
|
|
2409
|
+
wasm.__wbg_registrypost_free(ptr, 0);
|
|
2410
|
+
}
|
|
2411
|
+
/**
|
|
2412
|
+
* @param {Contract} contract
|
|
2413
|
+
* @param {AssetId} asset_id
|
|
2414
|
+
*/
|
|
2415
|
+
constructor(contract, asset_id) {
|
|
2416
|
+
_assertClass(contract, Contract);
|
|
2417
|
+
var ptr0 = contract.__destroy_into_raw();
|
|
2418
|
+
_assertClass(asset_id, AssetId);
|
|
2419
|
+
var ptr1 = asset_id.__destroy_into_raw();
|
|
2420
|
+
const ret = wasm.registrypost_new(ptr0, ptr1);
|
|
2421
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2422
|
+
RegistryPostFinalization.register(this, this.__wbg_ptr, this);
|
|
2423
|
+
return this;
|
|
2424
|
+
}
|
|
2425
|
+
/**
|
|
2426
|
+
* @returns {string}
|
|
2427
|
+
*/
|
|
2428
|
+
toString() {
|
|
2429
|
+
let deferred1_0;
|
|
2430
|
+
let deferred1_1;
|
|
2431
|
+
try {
|
|
2432
|
+
const ret = wasm.registrypost_toString(this.__wbg_ptr);
|
|
2433
|
+
deferred1_0 = ret[0];
|
|
2434
|
+
deferred1_1 = ret[1];
|
|
2435
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2436
|
+
} finally {
|
|
2437
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
module.exports.RegistryPost = RegistryPost;
|
|
2442
|
+
|
|
1898
2443
|
const ScriptFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1899
2444
|
? { register: () => {}, unregister: () => {} }
|
|
1900
2445
|
: new FinalizationRegistry(ptr => wasm.__wbg_script_free(ptr >>> 0, 1));
|
|
@@ -2028,6 +2573,31 @@ class Signer {
|
|
|
2028
2573
|
}
|
|
2029
2574
|
return Pset.__wrap(ret[0]);
|
|
2030
2575
|
}
|
|
2576
|
+
/**
|
|
2577
|
+
* Sign a message with the master key, return the signature as a base64 string
|
|
2578
|
+
* @param {string} message
|
|
2579
|
+
* @returns {string}
|
|
2580
|
+
*/
|
|
2581
|
+
signMessage(message) {
|
|
2582
|
+
let deferred3_0;
|
|
2583
|
+
let deferred3_1;
|
|
2584
|
+
try {
|
|
2585
|
+
const ptr0 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2586
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2587
|
+
const ret = wasm.signer_signMessage(this.__wbg_ptr, ptr0, len0);
|
|
2588
|
+
var ptr2 = ret[0];
|
|
2589
|
+
var len2 = ret[1];
|
|
2590
|
+
if (ret[3]) {
|
|
2591
|
+
ptr2 = 0; len2 = 0;
|
|
2592
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2593
|
+
}
|
|
2594
|
+
deferred3_0 = ptr2;
|
|
2595
|
+
deferred3_1 = len2;
|
|
2596
|
+
return getStringFromWasm0(ptr2, len2);
|
|
2597
|
+
} finally {
|
|
2598
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
2599
|
+
}
|
|
2600
|
+
}
|
|
2031
2601
|
/**
|
|
2032
2602
|
* @returns {WolletDescriptor}
|
|
2033
2603
|
*/
|
|
@@ -2053,23 +2623,22 @@ class Signer {
|
|
|
2053
2623
|
* @returns {string}
|
|
2054
2624
|
*/
|
|
2055
2625
|
keyoriginXpub(bip) {
|
|
2056
|
-
let
|
|
2057
|
-
let
|
|
2626
|
+
let deferred2_0;
|
|
2627
|
+
let deferred2_1;
|
|
2058
2628
|
try {
|
|
2059
2629
|
_assertClass(bip, Bip);
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
var
|
|
2063
|
-
var len2 = ret[1];
|
|
2630
|
+
const ret = wasm.signer_keyoriginXpub(this.__wbg_ptr, bip.__wbg_ptr);
|
|
2631
|
+
var ptr1 = ret[0];
|
|
2632
|
+
var len1 = ret[1];
|
|
2064
2633
|
if (ret[3]) {
|
|
2065
|
-
|
|
2634
|
+
ptr1 = 0; len1 = 0;
|
|
2066
2635
|
throw takeFromExternrefTable0(ret[2]);
|
|
2067
2636
|
}
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
return getStringFromWasm0(
|
|
2637
|
+
deferred2_0 = ptr1;
|
|
2638
|
+
deferred2_1 = len1;
|
|
2639
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2071
2640
|
} finally {
|
|
2072
|
-
wasm.__wbindgen_free(
|
|
2641
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2073
2642
|
}
|
|
2074
2643
|
}
|
|
2075
2644
|
/**
|
|
@@ -2324,7 +2893,7 @@ class TxBuilder {
|
|
|
2324
2893
|
}
|
|
2325
2894
|
/**
|
|
2326
2895
|
* Set the fee rate
|
|
2327
|
-
* @param {number |
|
|
2896
|
+
* @param {number | null} [fee_rate]
|
|
2328
2897
|
* @returns {TxBuilder}
|
|
2329
2898
|
*/
|
|
2330
2899
|
feeRate(fee_rate) {
|
|
@@ -2404,10 +2973,10 @@ class TxBuilder {
|
|
|
2404
2973
|
/**
|
|
2405
2974
|
* Issue an asset, wrapper of [`lwk_wollet::TxBuilder::issue_asset()`]
|
|
2406
2975
|
* @param {bigint} asset_sats
|
|
2407
|
-
* @param {Address | undefined} asset_receiver
|
|
2976
|
+
* @param {Address | null | undefined} asset_receiver
|
|
2408
2977
|
* @param {bigint} token_sats
|
|
2409
|
-
* @param {Address |
|
|
2410
|
-
* @param {Contract |
|
|
2978
|
+
* @param {Address | null} [token_receiver]
|
|
2979
|
+
* @param {Contract | null} [contract]
|
|
2411
2980
|
* @returns {TxBuilder}
|
|
2412
2981
|
*/
|
|
2413
2982
|
issueAsset(asset_sats, asset_receiver, token_sats, token_receiver, contract) {
|
|
@@ -2437,8 +3006,8 @@ class TxBuilder {
|
|
|
2437
3006
|
* Reissue an asset, wrapper of [`lwk_wollet::TxBuilder::reissue_asset()`]
|
|
2438
3007
|
* @param {AssetId} asset_to_reissue
|
|
2439
3008
|
* @param {bigint} satoshi_to_reissue
|
|
2440
|
-
* @param {Address |
|
|
2441
|
-
* @param {Transaction |
|
|
3009
|
+
* @param {Address | null} [asset_receiver]
|
|
3010
|
+
* @param {Transaction | null} [issuance_tx]
|
|
2442
3011
|
* @returns {TxBuilder}
|
|
2443
3012
|
*/
|
|
2444
3013
|
reissueAsset(asset_to_reissue, satoshi_to_reissue, asset_receiver, issuance_tx) {
|
|
@@ -2463,7 +3032,7 @@ class TxBuilder {
|
|
|
2463
3032
|
}
|
|
2464
3033
|
/**
|
|
2465
3034
|
* Manual coin selection, wrapper of [`lwk_wollet::TxBuilder::set_wallet_utxos()`]
|
|
2466
|
-
* @param {
|
|
3035
|
+
* @param {OutPoint[]} outpoints
|
|
2467
3036
|
* @returns {TxBuilder}
|
|
2468
3037
|
*/
|
|
2469
3038
|
setWalletUtxos(outpoints) {
|
|
@@ -2488,6 +3057,41 @@ class TxBuilder {
|
|
|
2488
3057
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2489
3058
|
}
|
|
2490
3059
|
}
|
|
3060
|
+
/**
|
|
3061
|
+
* @param {OutPoint} utxo
|
|
3062
|
+
* @param {Address} address
|
|
3063
|
+
* @param {bigint} satoshi
|
|
3064
|
+
* @param {AssetId} asset_id
|
|
3065
|
+
* @returns {TxBuilder}
|
|
3066
|
+
*/
|
|
3067
|
+
liquidexMake(utxo, address, satoshi, asset_id) {
|
|
3068
|
+
const ptr = this.__destroy_into_raw();
|
|
3069
|
+
_assertClass(utxo, OutPoint);
|
|
3070
|
+
var ptr0 = utxo.__destroy_into_raw();
|
|
3071
|
+
_assertClass(address, Address);
|
|
3072
|
+
var ptr1 = address.__destroy_into_raw();
|
|
3073
|
+
_assertClass(asset_id, AssetId);
|
|
3074
|
+
var ptr2 = asset_id.__destroy_into_raw();
|
|
3075
|
+
const ret = wasm.txbuilder_liquidexMake(ptr, ptr0, ptr1, satoshi, ptr2);
|
|
3076
|
+
if (ret[2]) {
|
|
3077
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3078
|
+
}
|
|
3079
|
+
return TxBuilder.__wrap(ret[0]);
|
|
3080
|
+
}
|
|
3081
|
+
/**
|
|
3082
|
+
* @param {ValidatedLiquidexProposal[]} proposals
|
|
3083
|
+
* @returns {TxBuilder}
|
|
3084
|
+
*/
|
|
3085
|
+
liquidexTake(proposals) {
|
|
3086
|
+
const ptr = this.__destroy_into_raw();
|
|
3087
|
+
const ptr0 = passArrayJsValueToWasm0(proposals, wasm.__wbindgen_malloc);
|
|
3088
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3089
|
+
const ret = wasm.txbuilder_liquidexTake(ptr, ptr0, len0);
|
|
3090
|
+
if (ret[2]) {
|
|
3091
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3092
|
+
}
|
|
3093
|
+
return TxBuilder.__wrap(ret[0]);
|
|
3094
|
+
}
|
|
2491
3095
|
}
|
|
2492
3096
|
module.exports.TxBuilder = TxBuilder;
|
|
2493
3097
|
|
|
@@ -2550,11 +3154,73 @@ class TxOutSecrets {
|
|
|
2550
3154
|
/**
|
|
2551
3155
|
* @returns {string}
|
|
2552
3156
|
*/
|
|
2553
|
-
valueBlindingFactor() {
|
|
3157
|
+
valueBlindingFactor() {
|
|
3158
|
+
let deferred1_0;
|
|
3159
|
+
let deferred1_1;
|
|
3160
|
+
try {
|
|
3161
|
+
const ret = wasm.txoutsecrets_valueBlindingFactor(this.__wbg_ptr);
|
|
3162
|
+
deferred1_0 = ret[0];
|
|
3163
|
+
deferred1_1 = ret[1];
|
|
3164
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3165
|
+
} finally {
|
|
3166
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
module.exports.TxOutSecrets = TxOutSecrets;
|
|
3171
|
+
|
|
3172
|
+
const TxidFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3173
|
+
? { register: () => {}, unregister: () => {} }
|
|
3174
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_txid_free(ptr >>> 0, 1));
|
|
3175
|
+
/**
|
|
3176
|
+
* A valid transaction identifier.
|
|
3177
|
+
*
|
|
3178
|
+
* 32 bytes encoded as hex string.
|
|
3179
|
+
*/
|
|
3180
|
+
class Txid {
|
|
3181
|
+
|
|
3182
|
+
static __wrap(ptr) {
|
|
3183
|
+
ptr = ptr >>> 0;
|
|
3184
|
+
const obj = Object.create(Txid.prototype);
|
|
3185
|
+
obj.__wbg_ptr = ptr;
|
|
3186
|
+
TxidFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3187
|
+
return obj;
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
__destroy_into_raw() {
|
|
3191
|
+
const ptr = this.__wbg_ptr;
|
|
3192
|
+
this.__wbg_ptr = 0;
|
|
3193
|
+
TxidFinalization.unregister(this);
|
|
3194
|
+
return ptr;
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
free() {
|
|
3198
|
+
const ptr = this.__destroy_into_raw();
|
|
3199
|
+
wasm.__wbg_txid_free(ptr, 0);
|
|
3200
|
+
}
|
|
3201
|
+
/**
|
|
3202
|
+
* Creates a `Txid`
|
|
3203
|
+
* @param {string} tx_id
|
|
3204
|
+
*/
|
|
3205
|
+
constructor(tx_id) {
|
|
3206
|
+
const ptr0 = passStringToWasm0(tx_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3207
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3208
|
+
const ret = wasm.txid_new(ptr0, len0);
|
|
3209
|
+
if (ret[2]) {
|
|
3210
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3211
|
+
}
|
|
3212
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
3213
|
+
TxidFinalization.register(this, this.__wbg_ptr, this);
|
|
3214
|
+
return this;
|
|
3215
|
+
}
|
|
3216
|
+
/**
|
|
3217
|
+
* @returns {string}
|
|
3218
|
+
*/
|
|
3219
|
+
toString() {
|
|
2554
3220
|
let deferred1_0;
|
|
2555
3221
|
let deferred1_1;
|
|
2556
3222
|
try {
|
|
2557
|
-
const ret = wasm.
|
|
3223
|
+
const ret = wasm.txid_toString(this.__wbg_ptr);
|
|
2558
3224
|
deferred1_0 = ret[0];
|
|
2559
3225
|
deferred1_1 = ret[1];
|
|
2560
3226
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -2563,51 +3229,85 @@ class TxOutSecrets {
|
|
|
2563
3229
|
}
|
|
2564
3230
|
}
|
|
2565
3231
|
}
|
|
2566
|
-
module.exports.
|
|
3232
|
+
module.exports.Txid = Txid;
|
|
2567
3233
|
|
|
2568
|
-
const
|
|
3234
|
+
const UnvalidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2569
3235
|
? { register: () => {}, unregister: () => {} }
|
|
2570
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
3236
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_unvalidatedliquidexproposal_free(ptr >>> 0, 1));
|
|
2571
3237
|
/**
|
|
2572
|
-
*
|
|
2573
|
-
*
|
|
2574
|
-
* 32 bytes encoded as hex string.
|
|
3238
|
+
* Wrapper of [`lwk_wollet::LiquidexProposal<Unvalidated>`]
|
|
2575
3239
|
*/
|
|
2576
|
-
class
|
|
3240
|
+
class UnvalidatedLiquidexProposal {
|
|
2577
3241
|
|
|
2578
3242
|
static __wrap(ptr) {
|
|
2579
3243
|
ptr = ptr >>> 0;
|
|
2580
|
-
const obj = Object.create(
|
|
3244
|
+
const obj = Object.create(UnvalidatedLiquidexProposal.prototype);
|
|
2581
3245
|
obj.__wbg_ptr = ptr;
|
|
2582
|
-
|
|
3246
|
+
UnvalidatedLiquidexProposalFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2583
3247
|
return obj;
|
|
2584
3248
|
}
|
|
2585
3249
|
|
|
2586
3250
|
__destroy_into_raw() {
|
|
2587
3251
|
const ptr = this.__wbg_ptr;
|
|
2588
3252
|
this.__wbg_ptr = 0;
|
|
2589
|
-
|
|
3253
|
+
UnvalidatedLiquidexProposalFinalization.unregister(this);
|
|
2590
3254
|
return ptr;
|
|
2591
3255
|
}
|
|
2592
3256
|
|
|
2593
3257
|
free() {
|
|
2594
3258
|
const ptr = this.__destroy_into_raw();
|
|
2595
|
-
wasm.
|
|
3259
|
+
wasm.__wbg_unvalidatedliquidexproposal_free(ptr, 0);
|
|
2596
3260
|
}
|
|
2597
3261
|
/**
|
|
2598
|
-
*
|
|
2599
|
-
* @
|
|
3262
|
+
* @param {string} s
|
|
3263
|
+
* @returns {UnvalidatedLiquidexProposal}
|
|
2600
3264
|
*/
|
|
2601
|
-
|
|
2602
|
-
const ptr0 = passStringToWasm0(
|
|
3265
|
+
static new(s) {
|
|
3266
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2603
3267
|
const len0 = WASM_VECTOR_LEN;
|
|
2604
|
-
const ret = wasm.
|
|
3268
|
+
const ret = wasm.unvalidatedliquidexproposal_new(ptr0, len0);
|
|
2605
3269
|
if (ret[2]) {
|
|
2606
3270
|
throw takeFromExternrefTable0(ret[1]);
|
|
2607
3271
|
}
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
3272
|
+
return UnvalidatedLiquidexProposal.__wrap(ret[0]);
|
|
3273
|
+
}
|
|
3274
|
+
/**
|
|
3275
|
+
* @param {Pset} pset
|
|
3276
|
+
* @returns {UnvalidatedLiquidexProposal}
|
|
3277
|
+
*/
|
|
3278
|
+
static from_pset(pset) {
|
|
3279
|
+
_assertClass(pset, Pset);
|
|
3280
|
+
var ptr0 = pset.__destroy_into_raw();
|
|
3281
|
+
const ret = wasm.unvalidatedliquidexproposal_from_pset(ptr0);
|
|
3282
|
+
if (ret[2]) {
|
|
3283
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3284
|
+
}
|
|
3285
|
+
return UnvalidatedLiquidexProposal.__wrap(ret[0]);
|
|
3286
|
+
}
|
|
3287
|
+
/**
|
|
3288
|
+
* @returns {ValidatedLiquidexProposal}
|
|
3289
|
+
*/
|
|
3290
|
+
insecure_validate() {
|
|
3291
|
+
const ptr = this.__destroy_into_raw();
|
|
3292
|
+
const ret = wasm.unvalidatedliquidexproposal_insecure_validate(ptr);
|
|
3293
|
+
if (ret[2]) {
|
|
3294
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3295
|
+
}
|
|
3296
|
+
return ValidatedLiquidexProposal.__wrap(ret[0]);
|
|
3297
|
+
}
|
|
3298
|
+
/**
|
|
3299
|
+
* @param {Transaction} tx
|
|
3300
|
+
* @returns {ValidatedLiquidexProposal}
|
|
3301
|
+
*/
|
|
3302
|
+
validate(tx) {
|
|
3303
|
+
const ptr = this.__destroy_into_raw();
|
|
3304
|
+
_assertClass(tx, Transaction);
|
|
3305
|
+
var ptr0 = tx.__destroy_into_raw();
|
|
3306
|
+
const ret = wasm.unvalidatedliquidexproposal_validate(ptr, ptr0);
|
|
3307
|
+
if (ret[2]) {
|
|
3308
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3309
|
+
}
|
|
3310
|
+
return ValidatedLiquidexProposal.__wrap(ret[0]);
|
|
2611
3311
|
}
|
|
2612
3312
|
/**
|
|
2613
3313
|
* @returns {string}
|
|
@@ -2616,7 +3316,7 @@ class Txid {
|
|
|
2616
3316
|
let deferred1_0;
|
|
2617
3317
|
let deferred1_1;
|
|
2618
3318
|
try {
|
|
2619
|
-
const ret = wasm.
|
|
3319
|
+
const ret = wasm.unvalidatedliquidexproposal_toString(this.__wbg_ptr);
|
|
2620
3320
|
deferred1_0 = ret[0];
|
|
2621
3321
|
deferred1_1 = ret[1];
|
|
2622
3322
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -2625,7 +3325,7 @@ class Txid {
|
|
|
2625
3325
|
}
|
|
2626
3326
|
}
|
|
2627
3327
|
}
|
|
2628
|
-
module.exports.
|
|
3328
|
+
module.exports.UnvalidatedLiquidexProposal = UnvalidatedLiquidexProposal;
|
|
2629
3329
|
|
|
2630
3330
|
const UpdateFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2631
3331
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2736,6 +3436,72 @@ class Update {
|
|
|
2736
3436
|
}
|
|
2737
3437
|
module.exports.Update = Update;
|
|
2738
3438
|
|
|
3439
|
+
const ValidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3440
|
+
? { register: () => {}, unregister: () => {} }
|
|
3441
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_validatedliquidexproposal_free(ptr >>> 0, 1));
|
|
3442
|
+
/**
|
|
3443
|
+
* Wrapper of [`lwk_wollet::LiquidexProposal<Validated>`]
|
|
3444
|
+
*/
|
|
3445
|
+
class ValidatedLiquidexProposal {
|
|
3446
|
+
|
|
3447
|
+
static __wrap(ptr) {
|
|
3448
|
+
ptr = ptr >>> 0;
|
|
3449
|
+
const obj = Object.create(ValidatedLiquidexProposal.prototype);
|
|
3450
|
+
obj.__wbg_ptr = ptr;
|
|
3451
|
+
ValidatedLiquidexProposalFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3452
|
+
return obj;
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
static __unwrap(jsValue) {
|
|
3456
|
+
if (!(jsValue instanceof ValidatedLiquidexProposal)) {
|
|
3457
|
+
return 0;
|
|
3458
|
+
}
|
|
3459
|
+
return jsValue.__destroy_into_raw();
|
|
3460
|
+
}
|
|
3461
|
+
|
|
3462
|
+
__destroy_into_raw() {
|
|
3463
|
+
const ptr = this.__wbg_ptr;
|
|
3464
|
+
this.__wbg_ptr = 0;
|
|
3465
|
+
ValidatedLiquidexProposalFinalization.unregister(this);
|
|
3466
|
+
return ptr;
|
|
3467
|
+
}
|
|
3468
|
+
|
|
3469
|
+
free() {
|
|
3470
|
+
const ptr = this.__destroy_into_raw();
|
|
3471
|
+
wasm.__wbg_validatedliquidexproposal_free(ptr, 0);
|
|
3472
|
+
}
|
|
3473
|
+
/**
|
|
3474
|
+
* @returns {AssetAmount}
|
|
3475
|
+
*/
|
|
3476
|
+
input() {
|
|
3477
|
+
const ret = wasm.validatedliquidexproposal_input(this.__wbg_ptr);
|
|
3478
|
+
return AssetAmount.__wrap(ret);
|
|
3479
|
+
}
|
|
3480
|
+
/**
|
|
3481
|
+
* @returns {AssetAmount}
|
|
3482
|
+
*/
|
|
3483
|
+
output() {
|
|
3484
|
+
const ret = wasm.validatedliquidexproposal_output(this.__wbg_ptr);
|
|
3485
|
+
return AssetAmount.__wrap(ret);
|
|
3486
|
+
}
|
|
3487
|
+
/**
|
|
3488
|
+
* @returns {string}
|
|
3489
|
+
*/
|
|
3490
|
+
toString() {
|
|
3491
|
+
let deferred1_0;
|
|
3492
|
+
let deferred1_1;
|
|
3493
|
+
try {
|
|
3494
|
+
const ret = wasm.validatedliquidexproposal_toString(this.__wbg_ptr);
|
|
3495
|
+
deferred1_0 = ret[0];
|
|
3496
|
+
deferred1_1 = ret[1];
|
|
3497
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3498
|
+
} finally {
|
|
3499
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
module.exports.ValidatedLiquidexProposal = ValidatedLiquidexProposal;
|
|
3504
|
+
|
|
2739
3505
|
const WalletTxFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2740
3506
|
? { register: () => {}, unregister: () => {} }
|
|
2741
3507
|
: new FinalizationRegistry(ptr => wasm.__wbg_wallettx_free(ptr >>> 0, 1));
|
|
@@ -2824,7 +3590,7 @@ class WalletTx {
|
|
|
2824
3590
|
return ret === 0x100000001 ? undefined : ret;
|
|
2825
3591
|
}
|
|
2826
3592
|
/**
|
|
2827
|
-
* @returns {
|
|
3593
|
+
* @returns {OptionWalletTxOut[]}
|
|
2828
3594
|
*/
|
|
2829
3595
|
inputs() {
|
|
2830
3596
|
const ret = wasm.wallettx_inputs(this.__wbg_ptr);
|
|
@@ -2833,7 +3599,7 @@ class WalletTx {
|
|
|
2833
3599
|
return v1;
|
|
2834
3600
|
}
|
|
2835
3601
|
/**
|
|
2836
|
-
* @returns {
|
|
3602
|
+
* @returns {OptionWalletTxOut[]}
|
|
2837
3603
|
*/
|
|
2838
3604
|
outputs() {
|
|
2839
3605
|
const ret = wasm.wallettx_outputs(this.__wbg_ptr);
|
|
@@ -2981,7 +3747,7 @@ class Wollet {
|
|
|
2981
3747
|
*
|
|
2982
3748
|
* If Some return the address at the given index,
|
|
2983
3749
|
* otherwise the last unused address.
|
|
2984
|
-
* @param {number |
|
|
3750
|
+
* @param {number | null} [index]
|
|
2985
3751
|
* @returns {AddressResult}
|
|
2986
3752
|
*/
|
|
2987
3753
|
address(index) {
|
|
@@ -3025,7 +3791,7 @@ class Wollet {
|
|
|
3025
3791
|
return takeFromExternrefTable0(ret[0]);
|
|
3026
3792
|
}
|
|
3027
3793
|
/**
|
|
3028
|
-
* @returns {
|
|
3794
|
+
* @returns {WalletTx[]}
|
|
3029
3795
|
*/
|
|
3030
3796
|
transactions() {
|
|
3031
3797
|
const ret = wasm.wollet_transactions(this.__wbg_ptr);
|
|
@@ -3038,7 +3804,7 @@ class Wollet {
|
|
|
3038
3804
|
}
|
|
3039
3805
|
/**
|
|
3040
3806
|
* Get the unspent transaction outputs of the wallet
|
|
3041
|
-
* @returns {
|
|
3807
|
+
* @returns {WalletTxOut[]}
|
|
3042
3808
|
*/
|
|
3043
3809
|
utxos() {
|
|
3044
3810
|
const ret = wasm.wollet_utxos(this.__wbg_ptr);
|
|
@@ -3051,7 +3817,7 @@ class Wollet {
|
|
|
3051
3817
|
}
|
|
3052
3818
|
/**
|
|
3053
3819
|
* Get all the transaction outputs of the wallet, both spent and unspent
|
|
3054
|
-
* @returns {
|
|
3820
|
+
* @returns {WalletTxOut[]}
|
|
3055
3821
|
*/
|
|
3056
3822
|
txos() {
|
|
3057
3823
|
const ret = wasm.wollet_txos(this.__wbg_ptr);
|
|
@@ -3182,7 +3948,7 @@ class WolletDescriptor {
|
|
|
3182
3948
|
}
|
|
3183
3949
|
/**
|
|
3184
3950
|
* @param {number} threshold
|
|
3185
|
-
* @param {
|
|
3951
|
+
* @param {string[]} participants
|
|
3186
3952
|
* @returns {WolletDescriptor}
|
|
3187
3953
|
*/
|
|
3188
3954
|
static newMultiWshSlip77(threshold, participants) {
|
|
@@ -3313,46 +4079,71 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
|
3313
4079
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3314
4080
|
};
|
|
3315
4081
|
|
|
3316
|
-
module.exports.
|
|
4082
|
+
module.exports.__wbg_abort_775ef1d17fc65868 = function(arg0) {
|
|
3317
4083
|
arg0.abort();
|
|
3318
4084
|
};
|
|
3319
4085
|
|
|
3320
|
-
module.exports.
|
|
4086
|
+
module.exports.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3321
4087
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
3322
4088
|
}, arguments) };
|
|
3323
4089
|
|
|
3324
|
-
module.exports.
|
|
4090
|
+
module.exports.__wbg_arrayBuffer_d1b44c4390db422f = function() { return handleError(function (arg0) {
|
|
3325
4091
|
const ret = arg0.arrayBuffer();
|
|
3326
4092
|
return ret;
|
|
3327
4093
|
}, arguments) };
|
|
3328
4094
|
|
|
3329
|
-
module.exports.
|
|
4095
|
+
module.exports.__wbg_assetmeta_new = function(arg0) {
|
|
4096
|
+
const ret = AssetMeta.__wrap(arg0);
|
|
4097
|
+
return ret;
|
|
4098
|
+
};
|
|
4099
|
+
|
|
4100
|
+
module.exports.__wbg_buffer_09165b52af8c5237 = function(arg0) {
|
|
3330
4101
|
const ret = arg0.buffer;
|
|
3331
4102
|
return ret;
|
|
3332
4103
|
};
|
|
3333
4104
|
|
|
3334
|
-
module.exports.
|
|
3335
|
-
const ret = arg0.
|
|
4105
|
+
module.exports.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
4106
|
+
const ret = arg0.buffer;
|
|
3336
4107
|
return ret;
|
|
3337
|
-
}
|
|
4108
|
+
};
|
|
4109
|
+
|
|
4110
|
+
module.exports.__wbg_byteLength_1bdb96d98ab0d871 = function(arg0) {
|
|
4111
|
+
const ret = arg0.byteLength;
|
|
4112
|
+
return ret;
|
|
4113
|
+
};
|
|
3338
4114
|
|
|
3339
|
-
module.exports.
|
|
4115
|
+
module.exports.__wbg_byteOffset_d7656012e66edc5f = function(arg0) {
|
|
4116
|
+
const ret = arg0.byteOffset;
|
|
4117
|
+
return ret;
|
|
4118
|
+
};
|
|
4119
|
+
|
|
4120
|
+
module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
3340
4121
|
const ret = arg0.call(arg1);
|
|
3341
4122
|
return ret;
|
|
3342
4123
|
}, arguments) };
|
|
3343
4124
|
|
|
4125
|
+
module.exports.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
4126
|
+
const ret = arg0.call(arg1, arg2);
|
|
4127
|
+
return ret;
|
|
4128
|
+
}, arguments) };
|
|
4129
|
+
|
|
3344
4130
|
module.exports.__wbg_crypto_ed58b8e10a292839 = function(arg0) {
|
|
3345
4131
|
const ret = arg0.crypto;
|
|
3346
4132
|
return ret;
|
|
3347
4133
|
};
|
|
3348
4134
|
|
|
3349
|
-
module.exports.
|
|
3350
|
-
const ret = arg0.
|
|
4135
|
+
module.exports.__wbg_data_432d9c3df2630942 = function(arg0) {
|
|
4136
|
+
const ret = arg0.data;
|
|
3351
4137
|
return ret;
|
|
3352
4138
|
};
|
|
3353
4139
|
|
|
3354
|
-
module.exports.
|
|
3355
|
-
const ret = arg0.
|
|
4140
|
+
module.exports.__wbg_data_abeb242764125124 = function(arg0) {
|
|
4141
|
+
const ret = arg0.data;
|
|
4142
|
+
return ret;
|
|
4143
|
+
};
|
|
4144
|
+
|
|
4145
|
+
module.exports.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
4146
|
+
const ret = arg0.done;
|
|
3356
4147
|
return ret;
|
|
3357
4148
|
};
|
|
3358
4149
|
|
|
@@ -3361,7 +4152,17 @@ module.exports.__wbg_fetch_4465c2b10f21a927 = function(arg0) {
|
|
|
3361
4152
|
return ret;
|
|
3362
4153
|
};
|
|
3363
4154
|
|
|
3364
|
-
module.exports.
|
|
4155
|
+
module.exports.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
4156
|
+
const ret = arg0.fetch(arg1);
|
|
4157
|
+
return ret;
|
|
4158
|
+
};
|
|
4159
|
+
|
|
4160
|
+
module.exports.__wbg_getDevices_916883032bafc9b1 = function(arg0) {
|
|
4161
|
+
const ret = arg0.getDevices();
|
|
4162
|
+
return ret;
|
|
4163
|
+
};
|
|
4164
|
+
|
|
4165
|
+
module.exports.__wbg_getPorts_5e6efecc826b1a6f = function(arg0) {
|
|
3365
4166
|
const ret = arg0.getPorts();
|
|
3366
4167
|
return ret;
|
|
3367
4168
|
};
|
|
@@ -3370,32 +4171,64 @@ module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return hand
|
|
|
3370
4171
|
arg0.getRandomValues(arg1);
|
|
3371
4172
|
}, arguments) };
|
|
3372
4173
|
|
|
3373
|
-
module.exports.
|
|
3374
|
-
const ret = arg0.
|
|
4174
|
+
module.exports.__wbg_getUint8_749a77380c219f58 = function(arg0, arg1) {
|
|
4175
|
+
const ret = arg0.getUint8(arg1 >>> 0);
|
|
3375
4176
|
return ret;
|
|
3376
|
-
}
|
|
4177
|
+
};
|
|
3377
4178
|
|
|
3378
|
-
module.exports.
|
|
3379
|
-
const ret = arg0
|
|
4179
|
+
module.exports.__wbg_getWriter_6ce182d0adc3f96b = function() { return handleError(function (arg0) {
|
|
4180
|
+
const ret = arg0.getWriter();
|
|
3380
4181
|
return ret;
|
|
3381
|
-
};
|
|
4182
|
+
}, arguments) };
|
|
3382
4183
|
|
|
3383
|
-
module.exports.
|
|
4184
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
3384
4185
|
const ret = Reflect.get(arg0, arg1);
|
|
3385
4186
|
return ret;
|
|
3386
4187
|
}, arguments) };
|
|
3387
4188
|
|
|
3388
|
-
module.exports.
|
|
4189
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
4190
|
+
const ret = arg0[arg1 >>> 0];
|
|
4191
|
+
return ret;
|
|
4192
|
+
};
|
|
4193
|
+
|
|
4194
|
+
module.exports.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {
|
|
3389
4195
|
const ret = Reflect.has(arg0, arg1);
|
|
3390
4196
|
return ret;
|
|
3391
4197
|
}, arguments) };
|
|
3392
4198
|
|
|
3393
|
-
module.exports.
|
|
4199
|
+
module.exports.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
|
|
3394
4200
|
const ret = arg0.headers;
|
|
3395
4201
|
return ret;
|
|
3396
4202
|
};
|
|
3397
4203
|
|
|
3398
|
-
module.exports.
|
|
4204
|
+
module.exports.__wbg_hid_890a1b64f4c510a6 = function(arg0) {
|
|
4205
|
+
const ret = arg0.hid;
|
|
4206
|
+
return ret;
|
|
4207
|
+
};
|
|
4208
|
+
|
|
4209
|
+
module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
4210
|
+
let result;
|
|
4211
|
+
try {
|
|
4212
|
+
result = arg0 instanceof ArrayBuffer;
|
|
4213
|
+
} catch (_) {
|
|
4214
|
+
result = false;
|
|
4215
|
+
}
|
|
4216
|
+
const ret = result;
|
|
4217
|
+
return ret;
|
|
4218
|
+
};
|
|
4219
|
+
|
|
4220
|
+
module.exports.__wbg_instanceof_HidDevice_281d00db95a533c6 = function(arg0) {
|
|
4221
|
+
let result;
|
|
4222
|
+
try {
|
|
4223
|
+
result = arg0 instanceof HIDDevice;
|
|
4224
|
+
} catch (_) {
|
|
4225
|
+
result = false;
|
|
4226
|
+
}
|
|
4227
|
+
const ret = result;
|
|
4228
|
+
return ret;
|
|
4229
|
+
};
|
|
4230
|
+
|
|
4231
|
+
module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
3399
4232
|
let result;
|
|
3400
4233
|
try {
|
|
3401
4234
|
result = arg0 instanceof Response;
|
|
@@ -3406,7 +4239,7 @@ module.exports.__wbg_instanceof_Response_d3453657e10c4300 = function(arg0) {
|
|
|
3406
4239
|
return ret;
|
|
3407
4240
|
};
|
|
3408
4241
|
|
|
3409
|
-
module.exports.
|
|
4242
|
+
module.exports.__wbg_instanceof_SerialPort_cb6aa528c64488f2 = function(arg0) {
|
|
3410
4243
|
let result;
|
|
3411
4244
|
try {
|
|
3412
4245
|
result = arg0 instanceof SerialPort;
|
|
@@ -3417,7 +4250,7 @@ module.exports.__wbg_instanceof_SerialPort_859e0e152f7eb0c4 = function(arg0) {
|
|
|
3417
4250
|
return ret;
|
|
3418
4251
|
};
|
|
3419
4252
|
|
|
3420
|
-
module.exports.
|
|
4253
|
+
module.exports.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
3421
4254
|
let result;
|
|
3422
4255
|
try {
|
|
3423
4256
|
result = arg0 instanceof Window;
|
|
@@ -3428,7 +4261,7 @@ module.exports.__wbg_instanceof_Window_d2514c6a7ee7ba60 = function(arg0) {
|
|
|
3428
4261
|
return ret;
|
|
3429
4262
|
};
|
|
3430
4263
|
|
|
3431
|
-
module.exports.
|
|
4264
|
+
module.exports.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
3432
4265
|
const ret = Array.isArray(arg0);
|
|
3433
4266
|
return ret;
|
|
3434
4267
|
};
|
|
@@ -3438,7 +4271,7 @@ module.exports.__wbg_issuance_new = function(arg0) {
|
|
|
3438
4271
|
return ret;
|
|
3439
4272
|
};
|
|
3440
4273
|
|
|
3441
|
-
module.exports.
|
|
4274
|
+
module.exports.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
3442
4275
|
const ret = Symbol.iterator;
|
|
3443
4276
|
return ret;
|
|
3444
4277
|
};
|
|
@@ -3448,49 +4281,53 @@ module.exports.__wbg_jade_new = function(arg0) {
|
|
|
3448
4281
|
return ret;
|
|
3449
4282
|
};
|
|
3450
4283
|
|
|
3451
|
-
module.exports.
|
|
4284
|
+
module.exports.__wbg_jadewebsocket_new = function(arg0) {
|
|
4285
|
+
const ret = JadeWebSocket.__wrap(arg0);
|
|
4286
|
+
return ret;
|
|
4287
|
+
};
|
|
4288
|
+
|
|
4289
|
+
module.exports.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
3452
4290
|
const ret = arg0.length;
|
|
3453
4291
|
return ret;
|
|
3454
4292
|
};
|
|
3455
4293
|
|
|
3456
|
-
module.exports.
|
|
4294
|
+
module.exports.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
3457
4295
|
const ret = arg0.length;
|
|
3458
4296
|
return ret;
|
|
3459
4297
|
};
|
|
3460
4298
|
|
|
4299
|
+
module.exports.__wbg_log_9366f8b8b59e9e2e = function(arg0, arg1) {
|
|
4300
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
4301
|
+
};
|
|
4302
|
+
|
|
3461
4303
|
module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {
|
|
3462
4304
|
const ret = arg0.msCrypto;
|
|
3463
4305
|
return ret;
|
|
3464
4306
|
};
|
|
3465
4307
|
|
|
3466
|
-
module.exports.
|
|
4308
|
+
module.exports.__wbg_navigator_1577371c070c8947 = function(arg0) {
|
|
3467
4309
|
const ret = arg0.navigator;
|
|
3468
4310
|
return ret;
|
|
3469
4311
|
};
|
|
3470
4312
|
|
|
3471
|
-
module.exports.
|
|
3472
|
-
const ret = new
|
|
3473
|
-
return ret;
|
|
3474
|
-
};
|
|
3475
|
-
|
|
3476
|
-
module.exports.__wbg_new_2deffdefb590e47b = function() { return handleError(function (arg0) {
|
|
3477
|
-
const ret = new ReadableStreamDefaultReader(arg0);
|
|
4313
|
+
module.exports.__wbg_new_018dcc2d6c8c2f6a = function() { return handleError(function () {
|
|
4314
|
+
const ret = new Headers();
|
|
3478
4315
|
return ret;
|
|
3479
4316
|
}, arguments) };
|
|
3480
4317
|
|
|
3481
|
-
module.exports.
|
|
3482
|
-
const ret = new
|
|
4318
|
+
module.exports.__wbg_new_22a36452a23e0e6f = function() { return handleError(function (arg0) {
|
|
4319
|
+
const ret = new ReadableStreamDefaultReader(arg0);
|
|
3483
4320
|
return ret;
|
|
3484
4321
|
}, arguments) };
|
|
3485
4322
|
|
|
3486
|
-
module.exports.
|
|
4323
|
+
module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
3487
4324
|
try {
|
|
3488
4325
|
var state0 = {a: arg0, b: arg1};
|
|
3489
4326
|
var cb0 = (arg0, arg1) => {
|
|
3490
4327
|
const a = state0.a;
|
|
3491
4328
|
state0.a = 0;
|
|
3492
4329
|
try {
|
|
3493
|
-
return
|
|
4330
|
+
return __wbg_adapter_481(a, state0.b, arg0, arg1);
|
|
3494
4331
|
} finally {
|
|
3495
4332
|
state0.a = a;
|
|
3496
4333
|
}
|
|
@@ -3502,71 +4339,96 @@ module.exports.__wbg_new_3d446df9155128ef = function(arg0, arg1) {
|
|
|
3502
4339
|
}
|
|
3503
4340
|
};
|
|
3504
4341
|
|
|
3505
|
-
module.exports.
|
|
3506
|
-
const ret = new
|
|
4342
|
+
module.exports.__wbg_new_405e22f390576ce2 = function() {
|
|
4343
|
+
const ret = new Object();
|
|
3507
4344
|
return ret;
|
|
3508
4345
|
};
|
|
3509
4346
|
|
|
3510
|
-
module.exports.
|
|
3511
|
-
const ret = new
|
|
4347
|
+
module.exports.__wbg_new_5e0be73521bc8c17 = function() {
|
|
4348
|
+
const ret = new Map();
|
|
3512
4349
|
return ret;
|
|
3513
|
-
}
|
|
4350
|
+
};
|
|
3514
4351
|
|
|
3515
|
-
module.exports.
|
|
3516
|
-
const ret = new
|
|
4352
|
+
module.exports.__wbg_new_78feb108b6472713 = function() {
|
|
4353
|
+
const ret = new Array();
|
|
3517
4354
|
return ret;
|
|
3518
4355
|
};
|
|
3519
4356
|
|
|
3520
|
-
module.exports.
|
|
3521
|
-
const ret = new
|
|
4357
|
+
module.exports.__wbg_new_92c54fc74574ef55 = function() { return handleError(function (arg0, arg1) {
|
|
4358
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
4359
|
+
return ret;
|
|
4360
|
+
}, arguments) };
|
|
4361
|
+
|
|
4362
|
+
module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
4363
|
+
const ret = new Uint8Array(arg0);
|
|
3522
4364
|
return ret;
|
|
3523
4365
|
};
|
|
3524
4366
|
|
|
3525
|
-
module.exports.
|
|
4367
|
+
module.exports.__wbg_new_e25e5aab09ff45db = function() { return handleError(function () {
|
|
4368
|
+
const ret = new AbortController();
|
|
4369
|
+
return ret;
|
|
4370
|
+
}, arguments) };
|
|
4371
|
+
|
|
4372
|
+
module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
3526
4373
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
3527
4374
|
return ret;
|
|
3528
4375
|
};
|
|
3529
4376
|
|
|
3530
|
-
module.exports.
|
|
4377
|
+
module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
3531
4378
|
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
3532
4379
|
return ret;
|
|
3533
4380
|
};
|
|
3534
4381
|
|
|
3535
|
-
module.exports.
|
|
4382
|
+
module.exports.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
3536
4383
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
3537
4384
|
return ret;
|
|
3538
4385
|
};
|
|
3539
4386
|
|
|
3540
|
-
module.exports.
|
|
4387
|
+
module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3541
4388
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
3542
4389
|
return ret;
|
|
3543
4390
|
}, arguments) };
|
|
3544
4391
|
|
|
3545
|
-
module.exports.
|
|
3546
|
-
const ret = arg0.next();
|
|
3547
|
-
return ret;
|
|
3548
|
-
}, arguments) };
|
|
3549
|
-
|
|
3550
|
-
module.exports.__wbg_next_137428deb98342b0 = function(arg0) {
|
|
4392
|
+
module.exports.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
3551
4393
|
const ret = arg0.next;
|
|
3552
4394
|
return ret;
|
|
3553
4395
|
};
|
|
3554
4396
|
|
|
4397
|
+
module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
4398
|
+
const ret = arg0.next();
|
|
4399
|
+
return ret;
|
|
4400
|
+
}, arguments) };
|
|
4401
|
+
|
|
3555
4402
|
module.exports.__wbg_node_02999533c4ea02e3 = function(arg0) {
|
|
3556
4403
|
const ret = arg0.node;
|
|
3557
4404
|
return ret;
|
|
3558
4405
|
};
|
|
3559
4406
|
|
|
3560
|
-
module.exports.
|
|
4407
|
+
module.exports.__wbg_now_807e54c39636c349 = function() {
|
|
3561
4408
|
const ret = Date.now();
|
|
3562
4409
|
return ret;
|
|
3563
4410
|
};
|
|
3564
4411
|
|
|
3565
|
-
module.exports.
|
|
4412
|
+
module.exports.__wbg_now_d18023d54d4e5500 = function(arg0) {
|
|
4413
|
+
const ret = arg0.now();
|
|
4414
|
+
return ret;
|
|
4415
|
+
};
|
|
4416
|
+
|
|
4417
|
+
module.exports.__wbg_open_a95fae7936477724 = function(arg0) {
|
|
4418
|
+
const ret = arg0.open();
|
|
4419
|
+
return ret;
|
|
4420
|
+
};
|
|
4421
|
+
|
|
4422
|
+
module.exports.__wbg_open_cdb62e879602b6c4 = function(arg0, arg1) {
|
|
3566
4423
|
const ret = arg0.open(arg1);
|
|
3567
4424
|
return ret;
|
|
3568
4425
|
};
|
|
3569
4426
|
|
|
4427
|
+
module.exports.__wbg_opened_1fee39ed52b14681 = function(arg0) {
|
|
4428
|
+
const ret = arg0.opened;
|
|
4429
|
+
return ret;
|
|
4430
|
+
};
|
|
4431
|
+
|
|
3570
4432
|
module.exports.__wbg_optionwallettxout_new = function(arg0) {
|
|
3571
4433
|
const ret = OptionWalletTxOut.__wrap(arg0);
|
|
3572
4434
|
return ret;
|
|
@@ -3577,6 +4439,11 @@ module.exports.__wbg_outpoint_unwrap = function(arg0) {
|
|
|
3577
4439
|
return ret;
|
|
3578
4440
|
};
|
|
3579
4441
|
|
|
4442
|
+
module.exports.__wbg_performance_c185c0cdc2766575 = function(arg0) {
|
|
4443
|
+
const ret = arg0.performance;
|
|
4444
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
4445
|
+
};
|
|
4446
|
+
|
|
3580
4447
|
module.exports.__wbg_process_5c1d670bc53614b8 = function(arg0) {
|
|
3581
4448
|
const ret = arg0.process;
|
|
3582
4449
|
return ret;
|
|
@@ -3592,16 +4459,21 @@ module.exports.__wbg_psetinput_new = function(arg0) {
|
|
|
3592
4459
|
return ret;
|
|
3593
4460
|
};
|
|
3594
4461
|
|
|
4462
|
+
module.exports.__wbg_psetoutput_new = function(arg0) {
|
|
4463
|
+
const ret = PsetOutput.__wrap(arg0);
|
|
4464
|
+
return ret;
|
|
4465
|
+
};
|
|
4466
|
+
|
|
3595
4467
|
module.exports.__wbg_psetsignatures_new = function(arg0) {
|
|
3596
4468
|
const ret = PsetSignatures.__wrap(arg0);
|
|
3597
4469
|
return ret;
|
|
3598
4470
|
};
|
|
3599
4471
|
|
|
3600
|
-
module.exports.
|
|
4472
|
+
module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
3601
4473
|
queueMicrotask(arg0);
|
|
3602
4474
|
};
|
|
3603
4475
|
|
|
3604
|
-
module.exports.
|
|
4476
|
+
module.exports.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
3605
4477
|
const ret = arg0.queueMicrotask;
|
|
3606
4478
|
return ret;
|
|
3607
4479
|
};
|
|
@@ -3610,12 +4482,12 @@ module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function() { return handl
|
|
|
3610
4482
|
arg0.randomFillSync(arg1);
|
|
3611
4483
|
}, arguments) };
|
|
3612
4484
|
|
|
3613
|
-
module.exports.
|
|
4485
|
+
module.exports.__wbg_read_a2434af1186cb56c = function(arg0) {
|
|
3614
4486
|
const ret = arg0.read();
|
|
3615
4487
|
return ret;
|
|
3616
4488
|
};
|
|
3617
4489
|
|
|
3618
|
-
module.exports.
|
|
4490
|
+
module.exports.__wbg_readable_dbb91ee91d979f24 = function(arg0) {
|
|
3619
4491
|
const ret = arg0.readable;
|
|
3620
4492
|
return ret;
|
|
3621
4493
|
};
|
|
@@ -3625,136 +4497,170 @@ module.exports.__wbg_recipient_new = function(arg0) {
|
|
|
3625
4497
|
return ret;
|
|
3626
4498
|
};
|
|
3627
4499
|
|
|
3628
|
-
module.exports.
|
|
3629
|
-
const ret = arg0.
|
|
4500
|
+
module.exports.__wbg_requestDevice_b9904d52d001d64d = function(arg0, arg1) {
|
|
4501
|
+
const ret = arg0.requestDevice(arg1);
|
|
3630
4502
|
return ret;
|
|
3631
4503
|
};
|
|
3632
4504
|
|
|
3633
|
-
module.exports.
|
|
4505
|
+
module.exports.__wbg_requestPort_1f87c6573d65b9ff = function(arg0) {
|
|
3634
4506
|
const ret = arg0.requestPort();
|
|
3635
4507
|
return ret;
|
|
3636
4508
|
};
|
|
3637
4509
|
|
|
4510
|
+
module.exports.__wbg_requestPort_f3ef84a64a129f42 = function(arg0, arg1) {
|
|
4511
|
+
const ret = arg0.requestPort(arg1);
|
|
4512
|
+
return ret;
|
|
4513
|
+
};
|
|
4514
|
+
|
|
3638
4515
|
module.exports.__wbg_require_79b1e9274cde3c87 = function() { return handleError(function () {
|
|
3639
4516
|
const ret = module.require;
|
|
3640
4517
|
return ret;
|
|
3641
4518
|
}, arguments) };
|
|
3642
4519
|
|
|
3643
|
-
module.exports.
|
|
4520
|
+
module.exports.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
3644
4521
|
const ret = Promise.resolve(arg0);
|
|
3645
4522
|
return ret;
|
|
3646
4523
|
};
|
|
3647
4524
|
|
|
3648
|
-
module.exports.
|
|
4525
|
+
module.exports.__wbg_sendReport_4d1024566077f413 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4526
|
+
const ret = arg0.sendReport(arg1, getArrayU8FromWasm0(arg2, arg3));
|
|
4527
|
+
return ret;
|
|
4528
|
+
}, arguments) };
|
|
4529
|
+
|
|
4530
|
+
module.exports.__wbg_send_7c4769e24cf1d784 = function() { return handleError(function (arg0, arg1) {
|
|
4531
|
+
arg0.send(arg1);
|
|
4532
|
+
}, arguments) };
|
|
4533
|
+
|
|
4534
|
+
module.exports.__wbg_serial_a5487140b2fdb38f = function(arg0) {
|
|
3649
4535
|
const ret = arg0.serial;
|
|
3650
4536
|
return ret;
|
|
3651
4537
|
};
|
|
3652
4538
|
|
|
3653
|
-
module.exports.
|
|
4539
|
+
module.exports.__wbg_setTimeout_f2fe5af8e3debeb3 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3654
4540
|
const ret = arg0.setTimeout(arg1, arg2);
|
|
3655
4541
|
return ret;
|
|
3656
4542
|
}, arguments) };
|
|
3657
4543
|
|
|
3658
|
-
module.exports.
|
|
4544
|
+
module.exports.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
3659
4545
|
arg0[arg1 >>> 0] = arg2;
|
|
3660
4546
|
};
|
|
3661
4547
|
|
|
3662
|
-
module.exports.__wbg_set_23d69db4e5c66a6e = function(arg0, arg1, arg2) {
|
|
3663
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
3664
|
-
};
|
|
3665
|
-
|
|
3666
4548
|
module.exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
3667
4549
|
arg0[arg1] = arg2;
|
|
3668
4550
|
};
|
|
3669
4551
|
|
|
3670
|
-
module.exports.
|
|
4552
|
+
module.exports.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
4553
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
4554
|
+
};
|
|
4555
|
+
|
|
4556
|
+
module.exports.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
3671
4557
|
const ret = arg0.set(arg1, arg2);
|
|
3672
4558
|
return ret;
|
|
3673
4559
|
};
|
|
3674
4560
|
|
|
3675
|
-
module.exports.
|
|
4561
|
+
module.exports.__wbg_setbaudrate_fe58f64af51588e8 = function(arg0, arg1) {
|
|
3676
4562
|
arg0.baudRate = arg1 >>> 0;
|
|
3677
4563
|
};
|
|
3678
4564
|
|
|
3679
|
-
module.exports.
|
|
4565
|
+
module.exports.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
|
|
4566
|
+
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
4567
|
+
};
|
|
4568
|
+
|
|
4569
|
+
module.exports.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
3680
4570
|
arg0.body = arg1;
|
|
3681
4571
|
};
|
|
3682
4572
|
|
|
3683
|
-
module.exports.
|
|
4573
|
+
module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
|
|
3684
4574
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
3685
4575
|
};
|
|
3686
4576
|
|
|
3687
|
-
module.exports.
|
|
4577
|
+
module.exports.__wbg_setfilters_35abbff30813c430 = function(arg0, arg1) {
|
|
4578
|
+
arg0.filters = arg1;
|
|
4579
|
+
};
|
|
4580
|
+
|
|
4581
|
+
module.exports.__wbg_setfilters_a1e596125ae8f487 = function(arg0, arg1) {
|
|
3688
4582
|
arg0.filters = arg1;
|
|
3689
4583
|
};
|
|
3690
4584
|
|
|
3691
|
-
module.exports.
|
|
4585
|
+
module.exports.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
|
|
3692
4586
|
arg0.headers = arg1;
|
|
3693
4587
|
};
|
|
3694
4588
|
|
|
3695
|
-
module.exports.
|
|
4589
|
+
module.exports.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
|
|
3696
4590
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
3697
4591
|
};
|
|
3698
4592
|
|
|
3699
|
-
module.exports.
|
|
4593
|
+
module.exports.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
|
|
3700
4594
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
3701
4595
|
};
|
|
3702
4596
|
|
|
3703
|
-
module.exports.
|
|
4597
|
+
module.exports.__wbg_setoninputreport_de1916af49f98e5f = function(arg0, arg1) {
|
|
4598
|
+
arg0.oninputreport = arg1;
|
|
4599
|
+
};
|
|
4600
|
+
|
|
4601
|
+
module.exports.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
|
|
4602
|
+
arg0.onmessage = arg1;
|
|
4603
|
+
};
|
|
4604
|
+
|
|
4605
|
+
module.exports.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
|
|
4606
|
+
arg0.onopen = arg1;
|
|
4607
|
+
};
|
|
4608
|
+
|
|
4609
|
+
module.exports.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
|
|
3704
4610
|
arg0.signal = arg1;
|
|
3705
4611
|
};
|
|
3706
4612
|
|
|
3707
|
-
module.exports.
|
|
4613
|
+
module.exports.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
|
|
3708
4614
|
const ret = arg0.signal;
|
|
3709
4615
|
return ret;
|
|
3710
4616
|
};
|
|
3711
4617
|
|
|
3712
|
-
module.exports.
|
|
4618
|
+
module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
3713
4619
|
const ret = typeof global === 'undefined' ? null : global;
|
|
3714
4620
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3715
4621
|
};
|
|
3716
4622
|
|
|
3717
|
-
module.exports.
|
|
4623
|
+
module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
3718
4624
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
3719
4625
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3720
4626
|
};
|
|
3721
4627
|
|
|
3722
|
-
module.exports.
|
|
4628
|
+
module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
3723
4629
|
const ret = typeof self === 'undefined' ? null : self;
|
|
3724
4630
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3725
4631
|
};
|
|
3726
4632
|
|
|
3727
|
-
module.exports.
|
|
4633
|
+
module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
3728
4634
|
const ret = typeof window === 'undefined' ? null : window;
|
|
3729
4635
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
3730
4636
|
};
|
|
3731
4637
|
|
|
3732
|
-
module.exports.
|
|
4638
|
+
module.exports.__wbg_status_f6360336ca686bf0 = function(arg0) {
|
|
3733
4639
|
const ret = arg0.status;
|
|
3734
4640
|
return ret;
|
|
3735
4641
|
};
|
|
3736
4642
|
|
|
3737
|
-
module.exports.
|
|
4643
|
+
module.exports.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
|
|
3738
4644
|
const ret = JSON.stringify(arg0);
|
|
3739
4645
|
return ret;
|
|
3740
4646
|
}, arguments) };
|
|
3741
4647
|
|
|
3742
|
-
module.exports.
|
|
4648
|
+
module.exports.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
3743
4649
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
3744
4650
|
return ret;
|
|
3745
4651
|
};
|
|
3746
4652
|
|
|
3747
|
-
module.exports.
|
|
4653
|
+
module.exports.__wbg_text_7805bea50de2af49 = function() { return handleError(function (arg0) {
|
|
3748
4654
|
const ret = arg0.text();
|
|
3749
4655
|
return ret;
|
|
3750
4656
|
}, arguments) };
|
|
3751
4657
|
|
|
3752
|
-
module.exports.
|
|
4658
|
+
module.exports.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
3753
4659
|
const ret = arg0.then(arg1);
|
|
3754
4660
|
return ret;
|
|
3755
4661
|
};
|
|
3756
4662
|
|
|
3757
|
-
module.exports.
|
|
4663
|
+
module.exports.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
3758
4664
|
const ret = arg0.then(arg1, arg2);
|
|
3759
4665
|
return ret;
|
|
3760
4666
|
};
|
|
@@ -3769,7 +4675,7 @@ module.exports.__wbg_update_new = function(arg0) {
|
|
|
3769
4675
|
return ret;
|
|
3770
4676
|
};
|
|
3771
4677
|
|
|
3772
|
-
module.exports.
|
|
4678
|
+
module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
3773
4679
|
const ret = arg1.url;
|
|
3774
4680
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3775
4681
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -3777,7 +4683,12 @@ module.exports.__wbg_url_5327bc0a41a9b085 = function(arg0, arg1) {
|
|
|
3777
4683
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3778
4684
|
};
|
|
3779
4685
|
|
|
3780
|
-
module.exports.
|
|
4686
|
+
module.exports.__wbg_validatedliquidexproposal_unwrap = function(arg0) {
|
|
4687
|
+
const ret = ValidatedLiquidexProposal.__unwrap(arg0);
|
|
4688
|
+
return ret;
|
|
4689
|
+
};
|
|
4690
|
+
|
|
4691
|
+
module.exports.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
3781
4692
|
const ret = arg0.value;
|
|
3782
4693
|
return ret;
|
|
3783
4694
|
};
|
|
@@ -3802,12 +4713,12 @@ module.exports.__wbg_wolletdescriptor_new = function(arg0) {
|
|
|
3802
4713
|
return ret;
|
|
3803
4714
|
};
|
|
3804
4715
|
|
|
3805
|
-
module.exports.
|
|
4716
|
+
module.exports.__wbg_writable_169515f8aae06da5 = function(arg0) {
|
|
3806
4717
|
const ret = arg0.writable;
|
|
3807
4718
|
return ret;
|
|
3808
4719
|
};
|
|
3809
4720
|
|
|
3810
|
-
module.exports.
|
|
4721
|
+
module.exports.__wbg_write_311434e30ee214e5 = function(arg0, arg1) {
|
|
3811
4722
|
const ret = arg0.write(arg1);
|
|
3812
4723
|
return ret;
|
|
3813
4724
|
};
|
|
@@ -3837,8 +4748,23 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
3837
4748
|
return ret;
|
|
3838
4749
|
};
|
|
3839
4750
|
|
|
3840
|
-
module.exports.
|
|
3841
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4751
|
+
module.exports.__wbindgen_closure_wrapper10165 = function(arg0, arg1, arg2) {
|
|
4752
|
+
const ret = makeMutClosure(arg0, arg1, 1172, __wbg_adapter_43);
|
|
4753
|
+
return ret;
|
|
4754
|
+
};
|
|
4755
|
+
|
|
4756
|
+
module.exports.__wbindgen_closure_wrapper5011 = function(arg0, arg1, arg2) {
|
|
4757
|
+
const ret = makeMutClosure(arg0, arg1, 287, __wbg_adapter_36);
|
|
4758
|
+
return ret;
|
|
4759
|
+
};
|
|
4760
|
+
|
|
4761
|
+
module.exports.__wbindgen_closure_wrapper5013 = function(arg0, arg1, arg2) {
|
|
4762
|
+
const ret = makeMutClosure(arg0, arg1, 286, __wbg_adapter_36);
|
|
4763
|
+
return ret;
|
|
4764
|
+
};
|
|
4765
|
+
|
|
4766
|
+
module.exports.__wbindgen_closure_wrapper5015 = function(arg0, arg1, arg2) {
|
|
4767
|
+
const ret = makeMutClosure(arg0, arg1, 287, __wbg_adapter_36);
|
|
3842
4768
|
return ret;
|
|
3843
4769
|
};
|
|
3844
4770
|
|