Hi,
I need to know which BTC addresses have sent BTCs to one of my addresses.
I've googled and have saw some advices that the way to go is by the Transaction ID, but I'm not getting on how to do it.
For example, to get my last transaction, I do:
I will get:
{
"account" : "",
"address" : "XXXXxxxXXxxxXXxxxxxxxXX",
"category" : "receive",
"amount" : 0.1111,
"confirmations" : 111,
"blockhash" : "00000000000000000000000000000000000000000000000",
"blockindex" : 111,
"blocktime" : 111111111111,
"txid" : "555555555555555555555555555555555555555555555555555",
"time" : 11111111111,
"timereceived" : 11111111111
}
I saw this example here (
http://bitcoin.stackexchange.com/questions/3896/how-to-findout-the-sender-of-a-transaction):
txid = <relevant transaction id>
addresses = []
raw_tx = decoderawtransaction(getrawtransaction(txid))
for(input in raw_tx['vin']) {
input_raw_tx = decoderawtransaction(getrawtransaction(input['txid']))
addresses.push(input_raw_tx['vout'][input['vout']]['scriptPubKey']['addresses'][0])
}
This code above fails me in this line "input_raw_tx = decoderawtransaction(getrawtransaction(input['txid']))" when getting the "getrawtransaction(input['txid'])"
The error is code -5
Any clues on how to do this?
Thanks