-
Notifications
You must be signed in to change notification settings - Fork 7
/
[RECURSION].txt
33 lines (24 loc) · 2.01 KB
/
[RECURSION].txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Recursion
An important exception to sandboxing is recursion: access to ord's /content endpoint is permitted, allowing inscriptions to access the content of other inscriptions by requesting /content/<INSCRIPTION_ID>.
This has a number of interesting use-cases:
Remixing the content of existing inscriptions.
Publishing snippets of code, images, audio, or stylesheets as shared public resources.
Generative art collections where an algorithm is inscribed as JavaScript, and instantiated from multiple inscriptions with unique seeds.
Generative profile picture collections where accessories and attributes are inscribed as individual images, or in a shared texture atlas, and then combined, collage-style, in unique combinations in multiple inscriptions.
The recursive endpoints are:
/r/blockhash/<HEIGHT>: block hash at given block height.
/r/blockhash: latest block hash.
/r/blockheight: latest block height.
/r/blocktime: UNIX time stamp of latest block.
/r/children/<INSCRIPTION_ID>: the first 100 child inscription ids.
/r/children/<INSCRIPTION_ID>/<PAGE>: the set of 100 child inscription ids on <PAGE>.
/r/metadata/<INSCRIPTION_ID>: JSON string containing the hex-encoded CBOR metadata.
/r/sat/<SAT_NUMBER>: the first 100 inscription ids on a sat.
/r/sat/<SAT_NUMBER>/<PAGE>: the set of 100 inscription ids on <PAGE>.
/r/sat/<SAT_NUMBER>/at/<INDEX>: the inscription id at <INDEX> of all inscriptions on a sat. <INDEX> may be a negative number to index from the back. 0 being the first and -1 being the most recent for example.
Note: <SAT_NUMBER> only allows the actual number of a sat no other sat notations like degree, percentile or decimal. We may expand to allow those in the future.
Responses from the above recursive endpoints are JSON. For backwards compatibility additional endpoints are supported, some of which return plain-text responses.
/blockheight: latest block height.
/blockhash: latest block hash.
/blockhash/<HEIGHT>: block hash at given block height.
/blocktime: UNIX time stamp of latest block.