mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
rpc: decode Miniscript descriptor when possible in decodescript
The descriptor inference logic would previously always use a dummy signing provider and would never analyze the witness script of a P2WSH scriptPubKey. Note even a valid Miniscript might not always be decodable from Script without more contextual information (for instance the key preimage for a pk_h).
This commit is contained in:
@@ -15,6 +15,7 @@ class CBlockHeader;
|
||||
class CScript;
|
||||
class CTransaction;
|
||||
struct CMutableTransaction;
|
||||
class SigningProvider;
|
||||
class uint256;
|
||||
class UniValue;
|
||||
class CTxUndo;
|
||||
@@ -52,7 +53,7 @@ UniValue ValueFromAmount(const CAmount amount);
|
||||
std::string FormatScript(const CScript& script);
|
||||
std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
|
||||
std::string SighashToStr(unsigned char sighash_type);
|
||||
void ScriptToUniv(const CScript& script, UniValue& out, bool include_hex = true, bool include_address = false);
|
||||
void ScriptToUniv(const CScript& script, UniValue& out, bool include_hex = true, bool include_address = false, const SigningProvider* provider = nullptr);
|
||||
void TxToUniv(const CTransaction& tx, const uint256& block_hash, UniValue& entry, bool include_hex = true, int serialize_flags = 0, const CTxUndo* txundo = nullptr, TxVerbosity verbosity = TxVerbosity::SHOW_DETAILS);
|
||||
|
||||
#endif // BITCOIN_CORE_IO_H
|
||||
|
||||
Reference in New Issue
Block a user