0
0
Given a BTC transaction such as this, how do I find the net amount person A sent to person B. I have searched all over and people start bringing up change wallets and all this other stuff. All I want to know, is given this transaction how can I convert it into something like: A --1.32BTC--> B. I don't care about what wallets the change was sent to, or what wallets were the inputs. All I need to know is how much did person A lose in the transaction and how much did person B gain. Thanks
{
"txid":"7afbbb1e606cc232602944b79ae90e9530b74776a923e9ec044a30738c679931",
"version":1,"locktime":0,
"vin":[{"txid":"8607869dc4f89440dee4ed5f9a32a4610cd0b6065ca66f7891ddf7d65ed09d07",
"vout":0,
"scriptSig":{"asm":"304402202882405db1bae04e1a13f1609beac47ea3afebe3668a44fe8ab393ac768e194d022015d3a915ba662097000bf90191a938949141fe9f16918e845d20fe1af2003e01[ALL] 03166a538434ad1ec63fc5265dbbcbfbd521ca513593f7edc4d5929b285f6d4422","hex":"47304402202882405db1bae04e1a13f1609beac47ea3afebe3668a44fe8ab393ac768e194d022015d3a915ba662097000bf90191a938949141fe9f16918e845d20fe1af2003e01012103166a538434ad1ec63fc5265dbbcbfbd521ca513593f7edc4d5929b285f6d4422"},
"sequence":4294967295,
"n":0,
"addr":"16jyig11zSX77NV3o4AcWiw57m1tqLogg",
"valueSat":229438,
"value":0.00229438,
"doubleSpentTxID":null}],
"vout":[
{"value":"0.00008203",
"n":0,"scriptPubKey":{"hex":"76a9140115f4b99e9c537bb584149191723841c6171a6f88ac",
"asm":"OP_DUP OP_HASH160 0115f4b99e9c537bb584149191723841c6171a6f OP_EQUALVERIFY OP_CHECKSIG",
"addresses":["16jyig11zSX77NV3o4AcWiw57m1tqLogg"],
"type":"pubkeyhash"},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null},
{"value":"0.00185075",
"n":1,
"scriptPubKey":{"hex":"a914b0458d1ab4d0fcffc7fd1014d6e62ad8120d294787",
"asm":"OP_HASH160 b0458d1ab4d0fcffc7fd1014d6e62ad8120d2947 OP_EQUAL","addresses":["3Hm4AomkLBGgHHMVMYqoxpTyn1tvf6u4dh"],
"type":"scripthash"},
"spentTxId":null,
"spentIndex":null,
"spentHeight":null}],
"blockheight":-1,
"confirmations":0,
"time":1515372033,
"valueOut":0.00193278,
"size":223,
"valueIn":0.00229438,
"fees":0.0003616}
1That works in this example. But in practice, most people use fresh addresses for change. In that case, neither of the output addresses will equal the input, and you won't have any way to know which of the two belongs to the real recipient B and which is the change address belonging to A. As such, what the asker wants is in general impossible. – Nate Eldredge – 2018-01-08T03:29:47.200
Yeah I'm trying to generalize it. It just seems so convoluted how the person has to receive change in a new wallet. I thought there would be an easy way to simplify the transaction. – Colman Koivisto – 2018-01-08T05:57:26.950