Struct bdk::wallet::signer::SignersContainer
source · pub struct SignersContainer(/* private fields */);
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
Auto Trait Implementations§
impl !RefUnwindSafe for SignersContainer
impl Send for SignersContainer
impl Sync for SignersContainer
impl Unpin for SignersContainer
impl !UnwindSafe for SignersContainer
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