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.
| Field | Type | Description |
|---|---|---|
| version | uint8 | Protocol version (currently 0). |
| location | string | Storage backend identifier (e.g. "sia"). |
| sourceClaimId | string (hex) | 40-char lowercase hex of the 20-byte source ClaimID. |
| dataKey | byte[32] | AES-256 encryption key for file content. |
| locationData | object | Backend-specific retrieval data. Schema depends on location. |
ManifestPage
Paged chain structure for off-chain manifest data.
| Field | Type | Description |
|---|---|---|
| data | json.RawMessage | Backend-specific manifest payload for this page. Opaque to core. |
| next | json.RawMessage | Backend-specific pointer to next page. Omitted on last page. |
infoNote
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
EncodeSignedEnvelope to ensure correct computation.4. Constants
| Field | Type | Description |
|---|---|---|
| ProtocolVersion | uint8 | Current protocol version (0). |
| MaxClaimScriptSize | int | Maximum on-chain claim script size in bytes (8192). |
| SourceClaimIDLen | int | Length of a LBRY ClaimID in bytes (20). |
| EnvelopeUnsigned | byte | Envelope version byte for unsigned claims (0x00). |
| EnvelopeSigned | byte | Envelope version byte for signed claims (0x01). |
| EnvelopeSignedOverhead | int | Signed envelope overhead: 1 + 20 + 64 = 85 bytes. |
| ClaimScriptOverhead | int | Fixed script overhead: 46 bytes. |