Skip to content

Commit

Permalink
PR Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
pacu committed Aug 2, 2024
1 parent 01367ff commit d0e37ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ visibility of methods and struct for the `unstable-frost` feature.
- Added `SpendValidatingKey` serialization and deserialization from bytes
visibility under the `unstable-frost` feature
- `orchard::keys::SpendValidatingKey`
- Added `from_sk_and_ask::keys::FullViewingKey::from_sk_and_ask` under the
- Added `orchard::keys::FullViewingKey::from_sk_and_ak` under the
`unstable-frost` feature flag
- Added `from_sk_and_ask::keys::FullViewingKey::from_checked_parts` under the
- Added `orchard::keys::FullViewingKey::from_checked_parts` under the
`unstable-frost` feature flag
- `orchard::keys::SpendValidatingKey::{from_bytes, to_bytes}` behind the
`unstable-frost` feature flag. These are temporary APIs exposed for development
Expand Down
14 changes: 5 additions & 9 deletions src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl SpendValidatingKey {
/// [`Note`]: crate::note::Note
/// [orchardkeycomponents]: https://zips.z.cash/protocol/nu5.pdf#orchardkeycomponents
#[derive(Copy, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[cfg_attr(feature = "unstable-frost", visibility::make(pub))]
#[cfg_attr(feature = "unstable-frost", visibility::make(pub))]
pub(crate) struct NullifierDerivingKey(pallas::Base);

impl NullifierDerivingKey {
Expand Down Expand Up @@ -340,9 +340,9 @@ impl FullViewingKey {
///
/// Note: See [FROST Book - Technical details](https://frost.zfnd.org/zcash/technical-details.html)
#[cfg(feature = "unstable-frost")]
pub fn from_sk_and_ask(sk: &SpendingKey, ask: SpendValidatingKey) -> FullViewingKey {
pub fn from_sk_and_ak(sk: &SpendingKey, ak: SpendValidatingKey) -> FullViewingKey {
FullViewingKey {
ak: ask,
ak,
nk: NullifierDerivingKey::from(sk),
rivk: CommitIvkRandomness::from(sk),
}
Expand All @@ -354,15 +354,11 @@ impl FullViewingKey {
/// Note: See [FROST Book - Technical details - Backing Up Key Shares](https://frost.zfnd.org/zcash/technical-details.html)
#[cfg(feature = "unstable-frost")]
pub fn from_checked_parts(
ask: SpendValidatingKey,
ak: SpendValidatingKey,
nk: NullifierDerivingKey,
rivk: CommitIvkRandomness,
) -> FullViewingKey {
FullViewingKey {
ak: ask,
nk,
rivk,
}
FullViewingKey { ak, nk, rivk }
}

pub(crate) fn nk(&self) -> &NullifierDerivingKey {
Expand Down

0 comments on commit d0e37ad

Please sign in to comment.