Provenance

The owner of an inscription has the ability to create descendant inscriptions, establishing the origin of these descendants on the chain in a trustless manner, and attributing their creation to the owner of the original inscription. This functionality is particularly useful for assembling collections, where the descendants of a primary inscription are members of a unified collection.

Furthermore, these descendants are able to generate their own descendants, facilitating the formation of complex hierarchies. For example, an artist might produce an inscription that symbolises himself, accompanied by sub-inscriptions that identify collections that he has created. The descendants of these sub-inscriptions would then represent individual items within these respective collections.

Specification

To create a descendant inscription C with parent inscription P:

  • Create an inscribe transaction T as usual for C.

  • Spend the parent P in one of the inputs of T.

  • Include tag 3, i.e. OP_PUSH 3, in C, with the value of the serialized binary inscription ID of P, serialized as the 32-byte TXID, followed by the four-byte little-endian INDEX, with trailing zeroes omitted.

NB The bytes of a bitcoin transaction ID are reversed in their text representation, so the serialized transaction ID will be in the opposite order.

Example

An example of a descendant inscription of000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fi0:

OP_FALSE
OP_IF
  OP_PUSH "ord"
  OP_PUSH 1
  OP_PUSH "text/plain;charset=utf-8"
  OP_PUSH 3
  OP_PUSH 0x1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100
  OP_PUSH 0
  OP_PUSH "Hello, world!"
OP_ENDIF

Note that the value of tag 3 is binary, not hex, and that for the descendant inscription to be recognized as a descendant, 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fi0 must be spent as one of the inputs of the inscribe transaction.

Example encoding of inscription ID000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fi255:

OP_FALSE
OP_IF
  …
  OP_PUSH 3
  OP_PUSH 0x1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100ff
  …
OP_ENDIF

And of inscription ID 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fi256:

OP_FALSE
OP_IF
  …
  OP_PUSH 3
  OP_PUSH 0x1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a090807060504030201000001
  …
OP_ENDIF

Last updated