Blockchain.com transaction explanation I'm query the BTC blockchain using blockchain.com to understand my own transactions a bit better.
One thing that confuses me in the inclusion of the Pkscript (scriptPubKey) under &quot;Inputs&quot; in the transaction manifest. My understanding is that this script is part of the Output of a transaction.
I presume that its inclusion here is a reference to the Output of the originating transaction i.e. the Input of the current transaction includes a part of the Output of the previous transaction to provide extra information to the user.
ie it is not suggesting that the scriptPubKey is actually part of the Input of the current transaction.
e.g
https://www.blockchain.com/btc/tx/7da0823ebf7a002a15b6bd11c676c6c213c349c982a9c454539e3ad63e9d57ee
A transaction (that is not a coinbase transaction) will have specified inputs and outputs. The inputs must be comprised of valid, existing UTXOs (referenced by transaction ID and output index number, called the 'outpoint'), which will be 'consumed' to create the outputs (newly created UTXOs).
To spend any UTXO, you need to satisfy the conditions of the locking script placed on it.

I presume that its inclusion here is a reference to the Output of the originating transaction i.e. the Input of the current transaction includes a part of the Output of the previous transaction to provide extra information to the user.

If we look under the hood at how transactions work:
The transaction input will include an outpoint, as well as an unlocking script that will satisfy the scriptPubKey, and a sequence number (which is not relevant to the question at hand). The scriptPubKey for an input isn't explicitly included in the transaction data, as that would be redundant. Instead, the scriptPubKey can be looked up via the outpoint.
The outputs created by a transaction will each include a value (amount of BTC), and a scriptPubKey.
A block explorer will likely just display all of this info together for ease of use though. So if you look up a transaction ID, the scriptPubKey of the inputs may be listed, despite the fact that the actual serialized transaction data doesn't explicitly include this data (it just includes the outpoint, which is used as reference to look up the relevant data).

You can think of the outpoint as the information about which UTXO is to be spent, the scriptPubKey as the 'lock' which must be opened in order to spend it, and the scriptsig as the 'key' which will open the lock.