zebra_consensus::redpallas

Type Alias Item

Source
pub type Item = Item<SpendAuth, Binding>;
Expand description

The type of the batch item. This is a RedPallasItem.

Aliased Type§

struct Item { /* private fields */ }

Implementations

§

impl<S, B> Item<S, B>
where S: SpendAuth, B: Binding<Scalar = <S as Sealed<S>>::Scalar, Point = <S as Sealed<S>>::Point>,

pub fn from_spendauth<M>( vk_bytes: VerificationKeyBytes<S>, sig: Signature<S>, msg: &M, ) -> Item<S, B>
where M: AsRef<[u8]>,

Create a batch item from a SpendAuth signature.

pub fn from_binding<M>( vk_bytes: VerificationKeyBytes<B>, sig: Signature<B>, msg: &M, ) -> Item<S, B>
where M: AsRef<[u8]>,

Create a batch item from a Binding signature.

pub fn verify_single(self) -> Result<(), Error>

Perform non-batched verification of this Item.

This is useful (in combination with Item::clone) for implementing fallback logic when batch verification fails. In contrast to VerificationKey::verify, which requires borrowing the message data, the Item type is unlinked from the lifetime of the message.

Trait Implementations

§

impl<S, B> Clone for Item<S, B>
where S: Clone + SpendAuth, B: Clone + Binding<Scalar = <S as Sealed<S>>::Scalar, Point = <S as Sealed<S>>::Point>,

§

fn clone(&self) -> Item<S, B>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<S, B> Debug for Item<S, B>
where S: Debug + SpendAuth, B: Debug + Binding<Scalar = <S as Sealed<S>>::Scalar, Point = <S as Sealed<S>>::Point>,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more