Add redpallas::signing_key::SigningKey stub

This commit is contained in:
Deirdre Connolly 2021-03-11 09:00:16 -05:00 committed by Deirdre Connolly
parent 01fed3e0f3
commit 570ad6e914
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
use std::{
convert::{TryFrom, TryInto},
marker::PhantomData,
};
use halo2::pasta::pallas;
use super::{SigType, VerificationKey};
/// A RedPallas signing key.
#[derive(Copy, Clone, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(try_from = "SerdeHelper"))]
#[cfg_attr(feature = "serde", serde(into = "SerdeHelper"))]
#[cfg_attr(feature = "serde", serde(bound = "T: SigType"))]
pub struct SigningKey<T: SigType> {
sk: pallas::Scalar,
pk: VerificationKey<T>,
}