@btc-vision/wallet-sdk 2.0.3 → 2.0.5
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/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +44 -6
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -471,9 +471,17 @@ export declare class LocalWallet implements AbstractWallet {
|
|
|
471
471
|
*/
|
|
472
472
|
exportPrivateKey(): string;
|
|
473
473
|
/**
|
|
474
|
-
* Export the quantum private key
|
|
474
|
+
* Export the quantum private key WITH chain code (for backup/restore)
|
|
475
475
|
*/
|
|
476
476
|
exportQuantumPrivateKey(): string;
|
|
477
|
+
/**
|
|
478
|
+
* Export the raw quantum private key WITHOUT chain code (for Wallet.fromWif)
|
|
479
|
+
*/
|
|
480
|
+
exportRawQuantumPrivateKey(): string;
|
|
481
|
+
/**
|
|
482
|
+
* Export the chain code
|
|
483
|
+
*/
|
|
484
|
+
exportChainCode(): Buffer;
|
|
477
485
|
/**
|
|
478
486
|
* Export WIF
|
|
479
487
|
*/
|
|
@@ -644,15 +652,21 @@ export declare class SimpleKeyring {
|
|
|
644
652
|
*/
|
|
645
653
|
static generate(network?: Network, securityLevel?: MLDSASecurityLevel): SimpleKeyring;
|
|
646
654
|
/**
|
|
647
|
-
* Import from WIF (Wallet Import Format) with
|
|
655
|
+
* Import from WIF (Wallet Import Format) with optional quantum key.
|
|
656
|
+
* If no quantum key is provided, the keyring will NOT have a quantum keypair.
|
|
657
|
+
* The quantum key must be explicitly set later via importQuantumKey() or generateFreshQuantumKey().
|
|
648
658
|
*/
|
|
649
659
|
static fromWIF(wif: string, quantumPrivateKey: string | undefined, network?: Network, securityLevel?: MLDSASecurityLevel): SimpleKeyring;
|
|
650
660
|
/**
|
|
651
|
-
* Import from hex private key with
|
|
661
|
+
* Import from hex private key with optional quantum key.
|
|
662
|
+
* If no quantum key is provided, the keyring will NOT have a quantum keypair.
|
|
663
|
+
* The quantum key must be explicitly set later via importQuantumKey() or generateFreshQuantumKey().
|
|
652
664
|
*/
|
|
653
665
|
static fromPrivateKey(privateKeyHex: string, quantumPrivateKey: string | undefined, network?: Network, securityLevel?: MLDSASecurityLevel): SimpleKeyring;
|
|
654
666
|
/**
|
|
655
|
-
* Import a private key (WIF or hex format)
|
|
667
|
+
* Import a private key (WIF or hex format).
|
|
668
|
+
* If no quantum key is provided, the keyring will NOT have a quantum keypair.
|
|
669
|
+
* The quantum key must be explicitly set later via importQuantumKey() or generateFreshQuantumKey().
|
|
656
670
|
*/
|
|
657
671
|
importPrivateKey(privateKey: string, quantumPrivateKey?: string): void;
|
|
658
672
|
/**
|
|
@@ -664,9 +678,21 @@ export declare class SimpleKeyring {
|
|
|
664
678
|
*/
|
|
665
679
|
generateFreshQuantumKey(): void;
|
|
666
680
|
/**
|
|
667
|
-
* Check if keyring has keys
|
|
681
|
+
* Check if keyring has both classical and quantum keys
|
|
668
682
|
*/
|
|
669
683
|
hasKeys(): boolean;
|
|
684
|
+
/**
|
|
685
|
+
* Check if keyring has the classical keypair (may or may not have quantum key)
|
|
686
|
+
*/
|
|
687
|
+
hasClassicalKey(): boolean;
|
|
688
|
+
/**
|
|
689
|
+
* Check if keyring has a quantum keypair
|
|
690
|
+
*/
|
|
691
|
+
hasQuantumKey(): boolean;
|
|
692
|
+
/**
|
|
693
|
+
* Check if quantum migration is needed (has classical but no quantum key)
|
|
694
|
+
*/
|
|
695
|
+
needsQuantumMigration(): boolean;
|
|
670
696
|
/**
|
|
671
697
|
* Get the classical public key
|
|
672
698
|
*/
|
|
@@ -679,6 +705,10 @@ export declare class SimpleKeyring {
|
|
|
679
705
|
* Get the quantum public key hash (universal identifier)
|
|
680
706
|
*/
|
|
681
707
|
getQuantumPublicKeyHash(): string;
|
|
708
|
+
/**
|
|
709
|
+
* Clear the quantum keypair (used for reverting failed imports)
|
|
710
|
+
*/
|
|
711
|
+
clearQuantumKey(): void;
|
|
682
712
|
/**
|
|
683
713
|
* Get all accounts (returns array with single public key)
|
|
684
714
|
*/
|
|
@@ -696,9 +726,17 @@ export declare class SimpleKeyring {
|
|
|
696
726
|
*/
|
|
697
727
|
exportPrivateKey(): string;
|
|
698
728
|
/**
|
|
699
|
-
* Export the quantum private key with chain code
|
|
729
|
+
* Export the quantum private key with chain code (for backup/restore)
|
|
700
730
|
*/
|
|
701
731
|
exportQuantumPrivateKey(): string;
|
|
732
|
+
/**
|
|
733
|
+
* Export the raw quantum private key WITHOUT chain code (for Wallet.fromWif)
|
|
734
|
+
*/
|
|
735
|
+
exportRawQuantumPrivateKey(): string;
|
|
736
|
+
/**
|
|
737
|
+
* Export the chain code (for use with Wallet.fromWif separately)
|
|
738
|
+
*/
|
|
739
|
+
exportChainCode(): Buffer;
|
|
702
740
|
/**
|
|
703
741
|
* Export WIF format
|
|
704
742
|
*/
|