Skip to content

Commit

Permalink
Add metadata spec
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Sep 4, 2023
1 parent e6ceb97 commit e836267
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/src/inscriptions/metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Metadata
========

Inscriptions may include metadata consisting of plain-text key-value pairs.

Keys and values are encoded as UTF-8 data pushes, with keys preceeded with tag
5, and values preceeded with tag 7. For extensibility, the handling of
duplicate keys and keys with multiple values is undefined.

Example
-------

```
OP_FALSE
OP_IF
...
0x05 "foo"
0x07 "bar"
0x05 "this"
0x07 "that"
...
OP_ENDIF
```

```
<dl>
...
<dt>metadata</dt>
<dd>
<dl>
<dt>foo</dt>
<dd>bar</dd>
<dt>this</dt>
<dd>that</dd>
</dl>
<dd>
...
</dl>
```

0 comments on commit e836267

Please sign in to comment.