lwk_node 0.13.0 → 0.14.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 +94 -12
- package/lwk_wasm.js +1803 -463
- package/lwk_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/lwk_wasm.d.ts
CHANGED
|
@@ -578,6 +578,21 @@ export class EsploraClient {
|
|
|
578
578
|
* Set the waterfalls server recipient key. This is used to encrypt the descriptor when calling the waterfalls endpoint.
|
|
579
579
|
*/
|
|
580
580
|
setWaterfallsServerRecipient(recipient: string): Promise<void>;
|
|
581
|
+
/**
|
|
582
|
+
* Query the last used derivation index for a wallet's descriptor from the waterfalls server.
|
|
583
|
+
*
|
|
584
|
+
* This method queries the waterfalls `/v1/last_used_index` endpoint to get the last used
|
|
585
|
+
* derivation index for both external and internal chains of the wallet's descriptor.
|
|
586
|
+
*
|
|
587
|
+
* Returns `LastUsedIndexResponse` containing the last used indexes and the tip block hash.
|
|
588
|
+
*
|
|
589
|
+
* # Errors
|
|
590
|
+
*
|
|
591
|
+
* Returns an error if this client was not configured with waterfalls support,
|
|
592
|
+
* if the descriptor does not contain a wildcard,
|
|
593
|
+
* or if the descriptor uses ELIP151 blinding.
|
|
594
|
+
*/
|
|
595
|
+
lastUsedIndex(descriptor: WolletDescriptor): Promise<LastUsedIndexResponse>;
|
|
581
596
|
}
|
|
582
597
|
/**
|
|
583
598
|
* Multiple exchange rates against BTC provided from various sources
|
|
@@ -743,6 +758,30 @@ export class JadeWebSocket {
|
|
|
743
758
|
keyoriginXpub(bip: Bip): Promise<string>;
|
|
744
759
|
registerDescriptor(name: string, desc: WolletDescriptor): Promise<boolean>;
|
|
745
760
|
}
|
|
761
|
+
/**
|
|
762
|
+
* Response from the last_used_index endpoint
|
|
763
|
+
*
|
|
764
|
+
* Returns the highest derivation index that has been used (has transaction history)
|
|
765
|
+
* for both external and internal chains. This is useful for quickly determining
|
|
766
|
+
* the next unused address without downloading full transaction history.
|
|
767
|
+
*/
|
|
768
|
+
export class LastUsedIndexResponse {
|
|
769
|
+
private constructor();
|
|
770
|
+
free(): void;
|
|
771
|
+
[Symbol.dispose](): void;
|
|
772
|
+
/**
|
|
773
|
+
* Last used index on the external (receive) chain, or undefined if no addresses have been used.
|
|
774
|
+
*/
|
|
775
|
+
readonly external: number | undefined;
|
|
776
|
+
/**
|
|
777
|
+
* Last used index on the internal (change) chain, or undefined if no addresses have been used.
|
|
778
|
+
*/
|
|
779
|
+
readonly internal: number | undefined;
|
|
780
|
+
/**
|
|
781
|
+
* Current blockchain tip hash for reference.
|
|
782
|
+
*/
|
|
783
|
+
readonly tip: string | undefined;
|
|
784
|
+
}
|
|
746
785
|
export class LedgerWeb {
|
|
747
786
|
free(): void;
|
|
748
787
|
[Symbol.dispose](): void;
|
|
@@ -922,6 +961,49 @@ export class OutPoint {
|
|
|
922
961
|
*/
|
|
923
962
|
vout(): number;
|
|
924
963
|
}
|
|
964
|
+
/**
|
|
965
|
+
* POS (Point of Sale) configuration for encoding/decoding
|
|
966
|
+
*/
|
|
967
|
+
export class PosConfig {
|
|
968
|
+
free(): void;
|
|
969
|
+
[Symbol.dispose](): void;
|
|
970
|
+
/**
|
|
971
|
+
* Create a new POS configuration
|
|
972
|
+
*/
|
|
973
|
+
constructor(descriptor: WolletDescriptor, currency: CurrencyCode);
|
|
974
|
+
/**
|
|
975
|
+
* Create a POS configuration with all options
|
|
976
|
+
*/
|
|
977
|
+
static withOptions(descriptor: WolletDescriptor, currency: CurrencyCode, show_gear?: boolean | null, show_description?: boolean | null): PosConfig;
|
|
978
|
+
/**
|
|
979
|
+
* Decode a POS configuration from a URL-safe base64 encoded string
|
|
980
|
+
*/
|
|
981
|
+
static decode(encoded: string): PosConfig;
|
|
982
|
+
/**
|
|
983
|
+
* Encode the POS configuration to a URL-safe base64 string
|
|
984
|
+
*/
|
|
985
|
+
encode(): string;
|
|
986
|
+
/**
|
|
987
|
+
* Return a string representation of the POS configuration
|
|
988
|
+
*/
|
|
989
|
+
toString(): string;
|
|
990
|
+
/**
|
|
991
|
+
* Get the wallet descriptor
|
|
992
|
+
*/
|
|
993
|
+
readonly descriptor: WolletDescriptor;
|
|
994
|
+
/**
|
|
995
|
+
* Get the currency code
|
|
996
|
+
*/
|
|
997
|
+
readonly currency: CurrencyCode;
|
|
998
|
+
/**
|
|
999
|
+
* Get whether to show the gear/settings button
|
|
1000
|
+
*/
|
|
1001
|
+
readonly showGear: boolean | undefined;
|
|
1002
|
+
/**
|
|
1003
|
+
* Get whether to show the description/note field
|
|
1004
|
+
*/
|
|
1005
|
+
readonly showDescription: boolean | undefined;
|
|
1006
|
+
}
|
|
925
1007
|
/**
|
|
926
1008
|
* Helper to convert satoshi values of an asset to the value with the given precision and viceversa.
|
|
927
1009
|
*
|
|
@@ -1242,18 +1324,6 @@ export class Script {
|
|
|
1242
1324
|
export class Signer {
|
|
1243
1325
|
free(): void;
|
|
1244
1326
|
[Symbol.dispose](): void;
|
|
1245
|
-
/**
|
|
1246
|
-
* AMP0 signer data for login
|
|
1247
|
-
*/
|
|
1248
|
-
amp0SignerData(): Amp0SignerData;
|
|
1249
|
-
/**
|
|
1250
|
-
* AMP0 sign login challenge
|
|
1251
|
-
*/
|
|
1252
|
-
amp0SignChallenge(challenge: string): string;
|
|
1253
|
-
/**
|
|
1254
|
-
* AMP0 account xpub
|
|
1255
|
-
*/
|
|
1256
|
-
amp0AccountXpub(account: number): string;
|
|
1257
1327
|
/**
|
|
1258
1328
|
* Creates a `Signer`
|
|
1259
1329
|
*/
|
|
@@ -1290,6 +1360,18 @@ export class Signer {
|
|
|
1290
1360
|
* Return the derived BIP85 mnemonic
|
|
1291
1361
|
*/
|
|
1292
1362
|
derive_bip85_mnemonic(index: number, word_count: number): Mnemonic;
|
|
1363
|
+
/**
|
|
1364
|
+
* AMP0 signer data for login
|
|
1365
|
+
*/
|
|
1366
|
+
amp0SignerData(): Amp0SignerData;
|
|
1367
|
+
/**
|
|
1368
|
+
* AMP0 sign login challenge
|
|
1369
|
+
*/
|
|
1370
|
+
amp0SignChallenge(challenge: string): string;
|
|
1371
|
+
/**
|
|
1372
|
+
* AMP0 account xpub
|
|
1373
|
+
*/
|
|
1374
|
+
amp0AccountXpub(account: number): string;
|
|
1293
1375
|
}
|
|
1294
1376
|
export class Singlesig {
|
|
1295
1377
|
private constructor();
|