pub struct SignersContainer(_);
Expand description
Container for multiple signers
Implementations
sourceimpl 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
sourceimpl 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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn ids(&self) -> Vec<&SignerId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns the list of identifiers of all the signers in the container
Trait Implementations
sourceimpl Clone for SignersContainer
impl Clone for SignersContainer
sourcefn clone(&self) -> SignersContainer
fn clone(&self) -> SignersContainer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SignersContainer
impl Debug for SignersContainer
sourceimpl Default for SignersContainer
impl Default for SignersContainer
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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