lwk_node 0.12.1 → 0.13.1

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,5 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ /**
4
+ * Convert the given string to a QR code image uri
5
+ *
6
+ * The image format is monocromatic bitmap, returned as an encoded in base64 uri.
7
+ *
8
+ * Without `pixel_per_module` the default is no border, and 1 pixel per module, to be used
9
+ * for example in html: `style="image-rendering: pixelated; border: 20px solid white;"`
10
+ */
11
+ export function stringToQr(str: string, pixel_per_module?: number | null): string;
3
12
  export function searchLedgerDevice(): Promise<HIDDevice>;
4
13
  /**
5
14
  * Wallet chain
@@ -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
  */
@@ -174,6 +187,7 @@ 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
  */
@@ -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
  */
@@ -687,6 +922,49 @@ export class OutPoint {
687
922
  */
688
923
  vout(): number;
689
924
  }
925
+ /**
926
+ * POS (Point of Sale) configuration for encoding/decoding
927
+ */
928
+ export class PosConfig {
929
+ free(): void;
930
+ [Symbol.dispose](): void;
931
+ /**
932
+ * Create a new POS configuration
933
+ */
934
+ constructor(descriptor: WolletDescriptor, currency: CurrencyCode);
935
+ /**
936
+ * Create a POS configuration with all options
937
+ */
938
+ static withOptions(descriptor: WolletDescriptor, currency: CurrencyCode, show_gear?: boolean | null, show_description?: boolean | null): PosConfig;
939
+ /**
940
+ * Decode a POS configuration from a URL-safe base64 encoded string
941
+ */
942
+ static decode(encoded: string): PosConfig;
943
+ /**
944
+ * Encode the POS configuration to a URL-safe base64 string
945
+ */
946
+ encode(): string;
947
+ /**
948
+ * Return a string representation of the POS configuration
949
+ */
950
+ toString(): string;
951
+ /**
952
+ * Get the wallet descriptor
953
+ */
954
+ readonly descriptor: WolletDescriptor;
955
+ /**
956
+ * Get the currency code
957
+ */
958
+ readonly currency: CurrencyCode;
959
+ /**
960
+ * Get whether to show the gear/settings button
961
+ */
962
+ readonly showGear: boolean | undefined;
963
+ /**
964
+ * Get whether to show the description/note field
965
+ */
966
+ readonly showDescription: boolean | undefined;
967
+ }
690
968
  /**
691
969
  * Helper to convert satoshi values of an asset to the value with the given precision and viceversa.
692
970
  *
@@ -694,6 +972,7 @@ export class OutPoint {
694
972
  */
695
973
  export class Precision {
696
974
  free(): void;
975
+ [Symbol.dispose](): void;
697
976
  /**
698
977
  * Create a new Precision, useful to encode e decode values for assets with precision.
699
978
  * erroring if the given precision is greater than the allowed maximum (8)
@@ -712,11 +991,58 @@ export class Precision {
712
991
  */
713
992
  stringToSats(sats: string): bigint;
714
993
  }
994
+ export class PreparePayResponse {
995
+ private constructor();
996
+ free(): void;
997
+ [Symbol.dispose](): void;
998
+ /**
999
+ * Serialize the response to JSON string for JS interop
1000
+ */
1001
+ serialize(): string;
1002
+ swapId(): string;
1003
+ uri(): string;
1004
+ uriAddress(): Address;
1005
+ uriAmount(): bigint;
1006
+ /**
1007
+ * The fee of the swap provider
1008
+ *
1009
+ * It is equal to the amount requested onchain minus the amount of the bolt11 invoice
1010
+ * Does not include the fee of the onchain transaction.
1011
+ */
1012
+ fee(): bigint | undefined;
1013
+ completePay(): Promise<boolean>;
1014
+ }
1015
+ /**
1016
+ * Wrapper over [`lwk_wollet::PricesFetcher`]
1017
+ */
1018
+ export class PricesFetcher {
1019
+ free(): void;
1020
+ [Symbol.dispose](): void;
1021
+ /**
1022
+ * Create a new PricesFetcher with default settings
1023
+ */
1024
+ constructor();
1025
+ /**
1026
+ * Fetch exchange rates for the given currency (e.g., "USD", "EUR", "CHF")
1027
+ *
1028
+ * Returns an ExchangeRates object containing rates from multiple sources and the median
1029
+ */
1030
+ rates(currency: CurrencyCode): Promise<ExchangeRates>;
1031
+ }
1032
+ /**
1033
+ * Wrapper over [`lwk_wollet::PricesFetcherBuilder`]
1034
+ */
1035
+ export class PricesFetcherBuilder {
1036
+ private constructor();
1037
+ free(): void;
1038
+ [Symbol.dispose](): void;
1039
+ }
715
1040
  /**
716
1041
  * Partially Signed Elements Transaction
717
1042
  */
