Posts

Showing posts with the label "value" and "cost"

Format transactions into "from", "to", "value" and "cost"

Format transactions into "from", "to", "value" and "cost" I'm trying to write a script that parses the entire blockchain into a database. But I'm having issues figuring out how to store what I need to then aggregate the results and build a transaction list per address. The transaction object I need: { from: "addressA", to: "addressB", value: 100, cost: 0.10, } My process so far: // get block transactions // for every transaction get information // example info (taken from http://ift.tt/2j49oG6 $tx_hash): // tx "f93e892f2750520576190707250d86fbb9e438e6d2378620e746bb323a8a53f3" { "ver": 2, "inputs": [ { "sequence": 4294967295, "witness": "02483045022100e1689f42a5bae835cd3838772a49638be935c4b651c11ac4f8bdeed90dea56b402207a40301eef5b5767e3795fccd864d5e1d671f2960381ece1a74f6f...