fedimint_ln_client::api

Trait LnFederationApi

Source
pub trait LnFederationApi {
Show 13 methods // Required methods fn fetch_consensus_block_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = FederationResult<Option<u64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn fetch_contract<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<Option<ContractAccount>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn await_contract<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = ContractAccount> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn wait_block_height<'life0, 'async_trait>( &'life0 self, block_height: u64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn wait_outgoing_contract_cancelled<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<ContractAccount>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_decrypted_preimage_status<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<(IncomingContractAccount, DecryptedPreimageStatus)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn wait_preimage_decrypted<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<(IncomingContractAccount, Option<Preimage>)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn fetch_offer<'life0, 'async_trait>( &'life0 self, payment_hash: Sha256Hash, ) -> Pin<Box<dyn Future<Output = FederationResult<IncomingContractOffer>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn fetch_gateways<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = FederationResult<Vec<LightningGatewayAnnouncement>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn register_gateway<'life0, 'life1, 'async_trait>( &'life0 self, gateway: &'life1 LightningGatewayAnnouncement, ) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_remove_gateway_challenge<'life0, 'async_trait>( &'life0 self, gateway_id: PublicKey, ) -> Pin<Box<dyn Future<Output = BTreeMap<PeerId, Option<Hash>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn remove_gateway<'life0, 'async_trait>( &'life0 self, remove_gateway_request: RemoveGatewayRequest, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn offer_exists<'life0, 'async_trait>( &'life0 self, payment_hash: Sha256Hash, ) -> Pin<Box<dyn Future<Output = FederationResult<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}

Required Methods§

Source

fn fetch_consensus_block_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = FederationResult<Option<u64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_contract<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<Option<ContractAccount>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn await_contract<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = ContractAccount> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn wait_block_height<'life0, 'async_trait>( &'life0 self, block_height: u64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn wait_outgoing_contract_cancelled<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<ContractAccount>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_decrypted_preimage_status<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<(IncomingContractAccount, DecryptedPreimageStatus)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn wait_preimage_decrypted<'life0, 'async_trait>( &'life0 self, contract: ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<(IncomingContractAccount, Option<Preimage>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_offer<'life0, 'async_trait>( &'life0 self, payment_hash: Sha256Hash, ) -> Pin<Box<dyn Future<Output = FederationResult<IncomingContractOffer>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_gateways<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = FederationResult<Vec<LightningGatewayAnnouncement>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn register_gateway<'life0, 'life1, 'async_trait>( &'life0 self, gateway: &'life1 LightningGatewayAnnouncement, ) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_remove_gateway_challenge<'life0, 'async_trait>( &'life0 self, gateway_id: PublicKey, ) -> Pin<Box<dyn Future<Output = BTreeMap<PeerId, Option<Hash>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves the map of gateway remove challenges from the server. Each challenge needs to be signed by the gateway’s private key in order for the registration record to be removed.

Source

fn remove_gateway<'life0, 'async_trait>( &'life0 self, remove_gateway_request: RemoveGatewayRequest, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Removes the gateway’s registration record. First checks the provided signature to verify the gateway authorized the removal of the registration.

Source

fn offer_exists<'life0, 'async_trait>( &'life0 self, payment_hash: Sha256Hash, ) -> Pin<Box<dyn Future<Output = FederationResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<T> LnFederationApi for T
where T: IModuleFederationApi + MaybeSend + MaybeSync + 'static + ?Sized,