pub struct TaprootPubkeyGen {
pub seed: Vec<u8>,
pub pubkey: PublicKey,
pub address: Address,
}Expand description
Container for the seed, public key and derived address.
Fields§
§seed: Vec<u8>§pubkey: PublicKey§address: AddressImplementations§
Source§impl TaprootPubkeyGen
impl TaprootPubkeyGen
Sourcepub fn from<A>(
arguments: &A,
params: &'static AddressParams,
get_address: &impl Fn(&XOnlyPublicKey, &A, &'static AddressParams) -> Result<Address>,
) -> Result<Self>
pub fn from<A>( arguments: &A, params: &'static AddressParams, get_address: &impl Fn(&XOnlyPublicKey, &A, &'static AddressParams) -> Result<Address>, ) -> Result<Self>
Build from current process randomness and compute the address given arguments.
Sourcepub fn build_from_str<A>(
s: &str,
arguments: &A,
params: &'static AddressParams,
get_address: &impl Fn(&XOnlyPublicKey, &A, &'static AddressParams) -> Result<Address>,
) -> Result<Self>
pub fn build_from_str<A>( s: &str, arguments: &A, params: &'static AddressParams, get_address: &impl Fn(&XOnlyPublicKey, &A, &'static AddressParams) -> Result<Address>, ) -> Result<Self>
Parse from string and verify that pubkey and address match the provided arguments.
Sourcepub fn verify<A>(
&self,
arguments: &A,
params: &'static AddressParams,
get_address: &impl Fn(&XOnlyPublicKey, &A, &'static AddressParams) -> Result<Address>,
) -> Result<()>
pub fn verify<A>( &self, arguments: &A, params: &'static AddressParams, get_address: &impl Fn(&XOnlyPublicKey, &A, &'static AddressParams) -> Result<Address>, ) -> Result<()>
Verify that the stored pubkey and address are consistent with arguments.
Trait Implementations§
Source§impl Clone for TaprootPubkeyGen
impl Clone for TaprootPubkeyGen
Source§fn clone(&self) -> TaprootPubkeyGen
fn clone(&self) -> TaprootPubkeyGen
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaprootPubkeyGen
impl Debug for TaprootPubkeyGen
Auto Trait Implementations§
impl Freeze for TaprootPubkeyGen
impl RefUnwindSafe for TaprootPubkeyGen
impl Send for TaprootPubkeyGen
impl Sync for TaprootPubkeyGen
impl Unpin for TaprootPubkeyGen
impl UnwindSafe for TaprootPubkeyGen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.