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 Freeze for SignersContainer
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