<p>This is additional information displayed by blockchain.com, and not part of the transaction data (for the transaction being viewed).</p>

<p>The PkScript is the locking script set by the previous transactions that created the outputs being used as inputs for the selected transaction. The selected transaction does not include this information, only a reference to it (in the form of the previous output txid + vout).</p>

<p>Blockchain.com uses this reference to lookup the PkScript from the previous transaction, and displays it alongside the scriptSig and witness data here.</p>

<p>The PkScript is used to ensure that the transaction is valid - it is also known as a locking script, and is a Bitcoin Script program that sets the requirements for the output to be spent. For example, a p2pkh locking script sets the requirement to "the input must be signed with a private key for which the public key's HASH160 equals the HASH160 in the locking script".</p>

<p>The input's scriptSig (and witness, in segwit transactions) is fed to the locking script as input. If the program evaluates to true, the scripts are valid. If it evaluates to anything else, it is invalid.</p>

CC BY-SA 4.0
2019-11-25T04:27:20.917Z
It looks like they're showing the scriptPubKey of the output being spent. I first downvoted because it sounded like you were saying it's a blockchain.info specific transaction comment, but re-reading I think what you're trying to say is they're doing additional interpretation of the data, which is right.
Pieter Wuille
CC BY-SA 4.0
2019-11-25T04:29:36.870Z
@PieterWuille Yup, they are - afaik, the only way to get that data is to look up the previous transaction and read it from the vout being used, and it is not part of the transaction data for the tx being viewed. Perhaps my phrasing is a bit off, I'll revise it a little
Raghav Sood
CC BY-SA 4.0
2020-12-24T05:48:13.877Z
So what does it mean that blockchain.com shows "Pkscript Invalid / ASM" in OP's link? The transaction is confirmed so it can't be an invalid transaction.
Gunar Gessner
CC BY-SA 4.0
2019-11-24T09:58:02.963Z
2019-11-25T04:33:33.123Z
2019-11-25T04:33:33.123Z
Raghav Sood
<p>I've seen transactions with PkScripts as part of Inputs</p>

<p>eg : <a href="https://www.blockchain.com/btc/tx/3fac60365785462bb8dbc5ec9cadfa8d9bb0943fbcf9386c2cc65c4095d7363d" rel="nofollow noreferrer">Example of such a transaction</a></p>

<p>Could anyone please explain how this PkScript is used ?</p>

<transactions><transaction-input>
Usage of PkScript as a part of Inputs of a Transaction
psaw.mora
# Usage of PkScript as a part of Inputs of a Transaction

(Asked by: username_0 on 2019-11-24)

I've seen transactions with PkScripts as part of Inputs

eg : [Example of such a transaction](https://www.blockchain.com/btc/tx/3fac60365785462bb8dbc5ec9cadfa8d9bb0943fbcf9386c2cc65c4095d7363d)

Could anyone please explain how this PkScript is used ?

**Tags:** transactions, transaction-input


---

## 1 answers

### Answer by username_1 on 2019-11-24. Score: 2

This is additional information displayed by blockchain.com, and not part of the transaction data (for the transaction being viewed).

The PkScript is the locking script set by the previous transactions that created the outputs being used as inputs for the selected transaction. The selected transaction does not include this information, only a reference to it (in the form of the previous output txid + vout).

Blockchain.com uses this reference to lookup the PkScript from the previous transaction, and displays it alongside the scriptSig and witness data here.

The PkScript is used to ensure that the transaction is valid - it is also known as a locking script, and is a Bitcoin Script program that sets the requirements for the output to be spent. For example, a p2pkh locking script sets the requirement to "the input must be signed with a private key for which the public key's HASH160 equals the HASH160 in the locking script".

The input's scriptSig (and witness, in segwit transactions) is fed to the locking script as input. If the program evaluates to true, the scripts are valid. If it evaluates to anything else, it is invalid.

> **Comments:**
> **username_2**: It looks like they're showing the scriptPubKey of the output being spent. I first downvoted because it sounded like you were saying it's a blockchain.info specific transaction comment, but re-reading I think what you're trying to say is they're doing additional interpretation of the data, which is right.  
> **username_1**: @username_2 Yup, they are - afaik, the only way to get that data is to look up the previous transaction and read it from the vout being used, and it is not part of the transaction data for the tx being viewed. Perhaps my phrasing is a bit off, I'll revise it a little  
> **username_3**: So what does it mean that blockchain.com shows "Pkscript Invalid / ASM" in OP's link? The transaction is confirmed so it can't be an invalid transaction.  

---

