You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #298: Add support for x-only keys in descriptor
602e94f Add simple API for derivation (sanket1729)
4763870 Add Xonly key support for descriptor public keys (sanket1729)
ff5a4bf Add MiniscriptKey::is_xonly (sanket1729)
Pull request description:
.
ACKs for top commit:
apoelstra:
ACK 602e94f
Tree-SHA512: 3489a0474b4991298f590aaea554bd68d82ce1913e59a08dbdb645878937d2cc5c89f8f7ba66397bf21c75747c74507e33298c01985b760990da97c706252707
/// Derive a [`Descriptor`] with a concrete [`bitcoin::PublicKey`] at a given index
568
+
/// Removes all extended pubkeys and wildcards from the descriptor and only leaves
569
+
/// concrete [`bitcoin::PublicKey`]. All [`crate::XOnlyKey`]s are converted to [`bitcoin::PublicKey`]
570
+
/// by adding a default(0x02) y-coordinate. For [`crate::descriptor::Tr`] descriptor,
571
+
/// spend info is also cached.
572
+
///
573
+
/// # Examples
574
+
///
575
+
/// ```
576
+
/// use miniscript::descriptor::{Descriptor, DescriptorPublicKey};
577
+
/// use miniscript::bitcoin::secp256k1;
578
+
/// use std::str::FromStr;
579
+
///
580
+
/// // test from bip 86
581
+
/// let secp = secp256k1::Secp256k1::verification_only();
582
+
/// let descriptor = Descriptor::<DescriptorPublicKey>::from_str("tr(xpub6BgBgsespWvERF3LHQu6CnqdvfEvtMcQjYrcRzx53QJjSxarj2afYWcLteoGVky7D3UKDP9QyrLprQ3VCECoY49yfdDEHGCtMMj92pReUsQ/0/*)")
583
+
/// .expect("Valid ranged descriptor");
584
+
/// let result = descriptor.derived_descriptor(0, &secp).expect("Non-hardened derivation");
0 commit comments