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
) -> impl Future<Output = Result<Bytecode, 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
) -> impl Future<Output = Result<Bytecode, 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<D, T, S, V>(
&mut self,
domain: D,
types: T,
primary_type: S,
value: V
) -> impl Future<Output = Result<H520, Error<String, Value>>>where
S: AsRef<str>,
D: TryInto<EIP712Domain>,
<D as TryInto<EIP712Domain>>::Error: Display + Debug,
T: TryInto<BTreeMap<String, Vec<Eip712DomainType, Global>, Global>>,
<T as TryInto<BTreeMap<String, Vec<Eip712DomainType, Global>, Global>>>::Error: Display + Debug,
V: TryInto<BTreeMap<String, Value, Global>>,
<V as TryInto<BTreeMap<String, Value, Global>>>::Error: Display + Debug,
pub async fn sign_typed_data<D, T, S, V>(
&mut self,
domain: D,
types: T,
primary_type: S,
value: V
) -> impl Future<Output = Result<H520, Error<String, Value>>>where
S: AsRef<str>,
D: TryInto<EIP712Domain>,
<D as TryInto<EIP712Domain>>::Error: Display + Debug,
T: TryInto<BTreeMap<String, Vec<Eip712DomainType, Global>, Global>>,
<T as TryInto<BTreeMap<String, Vec<Eip712DomainType, Global>, Global>>>::Error: Display + Debug,
V: TryInto<BTreeMap<String, Value, Global>>,
<V as TryInto<BTreeMap<String, Value, Global>>>::Error: Display + Debug,
Returns the signed typed data, using eip-712
algorithm
sourcepub async fn decrypt<B>(
&mut self,
encrypt_data: B
) -> impl Future<Output = Result<Bytecode, Error<String, Value>>>where
B: TryInto<Bytecode>,
<B as TryInto<Bytecode>>::Error: Display + Debug,
pub async fn decrypt<B>(
&mut self,
encrypt_data: B
) -> impl Future<Output = Result<Bytecode, Error<String, Value>>>where
B: TryInto<Bytecode>,
<B as TryInto<Bytecode>>::Error: Display + Debug,
Decript data using signer private key.