librustzcash
librustzcash copied to clipboard
Redesign Rust types for representing wallet key material
The key types in our Rust crates have evolved somewhat organically over time:
- The Sapling key types were originally written for circuit usage, and extracted / extended from there.
- The Orchard key types were crafted for direct usage, but only within the Orchard context.
- The transparent key types have only been implemented as minimally as required for our usage. We don't have full transparent support like the
zcashdwallet does. - Wrapper types like
RecipientAddressandUnifiedFullViewingKeywere built as they were needed.
Once #578 is complete, we should look at the overall Zcash key structure, and redesign our Rust types for simplicity and cohesiveness, and to better match the actual use cases.
The zcash_keys crate is the direction we've headed in for addressing this issue. We still need to redesign the sapling-crypto key structures, and we still need to take input from zcashd (#578) to ensure we can represent those keys as needed.