diff --git a/CHANGELOG.md b/CHANGELOG.md index d4212bf..bb51b39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- added: `getPrivateViewKey` method to retrieve the private view key for a wallet. + ## 0.2.0 (2025-05-26) - changed: `transfer` now accepts an array of destinations. diff --git a/src/CppBridge.ts b/src/CppBridge.ts index d15e064..8d5d308 100644 --- a/src/CppBridge.ts +++ b/src/CppBridge.ts @@ -242,6 +242,16 @@ export class CppBridge { return JSON.parse(response) } + /** + * Get the private view key for a wallet. + * This key allows viewing incoming transactions without spending ability. + * WARNING: This is sensitive information - handle with care! + */ + async getPrivateViewKey(walletId: number): Promise { + const walletInfo = await this.getWalletInfo(walletId) + return walletInfo.wi_extended.view_private_key + } + async resetWalletPassword( walletId: number, password: string