pub struct ShareMetadata {
pub identifier: u16,
pub threshold: u16,
pub total_shares: u16,
pub group_pubkey: [u8; 32],
pub name: String,
pub created_at: i64,
pub last_used: Option<i64>,
pub sign_count: u64,
pub did_backup: bool,
}Expand description
Metadata for a FROST share.
Fields§
§identifier: u16Share identifier (1-indexed).
threshold: u16Threshold required to sign.
Total number of shares.
group_pubkey: [u8; 32]The group public key (x-only, 32 bytes).
name: StringHuman-readable name.
created_at: i64Unix timestamp when created.
last_used: Option<i64>Unix timestamp of last use.
sign_count: u64Number of signatures made.
did_backup: boolWhether this share has been backed up.
Implementations§
Sourcepub fn new(
identifier: u16,
threshold: u16,
total_shares: u16,
group_pubkey: [u8; 32],
name: String,
) -> Self
pub fn new( identifier: u16, threshold: u16, total_shares: u16, group_pubkey: [u8; 32], name: String, ) -> Self
Create new share metadata.
Sourcepub fn record_usage(&mut self)
pub fn record_usage(&mut self)
Record usage timestamp.
Sourcepub fn mark_backed_up(&mut self)
pub fn mark_backed_up(&mut self)
Mark this share as backed up.
Sourcepub fn increment_sign_count(&mut self)
pub fn increment_sign_count(&mut self)
Increment signature count and record usage.
Trait Implementations§
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more