Trait bdk_wallet::keys::GeneratableDefaultOptions
source · pub trait GeneratableDefaultOptions<Ctx>: GeneratableKey<Ctx>{
// Provided methods
fn generate_with_entropy_default(
entropy: Self::Entropy
) -> Result<GeneratedKey<Self, Ctx>, Self::Error> { ... }
fn generate_default() -> Result<GeneratedKey<Self, Ctx>, Self::Error> { ... }
fn generate_default_with_aux_rand(
rng: &mut (impl CryptoRng + RngCore)
) -> Result<GeneratedKey<Self, Ctx>, Self::Error> { ... }
}
Expand description
Trait that allows generating a key with the default options
This trait is automatically implemented if the GeneratableKey::Options
implements Default
.
Provided Methods§
sourcefn generate_with_entropy_default(
entropy: Self::Entropy
) -> Result<GeneratedKey<Self, Ctx>, Self::Error>
fn generate_with_entropy_default( entropy: Self::Entropy ) -> Result<GeneratedKey<Self, Ctx>, Self::Error>
Generate a key with the default options and a given entropy
sourcefn generate_default() -> Result<GeneratedKey<Self, Ctx>, Self::Error>
fn generate_default() -> Result<GeneratedKey<Self, Ctx>, Self::Error>
Generate a key with the default options and a random entropy
Uses the thread-local random number generator.
sourcefn generate_default_with_aux_rand(
rng: &mut (impl CryptoRng + RngCore)
) -> Result<GeneratedKey<Self, Ctx>, Self::Error>
fn generate_default_with_aux_rand( rng: &mut (impl CryptoRng + RngCore) ) -> Result<GeneratedKey<Self, Ctx>, Self::Error>
Generate a key with the default options and a random entropy
Uses a provided random number generator (rng).
Object Safety§
This trait is not object safe.
Implementors§
impl<Ctx, K> GeneratableDefaultOptions<Ctx> for K
Automatic implementation of GeneratableDefaultOptions
for GeneratableKey
s where
Options
implements Default