> >

Opcode

Opcodes, short for operation codes, are the basic building blocks in Bitcoin Script that define and enable various operations on the network. They allow users to set transaction conditions, manipulate data on the stack, execute calculations, validate or invalidate transactions, and perform cryptographic functions, among other functions.

Some popular opcodes (with hexadecimal value) and their functions:

OP_CHECKSIG (0xAC): used to verify that a digital signature is valid for a given public key and transaction, ensuring that the person spending bitcoin has the authority to do so.

OP_RETURN (0x6A) marks a transaction output as unspendable and allows a small amount of arbitrary data to be embedded into it. It is commonly used to add data to the blockchain for various applications, such as timestamping, anchoring, or including metadata.

OP_CHECKMULTISIG (0xAE): employed to check multiple signatures against multiple public keys, allowing for n-of-m multisignature (multisig) operations where a specified number (n) of signatures out of a possible set (m) are required to validate the transaction.

It's important to note that Bitcoin opcodes encompass a broad spectrum of basic operations, while introspection opcodes are specifically focused on accessing transaction data.