Skip to content

rpc: Implement z_exportviewingkey for Sapling#461

Open
mnm458 wants to merge 1 commit into
zcash:mainfrom
mnm458:z_exportviewingkey
Open

rpc: Implement z_exportviewingkey for Sapling#461
mnm458 wants to merge 1 commit into
zcash:mainfrom
mnm458:z_exportviewingkey

Conversation

@mnm458

@mnm458 mnm458 commented Jun 8, 2026

Copy link
Copy Markdown

Implements z_exportviewingkey, which returns the bech32-encoded Sapling extended full viewing key for a
given Sapling payment address. This is the export counterpart needed to support z_importviewingkey (PR
#431) and its integration test (zcash/integration-tests#99).

The address lookup scans each account's UFVK Sapling component via decrypt_diversifier, since bare Sapling
receivers derived from unified accounts aren't found by the standard get_account_for_address path. Wallet
unlock is required for seed access to re-derive the EFVK. Imported view-only accounts are rejected (the
stored DiversifiableFullViewingKey can't reconstruct the chain-code-bearing ExtendedFullViewingKey).

Integration tests can be found here: zcash/integration-tests#115

Closes #70
Closes COR-255

@mnm458 mnm458 force-pushed the z_exportviewingkey branch from 2eb45a2 to 698e8a7 Compare June 8, 2026 07:04
@mnm458

mnm458 commented Jun 8, 2026

Copy link
Copy Markdown
Author

@nullcopy Please help take a look when you have time. Integration tests can be found here: zcash/integration-tests#115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rpc: Implement z_exportviewingkey

1 participant