[−][src]Trait miniscript::ToPublicKey
Trait describing public key types which can be converted to bitcoin pubkeys
The trait relies on Copy trait because in all practical usecases ToPkCtx
should contain references to objects which should be cheap to Copy
.
Required methods
pub fn to_public_key(&self, to_pk_ctx: ToPkCtx) -> PublicKey
[src]
Converts an object to a public key C represents additional context information that maybe required for deriving a bitcoin::PublicKey from MiniscriptKey You may require secp context for crypto operations or additional information for substituting the wildcard in extended pubkeys
pub fn hash_to_hash160(hash: &Self::Hash, to_pk_ctx: ToPkCtx) -> Hash
[src]
Converts a hashed version of the public key to a hash160
hash.
This method must be consistent with to_public_key
, in the sense
that calling MiniscriptKey::to_pubkeyhash
followed by this function
should give the same result as calling to_public_key
and hashing
the result directly.
Provided methods
pub fn serialized_len(&self, to_pk_ctx: ToPkCtx) -> usize
[src]
Computes the size of a public key when serialized in a script, including the length bytes
Implementations on Foreign Types
impl ToPublicKey<NullCtx> for PublicKey
[src]
pub fn to_public_key(&self, _ctx: NullCtx) -> PublicKey
[src]
pub fn hash_to_hash160(hash: &Hash, _ctx: NullCtx) -> Hash
[src]
Implementors
impl ToPublicKey<NullCtx> for DummyKey
[src]
pub fn to_public_key(&self, _ctx: NullCtx) -> PublicKey
[src]
pub fn hash_to_hash160(_: &DummyKeyHash, _ctx: NullCtx) -> Hash
[src]
impl<'secp, C: Verification> ToPublicKey<DescriptorPublicKeyCtx<'secp, C>> for DescriptorPublicKey
[src]
pub fn to_public_key(
&self,
to_pk_ctx: DescriptorPublicKeyCtx<'secp, C>
) -> PublicKey
[src]
&self,
to_pk_ctx: DescriptorPublicKeyCtx<'secp, C>
) -> PublicKey
pub fn hash_to_hash160(
hash: &Self::Hash,
to_pk_ctx: DescriptorPublicKeyCtx<'secp, C>
) -> Hash
[src]
hash: &Self::Hash,
to_pk_ctx: DescriptorPublicKeyCtx<'secp, C>
) -> Hash