<p>In general, you can't.</p>

<p>You need to look at the <code>scriptPubKey</code> of the output that is being spent.</p>

CC BY-SA 4.0
2018-05-29T19:51:58.837Z
How get scriptPubKey from this 3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01?
Временный Аккаунт 
CC BY-SA 4.0
2018-05-29T19:52:29.623Z
As I said, you can't. You need to look at the output being spent. The information you are looking for is not in the `scriptSig`.
Pieter Wuille
CC BY-SA 4.0
2018-05-29T20:00:04.963Z
so, edit question
Временный Аккаунт 
CC BY-SA 4.0
2018-05-29T19:49:43.767Z
2018-05-29T19:49:43.767Z
Pieter Wuille
<p>The input script does not provide you the necessary information. You need more than just the input script, you also need to know the output that the input spends. This is specified as the outpoint for an input and consists of a txid and output index. Using that txid and output index, you lookup the output and pull from that the scriptPubKey. With the scriptPubKey, you can then compute the address.</p>

CC BY-SA 4.0
2018-05-29T20:42:10.987Z
How get address from scriptPubKey I know. But I not know how get txid and output index. Please help me.
Временный Аккаунт 
CC BY-SA 4.0
2018-05-29T21:26:58.157Z
The txid and output indexes are part of the transaction. See https://bitcoin.org/en/developer-reference#txin
Ava Chow
CC BY-SA 4.0
2018-05-29T20:19:40.500Z
2018-05-29T20:19:40.500Z
Ava Chow
<p>I'm from Ukraine and do not know much English, sorry. I want to parse blockchain, but I have problems. In <a href="https://blockchain.info/block/00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a" rel="nofollow noreferrer">block 728</a> will first <a href="https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6" rel="nofollow noreferrer">txs</a> (user-user). But input-script have not public keys. I read this <a href="https://bitcoin.stackexchange.com/questions/58723/missing-public-key-in-transaction-input">Missing public key in transaction input</a>. And don't understand how work it. For example first input in <a href="https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6" rel="nofollow noreferrer">txs</a> is </p>

<p>3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01</p>

<p>and explorer say what this address get 50 btc in this <a href="https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6" rel="nofollow noreferrer">txs</a> when confirm <a href="https://blockchain.info/block-index/15358" rel="nofollow noreferrer">this block</a>. But how connected this <a href="https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6" rel="nofollow noreferrer">txs</a> and this <a href="https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6" rel="nofollow noreferrer">txs</a>.</p>

<p>How get address from ScriptSig: PUSHDATA(73)?</p>

<p>EDIT</p>

<p>What you need to do to get an address from such transactions?</p>

<transactions><transaction-input>
How get address from ScriptSig: PUSHDATA(N)?
Временный Аккаунт 
# How get address from ScriptSig: PUSHDATA(N)?

(Asked by: username_0 on 2018-05-29)

I'm from Ukraine and do not know much English, sorry. I want to parse blockchain, but I have problems. In [block 728](https://blockchain.info/block/00000000d14f2e97678951ad004d6699babd27e07ca722c46b30dc24c67eed7a) will first [txs](https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6) (user-user). But input-script have not public keys. I read this [Missing public key in transaction input](https://bitcoin.stackexchange.com/questions/58723/missing-public-key-in-transaction-input). And don't understand how work it. For example first input in [txs](https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6) is

3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01

and explorer say what this address get 50 btc in this [txs](https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6) when confirm [this block](https://blockchain.info/block-index/15358). But how connected this [txs](https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6) and this [txs](https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6).

How get address from ScriptSig: PUSHDATA(73)?

EDIT

What you need to do to get an address from such transactions?

**Tags:** transactions, transaction-input


---

## 2 answers

### Answer by username_1 on 2018-05-29. Score: 1

In general, you can't.

You need to look at the `scriptPubKey` of the output that is being spent.

> **Comments:**
> **username_0**: How get scriptPubKey from this 3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01?  
> **username_1**: As I said, you can't. You need to look at the output being spent. The information you are looking for is not in the `scriptSig`.  
> **username_0**: so, edit question  

---

### Answer by username_2 on 2018-05-29. Score: 0

The input script does not provide you the necessary information. You need more than just the input script, you also need to know the output that the input spends. This is specified as the outpoint for an input and consists of a txid and output index. Using that txid and output index, you lookup the output and pull from that the scriptPubKey. With the scriptPubKey, you can then compute the address.

> **Comments:**
> **username_0**: How get address from scriptPubKey I know. But I not know how get txid and output index. Please help me.  
> **username_2**: The txid and output indexes are part of the transaction. See https://bitcoin.org/en/developer-reference#txin  

---

