pub struct Signer { /* private fields */ }Implementations§
Source§impl Signer
impl Signer
pub fn new(rpc_client: Client) -> Signer
Sourcepub async fn sign_eth_transaction<T>(
&mut self,
transaction_request: T,
) -> Result<Bytes, Error<String, Value>>where
T: TryInto<TypedTransactionRequest>,
<T as TryInto<TypedTransactionRequest>>::Error: Display + Debug,
pub async fn sign_eth_transaction<T>(
&mut self,
transaction_request: T,
) -> Result<Bytes, Error<String, Value>>where
T: TryInto<TypedTransactionRequest>,
<T as TryInto<TypedTransactionRequest>>::Error: Display + Debug,
Returns the signed transaction of the parameter transaction_request
Sourcepub async fn sign_typed_data<T, V>(
&mut self,
typed_data: T,
) -> Result<Eip1559Signature, Error<String, Value>>
pub async fn sign_typed_data<T, V>( &mut self, typed_data: T, ) -> Result<Eip1559Signature, Error<String, Value>>
Returns the signed typed data, using eip-712 algorithm
Sourcepub async fn decrypt<B>(
&mut self,
encrypt_data: B,
) -> Result<Bytes, Error<String, Value>>
pub async fn decrypt<B>( &mut self, encrypt_data: B, ) -> Result<Bytes, Error<String, Value>>
Decript data using signer private key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Signer
impl !RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl !UnwindSafe for Signer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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