pub struct Multisig { /* private fields */ }Expand description
Multisignature data.
Implementations§
Source§impl Multisig
impl Multisig
Sourcepub fn from_account_view(
account_view: &AccountView,
) -> Result<Ref<'_, Multisig>, ProgramError>
pub fn from_account_view( account_view: &AccountView, ) -> Result<Ref<'_, Multisig>, ProgramError>
Return a Multisig from the given account view.
This method performs owner and length validation on AccountView, safe
borrowing the account data.
Sourcepub unsafe fn from_account_view_unchecked(
account_view: &AccountView,
) -> Result<&Self, ProgramError>
pub unsafe fn from_account_view_unchecked( account_view: &AccountView, ) -> Result<&Self, ProgramError>
Return a Multisig from the given account view.
This method performs owner and length validation on AccountView, but
does not perform the borrow check.
§Safety
The caller must ensure that it is safe to borrow the account data (e.g., there are no mutable borrows of the account data).
Sourcepub unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self
pub unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self
Return a Multisig from the given bytes.
§Safety
The caller must ensure that bytes contains a valid representation of
Multisig, and it has the correct length to be interpreted as an
instance of Multisig.
Sourcepub const fn required_signers(&self) -> u8
pub const fn required_signers(&self) -> u8
Number of signers required to validate the Multisig signature.
Sourcepub const fn signers_len(&self) -> usize
pub const fn signers_len(&self) -> usize
Number of signer addresses present on the Multisig.
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check whether the multisig is initialized or not.