Bitcoin does not actually use addresses internally. Addresses are just a way for us humans to specify what scriptPubKey we want the wallet software to create. When a transaction output is spent, the address is not included anywhere because it is not needed.
Bitcoin Core's decoding RPCs will include more information than is actually present in the transaction, block, or script. This is because it can infer and display the information present in different ways.
Since an address describes a scriptPubKey, it is typically possible to take a scriptPubKey and compute an address that corresponds to it. This is not always possible because not all scriptPubKeys correspond to addresses. But usually they do, and so the decoder will show you that.
However scriptSigs do not have corresponding addresses. You cannot get a scriptSig from an address and vice versa. In fact, the idea that you send from an address is really not true; that's just a simpler way to describe things to people. It isn't how Bitcoin actually works.
The reference to the previous output is done by explicitly referencing it, not referencing some address. Every output is uniquely identified by the transaction it is included in, and its index in the array of outputs in that transaction. Bitcoin Core displays this to you as the txid and vout fields for each input.
Bitcoin really does not have wallet ids. Contrary to popular belief, addresses are not wallet ids, nor are public keys.
So, the reference to previous output is the type Outpoint inside the Transaction input? so the hash inside the outpoint is the hash of the Previous Transaction output? – vincenzopalazzo – 2019-08-05T15:44:13.350
2Yes. The hash is the txid of the previous transaction, no the hash of the previous transaction output. It tells you what transaction to look up. The vout is the index of the transaction output in the array of transaction outputs in the previous transaction. It tells you where exactly in that transaction is the output being spent. – Andrew Chow – 2019-08-05T17:12:10.557
Thank so much, so for get the previus txout I could decodeRawTransaction(outpoinHasTx) -> access the transactionOutoput where vout = nOutpoint -> decode the scriptPubKeys – vincenzopalazzo – 2019-08-06T11:18:01.413
Yes. That is how you would get the address for an input. – Andrew Chow – 2019-08-06T17:27:32.570
Thanks for your help – vincenzopalazzo – 2019-08-06T18:33:59.030