pub struct MultisigWallet {
pub config: MultisigConfig,
pub redeem_script: Vec<u8>,
pub address_p2sh: String,
pub address_p2wsh: String,
pub address_p2sh_p2wsh: String,
pub network: Network,
}Expand description
A complete multisig wallet with all address types.
Fields§
§config: MultisigConfigThe multisig configuration
redeem_script: Vec<u8>The redeem script (for P2SH)
address_p2sh: StringP2SH address (legacy, starts with 3 or 2)
address_p2wsh: StringP2WSH address (native SegWit, starts with bc1q or tb1q)
address_p2sh_p2wsh: StringP2SH-P2WSH address (nested SegWit, starts with 3 or 2)
network: NetworkNetwork
Implementations§
Source§impl MultisigWallet
impl MultisigWallet
Sourcepub fn new(config: MultisigConfig, network: Network) -> Result<Self>
pub fn new(config: MultisigConfig, network: Network) -> Result<Self>
Create a new multisig wallet from configuration.
Sourcepub fn from_pubkeys(
threshold: u8,
public_keys: Vec<[u8; 33]>,
network: Network,
) -> Result<Self>
pub fn from_pubkeys( threshold: u8, public_keys: Vec<[u8; 33]>, network: Network, ) -> Result<Self>
Create from public keys.
Sourcepub fn witness_script(&self) -> &[u8] ⓘ
pub fn witness_script(&self) -> &[u8] ⓘ
Get the witness script (same as redeem script for P2WSH).
Sourcepub fn witness_script_hash(&self) -> [u8; 32]
pub fn witness_script_hash(&self) -> [u8; 32]
Get the witness script hash (for P2WSH).
Sourcepub fn nested_redeem_script(&self) -> Vec<u8> ⓘ
pub fn nested_redeem_script(&self) -> Vec<u8> ⓘ
Get the nested redeem script (for P2SH-P2WSH).
Trait Implementations§
Source§impl Clone for MultisigWallet
impl Clone for MultisigWallet
Source§fn clone(&self) -> MultisigWallet
fn clone(&self) -> MultisigWallet
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for MultisigWallet
impl RefUnwindSafe for MultisigWallet
impl Send for MultisigWallet
impl Sync for MultisigWallet
impl Unpin for MultisigWallet
impl UnwindSafe for MultisigWallet
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