Ledger

Struct Ledger 

Source
pub struct Ledger<T: Transport> {
    pub client: LiquidClient<T>,
}

Fields§

§client: LiquidClient<T>

Ledger Liquid Client

Implementations§

Source§

impl Ledger<TransportTcp>

Source

pub fn new(port: u16) -> Self

Trait Implementations§

Source§

impl<T: Debug + Transport> Debug for Ledger<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Transport> Signer for &Ledger<T>

Source§

type Error = LiquidClientError<TransportTcp>

The user defined error type returned by the signer.
Source§

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 derive_xpub(&self, path: &DerivationPath) -> Result<Xpub, Self::Error>

Derive an xpub from the master, path can contains hardened derivations
Source§

fn slip77_master_blinding_key(&self) -> Result<MasterBlindingKey, Self::Error>

Return the slip77 master blinding key
Source§

fn fingerprint(&self) -> Result<Fingerprint, Self::Error>

Return the fingerprint of the signer (4 bytes)
Source§

fn sign_message( &self, _message: &str, _path: &DerivationPath, ) -> Result<MessageSignature, Self::Error>

Sign a message using Bitcoin’s message signing format
Source§

fn xpub(&self) -> Result<Xpub, Self::Error>

Return the master xpub of the signer
Source§

fn identifier(&self) -> Result<XKeyIdentifier, Self::Error>

Return the full identifier of the signer
Source§

fn keyorigin_xpub( &self, bip: Bip, is_mainnet: bool, ) -> Result<String, Self::Error>

Return keyorigin and xpub, like “[73c5da0a/84h/1h/0h]tpub…”
Source§

fn is_mainnet(&self) -> Result<bool, Self::Error>

Return true if the signer is for mainnet.
Source§

fn wpkh_slip77_descriptor(&self) -> Result<String, String>

Return the Witness Public Key Hash, slip77, descriptor for this signer Read more
Source§

impl<T: Transport> Signer for Ledger<T>

Source§

type Error = LiquidClientError<TransportTcp>

The user defined error type returned by the signer.
Source§

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 derive_xpub(&self, path: &DerivationPath) -> Result<Xpub, Self::Error>

Derive an xpub from the master, path can contains hardened derivations
Source§

fn slip77_master_blinding_key(&self) -> Result<MasterBlindingKey, Self::Error>

Return the slip77 master blinding key
Source§

fn fingerprint(&self) -> Result<Fingerprint, Self::Error>

Return the fingerprint of the signer (4 bytes)
Source§

fn sign_message( &self, message: &str, path: &DerivationPath, ) -> Result<MessageSignature, Self::Error>

Sign a message using Bitcoin’s message signing format
Source§

fn xpub(&self) -> Result<Xpub, Self::Error>

Return the master xpub of the signer
Source§

fn identifier(&self) -> Result<XKeyIdentifier, Self::Error>

Return the full identifier of the signer
Source§

fn keyorigin_xpub( &self, bip: Bip, is_mainnet: bool, ) -> Result<String, Self::Error>

Return keyorigin and xpub, like “[73c5da0a/84h/1h/0h]tpub…”
Source§

fn is_mainnet(&self) -> Result<bool, Self::Error>

Return true if the signer is for mainnet.
Source§

fn wpkh_slip77_descriptor(&self) -> Result<String, String>

Return the Witness Public Key Hash, slip77, descriptor for this signer Read more

Auto Trait Implementations§

§

impl<T> Freeze for Ledger<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Ledger<T>
where T: RefUnwindSafe,

§

impl<T> Send for Ledger<T>
where T: Send,

§

impl<T> Sync for Ledger<T>
where T: Sync,

§

impl<T> Unpin for Ledger<T>
where T: Unpin,

§

impl<T> UnwindSafe for Ledger<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V