pub trait GatewayDbtxNcExt {
Show 15 methods
// Required methods
async fn save_federation_config(&mut self, config: &FederationConfig);
async fn load_federation_configs_v0(
&mut self,
) -> BTreeMap<FederationId, FederationConfigV0>;
async fn load_federation_configs(
&mut self,
) -> BTreeMap<FederationId, FederationConfig>;
async fn load_federation_config(
&mut self,
federation_id: FederationId,
) -> Option<FederationConfig>;
async fn remove_federation_config(&mut self, federation_id: FederationId);
async fn load_gateway_keypair(&mut self) -> Option<Keypair>;
async fn load_gateway_keypair_assert_exists(&mut self) -> Keypair;
async fn load_or_create_gateway_keypair(&mut self) -> Keypair;
async fn load_gateway_config(&mut self) -> Option<GatewayConfiguration>;
async fn set_gateway_config(
&mut self,
gateway_config: &GatewayConfiguration,
);
async fn save_new_preimage_authentication(
&mut self,
payment_hash: Hash,
preimage_auth: Hash,
);
async fn load_preimage_authentication(
&mut self,
payment_hash: Hash,
) -> Option<Hash>;
async fn save_registered_incoming_contract(
&mut self,
federation_id: FederationId,
incoming_amount: Amount,
contract: IncomingContract,
) -> Option<RegisteredIncomingContract>;
async fn load_registered_incoming_contract(
&mut self,
payment_image: PaymentImage,
) -> Option<RegisteredIncomingContract>;
async fn dump_database(
&mut self,
prefix_names: Vec<String>,
) -> BTreeMap<String, Box<dyn Serialize + Send>>;
}
Required Methods§
async fn save_federation_config(&mut self, config: &FederationConfig)
async fn load_federation_configs_v0( &mut self, ) -> BTreeMap<FederationId, FederationConfigV0>
async fn load_federation_configs( &mut self, ) -> BTreeMap<FederationId, FederationConfig>
async fn load_federation_config( &mut self, federation_id: FederationId, ) -> Option<FederationConfig>
async fn remove_federation_config(&mut self, federation_id: FederationId)
Sourceasync fn load_gateway_keypair(&mut self) -> Option<Keypair>
async fn load_gateway_keypair(&mut self) -> Option<Keypair>
Returns the keypair that uniquely identifies the gateway.
Sourceasync fn load_gateway_keypair_assert_exists(&mut self) -> Keypair
async fn load_gateway_keypair_assert_exists(&mut self) -> Keypair
Sourceasync fn load_or_create_gateway_keypair(&mut self) -> Keypair
async fn load_or_create_gateway_keypair(&mut self) -> Keypair
Returns the keypair that uniquely identifies the gateway, creating it if it does not exist. Remember to commit the transaction after calling this method.
async fn load_gateway_config(&mut self) -> Option<GatewayConfiguration>
async fn set_gateway_config(&mut self, gateway_config: &GatewayConfiguration)
async fn save_new_preimage_authentication( &mut self, payment_hash: Hash, preimage_auth: Hash, )
async fn load_preimage_authentication( &mut self, payment_hash: Hash, ) -> Option<Hash>
Sourceasync fn save_registered_incoming_contract(
&mut self,
federation_id: FederationId,
incoming_amount: Amount,
contract: IncomingContract,
) -> Option<RegisteredIncomingContract>
async fn save_registered_incoming_contract( &mut self, federation_id: FederationId, incoming_amount: Amount, contract: IncomingContract, ) -> Option<RegisteredIncomingContract>
Saves a registered incoming contract, returning the previous contract with the same payment hash if it existed.
async fn load_registered_incoming_contract( &mut self, payment_image: PaymentImage, ) -> Option<RegisteredIncomingContract>
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.