-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Pointer | ||
======= | ||
|
||
In order to make an inscription on a sat other than the first of its input, a | ||
zero-based integer, called the "pointer", can be provided with tag `2`, causing | ||
the inscription to be made on the sat at the given position in the outputs. If | ||
the pointer is equal to or greater than the number of total sats in the outputs | ||
of the inscribe transaction, it is ignored, and the inscription is made as | ||
usual. The value of the pointer field is a little endian integer, with trailing | ||
zeroes ignored. | ||
|
||
An even tag is used, so that old versions of `ord` consider the inscription to | ||
be unbound, instead of assigning it, incorrectly, to the first sat. | ||
|
||
This can be used to create multiple inscriptions in a single transaction on | ||
different sats, when otherwise they would be made on the same sat. | ||
|
||
Examples | ||
-------- | ||
|
||
An inscription with pointer 255: | ||
|
||
``` | ||
OP_FALSE | ||
OP_IF | ||
OP_PUSH "ord" | ||
OP_PUSH 1 | ||
OP_PUSH "text/plain;charset=utf-8" | ||
OP_PUSH 2 | ||
OP_PUSH 0xff | ||
OP_PUSH 0 | ||
OP_PUSH "Hello, world!" | ||
OP_ENDIF | ||
``` | ||
|
||
An inscription with pointer 256: | ||
|
||
``` | ||
OP_FALSE | ||
OP_IF | ||
OP_PUSH "ord" | ||
OP_PUSH 1 | ||
OP_PUSH "text/plain;charset=utf-8" | ||
OP_PUSH 2 | ||
OP_PUSH 0x0001 | ||
OP_PUSH 0 | ||
OP_PUSH "Hello, world!" | ||
OP_ENDIF | ||
``` | ||
|
||
An inscription with pointer 256, with trailing zeroes, which are ignored: | ||
|
||
``` | ||
OP_FALSE | ||
OP_IF | ||
OP_PUSH "ord" | ||
OP_PUSH 1 | ||
OP_PUSH "text/plain;charset=utf-8" | ||
OP_PUSH 2 | ||
OP_PUSH 0x000100 | ||
OP_PUSH 0 | ||
OP_PUSH "Hello, world!" | ||
OP_ENDIF | ||
``` |