pub struct EvmSignerHandle(/* private fields */);Expand description
A handle to the current EVM signer, providing type-safe access.
This handle guarantees that the underlying signer supports EVM operations.
It implements Deref to dyn EvmSigner, allowing direct access to all
EVM-specific methods.
§Thread Safety
The handle is Send + Sync and can be passed between threads safely.
The underlying signer is reference-counted and immutable.
§Examples
ⓘ
use riglr_core::signer::SignerContext;
async fn evm_transfer() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
// Get a type-safe handle to the EVM signer
let signer = SignerContext::current_as_evm().await?;
// Access EVM-specific methods directly
let address = signer.address();
let chain_id = signer.chain_id();
// Sign and send a transaction
let tx = TransactionRequest::default();
let tx_hash = signer.sign_and_send_transaction(tx).await?;
Ok(())
}Trait Implementations§
Auto Trait Implementations§
impl Freeze for EvmSignerHandle
impl !RefUnwindSafe for EvmSignerHandle
impl Send for EvmSignerHandle
impl Sync for EvmSignerHandle
impl Unpin for EvmSignerHandle
impl !UnwindSafe for EvmSignerHandle
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