Skip to main content

Data Contracts

A Dash Platform data contract defines the document types an application may write. EvoBin writes to one upload contract and uses a second contract for the DashConnect key exchange.

Contract IDs​

ContractIDUsed by
Upload contractFgeMdT68DwmHR6QRkQ14BgsWbYrN8gbEhdJwEYpiJSSiManifest and media documents
Key-exchange contract7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2PDashConnect QR handoff

Do not confuse the key-exchange data contract ID with the contractId field inside its documents. They are different identifiers.

Manifest document​

The manifest describes the file. The current upload path writes:

FieldMeaning
nameOriginal file name
kindfile
typeBroad file type (image, document, etc.)
mimeTypeMIME type, or application/octet-stream
fileSizeOriginal size in bytes
contentHashSHA-256 of the file
hashAlgorithmsha256
hashEncodinghex
compressionSchemenone
encryptionSchemenone
chunkCount1–50 (one per media document)
chunkSizeBytes20000

encryptionScheme: 'none' is the current truth. The file is public to anyone with the manifest ID.

Media document​

The media document contains the payload. The current path writes:

FieldMeaning
parentIdManifest ID as a 32-byte identifier
chunkIndex0–49
totalChunks1–50
sizePayload size for this chunk
totalSizeOriginal file size
chunkHashSHA-256 of this chunk
payload1 … payload4Up to four 5,120-byte payload arrays

The payload arrays are stored as Uint8Array so pshenmic serializes them as compact byteArray values. A plain JS number array roughly doubles the transition size.

Protocol limits that matter​

LimitValue
Max state-transition size20,480 bytes
Max field value size5,120 bytes
Payload arrays per media document4 × 5,120 bytes
Max media-document payload20,000 bytes
Current UI file limit1,000,000 bytes (up to 50 chunks)

The 1,000,000-byte UI limit is a product choice, not the protocol maximum. The uploader splits files into up to fifty media documents, each with its own nonce and state transition. Files above 1,000,000 bytes and resumable uploads remain roadmap items.

Reads are contract-agnostic​

The public viewer and raw routes read the manifest and media documents, reassemble the payload, and return it. They do not require a wallet. The /meta route exposes the manifest and media metadata as JSON.