pub trait LnFederationApi {
Show 15 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 wait_contract<'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 wait_block_height<'life0, 'async_trait>(
&'life0 self,
block_height: u64,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + 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;
fn get_incoming_contract<'life0, 'async_trait>(
&'life0 self,
id: ContractId,
) -> Pin<Box<dyn Future<Output = FederationResult<IncomingContractAccount>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_outgoing_contract<'life0, 'async_trait>(
&'life0 self,
id: ContractId,
) -> Pin<Box<dyn Future<Output = FederationResult<OutgoingContractAccount>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
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 wait_contract<'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 wait_block_height<'life0, 'async_trait>(
&'life0 self,
block_height: u64,
) -> Pin<Box<dyn Future<Output = FederationResult<()>> + 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,
Sourcefn 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 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.
Sourcefn 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 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.