Preface:BlockCypher transaction build and send workflow:
http://dev.blockcypher.com/samples/create-tx.htmlPOST https://api.blockcypher.com/v1/btc/main/txs/new
> {
> "inputs": [
> {"addresses": ["1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD"]}
> ],
> "outputs": [
> {"addresses": ["1FGAsJFNgWvFz2tWQAnRq8S6fVX9Zmuxje"], "value": 500000}
> ]
> }
{
"tx": {
"block_height": -1,
"hash": "f961dea839fd69653547a0308360de67846a49d3593f7459773e27af8d9f5ec0",
"addresses": [
"1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD",
"1FGAsJFNgWvFz2tWQAnRq8S6fVX9Zmuxje",
],
"total": 661116,
"fees": 10000,
"received": "2014-04-20T23:52:21.069978821Z",
"ver": 1,
"lock_time": 0,
"vin_sz": 2,
"vout_sz": 2,
"confirmed": 0,
"inputs": [
{
"prev_hash": "0c83c8321537a7c79dc6214788944ba6cd5ea76f0594453b6251fcf1856f2e4b",
"output_index": 0,
"script": "",
"output_value": 171116,
"addresses": [
"1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD"
],
"script_type": "pay-to-pubkey-hash"
},
{
"prev_hash": "995a50e05d197be88d4da74160b4bcd2c363ebb1a49f95e572667d580bc70aba",
"output_index": 0,
"script": "",
"output_value": 500000,
"addresses": [
"1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD"
],
"script_type": "pay-to-pubkey-hash"
}
],
"outputs": [
{
"value": 500000,
"script": "76a9149c703cb3e9f1a2a154e548b3acafd0054d4835a788ac",
"addresses": [
"1FGAsJFNgWvFz2tWQAnRq8S6fVX9Zmuxje"
],
"script_type": "pay-to-pubkey-hash"
},
{
"value": 161116,
"script": "76a9148629647bd642a2372d846a7660e210c8414f047c88ac",
"addresses": [
"1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD"
],
"script_type": "pay-to-pubkey-hash"
}
]
},
"tosign": [
"04779733bba8085dd86c21d86c8f9e786a1124751c42061d4c539229a07c4464",
"0396ea6f1bf7493e738339bd720267e7281144b222343ffe4167e00792c62ff2"
]
}
Question:What is the easiest way to check that the "tosign" hashes actually correspond to the correct transactions (i.e. is indeed a transaction from the specified "input" to the specified "output")? Solution needs to be pure client side browser JavaScript and be compatible on all modern mobile devices.