pub trait IGlobalClientContext:
Debug
+ MaybeSend
+ MaybeSync
+ 'static {
// Required methods
fn module_api(&self) -> DynModuleApi;
fn client_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClientConfig> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn api(&self) -> &DynGlobalApi;
fn decoders(&self) -> &ModuleDecoderRegistry;
fn claim_inputs_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
inputs: InstancelessDynClientInputBundle,
) -> Pin<Box<dyn Future<Output = Result<(TransactionId, Vec<OutPoint>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn fund_output_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
outputs: InstancelessDynClientOutputBundle,
) -> Pin<Box<dyn Future<Output = Result<(TransactionId, Vec<OutPoint>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn add_state_machine_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
sm: Box<dyn IState + Send + Sync>,
) -> Pin<Box<dyn Future<Output = AddStateMachinesResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn log_event_json<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
kind: EventKind,
module: Option<(ModuleKind, ModuleInstanceId)>,
payload: Value,
transient: bool,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn transaction_update_stream<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = BoxStream<'_, TxSubmissionStatesSM>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
Sourcefn module_api(&self) -> DynModuleApi
fn module_api(&self) -> DynModuleApi
Returned a reference client’s module API client, so that module-specific calls can be made
fn client_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClientConfig> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn api(&self) -> &DynGlobalApi
fn api(&self) -> &DynGlobalApi
Returns a reference to the client’s federation API client. The provided
interface IGlobalFederationApi
typically does not provide the
necessary functionality, for this extension traits like
fedimint_api_client::api::IGlobalFederationApi
have to be used.
fn decoders(&self) -> &ModuleDecoderRegistry
Sourcefn claim_inputs_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
inputs: InstancelessDynClientInputBundle,
) -> Pin<Box<dyn Future<Output = Result<(TransactionId, Vec<OutPoint>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn claim_inputs_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
inputs: InstancelessDynClientInputBundle,
) -> Pin<Box<dyn Future<Output = Result<(TransactionId, Vec<OutPoint>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
This function is mostly meant for internal use, you are probably looking
for DynGlobalClientContext::claim_inputs
.
Returns transaction id of the funding transaction and an optional
OutPoint
that represents change if change was added.
Sourcefn fund_output_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
outputs: InstancelessDynClientOutputBundle,
) -> Pin<Box<dyn Future<Output = Result<(TransactionId, Vec<OutPoint>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fund_output_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
outputs: InstancelessDynClientOutputBundle,
) -> Pin<Box<dyn Future<Output = Result<(TransactionId, Vec<OutPoint>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
This function is mostly meant for internal use, you are probably looking
for DynGlobalClientContext::fund_output
.
Returns transaction id of the funding transaction and an optional
OutPoint
that represents change if change was added.
Sourcefn add_state_machine_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
sm: Box<dyn IState + Send + Sync>,
) -> Pin<Box<dyn Future<Output = AddStateMachinesResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn add_state_machine_dyn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
dbtx: &'life1 mut ClientSMDatabaseTransaction<'life2, 'life3>,
sm: Box<dyn IState + Send + Sync>,
) -> Pin<Box<dyn Future<Output = AddStateMachinesResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Adds a state machine to the executor.