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
/// 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