pub struct RestBlsAggregateSignature {
pub signer_bitmask: String,
pub signature: String,
pub validator_public_keys: Vec<String>,
}Expand description
BLS aggregate signature representation for REST API. Contains the aggregated signature, signer bitmask, and validator public keys needed for verification.
Fields§
§signer_bitmask: StringBitmask indicating which validators signed (by index in validator set). Each byte contains 8 bits, where bit i indicates if validator i signed. Represented as hex string (e.g., “0x01ff”).
signature: StringThe aggregated BLS signature as hex string. BLS12-381 signature is 48 bytes.
validator_public_keys: Vec<String>Ordered list of all validator BLS public keys (48 bytes each, hex encoded). Index in this array corresponds to bit position in signer_bitmask. Clients need these public keys to verify the aggregate signature.
Implementations§
Source§impl RestBlsAggregateSignature
impl RestBlsAggregateSignature
Sourcepub fn new(
signer_bitmask: String,
signature: String,
validator_public_keys: Vec<String>,
) -> RestBlsAggregateSignature
pub fn new( signer_bitmask: String, signature: String, validator_public_keys: Vec<String>, ) -> RestBlsAggregateSignature
Create a new BLS aggregate signature for REST API response.
Sourcepub fn num_signers(&self) -> usize
pub fn num_signers(&self) -> usize
Get the number of signers from the bitmask.
Trait Implementations§
Source§impl Clone for RestBlsAggregateSignature
impl Clone for RestBlsAggregateSignature
Source§fn clone(&self) -> RestBlsAggregateSignature
fn clone(&self) -> RestBlsAggregateSignature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RestBlsAggregateSignature
impl Debug for RestBlsAggregateSignature
Source§impl Default for RestBlsAggregateSignature
impl Default for RestBlsAggregateSignature
Source§fn default() -> RestBlsAggregateSignature
fn default() -> RestBlsAggregateSignature
Source§impl<'de> Deserialize<'de> for RestBlsAggregateSignature
impl<'de> Deserialize<'de> for RestBlsAggregateSignature
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RestBlsAggregateSignature, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RestBlsAggregateSignature, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for RestBlsAggregateSignature
impl Display for RestBlsAggregateSignature
Source§impl Serialize for RestBlsAggregateSignature
impl Serialize for RestBlsAggregateSignature
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl ToSchema for RestBlsAggregateSignature
impl ToSchema for RestBlsAggregateSignature
impl Eq for RestBlsAggregateSignature
impl StructuralPartialEq for RestBlsAggregateSignature
Auto Trait Implementations§
impl Freeze for RestBlsAggregateSignature
impl RefUnwindSafe for RestBlsAggregateSignature
impl Send for RestBlsAggregateSignature
impl Sync for RestBlsAggregateSignature
impl Unpin for RestBlsAggregateSignature
impl UnwindSafe for RestBlsAggregateSignature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PartialSchema for Twhere
T: ComposeSchema + ?Sized,
impl<T> PartialSchema for Twhere
T: ComposeSchema + ?Sized,
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.