diff --git a/docs/src/inscriptions.md b/docs/src/inscriptions.md index 7a1481123e..2e02f9083a 100644 --- a/docs/src/inscriptions.md +++ b/docs/src/inscriptions.md @@ -62,3 +62,40 @@ The inscription content is contained within the input of a reveal transaction, and the inscription is made on the first sat of its input. This sat can then be tracked using the familiar rules of ordinal theory, allowing it to be transferred, bought, sold, lost to fees, and recovered. + +Content +------- + +The data model of inscriptions is that of a HTTP response, allowing inscription +content to be served by a web server and viewed in a web browser. + +Sandboxing +---------- + +HTML and SVG inscriptions are sandboxed in order to prevent references to +off-chain content, thus keeping inscriptions immutable and self-contained. + +This is accomplished by loading HTML and SVG inscriptions inside `iframes` with +the `sandbox` attribute, as well as serving inscription content with +`Content-Security-Policy` headers. + +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/`. + +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.