OP_CAT

Introduction

OP_CAT is a simple opcode that concatenates two byte strings together in Bitcoin Script.

Andrew Poelstra once wrote a two-part series of blog posts to showcase how the OP_CAT opcode can in itself effectively enable covenants:

It's important to clarify that this proposal doesn't aim to introduce covenants to Bitcoin. Instead, it is focused on introducing an opcode that holds broad utility across various scenarios. The potency of several covenant proposals increases substantially when they can be integrated with the functionality provided by CAT.

As a side note, OP_CAT is also one of the opcodes that would be re-enabled as part of the Great Script Restoration project.

Specification

A BIP of the OP_CAT opcode is currently in draft status on GitHub.

An implementation on Bitcoin Inquisition is also available.

Edit this page on GitHub