diff --git a/src/bundle.rs b/src/bundle.rs index a0c717de..0f72c64b 100644 --- a/src/bundle.rs +++ b/src/bundle.rs @@ -18,7 +18,7 @@ use crate::{ /// /// Internally, this may both consume a note and create a note, or it may do only one of /// the two. TODO: Determine which is more efficient (circuit size vs bundle size). -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Action { /// The nullifier of the note being spent. nf: Nullifier, @@ -173,7 +173,7 @@ pub trait Authorization { } /// A bundle of actions to be applied to the ledger. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Bundle { /// The list of actions that make up this bundle. actions: NonEmpty>, @@ -301,7 +301,7 @@ impl Bundle { } /// Authorizing data for a bundle of actions, ready to be committed to the ledger. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Authorized { proof: Proof, binding_signature: redpallas::Signature, diff --git a/src/circuit.rs b/src/circuit.rs index af2a6d78..16995821 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -116,7 +116,7 @@ impl Instance { /// A proof of the validity of an Orchard [`Bundle`]. /// /// [`Bundle`]: crate::bundle::Bundle -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Proof(Vec); impl AsRef<[u8]> for Proof { diff --git a/src/note.rs b/src/note.rs index 84e9e400..cd411768 100644 --- a/src/note.rs +++ b/src/note.rs @@ -135,7 +135,7 @@ impl Note { } /// An encrypted note. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct TransmittedNoteCiphertext { /// The serialization of the ephemeral public key pub epk_bytes: [u8; 32], diff --git a/src/primitives/redpallas.rs b/src/primitives/redpallas.rs index 0a8ba3d7..19e23c99 100644 --- a/src/primitives/redpallas.rs +++ b/src/primitives/redpallas.rs @@ -93,7 +93,7 @@ impl VerificationKey { } /// A RedPallas signature. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Signature(reddsa::Signature); impl From<[u8; 64]> for Signature {