pub enum ParsedHoprChainAction {
RegisterSafeAddress(Address),
Announce {
packet_key: OffchainPublicKey,
multiaddress: Option<Multiaddr>,
},
WithdrawNative(Address, XDaiBalance),
WithdrawToken(Address, HoprBalance),
FundChannel(Address, HoprBalance),
InitializeChannelClosure(ChannelId),
FinalizeChannelClosure(ChannelId),
IncomingChannelClosure(ChannelId),
RedeemTicket {
channel_id: ChannelId,
ticket_index: u64,
ticket_amount: HoprBalance,
},
}Expand description
Represents the action previously parsed from an EIP-2718 transaction.
This is effectively inverse of a PayloadGenerator.
Variants§
RegisterSafeAddress(Address)
Registration of a Safe address.
Announce
Announcement of a packet key and optional multiaddress.
Fields
§
packet_key: OffchainPublicKeyAnnounced packet key (key-binding).
WithdrawNative(Address, XDaiBalance)
Withdrawal of native XDai to an address.
WithdrawToken(Address, HoprBalance)
Withdrawal of HOPR token to an address.
FundChannel(Address, HoprBalance)
Funding of a payment channel to a given destination with a given amount.
InitializeChannelClosure(ChannelId)
Payment channel closure initiation with the given ID.
FinalizeChannelClosure(ChannelId)
Payment channel closure finalization with the given ID.
IncomingChannelClosure(ChannelId)
Incoming payment channel closure with the given ID.
RedeemTicket
Redemption of ticket.
Implementations§
Source§impl ParsedHoprChainAction
impl ParsedHoprChainAction
Sourcepub fn parse_from_eip2718(
signed_tx: &[u8],
module: &Address,
contract_addresses: &ContractAddresses,
) -> Result<(Self, Address), ChainTypesError>
pub fn parse_from_eip2718( signed_tx: &[u8], module: &Address, contract_addresses: &ContractAddresses, ) -> Result<(Self, Address), ChainTypesError>
Attempts to parse a signed EIP-2718 transaction previously generated via a
PayloadGenerator.
Trait Implementations§
Source§impl Clone for ParsedHoprChainAction
impl Clone for ParsedHoprChainAction
Source§fn clone(&self) -> ParsedHoprChainAction
fn clone(&self) -> ParsedHoprChainAction
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 ParsedHoprChainAction
impl Debug for ParsedHoprChainAction
Source§impl PartialEq for ParsedHoprChainAction
impl PartialEq for ParsedHoprChainAction
impl Eq for ParsedHoprChainAction
impl StructuralPartialEq for ParsedHoprChainAction
Auto Trait Implementations§
impl Freeze for ParsedHoprChainAction
impl RefUnwindSafe for ParsedHoprChainAction
impl Send for ParsedHoprChainAction
impl Sync for ParsedHoprChainAction
impl Unpin for ParsedHoprChainAction
impl UnwindSafe for ParsedHoprChainAction
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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