<p>Yes, it is possible. You can use <code>getrawtransaction &lt;txid&gt;</code> and <code>decoderawtransaction &lt;output from getrawtransaction&gt;</code>. For example:</p>

<pre><code>getrawtransaction 6dcaa5e7f412a9c14d0f87a2660907c37de5abac31823c22fba978b6fd616313
010000000105bbdd4f69478586a192f4904f51229690ae7f17703a8410f983c072658eb611c60200006a47304402200c64714e605c1ad63e5a52b2d4a734c3a6174e2d6a4e0aa7fcff99ec8c1451a902202005bed9f7f2969bf86989cbe295aab3d51ba77b2faf9def6010b04f24183e450121024209026dda4b136d55f92e36fb4fdf23a8beb129d872838a122a9d1e55c9f838ffffffff0240f3ad00000000001976a91452bf43c4d410b5971a37c304ba96b53dc5da7f5f88acc8a10000000000001976a914bcccc2b493e31afd0767448c8f7d7d5d6823164888ac00000000

decoderawtransaction 010000000105bbdd4f69478586a192f4904f51229690ae7f17703a8410f983c072658eb611c60200006a47304402200c64714e605c1ad63e5a52b2d4a734c3a6174e2d6a4e0aa7fcff99ec8c1451a902202005bed9f7f2969bf86989cbe295aab3d51ba77b2faf9def6010b04f24183e450121024209026dda4b136d55f92e36fb4fdf23a8beb129d872838a122a9d1e55c9f838ffffffff0240f3ad00000000001976a91452bf43c4d410b5971a37c304ba96b53dc5da7f5f88acc8a10000000000001976a914bcccc2b493e31afd0767448c8f7d7d5d6823164888ac00000000
{
"txid" : "6dcaa5e7f412a9c14d0f87a2660907c37de5abac31823c22fba978b6fd616313",
"version" : 1,
"locktime" : 0,
"vin" : [{
    "txid" : "11b68e6572c083f910843a70177fae909622514f90f492a1868547694fddbb05",
    "vout" : 710,
    "scriptSig" : {
        "asm" : "304402200c64714e605c1ad63e5a52b2d4a734c3a6174e2d6a4e0aa7fcff99ec8c1451a902202005bed9f7f2969bf86989cbe295aab3d51ba77b2faf9def6010b04f24183e4501 024209026dda4b136d55f92e36fb4fdf23a8beb129d872838a122a9d1e55c9f838",
        "hex" : "47304402200c64714e605c1ad63e5a52b2d4a734c3a6174e2d6a4e0aa7fcff99ec8c1451a902202005bed9f7f2969bf86989cbe295aab3d51ba77b2faf9def6010b04f24183e450121024209026dda4b136d55f92e36fb4fdf23a8beb129d872838a122a9d1e55c9f838"
    },
    "sequence" : 4294967295
}],
"vout" : [{
    "value" : 0.11400000,
    "n" : 0,
    "scriptPubKey" : {
        "asm" : "OP_DUP OP_HASH160 52bf43c4d410b5971a37c304ba96b53dc5da7f5f OP_EQUALVERIFY OP_CHECKSIG",
        "hex" : "76a91452bf43c4d410b5971a37c304ba96b53dc5da7f5f88ac",
        "reqSigs" : 1,
        "type" : "pubkeyhash",
        "addresses" : ["18YXY35z1HgMoKqBFgiShGuqnhR7zdwwC6"]
    }
}, {
    "value" : 0.00041416,
    "n" : 1,
    "scriptPubKey" : {
        "asm" : "OP_DUP OP_HASH160 bcccc2b493e31afd0767448c8f7d7d5d68231648 OP_EQUALVERIFY OP_CHECKSIG",
        "hex" : "76a914bcccc2b493e31afd0767448c8f7d7d5d6823164888ac",
        "reqSigs" : 1,
        "type" : "pubkeyhash",
        "addresses" : ["1JDHL5WhHNrg4HrNksnF7S1ChGVYYUkjVC"]
    }
}]
}
</code></pre>

<p>Look at <code>vin[0].scriptSig.asm</code>. It contains 2 values: <code>3044...4501</code> and <code>0242...f838</code>. Second value is a compressed public key. Now you can use it to calculate address: <code>RIPEMD160(SHA256(pubkey)) -&gt; Base58</code>. But you must do this by yourself.</p>

CC BY-SA 3.0
2014-01-16T09:35:53.653Z
2014-01-16T09:35:53.653Z
Zergatul
<p>Despite the fact that bockexplorer allows to navigate through transaction details and discover the sender address,
why via bitcoin client the sender address remains 'undefined'.</p>

<p>Is it possible to discover sender address via original Bitcoin API? </p>

CC BY-SA 3.0
2014-02-22T10:32:50.133Z
What you're talking about is not a "sender address". Bitcoin doesn't have that. All you can find out (and the answer below describes) is which address(es) the coins consumed by a transaction were previously assigned to. Unless you're the sender yourself, this is not usually interesting information.
Pieter Wuille
<transactions><bitcoin-core><client><api>
Why on bitcoin client sender address is 'undefined'
tokyo
# Why on bitcoin client sender address is 'undefined'

