pub struct LocalWallet { /* private fields */ }Expand description
A signer that simply holds the signing (private) key in memory for performing cryptographic operations. It’s recommended to use hardware-based signers for use cases involving real value.
Implementations§
Source§impl LocalWallet
impl LocalWallet
Sourcepub fn from_signing_key(key: SigningKey) -> LocalWallet
pub fn from_signing_key(key: SigningKey) -> LocalWallet
Constructs LocalWallet from a SigningKey.
Trait Implementations§
Source§impl Clone for LocalWallet
impl Clone for LocalWallet
Source§fn clone(&self) -> LocalWallet
fn clone(&self) -> LocalWallet
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalWallet
impl Debug for LocalWallet
Source§impl From<SigningKey> for LocalWallet
impl From<SigningKey> for LocalWallet
Source§fn from(value: SigningKey) -> LocalWallet
fn from(value: SigningKey) -> LocalWallet
Converts to this type from the input type.
Source§impl Signer for LocalWallet
impl Signer for LocalWallet
Source§type GetPublicKeyError = Infallible
type GetPublicKeyError = Infallible
Possible errors for calling
get_public_key.Source§fn get_public_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VerifyingKey, <LocalWallet as Signer>::GetPublicKeyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
LocalWallet: 'async_trait,
fn get_public_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VerifyingKey, <LocalWallet as Signer>::GetPublicKeyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
LocalWallet: 'async_trait,
Retrieves the verifying (public) key from the signer.
Source§fn sign_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 Felt,
) -> Pin<Box<dyn Future<Output = Result<Signature, <LocalWallet as Signer>::SignError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
LocalWallet: 'async_trait,
fn sign_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 Felt,
) -> Pin<Box<dyn Future<Output = Result<Signature, <LocalWallet as Signer>::SignError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
LocalWallet: 'async_trait,
Requests an ECDSA signature for a message hash. Read more
Source§fn is_interactive(&self, _context: SignerInteractivityContext<'_>) -> bool
fn is_interactive(&self, _context: SignerInteractivityContext<'_>) -> bool
Whether the underlying signer implementation is interactive, such as a hardware wallet.
Implementations should return
true if the signing operation is very expensive, even if not
strictly “interactive” as in requiring human input. Read moreAuto Trait Implementations§
impl Freeze for LocalWallet
impl RefUnwindSafe for LocalWallet
impl Send for LocalWallet
impl Sync for LocalWallet
impl Unpin for LocalWallet
impl UnwindSafe for LocalWallet
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