pub struct SdkLwkSigner { /* private fields */ }Expand description
A software signer
Implementations§
Source§impl SdkLwkSigner
impl SdkLwkSigner
Sourcepub fn new(sdk_signer: Arc<Box<dyn Signer>>) -> Result<Self, NewError>
pub fn new(sdk_signer: Arc<Box<dyn Signer>>) -> Result<Self, NewError>
Creates a new software signer from the given mnemonic.
Takes also a flag if the network is mainnet so that generated extended keys are in the correct form xpub/tpub (there is no need to discriminate between regtest and testnet)
pub fn fingerprint(&self) -> Result<Fingerprint, SignError>
Trait Implementations§
Source§impl Signer for SdkLwkSigner
impl Signer for SdkLwkSigner
type Error = SignError
Source§fn sign(
&self,
pset: &mut PartiallySignedTransaction,
) -> Result<u32, Self::Error>
fn sign( &self, pset: &mut PartiallySignedTransaction, ) -> Result<u32, Self::Error>
Try to sign the given pset, mutating it in place.
returns how many signatures were added or overwritten
Source§fn slip77_master_blinding_key(&self) -> Result<MasterBlindingKey, Self::Error>
fn slip77_master_blinding_key(&self) -> Result<MasterBlindingKey, Self::Error>
Return the slip77 master blinding key
Source§fn derive_xpub(&self, path: &DerivationPath) -> Result<Xpub, Self::Error>
fn derive_xpub(&self, path: &DerivationPath) -> Result<Xpub, Self::Error>
Derive an xpub from the master, path can contains hardened derivations
§fn identifier(&self) -> Result<XKeyIdentifier, Self::Error>
fn identifier(&self) -> Result<XKeyIdentifier, Self::Error>
Return the full identifier of the signer
§fn fingerprint(&self) -> Result<Fingerprint, Self::Error>
fn fingerprint(&self) -> Result<Fingerprint, Self::Error>
Return the fingerprint of the signer (4 bytes)
§fn keyorigin_xpub(
&self,
bip: Bip,
is_mainnet: bool,
) -> Result<String, Self::Error>
fn keyorigin_xpub( &self, bip: Bip, is_mainnet: bool, ) -> Result<String, Self::Error>
Return keyorigin and xpub, like “[73c5da0a/84h/1h/0h]tpub…”
fn is_mainnet(&self) -> Result<bool, Self::Error>
Auto Trait Implementations§
impl Freeze for SdkLwkSigner
impl !RefUnwindSafe for SdkLwkSigner
impl Send for SdkLwkSigner
impl Sync for SdkLwkSigner
impl Unpin for SdkLwkSigner
impl UnsafeUnpin for SdkLwkSigner
impl !UnwindSafe for SdkLwkSigner
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request