forked from ordinals/ord
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow inscriptions to nominate a delegate (ordinals#2912)
- Loading branch information
1 parent
b3cab9e
commit 03d1c98
Showing
10 changed files
with
215 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Delegate | ||
======== | ||
|
||
Inscriptions may nominate a delegate inscription. Requests for the content of | ||
an inscription with a delegate will instead return the content and content type | ||
of the delegate. This can be used to cheaply create copies of an inscription. | ||
|
||
### Specification | ||
|
||
To create an inscription I with delegate inscription D: | ||
|
||
- Create an inscription D. Note that inscription D does not have to exist when | ||
making inscription I. It may be inscribed later. Before inscription D is | ||
inscribed, requests for the content of inscription I will return a 404. | ||
- Include tag `11`, i.e. `OP_PUSH 11`, in I, with the value of the serialized | ||
binary inscription ID of D, 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 an inscription which delegates to | ||
`000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fi0`: | ||
|
||
``` | ||
OP_FALSE | ||
OP_IF | ||
OP_PUSH "ord" | ||
OP_PUSH 11 | ||
OP_PUSH 0x1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100 | ||
OP_ENDIF | ||
``` | ||
|
||
Note that the value of tag `11` is binary, not hex. | ||
|
||
The delegate field value uses the same encoding as the parent field. See | ||
[provenance](provenance.md) for more examples of inscrpition ID encodings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.