gadget-sdk 0.6.2

SDK for building Blueprints and gadget on Tangle Network
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::future::Future;

/// `TangleClientContext` trait provides access to the Tangle client from the context.
pub trait TangleClientContext {
    type Config: subxt::Config;
    /// Get the Tangle client from the context.
    fn tangle_client(
        &self,
    ) -> impl Future<Output = color_eyre::Result<subxt::OnlineClient<Self::Config>, subxt::Error>>;

    fn get_call_id(&mut self) -> &mut Option<u64>;

    fn set_call_id(&mut self, call_id: u64) {
        *self.get_call_id() = Some(call_id);
    }
}