pub struct LedgerHardwareWallet { /* private fields */ }Implementations§
Source§impl LedgerHardwareWallet
impl LedgerHardwareWallet
pub fn get_transport_type(&self) -> TransportTypes
pub fn is_simulator(&self) -> bool
pub fn is_debug_app(&self) -> bool
pub fn device_type(&self) -> &LedgerDeviceTypes
pub fn get_buffer_size(&self) -> usize
pub fn is_locked(&self) -> Result<bool, APIError>
Sourcepub fn set_account(
&self,
coin_type: u32,
bip32_account: u32,
) -> Result<(), APIError>
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.
pub fn get_addresses( &self, show: bool, bip32: LedgerBIP32Index, count: usize, ) -> Result<Vec<[u8; 32]>, APIError>
pub fn get_public_keys( &self, show: bool, bip32: LedgerBIP32Index, count: usize, ) -> Result<Vec<[u8; 32]>, APIError>
pub fn get_first_address(&self) -> Result<[u8; 32], APIError>
Sourcepub fn prepare_signing(
&self,
key_indices: Vec<LedgerBIP32Index>,
essence: Vec<u8>,
has_remainder: bool,
remainder_index: u16,
remainder: LedgerBIP32Index,
) -> Result<(), APIError>
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.
Sourcepub fn prepare_blind_signing(
&self,
key_indices: Vec<LedgerBIP32Index>,
essence_hash: Vec<u8>,
) -> Result<(), APIError>
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
Sourcepub fn user_confirm(&self) -> Result<(), APIError>
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.
Sourcepub fn sign(&self, num_inputs: u16) -> Result<Vec<u8>, APIError>
pub fn sign(&self, num_inputs: u16) -> Result<Vec<u8>, APIError>
Sign
The publicly usable function for signing an essence.
pub fn memory_dump(&self, filename: String) -> Result<(), APIError>
pub fn set_non_interactive_mode( &self, non_interactive_mode: bool, ) -> Result<(), APIError>
Auto Trait Implementations§
impl !Freeze for LedgerHardwareWallet
impl RefUnwindSafe for LedgerHardwareWallet
impl !Send for LedgerHardwareWallet
impl Sync for LedgerHardwareWallet
impl Unpin for LedgerHardwareWallet
impl UnwindSafe for LedgerHardwareWallet
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