0
I want to parse raw transaction into JSON then change some values and encode back to hex. JSON like this:
{
"addresses": [
"346vcZZ6QV4nr68fybMEuA7qxxQeyKWoPS"
],
"block_height": -1,
"block_index": -1,
"confirmations": 0,
"double_spend": false,
"fees": 0,
"hash": "e09c37cca11208a8c372a1e397dcff0382b4d78cdde157ce8824d028dc185a80",
"inputs": [
{
"age": 0,
"output_index": 1,
"prev_hash": "c15bb773cdd5bb63a65766f5680684ce991c126698db0aa020e3058081742874",
"script_type": "empty",
"sequence": 4294967295
}
],
"outputs": [
{
"addresses": [
"346vcZZ6QV4nr68fybMEuA7qxxQeyKWoPS"
],
"script": "a9141a75cd53e9740caadbf83cbefdd087cdceb978a487",
"script_type": "pay-to-script-hash",
"value": 14000000
}
],
"preference": "low",
"received": "2018-08-21T08:05:02.841875145Z",
"relayed_by": "54.160.159.32",
"size": 83,
"total": 14000000,
"ver": 2,
"vin_sz": 1,
"vout_sz": 1
}
I've tried to use bitcoinj but it returns very simple object without a lot of fields.
What are you trying to change? Most of the fields in the json don't actually exist in a transaction – Raghav Sood – 2018-08-21T10:01:17.273