lwk_node 0.12.0 → 0.13.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 CHANGED
@@ -1,6 +1,15 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function searchLedgerDevice(): Promise<HIDDevice>;
4
+ /**
5
+ * Convert the given string to a QR code image uri
6
+ *
7
+ * The image format is monocromatic bitmap, returned as an encoded in base64 uri.
8
+ *
9
+ * Without `pixel_per_module` the default is no border, and 1 pixel per module, to be used
10
+ * for example in html: `style="image-rendering: pixelated; border: 20px solid white;"`
11
+ */
12
+ export function stringToQr(str: string, pixel_per_module?: number | null): string;
4
13
  /**
5
14
  * Wallet chain
6
15
  */
@@ -20,6 +29,7 @@ export enum Chain {
20
29
  */
21
30
  export class Address {
22
31
  free(): void;
32
+ [Symbol.dispose](): void;
23
33
  /**
24
34
  * Creates an `Address`
25
35
  *
@@ -74,6 +84,7 @@ export class Address {
74
84
  export class AddressResult {
75
85
  private constructor();
76
86
  free(): void;
87
+ [Symbol.dispose](): void;
77
88
  /**
78
89
  * Return the address.
79
90
  */
@@ -108,6 +119,7 @@ export class AddressResult {
108
119
  export class Amp0 {
109
120
  private constructor();
110
121
  free(): void;
122
+ [Symbol.dispose](): void;
111
123
  /**
112
124
  * Create a new AMP0 context for the specified network
113
125
  */
@@ -150,6 +162,7 @@ export class Amp0 {
150
162
  */
151
163
  export class Amp0Connected {
152
164
  free(): void;
165
+ [Symbol.dispose](): void;
153
166
  /**
154
167
  * Connect and register to AMP0
155
168
  */
@@ -159,7 +172,7 @@ export class Amp0Connected {
159
172
  *
160
173
  * This must be signed with [`amp0_sign_challenge()`].
161
174
  */
162
- get_challenge(): Promise<string>;
175
+ getChallenge(): Promise<string>;
163
176
  /**
164
177
  * Log in
165
178
  *
@@ -174,28 +187,29 @@ export class Amp0Connected {
174
187
  export class Amp0LoggedIn {
175
188
  private constructor();
176
189
  free(): void;
190
+ [Symbol.dispose](): void;
177
191
  /**
178
192
  * List of AMP IDs.
179
193
  */
180
- get_amp_ids(): string[];
194
+ getAmpIds(): string[];
181
195
  /**
182
196
  * Get the next account for AMP0 account creation
183
197
  *
184
198
  * This must be given to [`amp0_account_xpub()`] to obtain the xpub to pass to
185
199
  * [`Amp0LoggedIn::create_amp0_account()`]
186
200
  */
187
- next_account(): number;
201
+ nextAccount(): number;
188
202
  /**
189
203
  * Create a new AMP0 account
190
204
  *
191
205
  * `account_xpub` must be obtained from [`amp0_account_xpub()`] called with the value obtained from
192
206
  * [`Amp0LoggedIn::next_account()`]
193
207
  */
194
- create_amp0_account(pointer: number, account_xpub: string): Promise<string>;
208
+ createAmp0Account(pointer: number, account_xpub: string): Promise<string>;
195
209
  /**
196
210
  * Create a new Watch-Only entry for this wallet
197
211
  */
198
- create_watch_only(username: string, password: string): Promise<void>;
212
+ createWatchOnly(username: string, password: string): Promise<void>;
199
213
  }
200
214
  /**
201
215
  * A PSET to use with AMP0
@@ -207,6 +221,7 @@ export class Amp0LoggedIn {
207
221
  */
208
222
  export class Amp0Pset {
209
223
  free(): void;
224
+ [Symbol.dispose](): void;
210
225
  /**
211
226
  * Creates a `Amp0Pset`
212
227
  */
@@ -223,6 +238,7 @@ export class Amp0Pset {
223
238
  export class Amp0SignerData {
224
239
  private constructor();
225
240
  free(): void;
241
+ [Symbol.dispose](): void;
226
242
  }
227
243
  /**
228
244
  * Context for actions interacting with Asset Management Platform version 2
@@ -230,6 +246,7 @@ export class Amp0SignerData {
230
246
  export class Amp2 {
231
247
  private constructor();
232
248
  free(): void;
249
+ [Symbol.dispose](): void;
233
250
  /**
234
251
  * Create a new AMP2 client with the default url and server key for the testnet network.
235
252
  */
@@ -253,6 +270,7 @@ export class Amp2 {
253
270
  export class Amp2Descriptor {
254
271
  private constructor();
255
272
  free(): void;
273
+ [Symbol.dispose](): void;
256
274
  /**
257
275
  * Return the descriptor as a `WolletDescriptor`
258
276
  */
@@ -268,6 +286,7 @@ export class Amp2Descriptor {
268
286
  export class AssetAmount {
269
287
  private constructor();
270
288
  free(): void;
289
+ [Symbol.dispose](): void;
271
290
  amount(): bigint;
272
291
  asset(): AssetId;
273
292
  }
@@ -278,6 +297,7 @@ export class AssetAmount {
278
297
  */
279
298
  export class AssetId {
280
299
  free(): void;
300
+ [Symbol.dispose](): void;
281
301
  /**
282
302
  * Creates an `AssetId`
283
303
  */
@@ -294,6 +314,7 @@ export class AssetId {
294
314
  export class AssetIds {
295
315
  private constructor();
296
316
  free(): void;
317
+ [Symbol.dispose](): void;
297
318
  /**
298
319
  * Return an empty list of asset identifiers.
299
320
  */
@@ -311,6 +332,7 @@ export class AssetIds {
311
332
  export class AssetMeta {
312
333
  private constructor();
313
334
  free(): void;
335
+ [Symbol.dispose](): void;
314
336
  /**
315
337
  * Return the contract of the asset.
316
338
  */
@@ -327,6 +349,7 @@ export class AssetMeta {
327
349
  export class Balance {
328
350
  private constructor();
329
351
  free(): void;
352
+ [Symbol.dispose](): void;
330
353
  /**
331
354
  * Convert the balance to a JsValue for serialization
332
355
  *
@@ -349,6 +372,7 @@ export class Balance {
349
372
  export class Bip {
350
373
  private constructor();
351
374
  free(): void;
375
+ [Symbol.dispose](): void;
352
376
  /**
353
377
  * Creates a bip49 variant
354
378
  */
@@ -366,11 +390,111 @@ export class Bip {
366
390
  */
367
391
  toString(): string;
368
392
  }
393
+ /**
394
+ * Wrapper over [`lwk_boltz::BoltzSession`]
395
+ */
396
+ export class BoltzSession {
397
+ private constructor();
398
+ free(): void;
399
+ [Symbol.dispose](): void;
400
+ /**
401
+ * Get the rescue file
402
+ */
403
+ rescueFile(): string;
404
+ /**
405
+ * Prepare a lightning invoice payment
406
+ */
407
+ preparePay(lightning_payment: LightningPayment, refund_address: Address): Promise<PreparePayResponse>;
408
+ /**
409
+ * Create a lightning invoice for receiving payment
410
+ */
411
+ invoice(amount: bigint, description: string | null | undefined, claim_address: Address): Promise<InvoiceResponse>;
412
+ /**
413
+ * Restore a swap from its serialized data
414
+ */
415
+ restorePreparePay(data: string): Promise<PreparePayResponse>;
416
+ /**
417
+ * Restore a swap from its serialized data
418
+ */
419
+ restoreInvoice(data: string): Promise<InvoiceResponse>;
420
+ }
421
+ /**
422
+ * Wrapper over [`lwk_boltz::BoltzSessionBuilder`]
423
+ */
424
+ export class BoltzSessionBuilder {
425
+ free(): void;
426
+ [Symbol.dispose](): void;
427
+ /**
428
+ * Create a new BoltzSessionBuilder with the given network
429
+ *
430
+ * This creates a builder with default Esplora client for the network.
431
+ */
432
+ constructor(network: Network, esplora_client: EsploraClient);
433
+ /**
434
+ * Set the timeout for creating swaps
435
+ *
436
+ * If not set, the default timeout of 10 seconds is used.
437
+ */
438
+ createSwapTimeout(timeout_seconds: bigint): BoltzSessionBuilder;
439
+ /**
440
+ * Set the timeout for the advance call
441
+ *
442
+ * If not set, the default timeout of 3 minutes is used.
443
+ */
444
+ timeoutAdvance(timeout_seconds: bigint): BoltzSessionBuilder;
445
+ /**
446
+ * Set the mnemonic for deriving swap keys
447
+ *
448
+ * If not set, a new random mnemonic will be generated.
449
+ */
450
+ mnemonic(mnemonic: Mnemonic): BoltzSessionBuilder;
451
+ /**
452
+ * Set the polling flag
453
+ *
454
+ * If true, the advance call will not await on the websocket connection returning immediately
455
+ * even if there is no update, thus requiring the caller to poll for updates.
456
+ *
457
+ * If true, the timeout_advance will be ignored even if set.
458
+ */
459
+ polling(polling: boolean): BoltzSessionBuilder;
460
+ /**
461
+ * Set the next index to use for deriving keypairs
462
+ *
463
+ * Avoid a call to the boltz API to recover this information.
464
+ *
465
+ * When the mnemonic is not set, this is ignored.
466
+ */
467
+ nextIndexToUse(next_index_to_use: number): BoltzSessionBuilder;
468
+ /**
469
+ * Set the referral id for the BoltzSession
470
+ */
471
+ referralId(referral_id: string): BoltzSessionBuilder;
472
+ /**
473
+ * Set the url of the bitcoin electrum client
474
+ */
475
+ bitcoinElectrumClient(bitcoin_electrum_client: string): BoltzSessionBuilder;
476
+ /**
477
+ * Set the random preimages flag
478
+ *
479
+ * The default is false, the preimages will be deterministic and the rescue file will be
480
+ * compatible with the Boltz web app.
481
+ * If true, the preimages will be random potentially allowing concurrent sessions with the same
482
+ * mnemonic, but completing the swap will be possible only with the preimage data. For example
483
+ * the boltz web app will be able only to refund the swap, not to bring it to completion.
484
+ * If true, when serializing the swap data, the preimage will be saved in the data.
485
+ */
486
+ randomPreimages(random_preimages: boolean): BoltzSessionBuilder;
487
+ /**
488
+ * Build the BoltzSession
489
+ */
490
+ build(): Promise<BoltzSession>;
491
+ }
369
492
  /**
370
493
  * A contract defining metadata of an asset such the name and the ticker
371
494
  */
372
495
  export class Contract {
373
496
  free(): void;
497
+ [Symbol.dispose](): void;
374
498
  /**
375
499
  * Creates a `Contract`
376
500
  */
@@ -391,6 +515,14 @@ export class Contract {
391
515
  */
392
516
  clone(): Contract;
393
517
  }
518
+ export class CurrencyCode {
519
+ free(): void;
520
+ [Symbol.dispose](): void;
521
+ constructor(code: string);
522
+ name(): string;
523
+ alpha3(): string;
524
+ exp(): number;
525
+ }
394
526
  /**
395
527
  * A blockchain backend implementation based on the
396
528
  * [esplora HTTP API](https://github.com/blockstream/esplora/blob/master/API.md).
@@ -399,6 +531,7 @@ export class Contract {
399
531
  */
400
532
  export class EsploraClient {
401
533
  free(): void;
534
+ [Symbol.dispose](): void;
402
535
  /**
403
536
  * Creates an Esplora client with the given options
404
537
  */
@@ -446,12 +579,68 @@ export class EsploraClient {
446
579
  */
447
580
  setWaterfallsServerRecipient(recipient: string): Promise<void>;
448
581
  }
582
+ /**
583
+ * Multiple exchange rates against BTC provided from various sources
584
+ */
585
+ export class ExchangeRates {
586
+ private constructor();
587
+ free(): void;
588
+ [Symbol.dispose](): void;
589
+ /**
590
+ * Get the median exchange rate
591
+ */
592
+ median(): number;
593
+ /**
594
+ * Get the individual exchange rates as a JSON array
595
+ *
596
+ * Each rate contains: rate, currency, source, and timestamp
597
+ */
598
+ results(): any;
599
+ /**
600
+ * Get the number of sources that provided rates
601
+ */
602
+ resultsCount(): number;
603
+ /**
604
+ * Serialize the entire response to JSON string
605
+ */
606
+ serialize(): string;
607
+ }
608
+ /**
609
+ * Wrapper over [`lwk_boltz::InvoiceResponse`]
610
+ */
611
+ export class InvoiceResponse {
612
+ private constructor();
613
+ free(): void;
614
+ [Symbol.dispose](): void;
615
+ /**
616
+ * Serialize the response to JSON string for JS interop
617
+ */
618
+ serialize(): string;
619
+ /**
620
+ * Return the bolt11 invoice string
621
+ */
622
+ bolt11Invoice(): string;
623
+ swapId(): string;
624
+ /**
625
+ * The fee of the swap provider
626
+ *
627
+ * It is equal to the amount of the invoice minus the amount of the onchain transaction.
628
+ * Does not include the fee of the onchain transaction.
629
+ */
630
+ fee(): bigint | undefined;
631
+ /**
632
+ * Complete the payment by advancing through the swap states until completion or failure
633
+ * Consumes self as the inner method does
634
+ */
635
+ completePay(): Promise<boolean>;
636
+ }
449
637
  /**
450
638
  * The details of an issuance or reissuance.
451
639
  */
452
640
  export class Issuance {
453
641
  private constructor();
454
642
  free(): void;
643
+ [Symbol.dispose](): void;
455
644
  /**
456
645
  * Return the asset id or None if it's a null issuance
457
646
  */
@@ -482,6 +671,7 @@ export class Issuance {
482
671
  */
483
672
  export class Jade {
484
673
  free(): void;
674
+ [Symbol.dispose](): void;
485
675
  /**
486
676
  * Creates a Jade from Web Serial for the given network
487
677
  *
@@ -520,6 +710,7 @@ export class Jade {
520
710
  */
521
711
  export class JadeWebSocket {
522
712
  free(): void;
713
+ [Symbol.dispose](): void;
523
714
  /**
524
715
  * Creates a Jade from WebSocket for the given network
525
716
  *
@@ -554,6 +745,7 @@ export class JadeWebSocket {
554
745
  }
555
746
  export class LedgerWeb {
556
747
  free(): void;
748
+ [Symbol.dispose](): void;
557
749
  /**
558
750
  * hid_device must be already opened
559
751
  */
@@ -575,6 +767,45 @@ export class LedgerWeb {
575
767
  */
576
768
  getReceiveAddressSingle(index: number): Promise<string>;
577
769
  }
770
+ /**
771
+ * Wrapper over [`lwk_boltz::LightningPayment`]
772
+ */
773
+ export class LightningPayment {
774
+ free(): void;
775
+ [Symbol.dispose](): void;
776
+ /**
777
+ * Create a LightningPayment from a bolt11 invoice string or a bolt12 offer
778
+ */
779
+ constructor(invoice: string);
780
+ /**
781
+ * Return a string representation of the LightningPayment
782
+ */
783
+ toString(): string;
784
+ /**
785
+ * Return a QR code image uri for the LightningPayment
786
+ */
787
+ toUriQr(pixel_per_module?: number | null): string;
788
+ }
789
+ /**
790
+ * A struct representing a magic routing hint, with details on how to pay directly without using Boltz
791
+ */
792
+ export class MagicRoutingHint {
793
+ private constructor();
794
+ free(): void;
795
+ [Symbol.dispose](): void;
796
+ /**
797
+ * The address to pay directly to
798
+ */
799
+ address(): string;
800
+ /**
801
+ * The amount to pay directly to
802
+ */
803
+ amount(): bigint;
804
+ /**
805
+ * The URI to pay directly to
806
+ */
807
+ uri(): string;
808
+ }
578
809
  /**
579
810
  * A mnemonic secret code used as a master secret for a bip39 wallet.
580
811
  *
@@ -582,6 +813,7 @@ export class LedgerWeb {
582
813
  */
583
814
  export class Mnemonic {
584
815
  free(): void;
816
+ [Symbol.dispose](): void;
585
817
  /**
586
818
  * Creates a Mnemonic
587
819
  */
@@ -608,6 +840,7 @@ export class Mnemonic {
608
840
  export class Network {
609
841
  private constructor();
610
842
  free(): void;
843
+ [Symbol.dispose](): void;
611
844
  /**
612
845
  * Creates a mainnet `Network``
613
846
  */
@@ -664,6 +897,7 @@ export class Network {
664
897
  export class OptionWalletTxOut {
665
898
  private constructor();
666
899
  free(): void;
900
+ [Symbol.dispose](): void;
667
901
  /**
668
902
  * Return a copy of the WalletTxOut if it exists, otherwise None
669
903
  */
@@ -674,6 +908,7 @@ export class OptionWalletTxOut {
674
908
  */
675
909
  export class OutPoint {
676
910
  free(): void;
911
+ [Symbol.dispose](): void;
677
912
  /**
678
913
  * Creates an `OutPoint`
679
914
  */
@@ -694,6 +929,7 @@ export class OutPoint {
694
929
  */
695
930
  export class Precision {
696
931
  free(): void;
932
+ [Symbol.dispose](): void;
697
933
  /**
698
934
  * Create a new Precision, useful to encode e decode values for assets with precision.
699
935
  * erroring if the given precision is greater than the allowed maximum (8)
@@ -712,11 +948,58 @@ export class Precision {
712
948
  */
713
949
  stringToSats(sats: string): bigint;
714
950
  }
951
+ export class PreparePayResponse {
952
+ private constructor();
953
+ free(): void;
954
+ [Symbol.dispose](): void;
955
+ /**
956
+ * Serialize the response to JSON string for JS interop
957
+ */
958
+ serialize(): string;
959
+ swapId(): string;
960
+ uri(): string;
961
+ uriAddress(): Address;
962
+ uriAmount(): bigint;
963
+ /**
964
+ * The fee of the swap provider
965
+ *
966
+ * It is equal to the amount requested onchain minus the amount of the bolt11 invoice
967
+ * Does not include the fee of the onchain transaction.
968
+ */
969
+ fee(): bigint | undefined;
970
+ completePay(): Promise<boolean>;
971
+ }
972
+ /**
973
+ * Wrapper over [`lwk_wollet::PricesFetcher`]
974
+ */
975
+ export class PricesFetcher {
976
+ free(): void;
977
+ [Symbol.dispose](): void;
978
+ /**
979
+ * Create a new PricesFetcher with default settings
980
+ */
981
+ constructor();
982
+ /**
983
+ * Fetch exchange rates for the given currency (e.g., "USD", "EUR", "CHF")
984
+ *
985
+ * Returns an ExchangeRates object containing rates from multiple sources and the median
986
+ */
987
+ rates(currency: CurrencyCode): Promise<ExchangeRates>;
988
+ }
989
+ /**
990
+ * Wrapper over [`lwk_wollet::PricesFetcherBuilder`]
991
+ */
992
+ export class PricesFetcherBuilder {
993
+ private constructor();
994
+ free(): void;
995
+ [Symbol.dispose](): void;
996
+ }
715
997
  /**
716
998
  * Partially Signed Elements Transaction
717
999
  */
718
1000
  export class Pset {
719
1001
  free(): void;
1002
+ [Symbol.dispose](): void;
720
1003
  /**
721
1004
  * Creates a `Pset` from its base64 string representation.
722
1005
  */
@@ -754,6 +1037,7 @@ export class Pset {
754
1037
  export class PsetBalance {
755
1038
  private constructor();
756
1039
  free(): void;
1040
+ [Symbol.dispose](): void;
757
1041
  fee(): bigint;
758
1042
  /**
759
1043
  * The net balance for every asset with respect of the wallet asking the pset details
@@ -771,6 +1055,7 @@ export class PsetBalance {
771
1055
  export class PsetDetails {
772
1056
  private constructor();
773
1057
  free(): void;
1058
+ [Symbol.dispose](): void;
774
1059
  /**
775
1060
  * Return the balance of the PSET from the point of view of the wallet
776
1061
  * that generated this via `psetDetails()`
@@ -799,6 +1084,7 @@ export class PsetDetails {
799
1084
  export class PsetInput {
800
1085
  private constructor();
801
1086
  free(): void;
1087
+ [Symbol.dispose](): void;
802
1088
  /**
803
1089
  * Prevout TXID of the input
804
1090
  */
@@ -822,6 +1108,7 @@ export class PsetInput {
822
1108
  export class PsetOutput {
823
1109
  private constructor();
824
1110
  free(): void;
1111
+ [Symbol.dispose](): void;
825
1112
  scriptPubkey(): Script;
826
1113
  }
827
1114
  /**
@@ -830,6 +1117,7 @@ export class PsetOutput {
830
1117
  export class PsetSignatures {
831
1118
  private constructor();
832
1119
  free(): void;
1120
+ [Symbol.dispose](): void;
833
1121
  /**
834
1122
  * Returns `Vec<(PublicKey, KeySource)>`
835
1123
  */
@@ -842,6 +1130,7 @@ export class PsetSignatures {
842
1130
  export class Recipient {
843
1131
  private constructor();
844
1132
  free(): void;
1133
+ [Symbol.dispose](): void;
845
1134
  asset(): AssetId | undefined;
846
1135
  value(): bigint | undefined;
847
1136
  address(): Address | undefined;
@@ -853,6 +1142,7 @@ export class Recipient {
853
1142
  export class Registry {
854
1143
  private constructor();
855
1144
  free(): void;
1145
+ [Symbol.dispose](): void;
856
1146
  /**
857
1147
  * Create a new registry cache specifying the URL of the registry,
858
1148
  * fetch the assets metadata identified by the given asset ids and cache them for later local retrieval.
@@ -899,6 +1189,7 @@ export class Registry {
899
1189
  export class RegistryData {
900
1190
  private constructor();
901
1191
  free(): void;
1192
+ [Symbol.dispose](): void;
902
1193
  precision(): number;
903
1194
  ticker(): string;
904
1195
  name(): string;
@@ -909,6 +1200,7 @@ export class RegistryData {
909
1200
  */
910
1201
  export class RegistryPost {
911
1202
  free(): void;
1203
+ [Symbol.dispose](): void;
912
1204
  /**
913
1205
  * Create a new registry post object to be used to publish a contract for an asset id in the registry.
914
1206
  */
@@ -923,6 +1215,7 @@ export class RegistryPost {
923
1215
  */
924
1216
  export class Script {
925
1217
  free(): void;
1218
+ [Symbol.dispose](): void;
926
1219
  /**
927
1220
  * Creates a `Script` from its hex string representation.
928
1221
  */
@@ -948,6 +1241,7 @@ export class Script {
948
1241
  */
949
1242
  export class Signer {
950
1243
  free(): void;
1244
+ [Symbol.dispose](): void;
951
1245
  /**
952
1246
  * AMP0 signer data for login
953
1247
  */
@@ -984,14 +1278,23 @@ export class Signer {
984
1278
  * Return keyorigin and xpub, like "[73c5da0a/84h/1h/0h]tpub..."
985
1279
  */
986
1280
  keyoriginXpub(bip: Bip): string;
1281
+ /**
1282
+ * Return the signer fingerprint
1283
+ */
1284
+ fingerprint(): string;
987
1285
  /**
988
1286
  * Return the mnemonic of the signer
989
1287
  */
990
1288
  mnemonic(): Mnemonic;
1289
+ /**
1290
+ * Return the derived BIP85 mnemonic
1291
+ */
1292
+ derive_bip85_mnemonic(index: number, word_count: number): Mnemonic;
991
1293
  }
992
1294
  export class Singlesig {
993
1295
  private constructor();
994
1296
  free(): void;
1297
+ [Symbol.dispose](): void;
995
1298
  static from(variant: string): Singlesig;
996
1299
  }
997
1300
  /**
@@ -1000,6 +1303,7 @@ export class Singlesig {
1000
1303
  export class Tip {
1001
1304
  private constructor();
1002
1305
  free(): void;
1306
+ [Symbol.dispose](): void;
1003
1307
  height(): number;
1004
1308
  hash(): string;
1005
1309
  timestamp(): number | undefined;
@@ -1012,6 +1316,7 @@ export class Tip {
1012
1316
  */
1013
1317
  export class Transaction {
1014
1318
  free(): void;
1319
+ [Symbol.dispose](): void;
1015
1320
  /**
1016
1321
  * Creates a `Transaction`
1017
1322
  */
@@ -1039,6 +1344,7 @@ export class Transaction {
1039
1344
  */
1040
1345
  export class TxBuilder {
1041
1346
  free(): void;
1347
+ [Symbol.dispose](): void;
1042
1348
  /**
1043
1349
  * Creates a transaction builder
1044
1350
  */
@@ -1139,6 +1445,10 @@ export class TxBuilder {
1139
1445
  * Set data to take LiquiDEX proposals
1140
1446
  */
1141
1447
  liquidexTake(proposals: ValidatedLiquidexProposal[]): TxBuilder;
1448
+ /**
1449
+ * Add input rangeproofs
1450
+ */
1451
+ addInputRangeproofs(add_rangeproofs: boolean): TxBuilder;
1142
1452
  }
1143
1453
  /**
1144
1454
  * Contains unblinded information such as the asset and the value of a transaction output
@@ -1146,6 +1456,7 @@ export class TxBuilder {
1146
1456
  export class TxOutSecrets {
1147
1457
  private constructor();
1148
1458
  free(): void;
1459
+ [Symbol.dispose](): void;
1149
1460
  /**
1150
1461
  * Return the asset of the output.
1151
1462
  */
@@ -1186,6 +1497,7 @@ export class TxOutSecrets {
1186
1497
  */
1187
1498
  export class Txid {
1188
1499
  free(): void;
1500
+ [Symbol.dispose](): void;
1189
1501
  /**
1190
1502
  * Creates a `Txid` from its hex string representation (64 characters).
1191
1503
  */
@@ -1211,6 +1523,7 @@ export class Txid {
1211
1523
  export class UnvalidatedLiquidexProposal {
1212
1524
  private constructor();
1213
1525
  free(): void;
1526
+ [Symbol.dispose](): void;
1214
1527
  static new(s: string): UnvalidatedLiquidexProposal;
1215
1528
  static fromPset(pset: Pset): UnvalidatedLiquidexProposal;
1216
1529
  insecureValidate(): ValidatedLiquidexProposal;
@@ -1223,6 +1536,7 @@ export class UnvalidatedLiquidexProposal {
1223
1536
  */
1224
1537
  export class Update {
1225
1538
  free(): void;
1539
+ [Symbol.dispose](): void;
1226
1540
  /**
1227
1541
  * Creates an `Update`
1228
1542
  */
@@ -1258,6 +1572,7 @@ export class Update {
1258
1572
  export class ValidatedLiquidexProposal {
1259
1573
  private constructor();
1260
1574
  free(): void;
1575
+ [Symbol.dispose](): void;
1261
1576
  input(): AssetAmount;
1262
1577
  output(): AssetAmount;
1263
1578
  toString(): string;
@@ -1270,6 +1585,7 @@ export class ValidatedLiquidexProposal {
1270
1585
  export class WalletTx {
1271
1586
  private constructor();
1272
1587
  free(): void;
1588
+ [Symbol.dispose](): void;
1273
1589
  /**
1274
1590
  * Return a copy of the transaction.
1275
1591
  */
@@ -1322,6 +1638,7 @@ export class WalletTx {
1322
1638
  export class WalletTxOut {
1323
1639
  private constructor();
1324
1640
  free(): void;
1641
+ [Symbol.dispose](): void;
1325
1642
  /**
1326
1643
  * Return the outpoint (txid and vout) of this `WalletTxOut`.
1327
1644
  */
@@ -1356,6 +1673,7 @@ export class WalletTxOut {
1356
1673
  */
1357
1674
  export class Wollet {
1358
1675
  free(): void;
1676
+ [Symbol.dispose](): void;
1359
1677
  /**
1360
1678
  * Create a `Wollet`
1361
1679
  */
@@ -1367,6 +1685,10 @@ export class Wollet {
1367
1685
  * otherwise the last unused address.
1368
1686
  */
1369
1687
  address(index?: number | null): AddressResult;
1688
+ /**
1689
+ * Return the [ELIP152](https://github.com/ElementsProject/ELIPs/blob/main/elip-0152.mediawiki) deterministic wallet identifier.
1690
+ */
1691
+ dwid(): string;
1370
1692
  /**
1371
1693
  * Get the full derivation path for an address
1372
1694
  *
@@ -1468,6 +1790,7 @@ export class Wollet {
1468
1790
  */
1469
1791
  export class WolletDescriptor {
1470
1792
  free(): void;
1793
+ [Symbol.dispose](): void;
1471
1794
  /**
1472
1795
  * Creates a `WolletDescriptor`
1473
1796
  */
@@ -1497,6 +1820,7 @@ export class WolletDescriptor {
1497
1820
  */
1498
1821
  export class Xpub {
1499
1822
  free(): void;
1823
+ [Symbol.dispose](): void;
1500
1824
  /**
1501
1825
  * Creates a Xpub
1502
1826
  */