pub struct ShSortedMulti<K = XpubDerivable>where
K: DeriveLegacy,{
pub threshold: u4,
pub keys: Confined<Vec<K>, 1, 16>,
}
Expand description
Representation of BIP-383 sortedmulti
as it is used inside sh
.
§Nota bene
The structure does not support 16-of-16 multisig (only 15-of-16 is possible). The cost of the support will increase code multifold, so we just ignore this rare case.
Fields§
§threshold: u4
§keys: Confined<Vec<K>, 1, 16>
Implementations§
Source§impl<K> ShSortedMulti<K>where
K: DeriveLegacy,
impl<K> ShSortedMulti<K>where
K: DeriveLegacy,
Trait Implementations§
Source§impl<K> Clone for ShSortedMulti<K>where
K: Clone + DeriveLegacy,
impl<K> Clone for ShSortedMulti<K>where
K: Clone + DeriveLegacy,
Source§fn clone(&self) -> ShSortedMulti<K>
fn clone(&self) -> ShSortedMulti<K>
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<K> Debug for ShSortedMulti<K>where
K: Debug + DeriveLegacy,
impl<K> Debug for ShSortedMulti<K>where
K: Debug + DeriveLegacy,
Source§impl<K> Derive<DerivedScript> for ShSortedMulti<K>where
K: DeriveLegacy,
impl<K> Derive<DerivedScript> for ShSortedMulti<K>where
K: DeriveLegacy,
fn default_keychain(&self) -> Keychain
fn keychains(&self) -> BTreeSet<Keychain>
fn derive( &self, keychain: impl Into<Keychain>, index: impl Into<NormalIndex>, ) -> impl Iterator<Item = DerivedScript>
fn derive_range( &self, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, to: impl Into<NormalIndex>, ) -> impl Iterator<Item = D>
Source§impl<K> Descriptor<K> for ShSortedMulti<K>
impl<K> Descriptor<K> for ShSortedMulti<K>
fn class(&self) -> SpkClass
fn keys<'a>(&'a self) -> impl Iterator<Item = &'a K>where
K: 'a,
fn vars<'a>(&'a self) -> impl Iterator<Item = &'a ()>where
(): 'a,
fn xpubs(&self) -> impl Iterator<Item = &XpubAccount>
fn legacy_keyset(&self, terminal: Terminal) -> IndexMap<LegacyPk, KeyOrigin>
fn xonly_keyset(&self, _terminal: Terminal) -> IndexMap<XOnlyPk, TapDerivation>
fn legacy_witness( &self, keysigs: HashMap<&KeyOrigin, LegacyKeySig>, redeem_script: Option<RedeemScript>, witness_script: Option<WitnessScript>, ) -> Option<(SigScript, Option<Witness>)>
fn taproot_witness( &self, _cb: Option<&ControlBlock>, _keysigs: HashMap<&KeyOrigin, TaprootKeySig>, ) -> Option<Witness>
fn is_taproot(&self) -> bool
Source§impl<S> Display for ShSortedMulti<S>where
S: DeriveLegacy,
impl<S> Display for ShSortedMulti<S>where
S: DeriveLegacy,
Source§impl<K> Hash for ShSortedMulti<K>where
K: Hash + DeriveLegacy,
impl<K> Hash for ShSortedMulti<K>where
K: Hash + DeriveLegacy,
Source§impl<K> PartialEq for ShSortedMulti<K>where
K: PartialEq + DeriveLegacy,
impl<K> PartialEq for ShSortedMulti<K>where
K: PartialEq + DeriveLegacy,
impl<K> Eq for ShSortedMulti<K>where
K: Eq + DeriveLegacy,
impl<K> StructuralPartialEq for ShSortedMulti<K>where
K: DeriveLegacy,
Auto Trait Implementations§
impl<K> Freeze for ShSortedMulti<K>
impl<K> RefUnwindSafe for ShSortedMulti<K>where
K: RefUnwindSafe,
impl<K> Send for ShSortedMulti<K>where
K: Send,
impl<K> Sync for ShSortedMulti<K>where
K: Sync,
impl<K> Unpin for ShSortedMulti<K>where
K: Unpin,
impl<K> UnwindSafe for ShSortedMulti<K>where
K: UnwindSafe,
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<T> DeriveScripts for Twhere
T: Derive<DerivedScript>,
impl<T> DeriveScripts for Twhere
T: Derive<DerivedScript>,
Source§fn derive_address(
&self,
network: AddressNetwork,
keychain: impl Into<Keychain>,
index: impl Into<NormalIndex>,
) -> impl Iterator<Item = Address>
fn derive_address( &self, network: AddressNetwork, keychain: impl Into<Keychain>, index: impl Into<NormalIndex>, ) -> impl Iterator<Item = Address>
Derives addresses for a given index. Read more
Source§fn derive_address_range(
&self,
network: AddressNetwork,
keychain: impl Into<Keychain>,
from: impl Into<NormalIndex>,
to: impl Into<NormalIndex>,
) -> impl Iterator<Item = Address>
fn derive_address_range( &self, network: AddressNetwork, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, to: impl Into<NormalIndex>, ) -> impl Iterator<Item = Address>
Derives addresses for a range of indexes. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.