pub struct MultisigCommittee { /* private fields */ }Expand description
A multisig committee
A MultisigCommittee is a set of members who collectively control a single
Address on the IOTA blockchain. The number of required signatures to
authorize the execution of a transaction is determined by
(signature_0_weight + signature_1_weight ..) >= threshold.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
multisig-committee = (vector multisig-member)
u16 ; thresholdThere is also a legacy encoding for this type defined as:
legacy-multisig-committee = (vector legacy-multisig-member)
u16 ; thresholdImplementations§
Source§impl MultisigCommittee
impl MultisigCommittee
Sourcepub fn derive_address(&self) -> Address
Available on crate feature hash only.
pub fn derive_address(&self) -> Address
hash only.Derive an Address from this MultisigCommittee.
A MultiSig address
is defined as the 32-byte Blake2b hash of serializing the
SignatureScheme flag (0x03), the threshold (in little endian), and
the concatenation of all n flag, public keys and its weight.
hash(0x03 || threshold || flag_1 || pk_1 || weight_1 || ... || flag_n || pk_n || weight_n).
When flag_i is ZkLogin, the pk_i for the ZkLoginPublicIdentifier
refers to the same input used when deriving the address using the
ZkLoginPublicIdentifier::derive_address_padded method (using the
full 32-byte address_seed value).
Source§impl MultisigCommittee
impl MultisigCommittee
Sourcepub fn new(members: Vec<MultisigMember>, threshold: u16) -> Self
pub fn new(members: Vec<MultisigMember>, threshold: u16) -> Self
Construct a new committee from a list of MultisigMembers and a
threshold.
Note that the order of the members is significant towards deriving the
Address governed by this committee.
Sourcepub fn members(&self) -> &[MultisigMember]
pub fn members(&self) -> &[MultisigMember]
The members of the committee
Sourcepub fn threshold(&self) -> u16
pub fn threshold(&self) -> u16
The total signature weight required to authorize a transaction for the
address corresponding to this MultisigCommittee.
Sourcepub fn scheme(&self) -> SignatureScheme
pub fn scheme(&self) -> SignatureScheme
Return the flag for this signature scheme
Trait Implementations§
Source§impl Arbitrary for MultisigCommittee
impl Arbitrary for MultisigCommittee
Source§type Parameters = ()
type Parameters = ()
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<MultisigCommittee>
type Strategy = BoxedStrategy<MultisigCommittee>
Strategy used to generate values of type Self.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl Clone for MultisigCommittee
impl Clone for MultisigCommittee
Source§fn clone(&self) -> MultisigCommittee
fn clone(&self) -> MultisigCommittee
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MultisigCommittee
impl Debug for MultisigCommittee
Source§impl<'de> Deserialize<'de> for MultisigCommittee
impl<'de> Deserialize<'de> for MultisigCommittee
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>,
Source§impl JsonSchema for MultisigCommittee
impl JsonSchema for MultisigCommittee
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for MultisigCommittee
impl PartialEq for MultisigCommittee
Source§impl Serialize for MultisigCommittee
impl Serialize for MultisigCommittee
impl Eq for MultisigCommittee
impl StructuralPartialEq for MultisigCommittee
Auto Trait Implementations§
impl Freeze for MultisigCommittee
impl RefUnwindSafe for MultisigCommittee
impl Send for MultisigCommittee
impl Sync for MultisigCommittee
impl Unpin for MultisigCommittee
impl UnwindSafe for MultisigCommittee
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<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 more