Skip to main content

ChainWriteAccountOperations

Trait ChainWriteAccountOperations 

pub trait ChainWriteAccountOperations {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn announce<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        multiaddrs: &'life1 [Multiaddr],
        key: &'life2 OffchainKeypair,
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, Self::Error>> + Send + 'life0>>, AnnouncementError<Self::Error>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
    fn withdraw<'life0, 'life1, 'async_trait, C>(
        &'life0 self,
        balance: Balance<C>,
        recipient: &'life1 Address,
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, Self::Error>> + Send + 'life0>>, Self::Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             C: 'async_trait + Currency + Send,
             Self: 'async_trait;
    fn register_safe<'life0, 'life1, 'async_trait>(
        &'life0 self,
        safe_address: &'life1 Address,
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, Self::Error>> + Send + 'life0>>, SafeRegistrationError<Self::Error>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

On-chain write operations regarding on-chain node accounts.

Required Associated Types§

type Error: Error + Send + Sync + 'static

Required Methods§

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

Announces transport key and list of multi addresses.

fn withdraw<'life0, 'life1, 'async_trait, C>( &'life0 self, balance: Balance<C>, recipient: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, Self::Error>> + Send + 'life0>>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, C: 'async_trait + Currency + Send, Self: 'async_trait,

Withdraws native or token currency from the Safe or node account (depends on the used [PayloadGenerator]).

fn register_safe<'life0, 'life1, 'async_trait>( &'life0 self, safe_address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, Self::Error>> + Send + 'life0>>, SafeRegistrationError<Self::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Registers Safe address with the current 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.

Implementations on Foreign Types§

§

impl<'a, T> ChainWriteAccountOperations for &'a T

§

type Error = <T as ChainWriteAccountOperations>::Error

§

fn announce<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, multiaddrs: &'life1 [Multiaddr], key: &'life2 OffchainKeypair, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <&'a T as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, AnnouncementError<<&'a T as ChainWriteAccountOperations>::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, &'a T: 'async_trait,

§

fn withdraw<'life0, 'life1, 'async_trait, C>( &'life0 self, balance: Balance<C>, recipient: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <&'a T as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, <&'a T as ChainWriteAccountOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, C: 'async_trait + Currency + Send, &'a T: 'async_trait,

§

fn register_safe<'life0, 'life1, 'async_trait>( &'life0 self, safe_address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <&'a T as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, SafeRegistrationError<<&'a T as ChainWriteAccountOperations>::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, &'a T: 'async_trait,

§

impl<T> ChainWriteAccountOperations for Box<T>

§

type Error = <T as ChainWriteAccountOperations>::Error

§

fn announce<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, multiaddrs: &'life1 [Multiaddr], key: &'life2 OffchainKeypair, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <Box<T> as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, AnnouncementError<<Box<T> as ChainWriteAccountOperations>::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Box<T>: 'async_trait,

§

fn withdraw<'life0, 'life1, 'async_trait, C>( &'life0 self, balance: Balance<C>, recipient: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <Box<T> as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, <Box<T> as ChainWriteAccountOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, C: 'async_trait + Currency + Send, Box<T>: 'async_trait,

§

fn register_safe<'life0, 'life1, 'async_trait>( &'life0 self, safe_address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <Box<T> as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, SafeRegistrationError<<Box<T> as ChainWriteAccountOperations>::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Box<T>: 'async_trait,

§

impl<T> ChainWriteAccountOperations for Arc<T>

§

type Error = <T as ChainWriteAccountOperations>::Error

§

fn announce<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, multiaddrs: &'life1 [Multiaddr], key: &'life2 OffchainKeypair, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <Arc<T> as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, AnnouncementError<<Arc<T> as ChainWriteAccountOperations>::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Arc<T>: 'async_trait,

§

fn withdraw<'life0, 'life1, 'async_trait, C>( &'life0 self, balance: Balance<C>, recipient: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <Arc<T> as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, <Arc<T> as ChainWriteAccountOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, C: 'async_trait + Currency + Send, Arc<T>: 'async_trait,

§

fn register_safe<'life0, 'life1, 'async_trait>( &'life0 self, safe_address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <Arc<T> as ChainWriteAccountOperations>::Error>> + Send + 'life0>>, SafeRegistrationError<<Arc<T> as ChainWriteAccountOperations>::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Arc<T>: 'async_trait,

Implementors§