OP_CODEs

Oded Leiba edited this page Nov 13, 2016 · 16 revisions

This set of OP_CODES are only recognized by the colored coins software and should not be confused with Bitcoin OP_CODES (such as OP_RETURN).

Colored coins OP_CODES are encoded using a single byte. Half of the values represented by that byte are reserved for Core Colored Coins protocol OP_CODES, the other half is left open for custom OP_CODES that may be added by users (e.g. in forks of the colored coins opensource software).

In particular

  • The first 128 values 0x00-0x7F are reserved for Colored Coins OP_CODES
    • 0x01-0x0F represent Issuance OP_CODES
    • 0x10-0x1F represent Transfer OP_CODES
    • 0x20-0x2F represent Burn OP_CODES
  • The last 128 values 0x80-0xFF can be used for referring to new OP_CODES used by custom extensions (plugins)

The table below lists the (currently available) Colored Coins OP_CODES

  • The I/T/B column refers to whether this is an Issuance, a Transfer or a Burn OP_CODE.
  • The M column designates whether any Metadata was stored at all
  • The 1(2) column designates whether a (1|2) multisignature address was used in addition to OP_RETURN
  • The 1(3) column designates whether a (1|3) multisignature address was used in addition to OP_RETURN
Hex Meaning I/T/B M 1(2) 1(3) Comment
0x00 Undefined
0x01 SHA1 Torrent info_hash + SHA256 of metadata in 80 bytes OP_RETURN I
0x02 SHA1 torrent info_hash in OP_RETURN
SHA256 of metadata in 1(2) multisig
I
0x03 SHA1 Torrent info_hash + SHA256 of metadata in 1(3) multisig I
0x04 SHA1 Torrent Hash in OP_RETURN
No SHA256 of metadata
I Low Security
0x05 No Metadata, cannot add rules I Locked
0x06 No Metadata, can add rules I Unlocked
0x10 SHA1 Torrent info_hash + SHA256 of metadata in 80 byte OP_RETURN T
0x11 SHA256 of metadata in 1(2) multisig T
0x12 SHA1 Torrent info_hash + SHA256 of metadata in 1(3) multisig T
0x13 SHA1 Torrent info_hash in OP_RETURN
No SHA256 of metadata
T
0x14 SHA1 Torrent info_hash in OP_RETURN
No SHA256 of metadata
No rules in metadata
T Low Security, Ignore rules if exist
0x15 No Metadata T
0x20 SHA1 Torrent info_hash + SHA256 of metadata in 80 byte OP_RETURN B
0x21 SHA256 of metadata in 1(2) multisig B
0x22 SHA1 Torrent info_hash + SHA256 of metadata in 1(3) multisig B
0x23 SHA1 Torrent info_hash in OP_RETURN
No SHA256 of metadata
B
0x24 SHA1 Torrent info_hash in OP_RETURN
No SHA256 of metadata
No rules in metadata
B Low Security, Ignore rules if exist
0x25 No Metadata B