Skip to content

Commit f0c88b7

Browse files
committed
add SigningParts::{ak, alpha}
1 parent e4f67b3 commit f0c88b7

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to Rust's notion of
77

88
## [Unreleased]
99

10+
- Added `SigningParts::{ak, alpha}` getters under the `unstable-frost` feature
11+
1012
## [0.10.1] - 2024-12-16
1113

1214
### Added

src/builder.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,18 @@ pub struct SigningParts {
917917
alpha: pallas::Scalar,
918918
}
919919

920+
#[cfg(feature = "unstable-frost")]
921+
impl SigningParts {
922+
/// Return the spend validating key for this action.
923+
pub fn ak(&self) -> &SpendValidatingKey {
924+
&self.ak
925+
}
926+
/// Return the randomization for this action.
927+
pub fn alpha(&self) -> pallas::Scalar {
928+
self.alpha
929+
}
930+
}
931+
920932
/// Marker for an unauthorized bundle with no signatures.
921933
#[derive(Clone, Debug)]
922934
pub struct Unauthorized {

src/keys.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,15 @@ impl From<FullViewingKey> for SpendValidatingKey {
334334
}
335335

336336
impl FullViewingKey {
337+
/// Create FVK from the given sk and ak.
338+
pub fn from_sk_ak(sk: &SpendingKey, ak: SpendValidatingKey) -> Self {
339+
FullViewingKey {
340+
ak,
341+
nk: sk.into(),
342+
rivk: sk.into(),
343+
}
344+
}
345+
337346
pub(crate) fn nk(&self) -> &NullifierDerivingKey {
338347
&self.nk
339348
}

0 commit comments

Comments
 (0)