BlokliSubscriptionClient

Trait BlokliSubscriptionClient 

pub trait BlokliSubscriptionClient {
    // Required methods
    fn subscribe_channels(
        &self,
        selector: ChannelSelector,
    ) -> Result<impl Stream<Item = Result<Channel, BlokliClientError>> + Send, BlokliClientError>;
    fn subscribe_accounts(
        &self,
        selector: AccountSelector,
    ) -> Result<impl Stream<Item = Result<Account, BlokliClientError>> + Send, BlokliClientError>;
    fn subscribe_graph(
        &self,
    ) -> Result<impl Stream<Item = Result<OpenedChannelsGraphEntry, BlokliClientError>> + Send, BlokliClientError>;
    fn subscribe_ticket_params(
        &self,
    ) -> Result<impl Stream<Item = Result<TicketParameters, BlokliClientError>> + Send, BlokliClientError>;
    fn subscribe_safe_deployments(
        &self,
    ) -> Result<impl Stream<Item = Result<Safe, BlokliClientError>> + Send, BlokliClientError>;
}
Expand description

Trait defining subscriptions to Blokli API.

Required Methods§

fn subscribe_channels( &self, selector: ChannelSelector, ) -> Result<impl Stream<Item = Result<Channel, BlokliClientError>> + Send, BlokliClientError>

Subscribes to channel updates matching the given selector.

If no selector is given, subscribes to all channel updates.

fn subscribe_accounts( &self, selector: AccountSelector, ) -> Result<impl Stream<Item = Result<Account, BlokliClientError>> + Send, BlokliClientError>

Subscribes to account updates optionally matching the given selector.

If no selector is given, subscribes to all account updates.

fn subscribe_graph( &self, ) -> Result<impl Stream<Item = Result<OpenedChannelsGraphEntry, BlokliClientError>> + Send, BlokliClientError>

Subscribes to updates of the entire channel graph.

fn subscribe_ticket_params( &self, ) -> Result<impl Stream<Item = Result<TicketParameters, BlokliClientError>> + Send, BlokliClientError>

Subscribes to updates of the ticket parameters.

fn subscribe_safe_deployments( &self, ) -> Result<impl Stream<Item = Result<Safe, BlokliClientError>> + Send, BlokliClientError>

Subscribes to on-chain Safe deployments.

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§