@@ -976,7 +976,7 @@ and height.
976
976
977
977
* *block_height *
978
978
979
- The height of the block the transaction was confirmed in.
979
+ The height of the block the transaction was confirmed in, an integer .
980
980
981
981
* *block_hash *
982
982
@@ -991,7 +991,7 @@ and height.
991
991
* *pos *
992
992
993
993
The 0-based index of the position of the transaction in the
994
- ordered list of transactions in the block.
994
+ ordered list of transactions in the block, an integer .
995
995
996
996
**Result Example **
997
997
@@ -1017,6 +1017,76 @@ and height.
1017
1017
"pos": 710
1018
1018
}
1019
1019
1020
+ blockchain.transaction.get_merkle_witness
1021
+ =========================================
1022
+
1023
+ Witness-SPV. Proves that a transaction with a given wtxid was mined in a particular block.
1024
+
1025
+ **Signature **
1026
+
1027
+ .. function :: blockchain.transaction.get_merkle_witness(txid, height=None, cb=false)
1028
+ .. versionadded :: 1.6
1029
+
1030
+ *txid *
1031
+
1032
+ The txid (NOT wtxid) as a hexadecimal string.
1033
+
1034
+ *height *
1035
+
1036
+ Optionally, the height at which it was confirmed, an integer.
1037
+ Clients are encouraged to provide this field when they can, to reduce server load.
1038
+
1039
+ *cb *
1040
+
1041
+ A boolean.
1042
+ If set to :const: `true `, the result MUST also include the *cb_tx * and *cb_proof * fields.
1043
+ If set to :const: `false `, those fields are omitted.
1044
+
1045
+ **Result **
1046
+
1047
+ A dictionary with the following keys:
1048
+
1049
+ * *wtxid *
1050
+
1051
+ The wtxid of the mined transaction, as a hexadecimal string.
1052
+
1053
+ * *block_height *
1054
+
1055
+ The height of the block the transaction was confirmed in, an integer.
1056
+
1057
+ * *block_hash *
1058
+
1059
+ The hash of the block the transaction was confirmed in, as a hexadecimal string.
1060
+
1061
+ * *pos *
1062
+
1063
+ The 0-based index of the position of the transaction in the
1064
+ ordered list of transactions in the block, an integer.
1065
+
1066
+ * *cb_tx *
1067
+
1068
+ The raw coinbase transaction from the block, as a hexadecimal string.
1069
+
1070
+ * *cb_proof *
1071
+
1072
+ Merkle branch to prove `cb_tx ` (against block header merkle root).
1073
+ A list of transaction hashes the current hash is paired with,
1074
+ recursively, in order to trace up to obtain merkle root of the
1075
+ block (in header), deepest pairing first.
1076
+
1077
+ * *wmerkle *
1078
+
1079
+ A witness merkle branch to prove `wtxid ` (against `cb_tx `).
1080
+ A list of hashes the current hash is paired with,
1081
+ recursively, in order to trace up to obtain `witness root hash `
1082
+ (committed to in the coinbase), deepest pairing first.
1083
+
1084
+ **Result Example **
1085
+
1086
+ ::
1087
+
1088
+ TODO
1089
+
1020
1090
blockchain.transaction.id_from_pos
1021
1091
==================================
1022
1092
0 commit comments