From b167a3b96e56b26ea2cae36fe75f6a8d481fb6ea Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Sun, 29 Mar 2020 03:18:16 -0400 Subject: [PATCH] Create our own Scalar alias for now --- zebra-chain/src/keys/sapling.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zebra-chain/src/keys/sapling.rs b/zebra-chain/src/keys/sapling.rs index 40280811..becc951d 100644 --- a/zebra-chain/src/keys/sapling.rs +++ b/zebra-chain/src/keys/sapling.rs @@ -18,6 +18,10 @@ use proptest::prelude::*; #[cfg(test)] use proptest_derive::Arbitrary; +// TODO: replace with reference to redjubjub or jubjub when merged and +// exported. +type Scalar = jubjub::Fr; + /// Our root secret key of the Sprout key derivation tree. /// /// All other Sprout key types derive from the SpendingKey value. @@ -46,7 +50,7 @@ impl From<[u8; 32]> for SpendingKey { } /// Derived from a _SpendingKey_. -pub type SpendAuthorizationKey = redjubjub::Scalar; +pub type SpendAuthorizationKey = Scalar; impl From for SpendAuthorizationKey { /// Invokes Blake2b-512 as PRF^expand to derive a @@ -69,7 +73,7 @@ impl From for SpendAuthorizationKey { } /// Derived from a _SpendingKey_. -pub type ProofAuthorizingKey = redjubjub::Scalar; +pub type ProofAuthorizingKey = Scalar; impl fmt::Debug for ProofAuthorizingKey { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -146,7 +150,7 @@ impl fmt::Debug for AuthorizingKey { pub type NullifierDerivingKey = redjubjub::PublicKeyBytes; /// -pub type IncomingViewingKey = redjubjub::Scalar; +pub type IncomingViewingKey = Scalar; /// #[derive(Copy, Clone, Display, Eq, PartialEq)]