Skip to main content

Documents API

An EvoBin upload writes a manifest document and one or more media documents. The manifest ID is the public address.

Manifest fields​

FieldTypeNotes
namestringOriginal file name
kindstringfile
typestringBroad type
mimeTypestringapplication/octet-stream fallback
fileSizenumberOriginal bytes
contentHashstringSHA-256 hex
hashAlgorithmstringsha256
hashEncodingstringhex
compressionSchemestringnone
encryptionSchemestringnone
chunkCountnumber1–50 (one per media document)
chunkSizeBytesnumber20000

Media fields​

FieldTypeNotes
parentIdbyteArray32-byte manifest identifier
chunkIndexnumber0–49
totalChunksnumber1–50
sizenumberPayload size
totalSizenumberOriginal file size
chunkHashstringSHA-256 hex of this chunk
hashAlgorithmstringsha256
hashEncodingstringhex
payload1 … payload4byteArrayUp to 5,120 bytes each

Document IDs and the nonce​

Dash Platform document IDs commit to the identity's contract nonce. The upload path:

  1. Fetches getIdentityContractNonce(identityId, dataContractId).
  2. The manifest uses nonce + 1; media chunk i uses nonce + 2 + i.
  3. Derives each document ID and creates its state transition with that same nonce.

A document built before the nonce is known carries a placeholder ID and is rejected by the network. Refresh and retry if a nonce error appears.

Payload encoding​

The media payloads are Uint8Array values, which pshenmic serializes as compact byteArray fields. A plain JavaScript number array is serialized as one encoded value per byte and roughly doubles the transition size.

Limits​

LimitValue
Max state transition20,480 bytes
Max field value5,120 bytes
Max media-document payload20,000 bytes
Current UI file limit1,000,000 bytes (up to 50 chunks)

The writer creates one media document per 20 KB chunk (up to 50); the reader reassembles them.