From 6498ba151b35ce9621ad00730f1fdfca55538ace Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Tue, 3 Sep 2019 12:04:30 -0400 Subject: transaction decoding infer output descriptors --- doc/REST-interface.md | 1 + src/core_write.cpp | 2 ++ src/rpc/blockchain.cpp | 1 + src/rpc/rawtransaction.cpp | 4 ++++ test/functional/data/rpc_decodescript.json | 11 +++++++++++ test/util/data/tt-delin1-out.json | 2 ++ test/util/data/tt-delout1-out.json | 1 + test/util/data/tt-locktime317000-out.json | 2 ++ test/util/data/txcreate1.json | 2 ++ test/util/data/txcreate2.json | 1 + test/util/data/txcreatedata1.json | 2 ++ test/util/data/txcreatedata2.json | 2 ++ test/util/data/txcreatedata_seq0.json | 1 + test/util/data/txcreatedata_seq1.json | 1 + test/util/data/txcreatemultisig1.json | 1 + test/util/data/txcreatemultisig2.json | 1 + test/util/data/txcreatemultisig3.json | 1 + test/util/data/txcreatemultisig4.json | 1 + test/util/data/txcreatemultisig5.json | 1 + test/util/data/txcreateoutpubkey1.json | 1 + test/util/data/txcreateoutpubkey2.json | 1 + test/util/data/txcreateoutpubkey3.json | 1 + test/util/data/txcreatescript1.json | 1 + test/util/data/txcreatescript2.json | 1 + test/util/data/txcreatescript3.json | 1 + test/util/data/txcreatescript4.json | 1 + test/util/data/txcreatesignv1.json | 1 + 27 files changed, 46 insertions(+) diff --git a/doc/REST-interface.md b/doc/REST-interface.md index 51a73b89fc..1f0a07a284 100644 --- a/doc/REST-interface.md +++ b/doc/REST-interface.md @@ -108,6 +108,7 @@ $ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff76 "value" : 8.8687, "scriptPubKey" : { "asm" : "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG", + "desc" : "addr(mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD)#gj9tznmy" "hex" : "76a9141c7cebb529b86a04c683dfa87be49de35bcf589e88ac", "type" : "pubkeyhash", "address" : "mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD" diff --git a/src/core_write.cpp b/src/core_write.cpp index 067f1e4f4e..5ea62cf3ed 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -8,6 +8,7 @@ #include #include #include +#include