NodeActions

Trait NodeActions 

Source
pub trait NodeActions {
    // Required methods
    fn withdraw<'life0, 'async_trait, C>(
        &'life0 self,
        recipient: Address,
        amount: Balance<C>,
    ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
       where C: 'async_trait + Currency + Send,
             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 the HOPR node itself.

Required Methods§

Source

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

Withdraws the specified amount of tokens or native coins 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 an 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§