pub struct MultiSigPublicKey { /* private fields */ }Expand description
The struct that contains the public key used for authenticating a MultiSig.
Implementations§
Source§impl MultiSigPublicKey
impl MultiSigPublicKey
Sourcepub fn insecure_new(
pk_map: Vec<(PublicKey, WeightUnit)>,
threshold: ThresholdUnit,
) -> Self
pub fn insecure_new( pk_map: Vec<(PublicKey, WeightUnit)>, threshold: ThresholdUnit, ) -> Self
Construct MultiSigPublicKey without validation.
pub fn new( pks: Vec<PublicKey>, weights: Vec<WeightUnit>, threshold: ThresholdUnit, ) -> Result<Self, Error>
pub fn get_index(&self, pk: &PublicKey) -> Option<u8>
pub const fn threshold(&self) -> &ThresholdUnit
pub const fn pubkeys(&self) -> &Vec<(PublicKey, WeightUnit)>
pub fn validate(&self) -> Result<Self, FastCryptoError>
Trait Implementations§
Source§impl Clone for MultiSigPublicKey
impl Clone for MultiSigPublicKey
Source§fn clone(&self) -> MultiSigPublicKey
fn clone(&self) -> MultiSigPublicKey
Returns a copy 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 MultiSigPublicKey
impl Debug for MultiSigPublicKey
Source§impl<'de> Deserialize<'de> for MultiSigPublicKey
impl<'de> Deserialize<'de> for MultiSigPublicKey
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
Source§impl From<&MultiSigPublicKey> for Address
impl From<&MultiSigPublicKey> for Address
Source§fn from(multisig_pk: &MultiSigPublicKey) -> Self
fn from(multisig_pk: &MultiSigPublicKey) -> Self
Derive a SuiAddress from [struct MultiSigPublicKey]. A MultiSig address
is defined as the 32-byte Blake2b hash of serializing the flag, the
threshold, concatenation of all n flag, public keys and
its weight. flag_MultiSig || threshold || flag_1 || pk_1 || weight_1 || ... || flag_n || pk_n || weight_n.
When flag_i is ZkLogin, pk_i refers to [struct ZkLoginPublicIdentifier] derived from padded address seed in bytes and iss.
Source§impl PartialEq for MultiSigPublicKey
impl PartialEq for MultiSigPublicKey
Source§impl Serialize for MultiSigPublicKey
impl Serialize for MultiSigPublicKey
impl Eq for MultiSigPublicKey
impl StructuralPartialEq for MultiSigPublicKey
Auto Trait Implementations§
impl Freeze for MultiSigPublicKey
impl RefUnwindSafe for MultiSigPublicKey
impl Send for MultiSigPublicKey
impl Sync for MultiSigPublicKey
impl Unpin for MultiSigPublicKey
impl UnwindSafe for MultiSigPublicKey
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
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§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>
Converts
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>
Converts
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