2

Output descriptors provide a standard to make address bodies more exchangeable between various wallet implementations. It seems that an output descriptor can be used to encode any Miniscript expression for one specific key. Can they also be used to produce a sequence output scripts that all use the same Miniscript expression applied to a chain of derived keys?

3

Yes. Such descriptors are referred to as ranged descriptors.

In a descriptor, keys are provided in the form of a Key expression. Key expressions can be individual keys themselves, or BIP 32 extended keys, followed by derivation information. The derivation information can end with a * to indicate that child keys should be derived. In that case, the descriptor is a ranged descriptor and each child key derived becomes a key in the output script.

If you then imagine the ranged descriptor like a higher form of an xpub, then you would have "derived descriptors" at each child index. Child index 0 would be a descriptor with everything the same as the parent except the xpubs. Those are replaced by the key derived at index 0. Index 1 has the keys derived at index 1, and so on.

One thing to note with ranged descriptors is that the indexes move in lockstep to avoid any combinatorial blowup. So if there are multiple xpubs in a descriptor, all of the keys are derived at the same child index. Index 0 has all keys derived using index 0, index 1 has all keys derived using index 1, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.