Skip to main content

KeypairExt

Trait KeypairExt 

Source
pub trait KeypairExt: Borrow<Keypair> {
    // Provided methods
    fn for_keyspend(
        &self,
        secp: &Secp256k1<impl Verification>,
        tap_merkle_root: Option<TapNodeHash>,
    ) -> Keypair { ... }
    fn for_keyspend_only(&self, secp: &Secp256k1<impl Verification>) -> Keypair { ... }
}
Expand description

Extension trait for Keypair.

Provided Methods§

Source

fn for_keyspend( &self, secp: &Secp256k1<impl Verification>, tap_merkle_root: Option<TapNodeHash>, ) -> Keypair

Adapt this key pair to be used in a key-spend using the given MAST root

Source

fn for_keyspend_only(&self, secp: &Secp256k1<impl Verification>) -> Keypair

Adapt this key pair to be used in a key-spend-only taproot

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.

Implementations on Foreign Types§

Source§

impl KeypairExt for Keypair

Implementors§