navio-sdk 0.1.0 → 0.1.3

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.d.mts CHANGED
@@ -167,6 +167,10 @@ declare class KeyManager {
167
167
  private timeFirstKey;
168
168
  private fViewKeyDefined;
169
169
  private fSpendKeyDefined;
170
+ private encrypted;
171
+ private encryptionSalt;
172
+ private passwordVerificationHash;
173
+ private encryptionKey;
170
174
  /**
171
175
  * Check if HD is enabled (has a seed)
172
176
  * @returns True if HD is enabled
@@ -177,6 +181,92 @@ declare class KeyManager {
177
181
  * @returns True if HD is enabled
178
182
  */
179
183
  canGenerateKeys(): boolean;
184
+ /**
185
+ * Check if the wallet is encrypted
186
+ * @returns True if the wallet has been encrypted with a password
187
+ */
188
+ isEncrypted(): boolean;
189
+ /**
190
+ * Check if the wallet is unlocked (decryption key is cached)
191
+ * @returns True if the wallet is unlocked and can access private keys
192
+ */
193
+ isUnlocked(): boolean;
194
+ /**
195
+ * Set a password to encrypt the wallet
196
+ * This encrypts all private keys and stores them in encrypted form
197
+ *
198
+ * @param password - The password to encrypt the wallet with
199
+ * @throws Error if wallet is already encrypted
200
+ */
201
+ setPassword(password: string): Promise<void>;
202
+ /**
203
+ * Unlock an encrypted wallet with the password
204
+ * This derives the encryption key and caches it for decrypting private keys
205
+ *
206
+ * @param password - The wallet password
207
+ * @returns True if the password is correct and wallet is unlocked
208
+ */
209
+ unlock(password: string): Promise<boolean>;
210
+ /**
211
+ * Lock the wallet, clearing the cached encryption key and unencrypted keys
212
+ * After locking, private keys cannot be accessed without unlocking again
213
+ */
214
+ lock(): void;
215
+ /**
216
+ * Change the wallet password
217
+ *
218
+ * @param oldPassword - The current password
219
+ * @param newPassword - The new password
220
+ * @returns True if password was changed successfully
221
+ * @throws Error if wallet is not encrypted or old password is incorrect
222
+ */
223
+ changePassword(oldPassword: string, newPassword: string): Promise<boolean>;
224
+ /**
225
+ * Get encryption parameters for storage
226
+ * @returns Encryption salt and verification hash, or null if not encrypted
227
+ */
228
+ getEncryptionParams(): {
229
+ salt: string;
230
+ verificationHash: string;
231
+ } | null;
232
+ /**
233
+ * Set encryption parameters from storage (for loading encrypted wallet)
234
+ * @param salt - Hex-encoded salt
235
+ * @param verificationHash - Hex-encoded verification hash
236
+ */
237
+ setEncryptionParams(salt: string, verificationHash: string): void;
238
+ /**
239
+ * Get key storage statistics (for testing/debugging)
240
+ * @returns Object with counts of plain and encrypted keys
241
+ */
242
+ getKeyStats(): {
243
+ plainKeys: number;
244
+ plainOutKeys: number;
245
+ encryptedKeys: number;
246
+ encryptedOutKeys: number;
247
+ };
248
+ /**
249
+ * Encrypt all private keys in the wallet
250
+ * Internal method called when setting password
251
+ */
252
+ private encryptAllKeys;
253
+ /**
254
+ * Decrypt essential keys needed for wallet operations
255
+ * Called after successful unlock
256
+ */
257
+ private decryptEssentialKeys;
258
+ /**
259
+ * Re-encrypt all keys with a new key (for password change)
260
+ */
261
+ private reEncryptAllKeys;
262
+ /**
263
+ * Serialize EncryptedData to bytes for storage
264
+ */
265
+ private serializeEncryptedToBytes;
266
+ /**
267
+ * Deserialize EncryptedData from bytes
268
+ */
269
+ private deserializeEncryptedFromBytes;
180
270
  /**
181
271
  * Generate a new random seed
182
272
  * @returns A new random Scalar (seed)
@@ -203,6 +293,65 @@ declare class KeyManager {
203
293
  * @returns The master seed Scalar
204
294
  */
205
295
  getMasterSeedKey(): ScalarType;
296
+ /**
297
+ * Generate a new random mnemonic phrase (24 words)
298
+ * @param strength - Entropy strength in bits (128=12 words, 160=15 words, 192=18 words, 224=21 words, 256=24 words)
299
+ * @returns A BIP39 mnemonic phrase
300
+ */
301
+ static generateMnemonic(strength?: 128 | 160 | 192 | 224 | 256): string;
302
+ /**
303
+ * Validate a mnemonic phrase
304
+ * @param mnemonic - The mnemonic phrase to validate
305
+ * @returns True if the mnemonic is valid
306
+ */
307
+ static validateMnemonic(mnemonic: string): boolean;
308
+ /**
309
+ * Convert a mnemonic phrase to seed bytes
310
+ * Uses BIP39 standard derivation with optional passphrase
311
+ * @param mnemonic - The mnemonic phrase
312
+ * @param passphrase - Optional passphrase for additional security
313
+ * @returns 64-byte seed derived from mnemonic
314
+ */
315
+ static mnemonicToSeedBytes(mnemonic: string, passphrase?: string): Uint8Array;
316
+ /**
317
+ * Convert a seed (Scalar) to a mnemonic phrase
318
+ * Note: This converts the 32-byte scalar to mnemonic using it as entropy
319
+ * @param seed - The seed Scalar
320
+ * @returns A 24-word mnemonic phrase
321
+ */
322
+ static seedToMnemonic(seed: ScalarType): string;
323
+ /**
324
+ * Convert a mnemonic phrase to a Scalar seed
325
+ * For direct entropy-based conversion (mnemonic as entropy, not BIP39 derivation)
326
+ * @param mnemonic - The mnemonic phrase
327
+ * @returns A Scalar seed
328
+ */
329
+ static mnemonicToScalar(mnemonic: string): ScalarType;
330
+ /**
331
+ * Generate a new mnemonic and set it as the HD seed
332
+ * @param strength - Entropy strength in bits (default: 256 for 24 words)
333
+ * @returns The mnemonic phrase that can be used to recover this wallet
334
+ * @note The returned mnemonic is derived from the stored seed, which ensures
335
+ * it will produce the same wallet when used for restoration. Due to BLS
336
+ * Scalar normalization, this may differ from the initially generated entropy.
337
+ */
338
+ generateNewMnemonic(strength?: 128 | 160 | 192 | 224 | 256): string;
339
+ /**
340
+ * Set the HD seed from a mnemonic phrase
341
+ * Uses direct entropy conversion (mnemonic words encode the seed directly)
342
+ * @param mnemonic - The mnemonic phrase
343
+ */
344
+ setHDSeedFromMnemonic(mnemonic: string): void;
345
+ /**
346
+ * Get the mnemonic phrase for the current seed
347
+ * @returns The mnemonic phrase for the current master seed
348
+ */
349
+ getMnemonic(): string;
350
+ /**
351
+ * Get the master seed as a hex string
352
+ * @returns The master seed as a 64-character hex string (32 bytes)
353
+ */
354
+ getMasterSeedHex(): string;
206
355
  /**
207
356
  * Get the private view key
208
357
  * @returns The view key
@@ -220,6 +369,24 @@ declare class KeyManager {
220
369
  * @returns The sub-address (SubAddr)
221
370
  */
222
371
  getSubAddress(id?: SubAddressIdentifier): SubAddrType;
372
+ /**
373
+ * Get a bech32m encoded address string for the given sub-address identifier
374
+ * @param id - The sub-address identifier (defaults to account 0, address 0)
375
+ * @param network - The network type ('mainnet' or 'testnet', defaults to 'mainnet')
376
+ * @returns The bech32m encoded address string
377
+ * @example
378
+ * ```typescript
379
+ * const keyManager = new KeyManager();
380
+ * keyManager.setHDSeed(seed);
381
+ *
382
+ * // Get mainnet address
383
+ * const mainnetAddress = keyManager.getSubAddressBech32m({ account: 0, address: 0 }, 'mainnet');
384
+ *
385
+ * // Get testnet address
386
+ * const testnetAddress = keyManager.getSubAddressBech32m({ account: 0, address: 0 }, 'testnet');
387
+ * ```
388
+ */
389
+ getSubAddressBech32m(id?: SubAddressIdentifier, network?: 'mainnet' | 'testnet'): string;
223
390
  /**
224
391
  * Generate a new sub-address for the given account
225
392
  * @param account - The account number (0 for main, -1 for change, -2 for staking)
@@ -462,6 +629,7 @@ declare class KeyManager {
462
629
  */
463
630
  private hash160;
464
631
  private bytesToHex;
632
+ private hexToBytes;
465
633
  /**
466
634
  * Get the private spending key
467
635
  * Replicates GetSpendingKey from keyman.cpp
@@ -837,6 +1005,13 @@ declare class WalletDB {
837
1005
  * @returns The restored KeyManager instance
838
1006
  */
839
1007
  restoreWallet(seedHex: string, creationHeight?: number): Promise<KeyManager>;
1008
+ /**
1009
+ * Restore wallet from mnemonic phrase
1010
+ * @param mnemonic - The BIP39 mnemonic phrase (12-24 words)
1011
+ * @param creationHeight - Optional block height to start scanning from (for faster restore)
1012
+ * @returns The restored KeyManager instance
1013
+ */
1014
+ restoreWalletFromMnemonic(mnemonic: string, creationHeight?: number): Promise<KeyManager>;
840
1015
  /**
841
1016
  * Save wallet metadata to database
842
1017
  */
@@ -917,6 +1092,110 @@ declare class WalletDB {
917
1092
  * @returns Array of all wallet outputs
918
1093
  */
919
1094
  getAllOutputs(): Promise<WalletOutput[]>;
1095
+ /**
1096
+ * Check if the database has encryption enabled
1097
+ * @returns True if encryption is enabled
1098
+ */
1099
+ isEncrypted(): boolean;
1100
+ /**
1101
+ * Save encryption metadata to the database
1102
+ * @param salt - Hex-encoded salt
1103
+ * @param verificationHash - Hex-encoded password verification hash
1104
+ */
1105
+ saveEncryptionMetadata(salt: string, verificationHash: string): void;
1106
+ /**
1107
+ * Load encryption metadata from the database
1108
+ * @returns Encryption metadata or null if not encrypted
1109
+ */
1110
+ getEncryptionMetadata(): {
1111
+ salt: string;
1112
+ verificationHash: string;
1113
+ } | null;
1114
+ /**
1115
+ * Save an encrypted key to the database
1116
+ * @param keyId - Key identifier (hex)
1117
+ * @param publicKey - Public key (hex)
1118
+ * @param encryptedSecret - Encrypted secret (JSON string)
1119
+ */
1120
+ saveEncryptedKey(keyId: string, publicKey: string, encryptedSecret: string): void;
1121
+ /**
1122
+ * Load an encrypted key from the database
1123
+ * @param keyId - Key identifier (hex)
1124
+ * @returns Encrypted key data or null if not found
1125
+ */
1126
+ getEncryptedKey(keyId: string): {
1127
+ publicKey: string;
1128
+ encryptedSecret: string;
1129
+ } | null;
1130
+ /**
1131
+ * Get all encrypted keys from the database
1132
+ * @returns Array of encrypted key data
1133
+ */
1134
+ getAllEncryptedKeys(): Array<{
1135
+ keyId: string;
1136
+ publicKey: string;
1137
+ encryptedSecret: string;
1138
+ }>;
1139
+ /**
1140
+ * Save an encrypted output key to the database
1141
+ * @param outId - Output identifier (hex)
1142
+ * @param publicKey - Public key (hex)
1143
+ * @param encryptedSecret - Encrypted secret (JSON string)
1144
+ */
1145
+ saveEncryptedOutKey(outId: string, publicKey: string, encryptedSecret: string): void;
1146
+ /**
1147
+ * Load an encrypted output key from the database
1148
+ * @param outId - Output identifier (hex)
1149
+ * @returns Encrypted output key data or null if not found
1150
+ */
1151
+ getEncryptedOutKey(outId: string): {
1152
+ publicKey: string;
1153
+ encryptedSecret: string;
1154
+ } | null;
1155
+ /**
1156
+ * Get all encrypted output keys from the database
1157
+ * @returns Array of encrypted output key data
1158
+ */
1159
+ getAllEncryptedOutKeys(): Array<{
1160
+ outId: string;
1161
+ publicKey: string;
1162
+ encryptedSecret: string;
1163
+ }>;
1164
+ /**
1165
+ * Delete plaintext keys (after encryption)
1166
+ * This removes the unencrypted keys from the database
1167
+ */
1168
+ deletePlaintextKeys(): void;
1169
+ /**
1170
+ * Export the database as an encrypted binary blob
1171
+ * Uses the encryption module to encrypt the entire SQLite database
1172
+ *
1173
+ * @param password - Password to encrypt the export
1174
+ * @returns Encrypted database bytes
1175
+ */
1176
+ exportEncrypted(password: string): Promise<Uint8Array>;
1177
+ /**
1178
+ * Load a database from an encrypted binary blob
1179
+ *
1180
+ * @param encryptedData - Encrypted database bytes
1181
+ * @param password - Password to decrypt
1182
+ * @param dbPath - Path for the new database instance
1183
+ * @returns New WalletDB instance with decrypted data
1184
+ */
1185
+ static loadEncrypted(encryptedData: Uint8Array, password: string, dbPath?: string): Promise<WalletDB>;
1186
+ /**
1187
+ * Get the raw database bytes (unencrypted)
1188
+ * @returns Database bytes
1189
+ */
1190
+ export(): Uint8Array;
1191
+ /**
1192
+ * Load a database from raw bytes
1193
+ *
1194
+ * @param data - Raw database bytes
1195
+ * @param dbPath - Path for the new database instance
1196
+ * @returns New WalletDB instance
1197
+ */
1198
+ static loadFromBytes(data: Uint8Array, dbPath?: string): Promise<WalletDB>;
920
1199
  }
921
1200
 
922
1201
  /**
@@ -1947,8 +2226,10 @@ interface NavioClientConfig {
1947
2226
  createWalletIfNotExists?: boolean;
1948
2227
  /** Restore wallet from seed (hex string) */
1949
2228
  restoreFromSeed?: string;
2229
+ /** Restore wallet from mnemonic phrase (24 words) */
2230
+ restoreFromMnemonic?: string;
1950
2231
  /**
1951
- * Block height to start scanning from when restoring a wallet from seed.
2232
+ * Block height to start scanning from when restoring a wallet from seed or mnemonic.
1952
2233
  * This is the height when the wallet was originally created.
1953
2234
  * Setting this avoids scanning blocks before the wallet existed.
1954
2235
  *
@@ -2221,6 +2502,168 @@ type BlockHash = HexString;
2221
2502
  */
2222
2503
  type OutputHash = HexString;
2223
2504
 
2505
+ /**
2506
+ * Wallet encryption module using Argon2id for key derivation and AES-256-GCM for encryption.
2507
+ *
2508
+ * This module provides secure password-based encryption for wallet data.
2509
+ *
2510
+ * @module crypto/encryption
2511
+ */
2512
+ type WebCryptoKey = Awaited<ReturnType<SubtleCrypto['importKey']>>;
2513
+ /**
2514
+ * Encrypted data structure containing ciphertext and encryption parameters
2515
+ */
2516
+ interface EncryptedData {
2517
+ /** The encrypted ciphertext (includes auth tag for GCM) */
2518
+ ciphertext: Uint8Array;
2519
+ /** Initialization vector (12 bytes for AES-GCM) */
2520
+ iv: Uint8Array;
2521
+ /** Salt used for Argon2 key derivation (16 bytes) */
2522
+ salt: Uint8Array;
2523
+ }
2524
+ /**
2525
+ * Serialized format for encrypted data (for storage)
2526
+ */
2527
+ interface SerializedEncryptedData {
2528
+ /** Base64-encoded ciphertext */
2529
+ ciphertext: string;
2530
+ /** Base64-encoded IV */
2531
+ iv: string;
2532
+ /** Base64-encoded salt */
2533
+ salt: string;
2534
+ /** Encryption version for future compatibility */
2535
+ version: number;
2536
+ }
2537
+ /**
2538
+ * Current encryption version for forward compatibility
2539
+ */
2540
+ declare const ENCRYPTION_VERSION = 1;
2541
+ /**
2542
+ * IV length for AES-GCM (96 bits / 12 bytes is recommended)
2543
+ */
2544
+ declare const IV_LENGTH = 12;
2545
+ /**
2546
+ * Salt length for Argon2 (16 bytes is recommended minimum)
2547
+ */
2548
+ declare const SALT_LENGTH = 16;
2549
+ /**
2550
+ * Generate cryptographically secure random bytes
2551
+ * @param length - Number of bytes to generate
2552
+ * @returns Random bytes
2553
+ */
2554
+ declare function randomBytes(length: number): Uint8Array;
2555
+ /**
2556
+ * Derive an AES-256 encryption key from a password using Argon2id
2557
+ *
2558
+ * @param password - The user's password
2559
+ * @param salt - Random salt (16 bytes recommended)
2560
+ * @returns CryptoKey suitable for AES-256-GCM encryption
2561
+ */
2562
+ declare function deriveKey(password: string, salt: Uint8Array): Promise<WebCryptoKey>;
2563
+ /**
2564
+ * Derive raw key bytes from a password using Argon2id
2565
+ * Useful for creating a password verification hash
2566
+ *
2567
+ * @param password - The user's password
2568
+ * @param salt - Random salt (16 bytes recommended)
2569
+ * @returns 32 bytes of derived key material
2570
+ */
2571
+ declare function deriveKeyBytes(password: string, salt: Uint8Array): Promise<Uint8Array>;
2572
+ /**
2573
+ * Encrypt data using AES-256-GCM with a password
2574
+ *
2575
+ * @param data - The plaintext data to encrypt
2576
+ * @param password - The user's password
2577
+ * @returns Encrypted data with IV and salt
2578
+ */
2579
+ declare function encrypt(data: Uint8Array, password: string): Promise<EncryptedData>;
2580
+ /**
2581
+ * Encrypt data using AES-256-GCM with a pre-derived CryptoKey
2582
+ * More efficient when encrypting multiple items with the same password
2583
+ *
2584
+ * @param data - The plaintext data to encrypt
2585
+ * @param key - Pre-derived CryptoKey
2586
+ * @param salt - Salt used to derive the key (for storage)
2587
+ * @returns Encrypted data with IV and salt
2588
+ */
2589
+ declare function encryptWithKey(data: Uint8Array, key: WebCryptoKey, salt: Uint8Array): Promise<EncryptedData>;
2590
+ /**
2591
+ * Decrypt data using AES-256-GCM with a password
2592
+ *
2593
+ * @param encrypted - The encrypted data with IV and salt
2594
+ * @param password - The user's password
2595
+ * @returns Decrypted plaintext data
2596
+ * @throws Error if decryption fails (wrong password or corrupted data)
2597
+ */
2598
+ declare function decrypt(encrypted: EncryptedData, password: string): Promise<Uint8Array>;
2599
+ /**
2600
+ * Decrypt data using AES-256-GCM with a pre-derived CryptoKey
2601
+ * More efficient when decrypting multiple items with the same password
2602
+ *
2603
+ * @param encrypted - The encrypted data with IV and salt
2604
+ * @param key - Pre-derived CryptoKey
2605
+ * @returns Decrypted plaintext data
2606
+ * @throws Error if decryption fails (wrong key or corrupted data)
2607
+ */
2608
+ declare function decryptWithKey(encrypted: EncryptedData, key: WebCryptoKey): Promise<Uint8Array>;
2609
+ /**
2610
+ * Serialize encrypted data for storage (converts to base64 strings)
2611
+ *
2612
+ * @param encrypted - Encrypted data to serialize
2613
+ * @returns Serialized format suitable for JSON storage
2614
+ */
2615
+ declare function serializeEncryptedData(encrypted: EncryptedData): SerializedEncryptedData;
2616
+ /**
2617
+ * Deserialize encrypted data from storage
2618
+ *
2619
+ * @param serialized - Serialized encrypted data
2620
+ * @returns Encrypted data ready for decryption
2621
+ * @throws Error if version is unsupported
2622
+ */
2623
+ declare function deserializeEncryptedData(serialized: SerializedEncryptedData): EncryptedData;
2624
+ /**
2625
+ * Encrypt an entire database buffer
2626
+ *
2627
+ * @param dbBuffer - Raw database file bytes
2628
+ * @param password - The user's password
2629
+ * @returns Encrypted database buffer with header
2630
+ */
2631
+ declare function encryptDatabase(dbBuffer: Uint8Array, password: string): Promise<Uint8Array>;
2632
+ /**
2633
+ * Decrypt an entire database buffer
2634
+ *
2635
+ * @param encryptedBuffer - Encrypted database buffer with header
2636
+ * @param password - The user's password
2637
+ * @returns Decrypted database file bytes
2638
+ * @throws Error if decryption fails
2639
+ */
2640
+ declare function decryptDatabase(encryptedBuffer: Uint8Array, password: string): Promise<Uint8Array>;
2641
+ /**
2642
+ * Check if a buffer appears to be an encrypted database
2643
+ *
2644
+ * @param buffer - Buffer to check
2645
+ * @returns True if buffer starts with valid encryption header
2646
+ */
2647
+ declare function isEncryptedDatabase(buffer: Uint8Array): boolean;
2648
+ /**
2649
+ * Create a password verification hash
2650
+ * This is stored to verify the password is correct before attempting decryption
2651
+ *
2652
+ * @param password - The user's password
2653
+ * @param salt - Salt to use (same as encryption salt)
2654
+ * @returns Verification hash (32 bytes)
2655
+ */
2656
+ declare function createPasswordVerification(password: string, salt: Uint8Array): Promise<Uint8Array>;
2657
+ /**
2658
+ * Verify a password against a stored verification hash
2659
+ *
2660
+ * @param password - Password to verify
2661
+ * @param salt - Salt used for key derivation
2662
+ * @param storedHash - Previously stored verification hash
2663
+ * @returns True if password is correct
2664
+ */
2665
+ declare function verifyPassword(password: string, salt: Uint8Array, storedHash: Uint8Array): Promise<boolean>;
2666
+
2224
2667
  /**
2225
2668
  * Electrum Sync Provider
2226
2669
  *
@@ -2497,4 +2940,4 @@ declare class P2PSyncProvider extends BaseSyncProvider {
2497
2940
  private decodeVarInt;
2498
2941
  }
2499
2942
 
2500
- export { type AmountRecoveryResult, type BackendType, type BackgroundSyncOptions, BaseSyncProvider, type BlockHash, type BlockHeader, type BlockHeadersResult, type BlockLocator, type BlockTransactionKeys, type BlockTransactionKeysRange, type CTxDestination, type CTxOut, type CTxOutBLSCTData, type ChainTip, DefaultPorts, ElectrumClient, ElectrumError, type ElectrumOptions, type ElectrumSyncOptions, ElectrumSyncProvider, type HDChain, type HexString, InvType, type InvVector, KeyManager, type KeyStorage, type MessageHeader, MessageType, NavioClient, type NavioClientConfig, type NavioNetwork, NetworkMagic, type NetworkType, type OutputHash, P2PClient, type P2PConnectionOptions, type P2PMessage, type P2POptions, type P2PSyncOptions, P2PSyncProvider, PROTOCOL_VERSION, type PublicKey$1 as PublicKey, type ReorganizationInfo, type SecretKey, type SeedType, ServiceFlags, type SubAddress, type SubAddressIdentifier, type SyncBlockHeader, type SyncOptions, type SyncProgressCallback, type SyncProvider, type SyncProviderOptions, type SyncState, type TransactionKeys, TransactionKeysSync, type TxHash, type VersionPayload, WalletDB, type WalletOutput };
2943
+ export { type AmountRecoveryResult, type BackendType, type BackgroundSyncOptions, BaseSyncProvider, type BlockHash, type BlockHeader, type BlockHeadersResult, type BlockLocator, type BlockTransactionKeys, type BlockTransactionKeysRange, type CTxDestination, type CTxOut, type CTxOutBLSCTData, type ChainTip, DefaultPorts, ENCRYPTION_VERSION, ElectrumClient, ElectrumError, type ElectrumOptions, type ElectrumSyncOptions, ElectrumSyncProvider, type EncryptedData, type HDChain, type HexString, IV_LENGTH, InvType, type InvVector, KeyManager, type KeyStorage, type MessageHeader, MessageType, NavioClient, type NavioClientConfig, type NavioNetwork, NetworkMagic, type NetworkType, type OutputHash, P2PClient, type P2PConnectionOptions, type P2PMessage, type P2POptions, type P2PSyncOptions, P2PSyncProvider, PROTOCOL_VERSION, type PublicKey$1 as PublicKey, type ReorganizationInfo, SALT_LENGTH, type SecretKey, type SeedType, type SerializedEncryptedData, ServiceFlags, type SubAddress, type SubAddressIdentifier, type SyncBlockHeader, type SyncOptions, type SyncProgressCallback, type SyncProvider, type SyncProviderOptions, type SyncState, type TransactionKeys, TransactionKeysSync, type TxHash, type VersionPayload, WalletDB, type WalletOutput, createPasswordVerification, decrypt, decryptDatabase, decryptWithKey, deriveKey, deriveKeyBytes, deserializeEncryptedData, encrypt, encryptDatabase, encryptWithKey, isEncryptedDatabase, randomBytes, serializeEncryptedData, verifyPassword };