pub struct Ethereum<S = LockedWallet> { /* private fields */ }
Expand description
Ethereum client implementation for the crate::Adapter
.
Implementations
sourceimpl Ethereum<LockedWallet>
impl Ethereum<LockedWallet>
sourceimpl<S: WalletState> Ethereum<S>
impl<S: WalletState> Ethereum<S>
sourcepub async fn has_privileges(
&self,
chain: &Chain,
identity: Address,
hash: [u8; 32],
signature_with_mode: &[u8]
) -> Result<bool, Error>
pub async fn has_privileges(
&self,
chain: &Chain,
identity: Address,
hash: [u8; 32],
signature_with_mode: &[u8]
) -> Result<bool, Error>
Checks if the signer of the hash
& signature
has privileges,
by using the Identity contract and the passed identity Address
See https://eips.ethereum.org/EIPS/eip-1271
Note: Signature should be 01
suffixed for Eth Sign for this call.
Trait Implementations
sourceimpl<S: WalletState> Locked for Ethereum<S>
impl<S: WalletState> Locked for Ethereum<S>
sourcefn session_from_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn session_from_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Error = Error
sourcefn whoami(&self) -> ValidatorId
fn whoami(&self) -> ValidatorId
Get Adapter whoami
sourcefn verify(
&self,
signer: ValidatorId,
state_root: &str,
signature: &str
) -> Result<bool, Self::Error>
fn verify(
&self,
signer: ValidatorId,
state_root: &str,
signature: &str
) -> Result<bool, Self::Error>
fn get_deposit<'life0, 'life1, 'async_trait>(
&'life0 self,
channel_context: &'life1 ChainOf<Channel>,
depositor_address: Address
) -> Pin<Box<dyn Future<Output = Result<Deposit, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
sourceimpl Unlockable for Ethereum<LockedWallet>
impl Unlockable for Ethereum<LockedWallet>
Auto Trait Implementations
impl<S> RefUnwindSafe for Ethereum<S>where
S: RefUnwindSafe,
impl<S> Send for Ethereum<S>where
S: Send,
impl<S> Sync for Ethereum<S>where
S: Sync,
impl<S> Unpin for Ethereum<S>where
S: Unpin,
impl<S> UnwindSafe for Ethereum<S>where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more