Add the beginnings of Sprout and Sapling key types
This commit is contained in:
parent
b4832ab7cb
commit
7af9b80f3b
|
@ -1,3 +1,5 @@
|
|||
//! Address types.
|
||||
|
||||
pub mod sapling;
|
||||
pub mod sprout;
|
||||
pub mod transparent;
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
//! Sapling key types
|
||||
//!
|
||||
//! "The spend authorizing key ask, proof authorizing key (ak, nsk),
|
||||
//! full viewing key (ak, nk, ovk), incoming viewing key ivk, and each
|
||||
//! diversied payment address addr_d = (d, pk_d ) are derived from sk,
|
||||
//! as described in [Sapling Key Components][ps]."
|
||||
//!
|
||||
//! [ps]: https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents
|
||||
|
||||
use std::{
|
||||
fmt,
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
//! Sprout key types
|
||||
//!
|
||||
//! "The receiving key sk_enc, the incoming viewing key ivk = (apk,
|
||||
//! sk_enc), and the shielded payment address addr_pk = (a_pk, pk_enc) are
|
||||
//! derived from a_sk, as described in [‘Sprout Key Components’][ps]
|
||||
//!
|
||||
//! [ps]: https://zips.z.cash/protocol/protocol.pdf#sproutkeycomponents
|
||||
|
||||
use std::{
|
||||
fmt,
|
||||
|
@ -12,6 +18,20 @@ use proptest_derive::Arbitrary;
|
|||
|
||||
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
|
||||
|
||||
/// All other Sprout key types derive from the SpendingKey value.
|
||||
pub struct SpendingKey;
|
||||
|
||||
pub struct ReceivingKey;
|
||||
|
||||
pub struct PayingKey;
|
||||
|
||||
pub struct TransmissionKey;
|
||||
|
||||
pub struct IncomingViewingKey {
|
||||
paying_key: PayingKey,
|
||||
receiving_key: ReceivingKey,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
proptest! {
|
||||
|
||||
|
|
Loading…
Reference in New Issue