Streams
Large files split across an ordinal transfer chain
Last updated
Large files split across an ordinal transfer chain
Large payloads can be split across multiple inscriptions on one ordinal transfer chain, then reassembled by OrdFS.
Chunk 0 (start of stream): the payload’s actual content type (e.g. video/mp4, application/octet-stream). Conventionally mark it as streamable, e.g. video/mp4; stream=ordfs (parameter on the type string). Body is the first slice of bytes.
Further chunks: each successive spend of the ordinal carries the next slice with content type exactly ordfs/stream.
Chain ends when a spend has no further content, spend is missing, or a later output’s type is not ordfs/stream (after the first chunk).
All chunks must be in the instance’s BEEF/spends graph so the stream walk can follow the ordinal. Same scope rules as other OrdFS loads.
GET /1sat/ordfs/stream/{outpoint}OrdFS:
Resolves origin / chain from the starting outpoint.
Walks spends forward, concatenating content bodies in order.
Sets Content-Type from the first chunk’s type (so clients see video/mp4, not ordfs/stream).
Supports HTTP Range (Range: bytes=start-end) for seek and progressive download; only the relevant portions of chunks are written.
Example:
curl -H "Range: bytes=0-1023" "https://{host}/1sat/ordfs/stream/{txid}_{vout}"GET /content/{outpoint} on a stream origin returns only that outpoint’s inscription (typically chunk 0), not the assembled stream. Use the stream route for full media.
Split the file into chunks sized for your inscription limits (1 MiB bodies are a practical default).
Mint chunk 0 as a 1-sat inscription with the public content type (and optional stream=ordfs parameter).
Transfer/reinscribe the same ordinal for each subsequent chunk with type ordfs/stream and the next bytes (order is spend order).
Point clients at /1sat/ordfs/stream/{firstChunkOutpoint} (or an outpoint mid-chain if you only need a suffix — walk starts from the requested outpoint).
If a middle chunk is missing from the store, the stream stops or errors when that spend cannot be loaded.
@1sat/actions)The TypeScript SDK’s inscribe action can build this layout:
stream: true — multi-tx stream with 1 MiB chunk bodies
streamChunkSize: N — multi-tx stream with custom body size
Omit both for a single-transaction inscription. Stream outputs are tagged with sha256:<content-hash> and stream-i:<index>. See Libraries and 1sat-sdk.
OrdFS — gateway resolution, seq, MAP, HTTP routes
Directories — multi-file sites via ord-fs/json
Last updated