Struct bdk::wallet::signer::SignersContainer
source · pub struct SignersContainer(_);
Expand description
Container for multiple signers
Implementations§
source§impl SignersContainer
impl SignersContainer
sourcepub fn as_key_map(&self, secp: &Secp256k1<All>) -> KeyMap
pub fn as_key_map(&self, secp: &Secp256k1<All>) -> KeyMap
Create a map of public keys to secret keys
sourcepub fn build(
keymap: KeyMap,
descriptor: &Descriptor<DescriptorPublicKey>,
secp: &Secp256k1<All>
) -> SignersContainer
pub fn build(
keymap: KeyMap,
descriptor: &Descriptor<DescriptorPublicKey>,
secp: &Secp256k1<All>
) -> SignersContainer
Build a new signer container from a KeyMap
Also looks at the corresponding descriptor to determine the SignerContext
to attach to
the signers
source§impl SignersContainer
impl SignersContainer
sourcepub fn add_external(
&mut self,
id: SignerId,
ordering: SignerOrdering,
signer: Arc<dyn TransactionSigner>
) -> Option<Arc<dyn TransactionSigner>>
pub fn add_external(
&mut self,
id: SignerId,
ordering: SignerOrdering,
signer: Arc<dyn TransactionSigner>
) -> Option<Arc<dyn TransactionSigner>>
Adds an external signer to the container for the specified id. Optionally returns the signer that was previously in the container, if any
sourcepub fn remove(
&mut self,
id: SignerId,
ordering: SignerOrdering
) -> Option<Arc<dyn TransactionSigner>>
pub fn remove(
&mut self,
id: SignerId,
ordering: SignerOrdering
) -> Option<Arc<dyn TransactionSigner>>
Removes a signer from the container and returns it
sourcepub fn ids(&self) -> Vec<&SignerId>
pub fn ids(&self) -> Vec<&SignerId>
Returns the list of identifiers of all the signers in the container
sourcepub fn signers(&self) -> Vec<&Arc<dyn TransactionSigner>>
pub fn signers(&self) -> Vec<&Arc<dyn TransactionSigner>>
Returns the list of signers in the container, sorted by lowest to highest ordering
Trait Implementations§
source§impl Clone for SignersContainer
impl Clone for SignersContainer
source§fn clone(&self) -> SignersContainer
fn clone(&self) -> SignersContainer
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 SignersContainer
impl Debug for SignersContainer
source§impl Default for SignersContainer
impl Default for SignersContainer
source§fn default() -> SignersContainer
fn default() -> SignersContainer
Returns the “default value” for a type. Read more