How get address from ScriptSig: PUSHDATA(N)?

0

I'm from Ukraine and do not know much English, sorry. I want to parse blockchain, but I have problems. In block 728 will first txs (user-user). But input-script have not public keys. I read this Missing public key in transaction input. And don't understand how work it. For example first input in txs is

3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01

and explorer say what this address get 50 btc in this txs when confirm this block. But how connected this txs and this txs.

How get address from ScriptSig: PUSHDATA(73)?

EDIT

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

Временный Аккаунт

Posted 2018-05-29T19:43:52.123

Reputation: 3

Answers

1

In general, you can't.

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

Pieter Wuille

Posted 2018-05-29T19:43:52.123

Reputation: 54 032

How get scriptPubKey from this 3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01?Временный Аккаунт 2018-05-29T19:51:58.837

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 2018-05-29T19:52:29.623

so, edit questionВременный Аккаунт 2018-05-29T20:00:04.963

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.

Andrew Chow

Posted 2018-05-29T19:43:52.123

Reputation: 40 910

How get address from scriptPubKey I know. But I not know how get txid and output index. Please help me.Временный Аккаунт 2018-05-29T20:42:10.987

The txid and output indexes are part of the transaction. See https://bitcoin.org/en/developer-reference#txin

Andrew Chow 2018-05-29T21:26:58.157