Skip to content

Latest commit

 

History

History
33 lines (17 loc) · 1.95 KB

ANS-108.md

File metadata and controls

33 lines (17 loc) · 1.95 KB

ANS-108: Render-With

Authors: Sam Williams sam@arweave.org, Abhav Kedia abhav@arweave.org

Abstract

This document describes a standard for specifying the default application for rendering any media stored on Arweave.

Motivation

Applications using Arweave protocol's permanent storage layer often store raw information on Arweave, such as raw text, images and videos. This information typically has substantial metadata associated with it, which may be lost if the media is shared pre-rendered by applications built on top of Arweave. A standard way to specify a rendering application for such data allows directly sharing the Transaction ID of the raw data asset (which is atomically linked to its associated Metadata) and have it be rendered/experienced in the way it was meant to be viewed.

Specification

Uploaders

The entire specification for a data uploader consists of a simple tag that Arweave data uploaders can use to specify a default way for the information to be rendered.

Tag Name Optional? Tag Value
Render-With False Renderer-TX-ID

Gateways

When serving data stored on Arweave, if a particular Arweave TX-ID contains the Render-With tag, gateways MUST use the information stored in the Render-With tag to redirect from /{TX-ID} to /{Renderer-TX-ID}?tx={TX-ID}, unless the original transaction came with a ?render=false query parameter.

As an example, consider serving Metaweave post data via the arweave.net gateway. When any user accesses https://arweave.net/MetaweavePostID, they are redirected to https://arweave.net/MetaweaveRendererID?tx=MetaweavePostID if the MetaweavePostID Arweave transaction contains the tag Render-With: MetaweaveRendererID.

Renderers

Renderers must implement a permaweb application that accepts the query parameter tx={TX-ID}, and returns a rendering of the specified transaction.