Expand description
Canonical Descriptor → BIP 388 @N-template renderer.
Walks an md1 Descriptor AST (Tag / Body / Node / UseSitePath,
no rust-miniscript) and emits the keyless wallet-policy template string with
@i placeholders — e.g.
wsh(or_i(and_v(v:after(1000000),...),multi(3,@0/<0;1>/*,...))).
This is the single source of truth for the template rendering: the
md CLI (md decode / md inspect) delegates here, and the
mnemonic toolkit’s inspect renders the same template: line by calling
descriptor_to_template — guaranteeing byte-identical output across both
binaries.
Lifted verbatim from md-cli’s format/text.rs (the renderer previously
lived only in the CLI). The structural-guard error type changed from the
CLI’s CliError::TemplateParse to the dedicated RenderError so
md_codec::Error stays a pure wire/decode taxonomy.
Enums§
- Render
Error - Error returned by the
descriptor_to_templaterenderer.
Functions§
- descriptor_
to_ template - Render a
Descriptorback to a BIP 388 template string with@iplaceholders.