718
1043
  export class Pset {
719
1044
  free(): void;
1045
+ [Symbol.dispose](): void;
720
1046
  /**
721
1047
  * Creates a `Pset` from its base64 string representation.
722
1048
  */
@@ -754,6 +1080,7 @@ export class Pset {
754
1080
  export class PsetBalance {
755
1081
  private constructor();
756
1082
  free(): void;
1083
+ [Symbol.dispose](): void;
757
1084
  fee(): bigint;
758
1085
  /**
759
1086
  * The net balance for every asset with respect of the wallet asking the pset details
@@ -771,6 +1098,7 @@ export class PsetBalance {
771
1098
  export class PsetDetails {
772
1099
  private constructor();
773
1100
  free(): void;
1101
+ [Symbol.dispose](): void;
774
1102
  /**
775
1103
  * Return the balance of the PSET from the point of view of the wallet
776
1104
  * that generated this via `psetDetails()`
@@ -799,6 +1127,7 @@ export class PsetDetails {
799
1127
  export class PsetInput {
800
1128
  private constructor();
801
1129
  free(): void;
1130
+ [Symbol.dispose](): void;
802
1131
  /**
803
1132
  * Prevout TXID of the input
804
1133
  */
@@ -822,6 +1151,7 @@ export class PsetInput {
822
1151
  export class PsetOutput {
823
1152
  private constructor();
824
1153
  free(): void;
1154
+ [Symbol.dispose](): void;
825
1155
  scriptPubkey(): Script;
826
1156
  }
827
1157
  /**
@@ -830,6 +1160,7 @@ export class PsetOutput {
830
1160
  export class PsetSignatures {
831
1161
  private constructor();
832
1162
  free(): void;
1163
+ [Symbol.dispose](): void;
833
1164
  /**
834
1165
  * Returns `Vec<(PublicKey, KeySource)>`
835
1166
  */
@@ -842,6 +1173,7 @@ export class PsetSignatures {
842
1173
  export class Recipient {
843
1174
  private constructor();
844
1175
  free(): void;
1176
+ [Symbol.dispose](): void;
845
1177
  asset(): AssetId | undefined;
846
1178
  value(): bigint | undefined;
847
1179
  address(): Address | undefined;
@@ -853,6 +1185,7 @@ export class Recipient {
853
1185
  export class Registry {
854
1186
  private constructor();
855
1187
  free(): void;
1188
+ [Symbol.dispose](): void;
856
1189
  /**
857
1190
  * Create a new registry cache specifying the URL of the registry,
858
1191
  * fetch the assets metadata identified by the given asset ids and cache them for later local retrieval.
@@ -899,6 +1232,7 @@ export class Registry {
899
1232
  export class RegistryData {
900
1233
  private constructor();
901
1234
  free(): void;
1235
+ [Symbol.dispose](): void;
902
1236
  precision(): number;
903
1237
  ticker(): string;
904
1238
  name(): string;
@@ -909,6 +1243,7 @@ export class RegistryData {
909
1243
  */
910
1244
  export class RegistryPost {
911
1245
  free(): void;
1246
+ [Symbol.dispose](): void;
912
1247
  /**
913
1248
  * Create a new registry post object to be used to publish a contract for an asset id in the registry.
914
1249
  */
@@ -923,6 +1258,7 @@ export class RegistryPost {
923
1258
  */
924
1259
  export class Script {
925
1260
  free(): void;
1261
+ [Symbol.dispose](): void;
926
1262
  /**
927
1263
  * Creates a `Script` from its hex string representation.
928
1264
  */
@@ -948,6 +1284,7 @@ export class Script {
948
1284
  */
949
1285
  export class Signer {
950
1286
  free(): void;
1287
+ [Symbol.dispose](): void;
951
1288
  /**
952
1289
  * AMP0 signer data for login
953
1290
  */
@@ -992,10 +1329,15 @@ export class Signer {
992
1329
  * Return the mnemonic of the signer
993
1330
  */
994
1331
  mnemonic(): Mnemonic;
1332
+ /**
1333
+ * Return the derived BIP85 mnemonic
1334
+ */
1335
+ derive_bip85_mnemonic(index: number, word_count: number): Mnemonic;
995
1336
  }
996
1337
  export class Singlesig {
997
1338
  private constructor();
998
1339
  free(): void;
1340
+ [Symbol.dispose](): void;
999
1341
  static from(variant: string): Singlesig;
1000
1342
  }
1001
1343
  /**
@@ -1004,6 +1346,7 @@ export class Singlesig {
1004
1346
  export class Tip {
1005
1347
  private constructor();
1006
1348
  free(): void;
1349
+ [Symbol.dispose](): void;
1007
1350
  height(): number;
1008
1351
  hash(): string;
1009
1352
  timestamp(): number | undefined;
@@ -1016,6 +1359,7 @@ export class Tip {
1016
1359
  */
1017
1360
  export class Transaction {
1018
1361
  free(): void;
1362
+ [Symbol.dispose](): void;
1019
1363
  /**
1020
1364
  * Creates a `Transaction`
1021
1365
  */
@@ -1043,6 +1387,7 @@ export class Transaction {
1043
1387
  */
1044
1388
  export class TxBuilder {
1045
1389
  free(): void;
1390
+ [Symbol.dispose](): void;
1046
1391
  /**
1047
1392
  * Creates a transaction builder
1048
1393
  */
@@ -1143,6 +1488,10 @@ export class TxBuilder {
1143
1488
  * Set data to take LiquiDEX proposals
1144
1489
  */
1145
1490
  liquidexTake(proposals: ValidatedLiquidexProposal[]): TxBuilder;
1491
+ /**
1492
+ * Add input rangeproofs
1493
+ */
1494
+ addInputRangeproofs(add_rangeproofs: boolean): TxBuilder;
1146
1495
  }
1147
1496
  /**
1148
1497
  * Contains unblinded information such as the asset and the value of a transaction output
@@ -1150,6 +1499,7 @@ export class TxBuilder {
1150
1499
  export class TxOutSecrets {
1151
1500
  private constructor();
1152
1501
  free(): void;
1502
+ [Symbol.dispose](): void;
1153
1503
  /**
1154
1504
  * Return the asset of the output.
1155
1505
  */
@@ -1190,6 +1540,7 @@ export class TxOutSecrets {
1190
1540
  */
1191
1541
  export class Txid {
1192
1542
  free(): void;
1543
+ [Symbol.dispose](): void;
1193
1544
  /**
1194
1545
  * Creates a `Txid` from its hex string representation (64 characters).
1195
1546
  */
@@ -1215,6 +1566,7 @@ export class Txid {
1215
1566
  export class UnvalidatedLiquidexProposal {
1216
1567
  private constructor();
1217
1568
  free(): void;
1569
+ [Symbol.dispose](): void;
1218
1570
  static new(s: string): UnvalidatedLiquidexProposal;
1219
1571
  static fromPset(pset: Pset): UnvalidatedLiquidexProposal;
1220
1572
  insecureValidate(): ValidatedLiquidexProposal;
@@ -1227,6 +1579,7 @@ export class UnvalidatedLiquidexProposal {
1227
1579
  */
1228
1580
  export class Update {
1229
1581
  free(): void;
1582
+ [Symbol.dispose](): void;
1230
1583
  /**
1231
1584
  * Creates an `Update`
1232
1585
  */
@@ -1262,6 +1615,7 @@ export class Update {
1262
1615
  export class ValidatedLiquidexProposal {
1263
1616
  private constructor();
1264
1617
  free(): void;
1618
+ [Symbol.dispose](): void;
1265
1619
  input(): AssetAmount;
1266
1620
  output(): AssetAmount;
1267
1621
  toString(): string;
@@ -1274,6 +1628,7 @@ export class ValidatedLiquidexProposal {
1274
1628
  export class WalletTx {
1275
1629
  private constructor();
1276
1630
  free(): void;
1631
+ [Symbol.dispose](): void;
1277
1632
  /**
1278
1633
  * Return a copy of the transaction.
1279
1634
  */
@@ -1326,6 +1681,7 @@ export class WalletTx {
1326
1681
  export class WalletTxOut {
1327
1682
  private constructor();
1328
1683
  free(): void;
1684
+ [Symbol.dispose](): void;
1329
1685
  /**
1330
1686
  * Return the outpoint (txid and vout) of this `WalletTxOut`.
1331
1687
  */
@@ -1360,6 +1716,7 @@ export class WalletTxOut {
1360
1716
  */
1361
1717
  export class Wollet {
1362
1718
  free(): void;
1719
+ [Symbol.dispose](): void;
1363
1720
  /**
1364
1721
  * Create a `Wollet`
1365
1722
  */
@@ -1371,6 +1728,10 @@ export class Wollet {
1371
1728
  * otherwise the last unused address.
1372
1729
  */
1373
1730
  address(index?: number | null): AddressResult;
1731
+ /**
1732
+ * Return the [ELIP152](https://github.com/ElementsProject/ELIPs/blob/main/elip-0152.mediawiki) deterministic wallet identifier.
1733
+ */
1734
+ dwid(): string;
1374
1735
  /**
1375
1736
  * Get the full derivation path for an address
1376
1737
  *
@@ -1472,6 +1833,7 @@ export class Wollet {
1472
1833
  */
1473
1834
  export class WolletDescriptor {
1474
1835
  free(): void;
1836
+ [Symbol.dispose](): void;
1475
1837
  /**
1476
1838
  * Creates a `WolletDescriptor`
1477
1839
  */
@@ -1501,6 +1863,7 @@ export class WolletDescriptor {
1501
1863
  */
1502
1864
  export class Xpub {
1503
1865
  free(): void;
1866
+ [Symbol.dispose](): void;
1504
1867
  /**
1505
1868
  * Creates a Xpub
1506
1869
  */