Skip to Content
Mastering Blockchain - Second Edition
book

Mastering Blockchain - Second Edition

by Ankur Daharwal, Imran Bashir, Pranav Burnwal
March 2018
Beginner to intermediate
656 pages
20h 9m
English
Packt Publishing
Content preview from Mastering Blockchain - Second Edition

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 https://github.com/bitcoin/bitcoin/blob/master/src/script/script.h 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:

Opcode

Description

OP_CHECKSIG

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.

OP_EQUAL

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

OP_DUP

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Blockchain - Third Edition

Mastering Blockchain - Third Edition

Imran Bashir
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey
Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood

Publisher Resources

ISBN: 9781788839044Supplemental Content