Section 02

Specification

Technical definitions for the data structures and encoding rules that constitute the underlying fabric of the Urma protocol.

1. Claim Naming

Every atomic piece of verifiable data within the protocol is identified by a deterministic claim string. The naming convention relies on a consistent prefix followed by a cryptographically secure hash.

u-{source_claim_id_hex}

The u- prefix designates the resource as a native Urma entity, distinct from raw IPFS CID hashes or standard domain name pointers. The payload must exactly equal 40 hexadecimal characters.

2. Data Structures

UrmaClaim

Primary wrapper for verifiable storage claims.

FieldTypeDescription
versionuint8Protocol version (currently 0).
locationstringStorage backend identifier (e.g. "sia").
sourceClaimIdstring (hex)40-char lowercase hex of the 20-byte source ClaimID.
dataKeybyte[32]AES-256 encryption key for file content.
locationDataobjectBackend-specific retrieval data. Schema depends on location.

ManifestPage

Paged chain structure for off-chain manifest data.

FieldTypeDescription
datajson.RawMessageBackend-specific manifest payload for this page. Opaque to core.
nextjson.RawMessageBackend-specific pointer to next page. Omitted on last page.

infoNote

Backend-specific manifest types (blob entries, slab slices, etc.) are defined by each backend, not by core. See the Sia backend for a concrete example.

3. Envelope & Signing

Claim values are wrapped in an envelope with a version byte. Unsigned envelopes (0x00) contain just the JSON payload. Signed envelopes (0x01) include a channel ClaimID and ECDSA signature.

Unsigned

[0x00] [UrmaClaim JSON bytes]

Signed

[0x01] [20-byte channel ClaimID] [64-byte ECDSA signature] [UrmaClaim JSON]

warningWarning

Invalid signatures cause immediate rejection by clients. The signature digest includes the transaction input hash, channel ClaimID, and JSON payload: useEncodeSignedEnvelope to ensure correct computation.

4. Constants

FieldTypeDescription
ProtocolVersionuint8Current protocol version (0).
MaxClaimScriptSizeintMaximum on-chain claim script size in bytes (8192).
SourceClaimIDLenintLength of a LBRY ClaimID in bytes (20).
EnvelopeUnsignedbyteEnvelope version byte for unsigned claims (0x00).
EnvelopeSignedbyteEnvelope version byte for signed claims (0x01).
EnvelopeSignedOverheadintSigned envelope overhead: 1 + 20 + 64 = 85 bytes.
ClaimScriptOverheadintFixed script overhead: 46 bytes.