pub enum PartiallyMultisigned<T, MK> where
T: Signable,
MK: MultiKeychain, {
Incomplete {
unchecked: UncheckedSigned<T, <MK as MultiKeychain>::PartialMultisignature>,
},
Complete {
multisigned: Multisigned<T, MK>,
},
}Expand description
Signable data together with a valid partial multisignature.
Instances of this type keep track whether the partial multisignautre is complete or not.
If the multisignature is complete, you can get Multisigned by pattern matching
against the variant PartiallyMultisigned::Complete.
Variants
Incomplete
Fields
unchecked: UncheckedSigned<T, <MK as MultiKeychain>::PartialMultisignature>Complete
Fields
multisigned: Multisigned<T, MK>Implementations
impl<T, MK> PartiallyMultisigned<T, MK> where
T: Signable,
MK: MultiKeychain,
impl<T, MK> PartiallyMultisigned<T, MK> where
T: Signable,
MK: MultiKeychain,
pub async fn sign(signable: T, keychain: &MK) -> PartiallyMultisigned<T, MK>
pub async fn sign(signable: T, keychain: &MK) -> PartiallyMultisigned<T, MK>
Create a partially multisigned object.
pub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Chceck if the partial multisignature is complete.
pub fn as_signable(&self) -> &T
pub fn as_signable(&self) -> &T
Get a reference to the multisigned object.
pub fn into_unchecked(
self
) -> UncheckedSigned<T, <MK as MultiKeychain>::PartialMultisignature>
pub fn into_unchecked(
self
) -> UncheckedSigned<T, <MK as MultiKeychain>::PartialMultisignature>
Return the object that is being signed.
pub fn add_signature(
self,
signed: Signed<Indexed<T>, MK>,
keychain: &MK
) -> PartiallyMultisigned<T, MK>
pub fn add_signature(
self,
signed: Signed<Indexed<T>, MK>,
keychain: &MK
) -> PartiallyMultisigned<T, MK>
Adds a signature and checks if multisignature is complete.
Trait Implementations
impl<T, MK> Debug for PartiallyMultisigned<T, MK> where
T: Debug + Signable,
MK: Debug + MultiKeychain,
<MK as MultiKeychain>::PartialMultisignature: Debug,
impl<T, MK> Debug for PartiallyMultisigned<T, MK> where
T: Debug + Signable,
MK: Debug + MultiKeychain,
<MK as MultiKeychain>::PartialMultisignature: Debug,
Auto Trait Implementations
impl<T, MK> RefUnwindSafe for PartiallyMultisigned<T, MK> where
T: RefUnwindSafe,
<MK as MultiKeychain>::PartialMultisignature: RefUnwindSafe,
impl<T, MK> Send for PartiallyMultisigned<T, MK> where
T: Send,
impl<T, MK> Sync for PartiallyMultisigned<T, MK> where
T: Sync,
impl<T, MK> Unpin for PartiallyMultisigned<T, MK> where
T: Unpin,
<MK as MultiKeychain>::PartialMultisignature: Unpin,
impl<T, MK> UnwindSafe for PartiallyMultisigned<T, MK> where
T: UnwindSafe,
<MK as MultiKeychain>::PartialMultisignature: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more