pub struct LedgerSigner<T: Exchange> { /* private fields */ }Implementations§
Source§impl<T> LedgerSigner<T>where
T: Exchange,
impl<T> LedgerSigner<T>where
T: Exchange,
pub fn new(transport: T) -> Self
Sourcepub fn native() -> Result<LedgerSigner<TransportNativeHID>, Error>
pub fn native() -> Result<LedgerSigner<TransportNativeHID>, Error>
§Errors
Returns an error if there is an issue with connecting with the device
Sourcepub async fn get_app_configuration(&self) -> Result<Vec<u8>, Error>
pub async fn get_app_configuration(&self) -> Result<Vec<u8>, Error>
Get the device app’s configuration
§Errors
Returns an error if there is an issue with connecting with the device or getting the config from the device
Sourcepub async fn sign_transaction_hash(
&self,
hd_path: impl Into<HdPath>,
transaction_hash: &[u8; 32],
) -> Result<Vec<u8>, Error>
pub async fn sign_transaction_hash( &self, hd_path: impl Into<HdPath>, transaction_hash: &[u8; 32], ) -> Result<Vec<u8>, Error>
Sign a Stellar transaction hash with the account on the Ledger device based on impl from https://github.com/LedgerHQ/ledger-live/blob/develop/libs/ledgerjs/packages/hw-app-str/src/Str.ts#L166
§Errors
Returns an error if there is an issue with connecting with the device or signing the given tx on the device. Or, if the device has not enabled hash signing
Sourcepub async fn sign_transaction(
&self,
hd_path: impl Into<HdPath>,
transaction: Transaction,
network_id: Hash,
) -> Result<Vec<u8>, Error>
pub async fn sign_transaction( &self, hd_path: impl Into<HdPath>, transaction: Transaction, network_id: Hash, ) -> Result<Vec<u8>, Error>
Sign a Stellar transaction with the account on the Ledger device
§Errors
Returns an error if there is an issue with connecting with the device or signing the given tx on the device
Trait Implementations§
Source§impl<T> Blob for LedgerSigner<T>where
T: Exchange,
impl<T> Blob for LedgerSigner<T>where
T: Exchange,
Source§fn get_public_key<'life0, 'life1, 'async_trait>(
&'life0 self,
index: &'life1 Self::Key,
) -> Pin<Box<dyn Future<Output = Result<PublicKey, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_public_key<'life0, 'life1, 'async_trait>(
&'life0 self,
index: &'life1 Self::Key,
) -> Pin<Box<dyn Future<Output = Result<PublicKey, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the public key from the device
§Errors
Returns an error if there is an issue with connecting with the device or getting the public key from the device
Source§fn sign_blob<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
index: &'life1 Self::Key,
blob: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sign_blob<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
index: &'life1 Self::Key,
blob: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sign a blob of data with the account on the Ledger device based on impl from https://github.com/LedgerHQ/ledger-live/blob/develop/libs/ledgerjs/packages/hw-app-str/src/Str.ts#L166
§Errors
Returns an error if there is an issue with connecting with the device or signing the given tx on the device. Or, if the device has not enabled hash signing