pub struct MultisigConfig { /* private fields */ }Expand description
Configuration for a multisig wallet.
Implementations§
Source§impl MultisigConfig
impl MultisigConfig
Sourcepub fn new(threshold: u8, public_keys: Vec<[u8; 33]>) -> Result<Self>
pub fn new(threshold: u8, public_keys: Vec<[u8; 33]>) -> Result<Self>
Create a new multisig configuration.
Public keys will be sorted lexicographically (BIP67).
§Arguments
threshold- Number of required signatures (M)public_keys- List of compressed public keys
§Errors
Returns error if:
- threshold is 0 or greater than number of keys
- more than 15 keys provided
- duplicate keys found
Sourcepub fn public_keys(&self) -> &[[u8; 33]]
pub fn public_keys(&self) -> &[[u8; 33]]
Get the sorted public keys.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get the M-of-N description.
Sourcepub fn contains_key(&self, pubkey: &[u8; 33]) -> bool
pub fn contains_key(&self, pubkey: &[u8; 33]) -> bool
Check if a public key is part of this multisig.
Trait Implementations§
Source§impl Clone for MultisigConfig
impl Clone for MultisigConfig
Source§fn clone(&self) -> MultisigConfig
fn clone(&self) -> MultisigConfig
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 MultisigConfig
impl Debug for MultisigConfig
Source§impl PartialEq for MultisigConfig
impl PartialEq for MultisigConfig
impl Eq for MultisigConfig
impl StructuralPartialEq for MultisigConfig
Auto Trait Implementations§
impl Freeze for MultisigConfig
impl RefUnwindSafe for MultisigConfig
impl Send for MultisigConfig
impl Sync for MultisigConfig
impl Unpin for MultisigConfig
impl UnwindSafe for MultisigConfig
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