pub trait GatewayDbtxNcExt {
Show 14 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 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>>;
async fn load_or_create_iroh_key(&mut self) -> SecretKey;
}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 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>
Sourceasync fn dump_database(
&mut self,
prefix_names: Vec<String>,
) -> BTreeMap<String, Box<dyn Serialize + Send>>
async fn dump_database( &mut self, prefix_names: Vec<String>, ) -> BTreeMap<String, Box<dyn Serialize + Send>>
Reads and serializes structures from the gateway’s database for the purpose for serializing to JSON for inspection.
Sourceasync fn load_or_create_iroh_key(&mut self) -> SecretKey
async fn load_or_create_iroh_key(&mut self) -> SecretKey
Returns iroh::SecretKey and saves it to the database if it does not
exist
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.