pub struct LedgerWallet<T: LedgerAsync> { /* private fields */ }
Expand description
A Ledger hardware wallet signer for Neo N3.
Implementations§
Source§impl<T: LedgerAsync> LedgerWallet<T>
impl<T: LedgerAsync> LedgerWallet<T>
Sourcepub async fn new(
ledger: T,
derivation_path: HDPath,
) -> Result<Self, WalletError>
pub async fn new( ledger: T, derivation_path: HDPath, ) -> Result<Self, WalletError>
Creates a new Ledger wallet with the specified derivation path and account index.
Sourcepub async fn get_address(&self) -> Result<Address, WalletError>
pub async fn get_address(&self) -> Result<Address, WalletError>
Gets the Neo N3 address for the current derivation path.
Sourcepub async fn sign_transaction<'a, P: JsonRpcProvider + 'static>(
&self,
tx: &Transaction<'a, P>,
) -> Result<Signature, WalletError>
pub async fn sign_transaction<'a, P: JsonRpcProvider + 'static>( &self, tx: &Transaction<'a, P>, ) -> Result<Signature, WalletError>
Signs a transaction using the Ledger device.
Sourcepub async fn sign_message(
&self,
message: &[u8],
) -> Result<Signature, WalletError>
pub async fn sign_message( &self, message: &[u8], ) -> Result<Signature, WalletError>
Signs a message using the Ledger device.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for LedgerWallet<T>
impl<T> RefUnwindSafe for LedgerWallet<T>where
T: RefUnwindSafe,
impl<T> Send for LedgerWallet<T>
impl<T> Sync for LedgerWallet<T>
impl<T> Unpin for LedgerWallet<T>
impl<T> UnwindSafe for LedgerWallet<T>where
T: RefUnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 more