lwk_node 0.16.0 → 0.17.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/lwk_wasm.d.ts +211 -8
- package/lwk_wasm.js +702 -97
- package/lwk_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/lwk_wasm.d.ts
CHANGED
|
@@ -164,9 +164,9 @@ export class Amp0Connected {
|
|
|
164
164
|
free(): void;
|
|
165
165
|
[Symbol.dispose](): void;
|
|
166
166
|
/**
|
|
167
|
-
* Connect and register to AMP0
|
|
167
|
+
* Connect and register to AMP0.
|
|
168
168
|
*/
|
|
169
|
-
|
|
169
|
+
static connect(network: Network, signer_data: Amp0SignerData): Promise<Amp0Connected>;
|
|
170
170
|
/**
|
|
171
171
|
* Obtain a login challenge
|
|
172
172
|
*
|
|
@@ -247,6 +247,13 @@ export class Amp2 {
|
|
|
247
247
|
private constructor();
|
|
248
248
|
free(): void;
|
|
249
249
|
[Symbol.dispose](): void;
|
|
250
|
+
/**
|
|
251
|
+
* Create a new AMP2 client
|
|
252
|
+
*
|
|
253
|
+
* * `server_key` - The keyorigin xpub of the AMP2 server key
|
|
254
|
+
* * `url` - The URL of the AMP2 server
|
|
255
|
+
*/
|
|
256
|
+
static new(server_key: string, url: string): Amp2;
|
|
250
257
|
/**
|
|
251
258
|
* Create a new AMP2 client with the default url and server key for the testnet network.
|
|
252
259
|
*/
|
|
@@ -254,7 +261,7 @@ export class Amp2 {
|
|
|
254
261
|
/**
|
|
255
262
|
* Get an AMP2 wallet descriptor from the keyorigin xpub string obtained from a signer
|
|
256
263
|
*/
|
|
257
|
-
descriptorFromStr(keyorigin_xpub: string): Amp2Descriptor;
|
|
264
|
+
descriptorFromStr(keyorigin_xpub: string, descriptor_blinding_key: string): Amp2Descriptor;
|
|
258
265
|
/**
|
|
259
266
|
* Register an AMP2 wallet with the AMP2 server
|
|
260
267
|
*/
|
|
@@ -745,12 +752,12 @@ export class Jade {
|
|
|
745
752
|
free(): void;
|
|
746
753
|
[Symbol.dispose](): void;
|
|
747
754
|
/**
|
|
748
|
-
* Creates a Jade from Web Serial for the given network
|
|
755
|
+
* Creates a Jade from Web Serial for the given network.
|
|
749
756
|
*
|
|
750
757
|
* When filter is true, it will filter available serial with Blockstream released chips, use
|
|
751
758
|
* false if you don't see your DYI jade
|
|
752
759
|
*/
|
|
753
|
-
|
|
760
|
+
static fromSerial(network: Network, filter: boolean): Promise<Jade>;
|
|
754
761
|
getVersion(): Promise<any>;
|
|
755
762
|
getMasterXpub(): Promise<Xpub>;
|
|
756
763
|
/**
|
|
@@ -788,7 +795,7 @@ export class JadeWebSocket {
|
|
|
788
795
|
*
|
|
789
796
|
* The url should point to your WebSocket bridge that connects to the Docker Jade emulator
|
|
790
797
|
*/
|
|
791
|
-
|
|
798
|
+
static fromWebSocket(network: Network, url: string): Promise<JadeWebSocket>;
|
|
792
799
|
getVersion(): Promise<any>;
|
|
793
800
|
getMasterXpub(): Promise<Xpub>;
|
|
794
801
|
/**
|
|
@@ -824,7 +831,8 @@ export class JsStoreLink {
|
|
|
824
831
|
/**
|
|
825
832
|
* Create a new `JsStoreLink` from a JavaScript storage object.
|
|
826
833
|
*
|
|
827
|
-
* The JS object must have `get(key)`, `put(key, value)`,
|
|
834
|
+
* The JS object must have `get(key)`, `put(key, value)`, `remove(key)`,
|
|
835
|
+
* and `isPersisted()` methods.
|
|
828
836
|
*/
|
|
829
837
|
constructor(storage: any);
|
|
830
838
|
}
|
|
@@ -1719,6 +1727,115 @@ export class TxBuilder {
|
|
|
1719
1727
|
*/
|
|
1720
1728
|
addInputRangeproofs(add_rangeproofs: boolean): TxBuilder;
|
|
1721
1729
|
}
|
|
1730
|
+
/**
|
|
1731
|
+
* Transaction details
|
|
1732
|
+
*/
|
|
1733
|
+
export class TxDetails {
|
|
1734
|
+
private constructor();
|
|
1735
|
+
free(): void;
|
|
1736
|
+
[Symbol.dispose](): void;
|
|
1737
|
+
/**
|
|
1738
|
+
* Transaction
|
|
1739
|
+
*/
|
|
1740
|
+
tx(): Transaction | undefined;
|
|
1741
|
+
/**
|
|
1742
|
+
* Txid
|
|
1743
|
+
*/
|
|
1744
|
+
txid(): Txid;
|
|
1745
|
+
/**
|
|
1746
|
+
* Blockchain height
|
|
1747
|
+
*/
|
|
1748
|
+
height(): number | undefined;
|
|
1749
|
+
/**
|
|
1750
|
+
* Timestamp
|
|
1751
|
+
*
|
|
1752
|
+
* A reasonable timestamp, that however can be inaccurate.
|
|
1753
|
+
* If you need a precise timestamp, do not use this value.
|
|
1754
|
+
*/
|
|
1755
|
+
timestamp(): number | undefined;
|
|
1756
|
+
/**
|
|
1757
|
+
* Transaction type
|
|
1758
|
+
*
|
|
1759
|
+
* A tentative description of the transaction type, which
|
|
1760
|
+
* however might be inaccurate. Use this if you want a simple
|
|
1761
|
+
* description of what this transaction is doing, but do
|
|
1762
|
+
* not rely on the value returned.
|
|
1763
|
+
*/
|
|
1764
|
+
txType(): string;
|
|
1765
|
+
/**
|
|
1766
|
+
* Balance
|
|
1767
|
+
*
|
|
1768
|
+
* Net balance from the `Wollet` perspective
|
|
1769
|
+
*/
|
|
1770
|
+
balance(): Balance;
|
|
1771
|
+
/**
|
|
1772
|
+
* Asset fees
|
|
1773
|
+
*/
|
|
1774
|
+
feesAsset(asset: AssetId): bigint;
|
|
1775
|
+
/**
|
|
1776
|
+
* Unblinded URL
|
|
1777
|
+
*/
|
|
1778
|
+
unblindedUrl(explorer_url: string): string;
|
|
1779
|
+
/**
|
|
1780
|
+
* Inputs
|
|
1781
|
+
*/
|
|
1782
|
+
inputs(): TxOutDetails[];
|
|
1783
|
+
/**
|
|
1784
|
+
* Outputs
|
|
1785
|
+
*/
|
|
1786
|
+
outputs(): TxOutDetails[];
|
|
1787
|
+
}
|
|
1788
|
+
/**
|
|
1789
|
+
* Options for transaction details
|
|
1790
|
+
*/
|
|
1791
|
+
export class TxOpt {
|
|
1792
|
+
private constructor();
|
|
1793
|
+
free(): void;
|
|
1794
|
+
[Symbol.dispose](): void;
|
|
1795
|
+
static default(): TxOpt;
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* Transaction output details
|
|
1799
|
+
*/
|
|
1800
|
+
export class TxOutDetails {
|
|
1801
|
+
private constructor();
|
|
1802
|
+
free(): void;
|
|
1803
|
+
[Symbol.dispose](): void;
|
|
1804
|
+
/**
|
|
1805
|
+
* Outpoint
|
|
1806
|
+
*/
|
|
1807
|
+
outpoint(): OutPoint;
|
|
1808
|
+
/**
|
|
1809
|
+
* Scriptpubkey
|
|
1810
|
+
*/
|
|
1811
|
+
script_pubkey(): Script | undefined;
|
|
1812
|
+
/**
|
|
1813
|
+
* Height
|
|
1814
|
+
*/
|
|
1815
|
+
height(): number | undefined;
|
|
1816
|
+
/**
|
|
1817
|
+
* Address
|
|
1818
|
+
*/
|
|
1819
|
+
address(): Address | undefined;
|
|
1820
|
+
/**
|
|
1821
|
+
* Unblinded values (asset, amount, blinders)
|
|
1822
|
+
*/
|
|
1823
|
+
unblinded(): TxOutSecrets | undefined;
|
|
1824
|
+
/**
|
|
1825
|
+
* Whether the transaction output is explicit
|
|
1826
|
+
*/
|
|
1827
|
+
is_explicit(): boolean;
|
|
1828
|
+
/**
|
|
1829
|
+
* Whether the output is spent by a previously downloaded transaction
|
|
1830
|
+
*
|
|
1831
|
+
* Note: this value might be inaccurate. We compute this from downloaded
|
|
1832
|
+
* transactions, however we only download transactions relevant for the
|
|
1833
|
+
* wallet (i.e. if they include inputs or outputs that belong to the
|
|
1834
|
+
* wallet), thus for non-wallet outputs we might set this value
|
|
1835
|
+
* incorrectly. For wallet outputs, it can be outdated.
|
|
1836
|
+
*/
|
|
1837
|
+
is_spent(): boolean;
|
|
1838
|
+
}
|
|
1722
1839
|
/**
|
|
1723
1840
|
* Contains unblinded information such as the asset and the value of a transaction output
|
|
1724
1841
|
*/
|
|
@@ -1783,6 +1900,16 @@ export class Txid {
|
|
|
1783
1900
|
*/
|
|
1784
1901
|
toString(): string;
|
|
1785
1902
|
}
|
|
1903
|
+
/**
|
|
1904
|
+
* Options for transaction details
|
|
1905
|
+
*/
|
|
1906
|
+
export class TxsOpt {
|
|
1907
|
+
private constructor();
|
|
1908
|
+
free(): void;
|
|
1909
|
+
[Symbol.dispose](): void;
|
|
1910
|
+
static default(): TxsOpt;
|
|
1911
|
+
static withPagination(offset: number, limit: number): TxsOpt;
|
|
1912
|
+
}
|
|
1786
1913
|
/**
|
|
1787
1914
|
* LiquiDEX swap proposal
|
|
1788
1915
|
*
|
|
@@ -1981,6 +2108,22 @@ export class WalletTxOut {
|
|
|
1981
2108
|
export class Wollet {
|
|
1982
2109
|
free(): void;
|
|
1983
2110
|
[Symbol.dispose](): void;
|
|
2111
|
+
/**
|
|
2112
|
+
* Get the transaction list
|
|
2113
|
+
*
|
|
2114
|
+
* **Experimental**: This API may change without notice.
|
|
2115
|
+
*/
|
|
2116
|
+
txs(opt: TxsOpt): TxDetails[];
|
|
2117
|
+
/**
|
|
2118
|
+
* Number of transactions
|
|
2119
|
+
*/
|
|
2120
|
+
numTxs(): number;
|
|
2121
|
+
/**
|
|
2122
|
+
* Get the details of a transaction
|
|
2123
|
+
*
|
|
2124
|
+
* **Experimental**: This API may change without notice.
|
|
2125
|
+
*/
|
|
2126
|
+
txDetails(txid: Txid, opt: TxOpt): TxDetails | undefined;
|
|
1984
2127
|
/**
|
|
1985
2128
|
* Create a `Wollet`
|
|
1986
2129
|
*/
|
|
@@ -2047,9 +2190,13 @@ export class Wollet {
|
|
|
2047
2190
|
*/
|
|
2048
2191
|
assetsOwned(): AssetIds;
|
|
2049
2192
|
/**
|
|
2050
|
-
* Get the wallet transactions
|
|
2193
|
+
* Get the wallet transactions, sorted by height descending, then txid descending with unconfirmed first
|
|
2051
2194
|
*/
|
|
2052
2195
|
transactions(): WalletTx[];
|
|
2196
|
+
/**
|
|
2197
|
+
* Get the wallet transactions with pagination sorted by height descending, then txid descending with unconfirmed first
|
|
2198
|
+
*/
|
|
2199
|
+
transactionsPaginated(offset: number, limit: number): WalletTx[];
|
|
2053
2200
|
/**
|
|
2054
2201
|
* Get the unspent transaction outputs of the wallet
|
|
2055
2202
|
*/
|
|
@@ -2092,6 +2239,62 @@ export class Wollet {
|
|
|
2092
2239
|
*/
|
|
2093
2240
|
isAmp0(): boolean;
|
|
2094
2241
|
}
|
|
2242
|
+
/**
|
|
2243
|
+
* A builder for constructing [`Wollet`] instances.
|
|
2244
|
+
*/
|
|
2245
|
+
export class WolletBuilder {
|
|
2246
|
+
free(): void;
|
|
2247
|
+
[Symbol.dispose](): void;
|
|
2248
|
+
/**
|
|
2249
|
+
* Create a builder for a watch-only wallet.
|
|
2250
|
+
*/
|
|
2251
|
+
constructor(network: Network, descriptor: WolletDescriptor);
|
|
2252
|
+
/**
|
|
2253
|
+
* Set the threshold used to merge persisted updates during build.
|
|
2254
|
+
*
|
|
2255
|
+
* **Experimental**: This API may change without notice.
|
|
2256
|
+
*
|
|
2257
|
+
* `None` disables merging (default behavior).
|
|
2258
|
+
*/
|
|
2259
|
+
withMergeThreshold(merge_threshold?: number | null): WolletBuilder;
|
|
2260
|
+
/**
|
|
2261
|
+
* Set the wallet as "utxo only".
|
|
2262
|
+
*
|
|
2263
|
+
* **Experimental**: This API may change without notice.
|
|
2264
|
+
*/
|
|
2265
|
+
utxoOnly(utxo_only: boolean): WolletBuilder;
|
|
2266
|
+
/**
|
|
2267
|
+
* Persist wallet updates in the given JavaScript storage object.
|
|
2268
|
+
*
|
|
2269
|
+
* **Experimental**: This API may change without notice.
|
|
2270
|
+
*
|
|
2271
|
+
* Wallet data is persisted in clear.
|
|
2272
|
+
*
|
|
2273
|
+
* The JS object must have `get(key)`, `put(key, value)`, and `remove(key)` methods.
|
|
2274
|
+
*/
|
|
2275
|
+
withExperimentalStore(storage: any): WolletBuilder;
|
|
2276
|
+
/**
|
|
2277
|
+
* Persist wallet transactions in the given JavaScript
|
|
2278
|
+
* storage object.
|
|
2279
|
+
*
|
|
2280
|
+
* **Experimental**: This API may change without notice.
|
|
2281
|
+
*
|
|
2282
|
+
* The JS object must have `get(key)`, `put(key, value)`, and `remove(key)` methods.
|
|
2283
|
+
*/
|
|
2284
|
+
withTxsStore(storage: any): WolletBuilder;
|
|
2285
|
+
/**
|
|
2286
|
+
* Set encryption for the transactions store.
|
|
2287
|
+
*
|
|
2288
|
+
* **Experimental**: This API may change without notice.
|
|
2289
|
+
*
|
|
2290
|
+
* Default: encrypted if the store is persisted.
|
|
2291
|
+
*/
|
|
2292
|
+
setEncryptionTxsStore(encrypt: boolean): WolletBuilder;
|
|
2293
|
+
/**
|
|
2294
|
+
* Build the wallet from this builder.
|
|
2295
|
+
*/
|
|
2296
|
+
build(): Wollet;
|
|
2297
|
+
}
|
|
2095
2298
|
/**
|
|
2096
2299
|
* A wrapper that contains only the subset of CT descriptors handled by wollet
|
|
2097
2300
|
*/
|
package/lwk_wasm.js
CHANGED
|
@@ -217,26 +217,16 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
217
217
|
return real;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
function takeFromExternrefTable0(idx) {
|
|
221
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
222
|
-
wasm.__externref_table_dealloc(idx);
|
|
223
|
-
return value;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
220
|
function _assertClass(instance, klass) {
|
|
227
221
|
if (!(instance instanceof klass)) {
|
|
228
222
|
throw new Error(`expected instance of ${klass.name}`);
|
|
229
223
|
}
|
|
230
224
|
}
|
|
231
225
|
|
|
232
|
-
function
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
237
|
-
}
|
|
238
|
-
WASM_VECTOR_LEN = array.length;
|
|
239
|
-
return ptr;
|
|
226
|
+
function takeFromExternrefTable0(idx) {
|
|
227
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
228
|
+
wasm.__externref_table_dealloc(idx);
|
|
229
|
+
return value;
|
|
240
230
|
}
|
|
241
231
|
|
|
242
232
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
@@ -249,6 +239,13 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
249
239
|
wasm.__externref_drop_slice(ptr, len);
|
|
250
240
|
return result;
|
|
251
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* @returns {Promise<HIDDevice>}
|
|
244
|
+
*/
|
|
245
|
+
exports.searchLedgerDevice = function() {
|
|
246
|
+
const ret = wasm.searchLedgerDevice();
|
|
247
|
+
return ret;
|
|
248
|
+
};
|
|
252
249
|
|
|
253
250
|
let cachedUint32ArrayMemory0 = null;
|
|
254
251
|
|
|
@@ -265,14 +262,6 @@ function passArray32ToWasm0(arg, malloc) {
|
|
|
265
262
|
WASM_VECTOR_LEN = arg.length;
|
|
266
263
|
return ptr;
|
|
267
264
|
}
|
|
268
|
-
/**
|
|
269
|
-
* @returns {Promise<HIDDevice>}
|
|
270
|
-
*/
|
|
271
|
-
exports.searchLedgerDevice = function() {
|
|
272
|
-
const ret = wasm.searchLedgerDevice();
|
|
273
|
-
return ret;
|
|
274
|
-
};
|
|
275
|
-
|
|
276
265
|
/**
|
|
277
266
|
* Convert the given string to a QR code image uri
|
|
278
267
|
*
|
|
@@ -305,32 +294,42 @@ exports.stringToQr = function(str, pixel_per_module) {
|
|
|
305
294
|
}
|
|
306
295
|
};
|
|
307
296
|
|
|
297
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
298
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
299
|
+
for (let i = 0; i < array.length; i++) {
|
|
300
|
+
const add = addToExternrefTable0(array[i]);
|
|
301
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
302
|
+
}
|
|
303
|
+
WASM_VECTOR_LEN = array.length;
|
|
304
|
+
return ptr;
|
|
305
|
+
}
|
|
306
|
+
|
|
308
307
|
function getArrayU32FromWasm0(ptr, len) {
|
|
309
308
|
ptr = ptr >>> 0;
|
|
310
309
|
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
311
310
|
}
|
|
312
|
-
function
|
|
313
|
-
wasm.
|
|
311
|
+
function __wbg_adapter_6(arg0, arg1, arg2) {
|
|
312
|
+
wasm.closure1315_externref_shim(arg0, arg1, arg2);
|
|
314
313
|
}
|
|
315
314
|
|
|
316
|
-
function
|
|
317
|
-
wasm.
|
|
315
|
+
function __wbg_adapter_11(arg0, arg1, arg2) {
|
|
316
|
+
wasm.closure748_externref_shim(arg0, arg1, arg2);
|
|
318
317
|
}
|
|
319
318
|
|
|
320
|
-
function
|
|
321
|
-
wasm.
|
|
319
|
+
function __wbg_adapter_14(arg0, arg1) {
|
|
320
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h94f351489121fb87(arg0, arg1);
|
|
322
321
|
}
|
|
323
322
|
|
|
324
323
|
function __wbg_adapter_31(arg0, arg1, arg2) {
|
|
325
|
-
wasm.
|
|
324
|
+
wasm.closure2094_externref_shim(arg0, arg1, arg2);
|
|
326
325
|
}
|
|
327
326
|
|
|
328
327
|
function __wbg_adapter_34(arg0, arg1) {
|
|
329
|
-
wasm.
|
|
328
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h912986096667d3cb(arg0, arg1);
|
|
330
329
|
}
|
|
331
330
|
|
|
332
|
-
function
|
|
333
|
-
wasm.
|
|
331
|
+
function __wbg_adapter_735(arg0, arg1, arg2, arg3) {
|
|
332
|
+
wasm.closure2881_externref_shim(arg0, arg1, arg2, arg3);
|
|
334
333
|
}
|
|
335
334
|
|
|
336
335
|
/**
|
|
@@ -762,7 +761,12 @@ class Amp0Connected {
|
|
|
762
761
|
wasm.__wbg_amp0connected_free(ptr, 0);
|
|
763
762
|
}
|
|
764
763
|
/**
|
|
765
|
-
* Connect and register to AMP0
|
|
764
|
+
* Connect and register to AMP0.
|
|
765
|
+
*
|
|
766
|
+
* Deprecated: use `connect()` instead.
|
|
767
|
+
*
|
|
768
|
+
* `wasm-bindgen` deprecated async constructors because they generate
|
|
769
|
+
* invalid TypeScript declarations. See https://github.com/wasm-bindgen/wasm-bindgen/pull/4402.
|
|
766
770
|
* @param {Network} network
|
|
767
771
|
* @param {Amp0SignerData} signer_data
|
|
768
772
|
*/
|
|
@@ -772,6 +776,18 @@ class Amp0Connected {
|
|
|
772
776
|
const ret = wasm.amp0connected_new(network.__wbg_ptr, signer_data.__wbg_ptr);
|
|
773
777
|
return ret;
|
|
774
778
|
}
|
|
779
|
+
/**
|
|
780
|
+
* Connect and register to AMP0.
|
|
781
|
+
* @param {Network} network
|
|
782
|
+
* @param {Amp0SignerData} signer_data
|
|
783
|
+
* @returns {Promise<Amp0Connected>}
|
|
784
|
+
*/
|
|
785
|
+
static connect(network, signer_data) {
|
|
786
|
+
_assertClass(network, Network);
|
|
787
|
+
_assertClass(signer_data, Amp0SignerData);
|
|
788
|
+
const ret = wasm.amp0connected_connect(network.__wbg_ptr, signer_data.__wbg_ptr);
|
|
789
|
+
return ret;
|
|
790
|
+
}
|
|
775
791
|
/**
|
|
776
792
|
* Obtain a login challenge
|
|
777
793
|
*
|
|
@@ -1020,6 +1036,26 @@ class Amp2 {
|
|
|
1020
1036
|
const ptr = this.__destroy_into_raw();
|
|
1021
1037
|
wasm.__wbg_amp2_free(ptr, 0);
|
|
1022
1038
|
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Create a new AMP2 client
|
|
1041
|
+
*
|
|
1042
|
+
* * `server_key` - The keyorigin xpub of the AMP2 server key
|
|
1043
|
+
* * `url` - The URL of the AMP2 server
|
|
1044
|
+
* @param {string} server_key
|
|
1045
|
+
* @param {string} url
|
|
1046
|
+
* @returns {Amp2}
|
|
1047
|
+
*/
|
|
1048
|
+
static new(server_key, url) {
|
|
1049
|
+
const ptr0 = passStringToWasm0(server_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1050
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1051
|
+
const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1052
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1053
|
+
const ret = wasm.amp2_new(ptr0, len0, ptr1, len1);
|
|
1054
|
+
if (ret[2]) {
|
|
1055
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1056
|
+
}
|
|
1057
|
+
return Amp2.__wrap(ret[0]);
|
|
1058
|
+
}
|
|
1023
1059
|
/**
|
|
1024
1060
|
* Create a new AMP2 client with the default url and server key for the testnet network.
|
|
1025
1061
|
* @returns {Amp2}
|
|
@@ -1031,12 +1067,15 @@ class Amp2 {
|
|
|
1031
1067
|
/**
|
|
1032
1068
|
* Get an AMP2 wallet descriptor from the keyorigin xpub string obtained from a signer
|
|
1033
1069
|
* @param {string} keyorigin_xpub
|
|
1070
|
+
* @param {string} descriptor_blinding_key
|
|
1034
1071
|
* @returns {Amp2Descriptor}
|
|
1035
1072
|
*/
|
|
1036
|
-
descriptorFromStr(keyorigin_xpub) {
|
|
1073
|
+
descriptorFromStr(keyorigin_xpub, descriptor_blinding_key) {
|
|
1037
1074
|
const ptr0 = passStringToWasm0(keyorigin_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1038
1075
|
const len0 = WASM_VECTOR_LEN;
|
|
1039
|
-
const
|
|
1076
|
+
const ptr1 = passStringToWasm0(descriptor_blinding_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1077
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1078
|
+
const ret = wasm.amp2_descriptorFromStr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1040
1079
|
if (ret[2]) {
|
|
1041
1080
|
throw takeFromExternrefTable0(ret[1]);
|
|
1042
1081
|
}
|
|
@@ -2575,12 +2614,31 @@ class Jade {
|
|
|
2575
2614
|
*
|
|
2576
2615
|
* When filter is true, it will filter available serial with Blockstream released chips, use
|
|
2577
2616
|
* false if you don't see your DYI jade
|
|
2617
|
+
*
|
|
2618
|
+
* Deprecated: use `fromSerial()` instead.
|
|
2619
|
+
*
|
|
2620
|
+
* `wasm-bindgen` deprecated async constructors because they generate
|
|
2621
|
+
* invalid TypeScript declarations. See https://github.com/wasm-bindgen/wasm-bindgen/pull/4402.
|
|
2578
2622
|
* @param {Network} network
|
|
2579
2623
|
* @param {boolean} filter
|
|
2580
2624
|
*/
|
|
2581
2625
|
constructor(network, filter) {
|
|
2582
2626
|
_assertClass(network, Network);
|
|
2583
|
-
const ret = wasm.
|
|
2627
|
+
const ret = wasm.jade_new(network.__wbg_ptr, filter);
|
|
2628
|
+
return ret;
|
|
2629
|
+
}
|
|
2630
|
+
/**
|
|
2631
|
+
* Creates a Jade from Web Serial for the given network.
|
|
2632
|
+
*
|
|
2633
|
+
* When filter is true, it will filter available serial with Blockstream released chips, use
|
|
2634
|
+
* false if you don't see your DYI jade
|
|
2635
|
+
* @param {Network} network
|
|
2636
|
+
* @param {boolean} filter
|
|
2637
|
+
* @returns {Promise<Jade>}
|
|
2638
|
+
*/
|
|
2639
|
+
static fromSerial(network, filter) {
|
|
2640
|
+
_assertClass(network, Network);
|
|
2641
|
+
const ret = wasm.jade_fromSerial(network.__wbg_ptr, filter);
|
|
2584
2642
|
return ret;
|
|
2585
2643
|
}
|
|
2586
2644
|
/**
|
|
@@ -2729,6 +2787,11 @@ class JadeWebSocket {
|
|
|
2729
2787
|
* Creates a Jade from WebSocket for the given network
|
|
2730
2788
|
*
|
|
2731
2789
|
* The url should point to your WebSocket bridge that connects to the Docker Jade emulator
|
|
2790
|
+
*
|
|
2791
|
+
* Deprecated: use `fromWebSocket()` instead.
|
|
2792
|
+
*
|
|
2793
|
+
* `wasm-bindgen` deprecated async constructors because they generate
|
|
2794
|
+
* invalid TypeScript declarations. See https://github.com/wasm-bindgen/wasm-bindgen/pull/4402.
|
|
2732
2795
|
* @param {Network} network
|
|
2733
2796
|
* @param {string} url
|
|
2734
2797
|
*/
|
|
@@ -2736,7 +2799,22 @@ class JadeWebSocket {
|
|
|
2736
2799
|
_assertClass(network, Network);
|
|
2737
2800
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2738
2801
|
const len0 = WASM_VECTOR_LEN;
|
|
2739
|
-
const ret = wasm.
|
|
2802
|
+
const ret = wasm.jadewebsocket_new(network.__wbg_ptr, ptr0, len0);
|
|
2803
|
+
return ret;
|
|
2804
|
+
}
|
|
2805
|
+
/**
|
|
2806
|
+
* Creates a Jade from WebSocket for the given network
|
|
2807
|
+
*
|
|
2808
|
+
* The url should point to your WebSocket bridge that connects to the Docker Jade emulator
|
|
2809
|
+
* @param {Network} network
|
|
2810
|
+
* @param {string} url
|
|
2811
|
+
* @returns {Promise<JadeWebSocket>}
|
|
2812
|
+
*/
|
|
2813
|
+
static fromWebSocket(network, url) {
|
|
2814
|
+
_assertClass(network, Network);
|
|
2815
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2816
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2817
|
+
const ret = wasm.jadewebsocket_fromWebSocket(network.__wbg_ptr, ptr0, len0);
|
|
2740
2818
|
return ret;
|
|
2741
2819
|
}
|
|
2742
2820
|
/**
|
|
@@ -2876,7 +2954,8 @@ class JsStoreLink {
|
|
|
2876
2954
|
/**
|
|
2877
2955
|
* Create a new `JsStoreLink` from a JavaScript storage object.
|
|
2878
2956
|
*
|
|
2879
|
-
* The JS object must have `get(key)`, `put(key, value)`,
|
|
2957
|
+
* The JS object must have `get(key)`, `put(key, value)`, `remove(key)`,
|
|
2958
|
+
* and `isPersisted()` methods.
|
|
2880
2959
|
* @param {any} storage
|
|
2881
2960
|
*/
|
|
2882
2961
|
constructor(storage) {
|
|
@@ -5664,9 +5743,8 @@ class TxBuilder {
|
|
|
5664
5743
|
addExplicitRecipient(address, satoshi, asset) {
|
|
5665
5744
|
const ptr = this.__destroy_into_raw();
|
|
5666
5745
|
_assertClass(address, Address);
|
|
5667
|
-
var ptr0 = address.__destroy_into_raw();
|
|
5668
5746
|
_assertClass(asset, AssetId);
|
|
5669
|
-
const ret = wasm.txbuilder_addExplicitRecipient(ptr,
|
|
5747
|
+
const ret = wasm.txbuilder_addExplicitRecipient(ptr, address.__wbg_ptr, satoshi, asset.__wbg_ptr);
|
|
5670
5748
|
if (ret[2]) {
|
|
5671
5749
|
throw takeFromExternrefTable0(ret[1]);
|
|
5672
5750
|
}
|
|
@@ -5736,18 +5814,17 @@ class TxBuilder {
|
|
|
5736
5814
|
reissueAsset(asset_to_reissue, satoshi_to_reissue, asset_receiver, issuance_tx) {
|
|
5737
5815
|
const ptr = this.__destroy_into_raw();
|
|
5738
5816
|
_assertClass(asset_to_reissue, AssetId);
|
|
5739
|
-
|
|
5740
|
-
let ptr1 = 0;
|
|
5817
|
+
let ptr0 = 0;
|
|
5741
5818
|
if (!isLikeNone(asset_receiver)) {
|
|
5742
5819
|
_assertClass(asset_receiver, Address);
|
|
5743
|
-
|
|
5820
|
+
ptr0 = asset_receiver.__destroy_into_raw();
|
|
5744
5821
|
}
|
|
5745
|
-
let
|
|
5822
|
+
let ptr1 = 0;
|
|
5746
5823
|
if (!isLikeNone(issuance_tx)) {
|
|
5747
5824
|
_assertClass(issuance_tx, Transaction);
|
|
5748
|
-
|
|
5825
|
+
ptr1 = issuance_tx.__destroy_into_raw();
|
|
5749
5826
|
}
|
|
5750
|
-
const ret = wasm.txbuilder_reissueAsset(ptr,
|
|
5827
|
+
const ret = wasm.txbuilder_reissueAsset(ptr, asset_to_reissue.__wbg_ptr, satoshi_to_reissue, ptr0, ptr1);
|
|
5751
5828
|
if (ret[2]) {
|
|
5752
5829
|
throw takeFromExternrefTable0(ret[1]);
|
|
5753
5830
|
}
|
|
@@ -5803,12 +5880,9 @@ class TxBuilder {
|
|
|
5803
5880
|
liquidexMake(utxo, address, satoshi, asset_id) {
|
|
5804
5881
|
const ptr = this.__destroy_into_raw();
|
|
5805
5882
|
_assertClass(utxo, OutPoint);
|
|
5806
|
-
var ptr0 = utxo.__destroy_into_raw();
|
|
5807
5883
|
_assertClass(address, Address);
|
|
5808
|
-
var ptr1 = address.__destroy_into_raw();
|
|
5809
5884
|
_assertClass(asset_id, AssetId);
|
|
5810
|
-
|
|
5811
|
-
const ret = wasm.txbuilder_liquidexMake(ptr, ptr0, ptr1, satoshi, ptr2);
|
|
5885
|
+
const ret = wasm.txbuilder_liquidexMake(ptr, utxo.__wbg_ptr, address.__wbg_ptr, satoshi, asset_id.__wbg_ptr);
|
|
5812
5886
|
if (ret[2]) {
|
|
5813
5887
|
throw takeFromExternrefTable0(ret[1]);
|
|
5814
5888
|
}
|
|
@@ -5844,6 +5918,286 @@ if (Symbol.dispose) TxBuilder.prototype[Symbol.dispose] = TxBuilder.prototype.fr
|
|
|
5844
5918
|
|
|
5845
5919
|
exports.TxBuilder = TxBuilder;
|
|
5846
5920
|
|
|
5921
|
+
const TxDetailsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5922
|
+
? { register: () => {}, unregister: () => {} }
|
|
5923
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_txdetails_free(ptr >>> 0, 1));
|
|
5924
|
+
/**
|
|
5925
|
+
* Transaction details
|
|
5926
|
+
*/
|
|
5927
|
+
class TxDetails {
|
|
5928
|
+
|
|
5929
|
+
static __wrap(ptr) {
|
|
5930
|
+
ptr = ptr >>> 0;
|
|
5931
|
+
const obj = Object.create(TxDetails.prototype);
|
|
5932
|
+
obj.__wbg_ptr = ptr;
|
|
5933
|
+
TxDetailsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
5934
|
+
return obj;
|
|
5935
|
+
}
|
|
5936
|
+
|
|
5937
|
+
__destroy_into_raw() {
|
|
5938
|
+
const ptr = this.__wbg_ptr;
|
|
5939
|
+
this.__wbg_ptr = 0;
|
|
5940
|
+
TxDetailsFinalization.unregister(this);
|
|
5941
|
+
return ptr;
|
|
5942
|
+
}
|
|
5943
|
+
|
|
5944
|
+
free() {
|
|
5945
|
+
const ptr = this.__destroy_into_raw();
|
|
5946
|
+
wasm.__wbg_txdetails_free(ptr, 0);
|
|
5947
|
+
}
|
|
5948
|
+
/**
|
|
5949
|
+
* Transaction
|
|
5950
|
+
* @returns {Transaction | undefined}
|
|
5951
|
+
*/
|
|
5952
|
+
tx() {
|
|
5953
|
+
const ret = wasm.txdetails_tx(this.__wbg_ptr);
|
|
5954
|
+
return ret === 0 ? undefined : Transaction.__wrap(ret);
|
|
5955
|
+
}
|
|
5956
|
+
/**
|
|
5957
|
+
* Txid
|
|
5958
|
+
* @returns {Txid}
|
|
5959
|
+
*/
|
|
5960
|
+
txid() {
|
|
5961
|
+
const ret = wasm.txdetails_txid(this.__wbg_ptr);
|
|
5962
|
+
return Txid.__wrap(ret);
|
|
5963
|
+
}
|
|
5964
|
+
/**
|
|
5965
|
+
* Blockchain height
|
|
5966
|
+
* @returns {number | undefined}
|
|
5967
|
+
*/
|
|
5968
|
+
height() {
|
|
5969
|
+
const ret = wasm.txdetails_height(this.__wbg_ptr);
|
|
5970
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
5971
|
+
}
|
|
5972
|
+
/**
|
|
5973
|
+
* Timestamp
|
|
5974
|
+
*
|
|
5975
|
+
* A reasonable timestamp, that however can be inaccurate.
|
|
5976
|
+
* If you need a precise timestamp, do not use this value.
|
|
5977
|
+
* @returns {number | undefined}
|
|
5978
|
+
*/
|
|
5979
|
+
timestamp() {
|
|
5980
|
+
const ret = wasm.txdetails_timestamp(this.__wbg_ptr);
|
|
5981
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
5982
|
+
}
|
|
5983
|
+
/**
|
|
5984
|
+
* Transaction type
|
|
5985
|
+
*
|
|
5986
|
+
* A tentative description of the transaction type, which
|
|
5987
|
+
* however might be inaccurate. Use this if you want a simple
|
|
5988
|
+
* description of what this transaction is doing, but do
|
|
5989
|
+
* not rely on the value returned.
|
|
5990
|
+
* @returns {string}
|
|
5991
|
+
*/
|
|
5992
|
+
txType() {
|
|
5993
|
+
let deferred1_0;
|
|
5994
|
+
let deferred1_1;
|
|
5995
|
+
try {
|
|
5996
|
+
const ret = wasm.txdetails_txType(this.__wbg_ptr);
|
|
5997
|
+
deferred1_0 = ret[0];
|
|
5998
|
+
deferred1_1 = ret[1];
|
|
5999
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
6000
|
+
} finally {
|
|
6001
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
6002
|
+
}
|
|
6003
|
+
}
|
|
6004
|
+
/**
|
|
6005
|
+
* Balance
|
|
6006
|
+
*
|
|
6007
|
+
* Net balance from the `Wollet` perspective
|
|
6008
|
+
* @returns {Balance}
|
|
6009
|
+
*/
|
|
6010
|
+
balance() {
|
|
6011
|
+
const ret = wasm.txdetails_balance(this.__wbg_ptr);
|
|
6012
|
+
return Balance.__wrap(ret);
|
|
6013
|
+
}
|
|
6014
|
+
/**
|
|
6015
|
+
* Asset fees
|
|
6016
|
+
* @param {AssetId} asset
|
|
6017
|
+
* @returns {bigint}
|
|
6018
|
+
*/
|
|
6019
|
+
feesAsset(asset) {
|
|
6020
|
+
_assertClass(asset, AssetId);
|
|
6021
|
+
const ret = wasm.txdetails_feesAsset(this.__wbg_ptr, asset.__wbg_ptr);
|
|
6022
|
+
return BigInt.asUintN(64, ret);
|
|
6023
|
+
}
|
|
6024
|
+
/**
|
|
6025
|
+
* Unblinded URL
|
|
6026
|
+
* @param {string} explorer_url
|
|
6027
|
+
* @returns {string}
|
|
6028
|
+
*/
|
|
6029
|
+
unblindedUrl(explorer_url) {
|
|
6030
|
+
let deferred2_0;
|
|
6031
|
+
let deferred2_1;
|
|
6032
|
+
try {
|
|
6033
|
+
const ptr0 = passStringToWasm0(explorer_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6034
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6035
|
+
const ret = wasm.txdetails_unblindedUrl(this.__wbg_ptr, ptr0, len0);
|
|
6036
|
+
deferred2_0 = ret[0];
|
|
6037
|
+
deferred2_1 = ret[1];
|
|
6038
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
6039
|
+
} finally {
|
|
6040
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
6041
|
+
}
|
|
6042
|
+
}
|
|
6043
|
+
/**
|
|
6044
|
+
* Inputs
|
|
6045
|
+
* @returns {TxOutDetails[]}
|
|
6046
|
+
*/
|
|
6047
|
+
inputs() {
|
|
6048
|
+
const ret = wasm.txdetails_inputs(this.__wbg_ptr);
|
|
6049
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
6050
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6051
|
+
return v1;
|
|
6052
|
+
}
|
|
6053
|
+
/**
|
|
6054
|
+
* Outputs
|
|
6055
|
+
* @returns {TxOutDetails[]}
|
|
6056
|
+
*/
|
|
6057
|
+
outputs() {
|
|
6058
|
+
const ret = wasm.txdetails_outputs(this.__wbg_ptr);
|
|
6059
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
6060
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6061
|
+
return v1;
|
|
6062
|
+
}
|
|
6063
|
+
}
|
|
6064
|
+
if (Symbol.dispose) TxDetails.prototype[Symbol.dispose] = TxDetails.prototype.free;
|
|
6065
|
+
|
|
6066
|
+
exports.TxDetails = TxDetails;
|
|
6067
|
+
|
|
6068
|
+
const TxOptFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6069
|
+
? { register: () => {}, unregister: () => {} }
|
|
6070
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_txopt_free(ptr >>> 0, 1));
|
|
6071
|
+
/**
|
|
6072
|
+
* Options for transaction details
|
|
6073
|
+
*/
|
|
6074
|
+
class TxOpt {
|
|
6075
|
+
|
|
6076
|
+
static __wrap(ptr) {
|
|
6077
|
+
ptr = ptr >>> 0;
|
|
6078
|
+
const obj = Object.create(TxOpt.prototype);
|
|
6079
|
+
obj.__wbg_ptr = ptr;
|
|
6080
|
+
TxOptFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
6081
|
+
return obj;
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
__destroy_into_raw() {
|
|
6085
|
+
const ptr = this.__wbg_ptr;
|
|
6086
|
+
this.__wbg_ptr = 0;
|
|
6087
|
+
TxOptFinalization.unregister(this);
|
|
6088
|
+
return ptr;
|
|
6089
|
+
}
|
|
6090
|
+
|
|
6091
|
+
free() {
|
|
6092
|
+
const ptr = this.__destroy_into_raw();
|
|
6093
|
+
wasm.__wbg_txopt_free(ptr, 0);
|
|
6094
|
+
}
|
|
6095
|
+
/**
|
|
6096
|
+
* @returns {TxOpt}
|
|
6097
|
+
*/
|
|
6098
|
+
static default() {
|
|
6099
|
+
const ret = wasm.txopt_default();
|
|
6100
|
+
return TxOpt.__wrap(ret);
|
|
6101
|
+
}
|
|
6102
|
+
}
|
|
6103
|
+
if (Symbol.dispose) TxOpt.prototype[Symbol.dispose] = TxOpt.prototype.free;
|
|
6104
|
+
|
|
6105
|
+
exports.TxOpt = TxOpt;
|
|
6106
|
+
|
|
6107
|
+
const TxOutDetailsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6108
|
+
? { register: () => {}, unregister: () => {} }
|
|
6109
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_txoutdetails_free(ptr >>> 0, 1));
|
|
6110
|
+
/**
|
|
6111
|
+
* Transaction output details
|
|
6112
|
+
*/
|
|
6113
|
+
class TxOutDetails {
|
|
6114
|
+
|
|
6115
|
+
static __wrap(ptr) {
|
|
6116
|
+
ptr = ptr >>> 0;
|
|
6117
|
+
const obj = Object.create(TxOutDetails.prototype);
|
|
6118
|
+
obj.__wbg_ptr = ptr;
|
|
6119
|
+
TxOutDetailsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
6120
|
+
return obj;
|
|
6121
|
+
}
|
|
6122
|
+
|
|
6123
|
+
__destroy_into_raw() {
|
|
6124
|
+
const ptr = this.__wbg_ptr;
|
|
6125
|
+
this.__wbg_ptr = 0;
|
|
6126
|
+
TxOutDetailsFinalization.unregister(this);
|
|
6127
|
+
return ptr;
|
|
6128
|
+
}
|
|
6129
|
+
|
|
6130
|
+
free() {
|
|
6131
|
+
const ptr = this.__destroy_into_raw();
|
|
6132
|
+
wasm.__wbg_txoutdetails_free(ptr, 0);
|
|
6133
|
+
}
|
|
6134
|
+
/**
|
|
6135
|
+
* Outpoint
|
|
6136
|
+
* @returns {OutPoint}
|
|
6137
|
+
*/
|
|
6138
|
+
outpoint() {
|
|
6139
|
+
const ret = wasm.txoutdetails_outpoint(this.__wbg_ptr);
|
|
6140
|
+
return OutPoint.__wrap(ret);
|
|
6141
|
+
}
|
|
6142
|
+
/**
|
|
6143
|
+
* Scriptpubkey
|
|
6144
|
+
* @returns {Script | undefined}
|
|
6145
|
+
*/
|
|
6146
|
+
script_pubkey() {
|
|
6147
|
+
const ret = wasm.txoutdetails_script_pubkey(this.__wbg_ptr);
|
|
6148
|
+
return ret === 0 ? undefined : Script.__wrap(ret);
|
|
6149
|
+
}
|
|
6150
|
+
/**
|
|
6151
|
+
* Height
|
|
6152
|
+
* @returns {number | undefined}
|
|
6153
|
+
*/
|
|
6154
|
+
height() {
|
|
6155
|
+
const ret = wasm.txoutdetails_height(this.__wbg_ptr);
|
|
6156
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
6157
|
+
}
|
|
6158
|
+
/**
|
|
6159
|
+
* Address
|
|
6160
|
+
* @returns {Address | undefined}
|
|
6161
|
+
*/
|
|
6162
|
+
address() {
|
|
6163
|
+
const ret = wasm.txoutdetails_address(this.__wbg_ptr);
|
|
6164
|
+
return ret === 0 ? undefined : Address.__wrap(ret);
|
|
6165
|
+
}
|
|
6166
|
+
/**
|
|
6167
|
+
* Unblinded values (asset, amount, blinders)
|
|
6168
|
+
* @returns {TxOutSecrets | undefined}
|
|
6169
|
+
*/
|
|
6170
|
+
unblinded() {
|
|
6171
|
+
const ret = wasm.txoutdetails_unblinded(this.__wbg_ptr);
|
|
6172
|
+
return ret === 0 ? undefined : TxOutSecrets.__wrap(ret);
|
|
6173
|
+
}
|
|
6174
|
+
/**
|
|
6175
|
+
* Whether the transaction output is explicit
|
|
6176
|
+
* @returns {boolean}
|
|
6177
|
+
*/
|
|
6178
|
+
is_explicit() {
|
|
6179
|
+
const ret = wasm.txoutdetails_is_explicit(this.__wbg_ptr);
|
|
6180
|
+
return ret !== 0;
|
|
6181
|
+
}
|
|
6182
|
+
/**
|
|
6183
|
+
* Whether the output is spent by a previously downloaded transaction
|
|
6184
|
+
*
|
|
6185
|
+
* Note: this value might be inaccurate. We compute this from downloaded
|
|
6186
|
+
* transactions, however we only download transactions relevant for the
|
|
6187
|
+
* wallet (i.e. if they include inputs or outputs that belong to the
|
|
6188
|
+
* wallet), thus for non-wallet outputs we might set this value
|
|
6189
|
+
* incorrectly. For wallet outputs, it can be outdated.
|
|
6190
|
+
* @returns {boolean}
|
|
6191
|
+
*/
|
|
6192
|
+
is_spent() {
|
|
6193
|
+
const ret = wasm.txoutdetails_is_spent(this.__wbg_ptr);
|
|
6194
|
+
return ret !== 0;
|
|
6195
|
+
}
|
|
6196
|
+
}
|
|
6197
|
+
if (Symbol.dispose) TxOutDetails.prototype[Symbol.dispose] = TxOutDetails.prototype.free;
|
|
6198
|
+
|
|
6199
|
+
exports.TxOutDetails = TxOutDetails;
|
|
6200
|
+
|
|
5847
6201
|
const TxOutSecretsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5848
6202
|
? { register: () => {}, unregister: () => {} }
|
|
5849
6203
|
: new FinalizationRegistry(ptr => wasm.__wbg_txoutsecrets_free(ptr >>> 0, 1));
|
|
@@ -6031,6 +6385,54 @@ if (Symbol.dispose) Txid.prototype[Symbol.dispose] = Txid.prototype.free;
|
|
|
6031
6385
|
|
|
6032
6386
|
exports.Txid = Txid;
|
|
6033
6387
|
|
|
6388
|
+
const TxsOptFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6389
|
+
? { register: () => {}, unregister: () => {} }
|
|
6390
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_txsopt_free(ptr >>> 0, 1));
|
|
6391
|
+
/**
|
|
6392
|
+
* Options for transaction details
|
|
6393
|
+
*/
|
|
6394
|
+
class TxsOpt {
|
|
6395
|
+
|
|
6396
|
+
static __wrap(ptr) {
|
|
6397
|
+
ptr = ptr >>> 0;
|
|
6398
|
+
const obj = Object.create(TxsOpt.prototype);
|
|
6399
|
+
obj.__wbg_ptr = ptr;
|
|
6400
|
+
TxsOptFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
6401
|
+
return obj;
|
|
6402
|
+
}
|
|
6403
|
+
|
|
6404
|
+
__destroy_into_raw() {
|
|
6405
|
+
const ptr = this.__wbg_ptr;
|
|
6406
|
+
this.__wbg_ptr = 0;
|
|
6407
|
+
TxsOptFinalization.unregister(this);
|
|
6408
|
+
return ptr;
|
|
6409
|
+
}
|
|
6410
|
+
|
|
6411
|
+
free() {
|
|
6412
|
+
const ptr = this.__destroy_into_raw();
|
|
6413
|
+
wasm.__wbg_txsopt_free(ptr, 0);
|
|
6414
|
+
}
|
|
6415
|
+
/**
|
|
6416
|
+
* @returns {TxsOpt}
|
|
6417
|
+
*/
|
|
6418
|
+
static default() {
|
|
6419
|
+
const ret = wasm.txsopt_default();
|
|
6420
|
+
return TxsOpt.__wrap(ret);
|
|
6421
|
+
}
|
|
6422
|
+
/**
|
|
6423
|
+
* @param {number} offset
|
|
6424
|
+
* @param {number} limit
|
|
6425
|
+
* @returns {TxsOpt}
|
|
6426
|
+
*/
|
|
6427
|
+
static withPagination(offset, limit) {
|
|
6428
|
+
const ret = wasm.txsopt_withPagination(offset, limit);
|
|
6429
|
+
return TxsOpt.__wrap(ret);
|
|
6430
|
+
}
|
|
6431
|
+
}
|
|
6432
|
+
if (Symbol.dispose) TxsOpt.prototype[Symbol.dispose] = TxsOpt.prototype.free;
|
|
6433
|
+
|
|
6434
|
+
exports.TxsOpt = TxsOpt;
|
|
6435
|
+
|
|
6034
6436
|
const UnvalidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6035
6437
|
? { register: () => {}, unregister: () => {} }
|
|
6036
6438
|
: new FinalizationRegistry(ptr => wasm.__wbg_unvalidatedliquidexproposal_free(ptr >>> 0, 1));
|
|
@@ -6682,6 +7084,51 @@ class Wollet {
|
|
|
6682
7084
|
const ptr = this.__destroy_into_raw();
|
|
6683
7085
|
wasm.__wbg_wollet_free(ptr, 0);
|
|
6684
7086
|
}
|
|
7087
|
+
/**
|
|
7088
|
+
* Get the transaction list
|
|
7089
|
+
*
|
|
7090
|
+
* **Experimental**: This API may change without notice.
|
|
7091
|
+
* @param {TxsOpt} opt
|
|
7092
|
+
* @returns {TxDetails[]}
|
|
7093
|
+
*/
|
|
7094
|
+
txs(opt) {
|
|
7095
|
+
_assertClass(opt, TxsOpt);
|
|
7096
|
+
const ret = wasm.wollet_txs(this.__wbg_ptr, opt.__wbg_ptr);
|
|
7097
|
+
if (ret[3]) {
|
|
7098
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
7099
|
+
}
|
|
7100
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
7101
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
7102
|
+
return v1;
|
|
7103
|
+
}
|
|
7104
|
+
/**
|
|
7105
|
+
* Number of transactions
|
|
7106
|
+
* @returns {number}
|
|
7107
|
+
*/
|
|
7108
|
+
numTxs() {
|
|
7109
|
+
const ret = wasm.wollet_numTxs(this.__wbg_ptr);
|
|
7110
|
+
if (ret[2]) {
|
|
7111
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
7112
|
+
}
|
|
7113
|
+
return ret[0] >>> 0;
|
|
7114
|
+
}
|
|
7115
|
+
/**
|
|
7116
|
+
* Get the details of a transaction
|
|
7117
|
+
*
|
|
7118
|
+
* **Experimental**: This API may change without notice.
|
|
7119
|
+
* @param {Txid} txid
|
|
7120
|
+
* @param {TxOpt} opt
|
|
7121
|
+
* @returns {TxDetails | undefined}
|
|
7122
|
+
*/
|
|
7123
|
+
txDetails(txid, opt) {
|
|
7124
|
+
_assertClass(txid, Txid);
|
|
7125
|
+
_assertClass(opt, TxOpt);
|
|
7126
|
+
const ret = wasm.wollet_txDetails(this.__wbg_ptr, txid.__wbg_ptr, opt.__wbg_ptr);
|
|
7127
|
+
if (ret[2]) {
|
|
7128
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
7129
|
+
}
|
|
7130
|
+
return ret[0] === 0 ? undefined : TxDetails.__wrap(ret[0]);
|
|
7131
|
+
}
|
|
6685
7132
|
/**
|
|
6686
7133
|
* Create a `Wollet`
|
|
6687
7134
|
* @param {Network} network
|
|
@@ -6826,7 +7273,7 @@ class Wollet {
|
|
|
6826
7273
|
return AssetIds.__wrap(ret[0]);
|
|
6827
7274
|
}
|
|
6828
7275
|
/**
|
|
6829
|
-
* Get the wallet transactions
|
|
7276
|
+
* Get the wallet transactions, sorted by height descending, then txid descending with unconfirmed first
|
|
6830
7277
|
* @returns {WalletTx[]}
|
|
6831
7278
|
*/
|
|
6832
7279
|
transactions() {
|
|
@@ -6838,6 +7285,21 @@ class Wollet {
|
|
|
6838
7285
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
6839
7286
|
return v1;
|
|
6840
7287
|
}
|
|
7288
|
+
/**
|
|
7289
|
+
* Get the wallet transactions with pagination sorted by height descending, then txid descending with unconfirmed first
|
|
7290
|
+
* @param {number} offset
|
|
7291
|
+
* @param {number} limit
|
|
7292
|
+
* @returns {WalletTx[]}
|
|
7293
|
+
*/
|
|
7294
|
+
transactionsPaginated(offset, limit) {
|
|
7295
|
+
const ret = wasm.wollet_transactionsPaginated(this.__wbg_ptr, offset, limit);
|
|
7296
|
+
if (ret[3]) {
|
|
7297
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
7298
|
+
}
|
|
7299
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
7300
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
7301
|
+
return v1;
|
|
7302
|
+
}
|
|
6841
7303
|
/**
|
|
6842
7304
|
* Get the unspent transaction outputs of the wallet
|
|
6843
7305
|
* @returns {WalletTxOut[]}
|
|
@@ -6944,6 +7406,134 @@ if (Symbol.dispose) Wollet.prototype[Symbol.dispose] = Wollet.prototype.free;
|
|
|
6944
7406
|
|
|
6945
7407
|
exports.Wollet = Wollet;
|
|
6946
7408
|
|
|
7409
|
+
const WolletBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
7410
|
+
? { register: () => {}, unregister: () => {} }
|
|
7411
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wolletbuilder_free(ptr >>> 0, 1));
|
|
7412
|
+
/**
|
|
7413
|
+
* A builder for constructing [`Wollet`] instances.
|
|
7414
|
+
*/
|
|
7415
|
+
class WolletBuilder {
|
|
7416
|
+
|
|
7417
|
+
static __wrap(ptr) {
|
|
7418
|
+
ptr = ptr >>> 0;
|
|
7419
|
+
const obj = Object.create(WolletBuilder.prototype);
|
|
7420
|
+
obj.__wbg_ptr = ptr;
|
|
7421
|
+
WolletBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
7422
|
+
return obj;
|
|
7423
|
+
}
|
|
7424
|
+
|
|
7425
|
+
__destroy_into_raw() {
|
|
7426
|
+
const ptr = this.__wbg_ptr;
|
|
7427
|
+
this.__wbg_ptr = 0;
|
|
7428
|
+
WolletBuilderFinalization.unregister(this);
|
|
7429
|
+
return ptr;
|
|
7430
|
+
}
|
|
7431
|
+
|
|
7432
|
+
free() {
|
|
7433
|
+
const ptr = this.__destroy_into_raw();
|
|
7434
|
+
wasm.__wbg_wolletbuilder_free(ptr, 0);
|
|
7435
|
+
}
|
|
7436
|
+
/**
|
|
7437
|
+
* Create a builder for a watch-only wallet.
|
|
7438
|
+
* @param {Network} network
|
|
7439
|
+
* @param {WolletDescriptor} descriptor
|
|
7440
|
+
*/
|
|
7441
|
+
constructor(network, descriptor) {
|
|
7442
|
+
_assertClass(network, Network);
|
|
7443
|
+
_assertClass(descriptor, WolletDescriptor);
|
|
7444
|
+
const ret = wasm.wolletbuilder_new(network.__wbg_ptr, descriptor.__wbg_ptr);
|
|
7445
|
+
this.__wbg_ptr = ret >>> 0;
|
|
7446
|
+
WolletBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
7447
|
+
return this;
|
|
7448
|
+
}
|
|
7449
|
+
/**
|
|
7450
|
+
* Set the threshold used to merge persisted updates during build.
|
|
7451
|
+
*
|
|
7452
|
+
* **Experimental**: This API may change without notice.
|
|
7453
|
+
*
|
|
7454
|
+
* `None` disables merging (default behavior).
|
|
7455
|
+
* @param {number | null} [merge_threshold]
|
|
7456
|
+
* @returns {WolletBuilder}
|
|
7457
|
+
*/
|
|
7458
|
+
withMergeThreshold(merge_threshold) {
|
|
7459
|
+
const ptr = this.__destroy_into_raw();
|
|
7460
|
+
const ret = wasm.wolletbuilder_withMergeThreshold(ptr, isLikeNone(merge_threshold) ? 0x100000001 : (merge_threshold) >>> 0);
|
|
7461
|
+
return WolletBuilder.__wrap(ret);
|
|
7462
|
+
}
|
|
7463
|
+
/**
|
|
7464
|
+
* Set the wallet as "utxo only".
|
|
7465
|
+
*
|
|
7466
|
+
* **Experimental**: This API may change without notice.
|
|
7467
|
+
* @param {boolean} utxo_only
|
|
7468
|
+
* @returns {WolletBuilder}
|
|
7469
|
+
*/
|
|
7470
|
+
utxoOnly(utxo_only) {
|
|
7471
|
+
const ptr = this.__destroy_into_raw();
|
|
7472
|
+
const ret = wasm.wolletbuilder_utxoOnly(ptr, utxo_only);
|
|
7473
|
+
return WolletBuilder.__wrap(ret);
|
|
7474
|
+
}
|
|
7475
|
+
/**
|
|
7476
|
+
* Persist wallet updates in the given JavaScript storage object.
|
|
7477
|
+
*
|
|
7478
|
+
* **Experimental**: This API may change without notice.
|
|
7479
|
+
*
|
|
7480
|
+
* Wallet data is persisted in clear.
|
|
7481
|
+
*
|
|
7482
|
+
* The JS object must have `get(key)`, `put(key, value)`, and `remove(key)` methods.
|
|
7483
|
+
* @param {any} storage
|
|
7484
|
+
* @returns {WolletBuilder}
|
|
7485
|
+
*/
|
|
7486
|
+
withExperimentalStore(storage) {
|
|
7487
|
+
const ptr = this.__destroy_into_raw();
|
|
7488
|
+
const ret = wasm.wolletbuilder_withExperimentalStore(ptr, storage);
|
|
7489
|
+
return WolletBuilder.__wrap(ret);
|
|
7490
|
+
}
|
|
7491
|
+
/**
|
|
7492
|
+
* Persist wallet transactions in the given JavaScript
|
|
7493
|
+
* storage object.
|
|
7494
|
+
*
|
|
7495
|
+
* **Experimental**: This API may change without notice.
|
|
7496
|
+
*
|
|
7497
|
+
* The JS object must have `get(key)`, `put(key, value)`, and `remove(key)` methods.
|
|
7498
|
+
* @param {any} storage
|
|
7499
|
+
* @returns {WolletBuilder}
|
|
7500
|
+
*/
|
|
7501
|
+
withTxsStore(storage) {
|
|
7502
|
+
const ptr = this.__destroy_into_raw();
|
|
7503
|
+
const ret = wasm.wolletbuilder_withTxsStore(ptr, storage);
|
|
7504
|
+
return WolletBuilder.__wrap(ret);
|
|
7505
|
+
}
|
|
7506
|
+
/**
|
|
7507
|
+
* Set encryption for the transactions store.
|
|
7508
|
+
*
|
|
7509
|
+
* **Experimental**: This API may change without notice.
|
|
7510
|
+
*
|
|
7511
|
+
* Default: encrypted if the store is persisted.
|
|
7512
|
+
* @param {boolean} encrypt
|
|
7513
|
+
* @returns {WolletBuilder}
|
|
7514
|
+
*/
|
|
7515
|
+
setEncryptionTxsStore(encrypt) {
|
|
7516
|
+
const ptr = this.__destroy_into_raw();
|
|
7517
|
+
const ret = wasm.wolletbuilder_setEncryptionTxsStore(ptr, encrypt);
|
|
7518
|
+
return WolletBuilder.__wrap(ret);
|
|
7519
|
+
}
|
|
7520
|
+
/**
|
|
7521
|
+
* Build the wallet from this builder.
|
|
7522
|
+
* @returns {Wollet}
|
|
7523
|
+
*/
|
|
7524
|
+
build() {
|
|
7525
|
+
const ptr = this.__destroy_into_raw();
|
|
7526
|
+
const ret = wasm.wolletbuilder_build(ptr);
|
|
7527
|
+
if (ret[2]) {
|
|
7528
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
7529
|
+
}
|
|
7530
|
+
return Wollet.__wrap(ret[0]);
|
|
7531
|
+
}
|
|
7532
|
+
}
|
|
7533
|
+
if (Symbol.dispose) WolletBuilder.prototype[Symbol.dispose] = WolletBuilder.prototype.free;
|
|
7534
|
+
|
|
7535
|
+
exports.WolletBuilder = WolletBuilder;
|
|
7536
|
+
|
|
6947
7537
|
const WolletDescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6948
7538
|
? { register: () => {}, unregister: () => {} }
|
|
6949
7539
|
: new FinalizationRegistry(ptr => wasm.__wbg_wolletdescriptor_free(ptr >>> 0, 1));
|
|
@@ -7333,7 +7923,12 @@ exports.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
|
|
|
7333
7923
|
return ret;
|
|
7334
7924
|
};
|
|
7335
7925
|
|
|
7336
|
-
exports.
|
|
7926
|
+
exports.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
7927
|
+
const ret = Reflect.get(arg0, arg1);
|
|
7928
|
+
return ret;
|
|
7929
|
+
}, arguments) };
|
|
7930
|
+
|
|
7931
|
+
exports.__wbg_get_51efc4293c4dd1d9 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
7337
7932
|
const ret = arg1.get(getStringFromWasm0(arg2, arg3));
|
|
7338
7933
|
var ptr1 = isLikeNone(ret) ? 0 : passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
7339
7934
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -7341,11 +7936,6 @@ exports.__wbg_get_39bedfef9433a446 = function() { return handleError(function (a
|
|
|
7341
7936
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
7342
7937
|
}, arguments) };
|
|
7343
7938
|
|
|
7344
|
-
exports.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
7345
|
-
const ret = Reflect.get(arg0, arg1);
|
|
7346
|
-
return ret;
|
|
7347
|
-
}, arguments) };
|
|
7348
|
-
|
|
7349
7939
|
exports.__wbg_has_b89e451f638123e3 = function() { return handleError(function (arg0, arg1) {
|
|
7350
7940
|
const ret = Reflect.has(arg0, arg1);
|
|
7351
7941
|
return ret;
|
|
@@ -7437,6 +8027,11 @@ exports.__wbg_isArray_030cce220591fb41 = function(arg0) {
|
|
|
7437
8027
|
return ret;
|
|
7438
8028
|
};
|
|
7439
8029
|
|
|
8030
|
+
exports.__wbg_isPersisted_d5ab844267f1abff = function() { return handleError(function (arg0) {
|
|
8031
|
+
const ret = arg0.isPersisted();
|
|
8032
|
+
return ret;
|
|
8033
|
+
}, arguments) };
|
|
8034
|
+
|
|
7440
8035
|
exports.__wbg_issuance_new = function(arg0) {
|
|
7441
8036
|
const ret = Issuance.__wrap(arg0);
|
|
7442
8037
|
return ret;
|
|
@@ -7472,7 +8067,7 @@ exports.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
|
|
|
7472
8067
|
return ret;
|
|
7473
8068
|
};
|
|
7474
8069
|
|
|
7475
|
-
exports.
|
|
8070
|
+
exports.__wbg_log_8528632c48f8c6bb = function(arg0, arg1) {
|
|
7476
8071
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
7477
8072
|
};
|
|
7478
8073
|
|
|
@@ -7508,7 +8103,7 @@ exports.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
|
|
|
7508
8103
|
const a = state0.a;
|
|
7509
8104
|
state0.a = 0;
|
|
7510
8105
|
try {
|
|
7511
|
-
return
|
|
8106
|
+
return __wbg_adapter_735(a, state0.b, arg0, arg1);
|
|
7512
8107
|
} finally {
|
|
7513
8108
|
state0.a = a;
|
|
7514
8109
|
}
|
|
@@ -7679,7 +8274,7 @@ exports.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
|
|
|
7679
8274
|
return ret;
|
|
7680
8275
|
};
|
|
7681
8276
|
|
|
7682
|
-
exports.
|
|
8277
|
+
exports.__wbg_put_fe70093a1126561e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
7683
8278
|
arg0.put(getStringFromWasm0(arg1, arg2), getArrayU8FromWasm0(arg3, arg4));
|
|
7684
8279
|
}, arguments) };
|
|
7685
8280
|
|
|
@@ -7729,7 +8324,7 @@ exports.__wbg_registry_new = function(arg0) {
|
|
|
7729
8324
|
return ret;
|
|
7730
8325
|
};
|
|
7731
8326
|
|
|
7732
|
-
exports.
|
|
8327
|
+
exports.__wbg_remove_e4c99b92a84f8bdb = function() { return handleError(function (arg0, arg1, arg2) {
|
|
7733
8328
|
arg0.remove(getStringFromWasm0(arg1, arg2));
|
|
7734
8329
|
}, arguments) };
|
|
7735
8330
|
|
|
@@ -7945,11 +8540,21 @@ exports.__wbg_transaction_new = function(arg0) {
|
|
|
7945
8540
|
return ret;
|
|
7946
8541
|
};
|
|
7947
8542
|
|
|
8543
|
+
exports.__wbg_txdetails_new = function(arg0) {
|
|
8544
|
+
const ret = TxDetails.__wrap(arg0);
|
|
8545
|
+
return ret;
|
|
8546
|
+
};
|
|
8547
|
+
|
|
7948
8548
|
exports.__wbg_txid_new = function(arg0) {
|
|
7949
8549
|
const ret = Txid.__wrap(arg0);
|
|
7950
8550
|
return ret;
|
|
7951
8551
|
};
|
|
7952
8552
|
|
|
8553
|
+
exports.__wbg_txoutdetails_new = function(arg0) {
|
|
8554
|
+
const ret = TxOutDetails.__wrap(arg0);
|
|
8555
|
+
return ret;
|
|
8556
|
+
};
|
|
8557
|
+
|
|
7953
8558
|
exports.__wbg_update_new = function(arg0) {
|
|
7954
8559
|
const ret = Update.__wrap(arg0);
|
|
7955
8560
|
return ret;
|
|
@@ -8060,15 +8665,27 @@ exports.__wbg_xpub_new = function(arg0) {
|
|
|
8060
8665
|
return ret;
|
|
8061
8666
|
};
|
|
8062
8667
|
|
|
8668
|
+
exports.__wbindgen_cast_05316810ffcd6eb2 = function(arg0, arg1) {
|
|
8669
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1527, function: Function { arguments: [], shim_idx: 1528, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8670
|
+
const ret = makeMutClosure(arg0, arg1, 1527, __wbg_adapter_34);
|
|
8671
|
+
return ret;
|
|
8672
|
+
};
|
|
8673
|
+
|
|
8674
|
+
exports.__wbindgen_cast_1321c3200b515ef0 = function(arg0, arg1) {
|
|
8675
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2048, function: Function { arguments: [], shim_idx: 2049, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8676
|
+
const ret = makeMutClosure(arg0, arg1, 2048, __wbg_adapter_14);
|
|
8677
|
+
return ret;
|
|
8678
|
+
};
|
|
8679
|
+
|
|
8063
8680
|
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
8064
8681
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
8065
8682
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
8066
8683
|
return ret;
|
|
8067
8684
|
};
|
|
8068
8685
|
|
|
8069
|
-
exports.
|
|
8070
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8071
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
8686
|
+
exports.__wbindgen_cast_2418b153fa6fc211 = function(arg0, arg1) {
|
|
8687
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1234, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1315, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8688
|
+
const ret = makeMutClosure(arg0, arg1, 1234, __wbg_adapter_6);
|
|
8072
8689
|
return ret;
|
|
8073
8690
|
};
|
|
8074
8691
|
|
|
@@ -8078,39 +8695,39 @@ exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
|
8078
8695
|
return ret;
|
|
8079
8696
|
};
|
|
8080
8697
|
|
|
8081
|
-
exports.
|
|
8082
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8083
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
8698
|
+
exports.__wbindgen_cast_472e36d4bc1d72dd = function(arg0, arg1) {
|
|
8699
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 464, function: Function { arguments: [NamedExternref("HIDInputReportEvent")], shim_idx: 748, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8700
|
+
const ret = makeMutClosure(arg0, arg1, 464, __wbg_adapter_11);
|
|
8084
8701
|
return ret;
|
|
8085
8702
|
};
|
|
8086
8703
|
|
|
8087
|
-
exports.
|
|
8088
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8089
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
8704
|
+
exports.__wbindgen_cast_5fb90d42c153401a = function(arg0, arg1) {
|
|
8705
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1234, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1315, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8706
|
+
const ret = makeMutClosure(arg0, arg1, 1234, __wbg_adapter_6);
|
|
8090
8707
|
return ret;
|
|
8091
8708
|
};
|
|
8092
8709
|
|
|
8093
|
-
exports.
|
|
8094
|
-
// Cast intrinsic for `
|
|
8095
|
-
const ret = arg0;
|
|
8710
|
+
exports.__wbindgen_cast_870f30505a964aa4 = function(arg0, arg1) {
|
|
8711
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1234, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1315, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8712
|
+
const ret = makeMutClosure(arg0, arg1, 1234, __wbg_adapter_6);
|
|
8096
8713
|
return ret;
|
|
8097
8714
|
};
|
|
8098
8715
|
|
|
8099
|
-
exports.
|
|
8100
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8101
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
8716
|
+
exports.__wbindgen_cast_87b57fd7dc87a7a7 = function(arg0, arg1) {
|
|
8717
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 2083, function: Function { arguments: [Externref], shim_idx: 2094, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8718
|
+
const ret = makeMutClosure(arg0, arg1, 2083, __wbg_adapter_31);
|
|
8102
8719
|
return ret;
|
|
8103
8720
|
};
|
|
8104
8721
|
|
|
8105
|
-
exports.
|
|
8106
|
-
// Cast intrinsic for `
|
|
8107
|
-
const ret =
|
|
8722
|
+
exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
8723
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
8724
|
+
const ret = arg0;
|
|
8108
8725
|
return ret;
|
|
8109
8726
|
};
|
|
8110
8727
|
|
|
8111
|
-
exports.
|
|
8112
|
-
// Cast intrinsic for `
|
|
8113
|
-
const ret =
|
|
8728
|
+
exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
8729
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
8730
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
8114
8731
|
return ret;
|
|
8115
8732
|
};
|
|
8116
8733
|
|
|
@@ -8120,21 +8737,9 @@ exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
|
8120
8737
|
return ret;
|
|
8121
8738
|
};
|
|
8122
8739
|
|
|
8123
|
-
exports.
|
|
8124
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
8125
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
8126
|
-
return ret;
|
|
8127
|
-
};
|
|
8128
|
-
|
|
8129
|
-
exports.__wbindgen_cast_f36c9415fb8ff7bb = function(arg0, arg1) {
|
|
8130
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 671, function: Function { arguments: [NamedExternref("HIDInputReportEvent")], shim_idx: 804, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8131
|
-
const ret = makeMutClosure(arg0, arg1, 671, __wbg_adapter_31);
|
|
8132
|
-
return ret;
|
|
8133
|
-
};
|
|
8134
|
-
|
|
8135
|
-
exports.__wbindgen_cast_f944d0f89d71242c = function(arg0, arg1) {
|
|
8136
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 1351, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1352, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8137
|
-
const ret = makeMutClosure(arg0, arg1, 1351, __wbg_adapter_15);
|
|
8740
|
+
exports.__wbindgen_cast_df70d36de82e387c = function(arg0, arg1) {
|
|
8741
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1234, function: Function { arguments: [NamedExternref("Event")], shim_idx: 1315, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
8742
|
+
const ret = makeMutClosure(arg0, arg1, 1234, __wbg_adapter_6);
|
|
8138
8743
|
return ret;
|
|
8139
8744
|
};
|
|
8140
8745
|
|
package/lwk_wasm_bg.wasm
CHANGED
|
Binary file
|