(Asked by: username_0 on 2014-01-15)

Despite the fact that bockexplorer allows to navigate through transaction details and discover the sender address,
why via bitcoin client the sender address remains 'undefined'.

Is it possible to discover sender address via original Bitcoin API?

**Tags:** transactions, bitcoin-core, client, api

> **Comments:**
> **username_1**: What you're talking about is not a "sender address". Bitcoin doesn't have that. All you can find out (and the answer below describes) is which address(es) the coins consumed by a transaction were previously assigned to. Unless you're the sender yourself, this is not usually interesting information.  

---

## 1 answers

### Answer by username_2 on 2014-01-16. Score: 2 | Accepted answer

Yes, it is possible. You can use `getrawtransaction <txid>` and `decoderawtransaction <output from getrawtransaction>`. For example:

```
getrawtransaction 6dcaa5e7f412a9c14d0f87a2660907c37de5abac31823c22fba978b6fd616313
010000000105bbdd4f69478586a192f4904f51229690ae7f17703a8410f983c072658eb611c60200006a47304402200c64714e605c1ad63e5a52b2d4a734c3a6174e2d6a4e0aa7fcff99ec8c1451a902202005bed9f7f2969bf86989cbe295aab3d51ba77b2faf9def6010b04f24183e450121024209026dda4b136d55f92e36fb4fdf23a8beb129d872838a122a9d1e55c9f838ffffffff0240f3ad00000000001976a91452bf43c4d410b5971a37c304ba96b53dc5da7f5f88acc8a10000000000001976a914bcccc2b493e31afd0767448c8f7d7d5d6823164888ac00000000

decoderawtransaction 010000000105bbdd4f69478586a192f4904f51229690ae7f17703a8410f983c072658eb611c60200006a47304402200c64714e605c1ad63e5a52b2d4a734c3a6174e2d6a4e0aa7fcff99ec8c1451a902202005bed9f7f2969bf86989cbe295aab3d51ba77b2faf9def6010b04f24183e450121024209026dda4b136d55f92e36fb4fdf23a8beb129d872838a122a9d1e55c9f838ffffffff0240f3ad00000000001976a91452bf43c4d410b5971a37c304ba96b53dc5da7f5f88acc8a10000000000001976a914bcccc2b493e31afd0767448c8f7d7d5d6823164888ac00000000
{
"txid" : "6dcaa5e7f412a9c14d0f87a2660907c37de5abac31823c22fba978b6fd616313",
"version" : 1,
"locktime" : 0,
"vin" : [{
    "txid" : "11b68e6572c083f910843a70177fae909622514f90f492a1868547694fddbb05",
    "vout" : 710,
    "scriptSig" : {
        "asm" : "304402200c64714e605c1ad63e5a52b2d4a734c3a6174e2d6a4e0aa7fcff99ec8c1451a902202005bed9f7f2969bf86989cbe295aab3d51ba77b2faf9def6010b04f24183e4501 024209026dda4b136d55f92e36fb4fdf23a8beb129d872838a122a9d1e55c9f838",
        "hex" : "47304402200c64714e605c1ad63e5a52b2d4a734c3a6174e2d6a4e0aa7fcff99ec8c1451a902202005bed9f7f2969bf86989cbe295aab3d51ba77b2faf9def6010b04f24183e450121024209026dda4b136d55f92e36fb4fdf23a8beb129d872838a122a9d1e55c9f838"
    },
    "sequence" : 4294967295
}],
"vout" : [{
    "value" : 0.11400000,
    "n" : 0,
    "scriptPubKey" : {
        "asm" : "OP_DUP OP_HASH160 52bf43c4d410b5971a37c304ba96b53dc5da7f5f OP_EQUALVERIFY OP_CHECKSIG",
        "hex" : "76a91452bf43c4d410b5971a37c304ba96b53dc5da7f5f88ac",
        "reqSigs" : 1,
        "type" : "pubkeyhash",
        "addresses" : ["18YXY35z1HgMoKqBFgiShGuqnhR7zdwwC6"]
    }
}, {
    "value" : 0.00041416,
    "n" : 1,
    "scriptPubKey" : {
        "asm" : "OP_DUP OP_HASH160 bcccc2b493e31afd0767448c8f7d7d5d68231648 OP_EQUALVERIFY OP_CHECKSIG",
        "hex" : "76a914bcccc2b493e31afd0767448c8f7d7d5d6823164888ac",
        "reqSigs" : 1,
        "type" : "pubkeyhash",
        "addresses" : ["1JDHL5WhHNrg4HrNksnF7S1ChGVYYUkjVC"]
    }
}]
}

```

Look at `vin[0].scriptSig.asm`. It contains 2 values: `3044...4501` and `0242...f838`. Second value is a compressed public key. Now you can use it to calculate address: `RIPEMD160(SHA256(pubkey)) -> Base58`. But you must do this by yourself.


---

