LedgerHardwareWallet

Struct LedgerHardwareWallet 

Source
pub struct LedgerHardwareWallet { /* private fields */ }

Implementations§

Source§

impl LedgerHardwareWallet

Source

pub fn get_transport_type(&self) -> TransportTypes

Source

pub fn is_simulator(&self) -> bool

Source

pub fn is_debug_app(&self) -> bool

Source

pub fn device_type(&self) -> &LedgerDeviceTypes

Source

pub fn get_buffer_size(&self) -> usize

Source

pub fn is_locked(&self) -> Result<bool, APIError>

Source

pub fn reset(&self) -> Result<(), APIError>

resets api (also resets account index)

Source

pub fn set_account( &self, coin_type: u32, bip32_account: u32, ) -> Result<(), APIError>

Set BIP32 account index

For all crypto operations following BIP32 path is used: 2c'/107a'/account'/index'. This command sets the third component of the BIP32 path. The account index remains valid until the API is reset.

The MSB (=hardened) always must be set.

Source

pub fn get_addresses( &self, show: bool, bip32: LedgerBIP32Index, count: usize, ) -> Result<Vec<[u8; 32]>, APIError>

Source

pub fn get_public_keys( &self, show: bool, bip32: LedgerBIP32Index, count: usize, ) -> Result<Vec<[u8; 32]>, APIError>

Source

pub fn get_first_address(&self) -> Result<[u8; 32], APIError>

Source

pub fn prepare_signing( &self, key_indices: Vec<LedgerBIP32Index>, essence: Vec<u8>, has_remainder: bool, remainder_index: u16, remainder: LedgerBIP32Index, ) -> Result<(), APIError>

Prepare Signing

Uploads the essence, parses and validates it.

Source

pub fn prepare_blind_signing( &self, key_indices: Vec<LedgerBIP32Index>, essence_hash: Vec<u8>, ) -> Result<(), APIError>

Prepare Blind Signing

Uploads the essence hash and validates it

Source

pub fn user_confirm(&self) -> Result<(), APIError>

User Confirm

Displays the (parsed and validated) essence in human readable form on the screen of the hardware wallet and waits for accepting or rejecting it.

Source

pub fn sign(&self, num_inputs: u16) -> Result<Vec<u8>, APIError>

Sign

The publicly usable function for signing an essence.

Source

pub fn memory_dump(&self, filename: String) -> Result<(), APIError>

Source

pub fn set_non_interactive_mode( &self, non_interactive_mode: bool, ) -> Result<(), APIError>

Auto Trait Implementations§

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, 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.