pub struct AgentSendAsset { /* private fields */ }Expand description
agentSendAsset: sendAsset’s fields as an L1 action, which an agent signs for its master.
The destination is the account itself, so it only moves between the account’s own balances.
The action carries its nonce and is signed with that same nonce.
Implementations§
Source§impl AgentSendAsset
impl AgentSendAsset
Sourcepub fn new(
account: Address,
source_dex: &str,
destination_dex: &str,
token: &str,
amount: Amount,
nonce: u64,
) -> AgentSendAsset
pub fn new( account: Address, source_dex: &str, destination_dex: &str, token: &str, amount: Amount, nonce: u64, ) -> AgentSendAsset
From source_dex to destination_dex of account, which is also the
destination. token is NAME:0x<tokenId>.
Sourcepub const fn nonce(&self) -> u64
pub const fn nonce(&self) -> u64
The nonce inside the action, which is also the one it is signed with.
pub const fn amount(&self) -> &Amount
Trait Implementations§
Source§impl Clone for AgentSendAsset
impl Clone for AgentSendAsset
Source§impl Debug for AgentSendAsset
impl Debug for AgentSendAsset
impl Eq for AgentSendAsset
Source§impl L1Action for AgentSendAsset
impl L1Action for AgentSendAsset
Source§fn action(&self) -> Map
fn action(&self) -> Map
The action’s keys and values in wire order, which is the hashed order.
fn msgpack(&self) -> Vec<u8> ⓘ
fn connection_id(&self, nonce: u64, vault: Option<Address>) -> [u8; 32]
fn typed( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> TypedStruct<'static>
fn digest( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> [u8; 32]
Source§fn wallet_json(
&self,
nonce: u64,
vault: Option<Address>,
network: Network,
) -> String
fn wallet_json( &self, nonce: u64, vault: Option<Address>, network: Network, ) -> String
For a master wallet signing in the browser. It needs chain 1337.
fn body( &self, nonce: u64, signature: &Signature, vault: Option<Address>, ) -> String
Source§impl PartialEq for AgentSendAsset
impl PartialEq for AgentSendAsset
impl StructuralPartialEq for AgentSendAsset
Auto Trait Implementations§
impl Freeze for AgentSendAsset
impl RefUnwindSafe for AgentSendAsset
impl Send for AgentSendAsset
impl Sync for AgentSendAsset
impl Unpin for AgentSendAsset
impl UnsafeUnpin for AgentSendAsset
impl UnwindSafe for AgentSendAsset
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.