Commonly used opcodes

All opcodes are declared in the script.h file in the Bitcoin reference client source code.

This can be accessed from the link at under the following comment: /** Script opcodes */

A description of the most commonly used opcodes is listed here. This table is taken from the Bitcoin developer's guide:




This takes a public key and signature and validates the signature of the hash of the transaction. If it matches, then TRUE is pushed onto the stack; otherwise, FALSE is pushed.


This returns 1 if the inputs are exactly equal; otherwise, 0 is returned.


This duplicates the top item in the stack. ...

Get Advanced Blockchain Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.