Using the Bitcoin API, how can I see the sending address?

3

1

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

I have a transaction and I want to see what addresses the inputs came from. How can I do that?

Shamoon

Posted 2012-08-16T18:47:27.427

Reputation: 2 689

Answers

2

If you use gettransaction on the transaction ID, the keys used to claim the inputs are in the scriptSig fields. They're the string starting with 04. You'll have to hash them and then convert them to base58 get account IDs.

Note that these account IDs may or may not actually mean anything. If you're being paid out of "change", then the account IDs are essentially random.

David Schwartz

Posted 2012-08-16T18:47:27.427

Reputation: 46 931

1David, I don't see a scriptSig field. Perhaps you're thinking of getrawtransaction?Nick ODell 2013-02-21T17:42:47.597