pub struct ApexCommand {
pub command: ApexCommandType,
pub nonce: [u8; 32],
pub timestamp: u64,
pub architect_signature: Vec<u8>,
pub council_signature: ThresholdSignature,
pub required_quorum: usize,
}Expand description
Apex Command - requires multi-signature
Fields§
§command: ApexCommandTypeCommand type
nonce: [u8; 32]Command nonce (anti-replay)
timestamp: u64Timestamp
architect_signature: Vec<u8>Architect signature
council_signature: ThresholdSignatureBFT Council threshold signature
required_quorum: usizeRequired quorum (must match)
Implementations§
Source§impl ApexCommand
impl ApexCommand
Sourcepub fn new(command: ApexCommandType, required_quorum: usize) -> Self
pub fn new(command: ApexCommandType, required_quorum: usize) -> Self
Create new apex command (unsigned)
Sourcepub fn sign_architect(
&mut self,
architect_key: &dyn KeyStore,
) -> Result<(), CryptoError>
pub fn sign_architect( &mut self, architect_key: &dyn KeyStore, ) -> Result<(), CryptoError>
Sign by Architect
Sourcepub fn add_council_signature(&mut self, signature: ThresholdSignature)
pub fn add_council_signature(&mut self, signature: ThresholdSignature)
Add council signature
Trait Implementations§
Source§impl Clone for ApexCommand
impl Clone for ApexCommand
Source§fn clone(&self) -> ApexCommand
fn clone(&self) -> ApexCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApexCommand
impl Debug for ApexCommand
Source§impl<'de> Deserialize<'de> for ApexCommand
impl<'de> Deserialize<'de> for ApexCommand
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§
impl Freeze for ApexCommand
impl RefUnwindSafe for ApexCommand
impl Send for ApexCommand
impl Sync for ApexCommand
impl Unpin for ApexCommand
impl UnwindSafe for ApexCommand
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