hopr_chain_actions::node

Trait NodeActions

Source
pub trait NodeActions {
    // Required methods
    fn withdraw<'life0, 'async_trait>(
        &'life0 self,
        recipient: Address,
        amount: Balance,
    ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn announce<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        multiaddrs: &'life1 [Multiaddr],
        offchain_key: &'life2 OffchainKeypair,
    ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn register_safe_by_node<'life0, 'async_trait>(
        &'life0 self,
        safe_address: Address,
    ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Contains all on-chain calls specific to HOPR node itself.

Required Methods§

Source

fn withdraw<'life0, 'async_trait>( &'life0 self, recipient: Address, amount: Balance, ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Withdraws the specified amount of tokens to the given recipient.

Source

fn announce<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, multiaddrs: &'life1 [Multiaddr], offchain_key: &'life2 OffchainKeypair, ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Announces node on-chain with key binding. The operation should also check if such announcement has not been already made on-chain.

Source

fn register_safe_by_node<'life0, 'async_trait>( &'life0 self, safe_address: Address, ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Registers the safe address with the node

Implementors§