Decodes a Miniscript from a Bitcoin Script.

Synopsis

Declared in <script/miniscript.h>

template<typename Ctx>
std::optional<Node<Ctx::Key>>
FromScript(
    CScript const& script,
    Ctx const& ctx);

Return Value

The decoded node tree, or std::nullopt on failure.

Parameters

Name

Description

script

The CScript to decode.

ctx

Context providing key decoding and the script context.

Created with MrDocs