Contract Keywords

A data contract describes its documents with a JSON schema per document type, and Platform reads a set of keywords in those schemas: some from JSON Schema, most of its own. The chapters of this part take each keyword, or a small group that works together, and say what it does, how to write it, what is checked when a contract is registered and when a document is written, what a later contract update may do with it, and which errors it produces. The chapters of the Data Model and Drive parts explain the internals behind them and are linked from each chapter.

Everything here follows the document meta-schema of protocol version 14, packages/rs-dpp/schema/meta_schemas/document/v3/document-meta.json. Every document type schema is validated against it when a contract is registered or updated, and the parser (try_from_schema) checks the rules a JSON schema cannot express. When a chapter and the meta-schema disagree, the meta-schema is right and the chapter is out of date.

Where keywords go

A contract's documentSchemas maps each document type name to its schema. Keywords sit at three levels:

"post": {
  "type": "object",
  "documentsMutable": true,
  "canBeDeleted": true,
  "indices": [
    { "name": "byOwner", "properties": [{ "$ownerId": "asc" }, { "$createdAt": "asc" }] }
  ],
  "properties": {
    "text": { "type": "string", "maxLength": 280, "maxBytes": 560, "position": 0 },
    "replyTo": {
      "type": "array", "byteArray": true, "minItems": 32, "maxItems": 32,
      "contentMediaType": "application/x.dash.dpp.identifier",
      "refersTo": { "type": "deletableDocument", "documentType": "post" },
      "position": 1
    }
  },
  "required": ["$createdAt", "text"],
  "additionalProperties": false
}
  • Document type keywords sit at the top of the schema (documentsMutable, canBeDeleted, indices, required). They say what may happen to a document of the type and who may do it.
  • Index keywords sit inside an entry of indices (name, properties).
  • Property keywords sit inside a property's schema (type, maxLength, maxBytes, position, refersTo). Most are ordinary JSON Schema; the rest are Platform's own.

The contract around the document types has keys of its own, and a config object: see Contract-Level Keys and config.

Reading the chapters

Each chapter opens with a short table for each keyword:

  • Since is the first protocol version at which the keyword can be used.
  • On update is what a contract update may do with the keyword on a document type that already exists. Fixed means adding, removing and changing it are all refused. A document type the update adds may use any keyword, as a new contract may.
  • Errors are consensus errors, written ErrorName (code). See Error Codes for the code ranges.

A contract update that breaks an update rule is refused with one of two errors, depending on which check catches it. DocumentTypeUpdateError (40212) comes from the comparison of the parsed document types, which judges flags such as documentsMutable by their meaning. IncompatibleDocumentTypeSchemaError (10246) comes from the comparison of the two JSON schemas, which judges property keywords such as refersTo or maxLength by their text. Top-level required and indices have errors of their own (10276 and 10217). Because the schema comparison reads text, an edit that changes how a keyword is written but not what it means, such as writing out a default or switching to the documentsAverageable shorthand, is refused with 10246.

Protocol versions

The document meta-schema has changed three times:

Meta-schemaProtocol versionsWhat it added
v01 to 11The original keywords. A document type key the meta-schema did not know was ignored.
v112Unknown document type keys are refused. The count, sum and average keywords.
v213keepsTransferHistory, keepsPurchaseHistory, keepsPricingHistory.
v314References, typed arrays, requiredSince, immutable, ttl, propertyConstraints, actionFees, moderation deletion, ranked, time-range and integer-range indexes, index-only types, and the rest marked 14 in these chapters.

Most keywords of v0 took effect at protocol version 1. The exceptions are tokenCost (9) and the index keyword countable (12).

The complete language

Every key a contract can write, grouped by where it goes. Since is the protocol version from which the key works. Read more links to the key's section in this part and, where there is one, to the chapter with the internals. A dotted name such as tokenCost.<action>.amount is a key written inside the ones before it.

The contract

KeyTakesWhat it doesSinceRead more
$formatVersion"0" or "1"The contract's serialization format. "1", the default from 9, carries groups, tokens, keywords, description and the timestamps.1Contract keys
ididentifierThe contract's id: a hash of ownerId and the identity nonce of the create transition.1Contract keys
ownerIdidentifierThe identity that registers the contract, and the only one that may update it.1Contract keys
versioninteger1 at creation; every update raises it by exactly one.1Contract keys
configobjectContract-wide settings, below.1config
documentSchemasobject of document typesThe document types by name, each written with the document type keys.1documentSchemas
schemaDefsobjectDefinitions any property may point at with $ref.1Document Shape
groupsobjectSets of identities, each member with a voting power, whose approval some token actions need.9Data Contracts
tokensobjectThe contract's tokens, by position. Their configuration is not covered in this part.9Data Contracts · Creating a Basic Token
keywordsup to 50 strings of 3 to 50 bytesSearch keywords, for the keyword search contract.9keywords and description
descriptionstring of 3 to 100 bytesA short description, for the keyword search contract.9keywords and description
createdAt, updatedAt, createdAtBlockHeight, updatedAtBlockHeight, createdAtEpoch, updatedAtEpochnumbersWhen the contract was created and last updated. Set by the platform, never written.9Contract keys
contractGroup{ "admins", "name", "description" }On the create transition, beside the contract: registers a contract group, a set of contracts the signer owns, with up to 16 admins, a name of 1 to 64 characters and a description of 1 to 256.14Contract Groups
contractGroupMembershipsup to 16 { "contractGroupId", "member" }On the create transition: enrols the new contract ("contract"), one of its document types ({ "documentType": ... }) or one of its tokens ({ "token": ... }) in contract groups.14Contract Groups

config

KeyTakesWhat it doesSinceRead more
canBeDeletedboolean, default falseWhether the contract may ever be deleted. No transition deletes a contract today.1canBeDeleted
readonlyboolean, default falsetrue: the contract can never be updated.1readonly
keepsHistoryboolean, default falseDrive keeps every version of the contract.1keepsHistory
documentsKeepHistoryContractDefaultboolean, default falsedocumentsKeepHistory for a document type that does not say.1Document type defaults
documentsMutableContractDefaultboolean, default truedocumentsMutable for a document type that does not say.1Document type defaults
documentsCanBeDeletedContractDefaultboolean, default truecanBeDeleted for a document type that does not say.1Document type defaults
requiresIdentityEncryptionBoundedKey, requiresIdentityDecryptionBoundedKey0 unique, 1 multiple, 2 multiple with a pointer to the latestLets identities bind encryption or decryption keys to the whole contract, and says how they are kept.1Bounded key requirements · Contract Bounds
sizedIntegerTypesboolean, default trueStores each integer in the smallest width its bounds allow, instead of 8 bytes.9sizedIntegerTypes
moderationobjectMakes the contract moderated: which lists it keeps and who moderates.14moderation · Contract Moderation
moderation.banlist, .suspensions, .warningsboolean, default falseKeeps a banlist, a suspension list, a warning list. A banned or suspended identity cannot act on the contract's documents; a warning bars nothing.14The Model
moderation.moderators{ "$type": ... }Who moderates: "contractOwner", "appointedModerators" with identities (1 to 16), or "elected" with the keys below.14moderation
moderators.seatContestableboolean, required when electedWhether a seated team may later be challenged.14Elected Moderation
moderators.challengeCoolDownseconds, two weeks to three yearsHow long a seated team is safe from a challenge after a seat change. Required when the seat is contestable, refused when it is not.14Elected Moderation
moderators.moderatedDocumentTypesobject: document type → abilitiesThe document types the team moderates, each with its abilities: ban, suspend, warn, deleteDocuments.14Elected Moderation
moderators.interim{ "$type": ... }Who moderates until a team is seated: "contractOwner", "appointedModerators", "notYetUsable" (the moderated types cannot be used yet) or "noModeration".14Elected Moderation
moderators.joinWindow, .voteWindowsecondsHow long applicants may join an election, and how long masternodes then vote.14Elected Moderation
moderators.electionDelaysecondsHow long after the contract's creation the first election may be called.14Elected Moderation
moderators.maxAddedModerators0 to 15, default 0How many members the seated leader may add after the election.14Elected Moderation
moderators.ownerProtectedboolean, default falseProtects the contract owner from the seated team.14Elected Moderation

Document type

KeyTakesWhat it doesSinceRead more
type"object"Required. A document is an object.1type
propertiesobject of 1 to 100 propertiesThe document's properties, each written with the property keys.1properties
requiredarray of namesThe properties every document holds. A system time or height listed here is recorded.1required
additionalPropertiesfalseRequired: a document holds only the declared properties.1additionalProperties
minProperties, maxPropertiesintegerHow many properties a document holds.1minProperties and maxProperties
dependentRequiredobjectA property that requires others when present.1dependentRequired
$comment, descriptionstringNotes; consensus ignores them.1$comment and description
$schema, $defsadded by the platformThe meta-schema URL and the contract's schemaDefs. A document type writing either is refused.1$schema and $defs
transientarray of top-level namesProperties validated on the transition but never stored.1transient · internals
documentsMutableboolean, default truefalse: documents cannot be replaced.1documentsMutable
immutablearray of top-level namesProperties frozen at creation on a mutable type.14immutable · internals
immutableAllowSettingarray of names from immutableImmutable properties a replace may still set once, while they have no value.14immutableAllowSetting
canBeDeletedboolean, default truefalse: a document's owner cannot delete it.1canBeDeleted
moderatorAbilitiesobject: delete, deleteWithin (seconds), deleteKeepsRecord, deleteRefundsOwner, changeFields (array of top-level names)What the contract's moderators may do to documents of the type: delete them, within a window after their last change, with or without a removal record and a refund to the owner, and write the fields only they write.14Moderator Abilities · delete · internals
ttlseconds, 3600 to 31536000The platform deletes each document this long after its creation.14Time To Live · internals
creationRestrictionMode0 anyone, 1 contract owner, 2 nobodyWho may create documents.1creationRestrictionMode
transferable0 never, 1 alwaysWhether an owner may give a document to another identity.1transferable
tradeMode0 none, 1 direct purchaseWhether an owner may set a price and anyone buy at it.1tradeMode
documentsKeepHistoryboolean, default falseDrive keeps every revision of every document.1documentsKeepHistory
keepsTransferHistory, keepsPurchaseHistory, keepsPricingHistoryboolean, default falseRecords every transfer, purchase or price update in the document history contract.13History
signatureSecurityLevelRequirement1 critical, 2 high (default), 3 mediumThe weakest key level that may sign a transition on the type.1signatureSecurityLevelRequirement · Security Level
requiresIdentityEncryptionBoundedKey, requiresIdentityDecryptionBoundedKey0 unique, 1 multiple, 2 multiple with a pointer to the latestLets identities bind encryption or decryption keys to the type, and says how they are kept.1Signing and Keys · Contract Bounds
ownerRefersToa refersTo declarationA reference the writer must meet, on types whose documents are never transferred or traded.14ownerRefersTo · internals
creatorRefersToa refersTo declarationA reference the creator must meet, on types whose documents can be transferred or traded.14creatorRefersTo
propertyConstraintsobject of named rules, at most 16Rules over several properties every created or replaced document meets. See the operators.14propertyConstraints · internals
tokenCostobject keyed by actionToken payments for actions on documents. See the keys.9Token Costs · Fees
actionFeesobject keyed by actionCredit fees for actions on documents, paid to the owner's and moderators' pots. See the keys.14Action Fees · Fees
indicesarray of 1 to 10 indexesThe indexes documents are queried by, each written with the index keys.1Indexes · internals
documentsCountablebooleanKeeps a count of the type's documents.12documentsCountable · internals
documentsSummableproperty nameKeeps the sum of one integer property over the type's documents.12documentsSummable · internals
documentsAverageableproperty nameShorthand for documentsCountable plus documentsSummable.12documentsAverageable
rangeCountable, rangeSummable, rangeAverageablebooleanProvable counts, sums or averages over ranges of document ids.12Document type range keys
indexOnlybooleanDocuments are never stored whole: the index entries are the rows.14indexOnly · internals
entryPayloadarray of 1 to 16 namesOn an index-only type, properties carried in each entry's value instead of a key.14entryPayload

Property

KeyTakesWhat it doesSinceRead more
typestring, integer, number, boolean, object, arrayThe kind of value. An array is a byte array or a typed array.1type
positionintegerThe property's place in the stored document. Required; top-level positions run 0, 1, 2 with no gap.1position · Document Serialization
minLength, maxLengthintegerA string's length in characters.1Strings
patternregular expressionA string must match it. Needs maxLength of at most 50000.1Strings
formatdate-time, date, time, email, idn-email, hostname, ipv4, ipv6, uri, regexA string must have this format. Needs maxLength of at most 50000.1Strings
maxBytes1 to 65535The most UTF-8 bytes a string may take.14maxBytes · internals
minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOfnumberNumeric bounds. minimum and maximum also decide an integer's stored width.1Numbers
enum, constvaluesThe values allowed, or the one value allowed.1enum and const
byteArraytrueMakes an array a string of bytes, stored raw.1Byte arrays and identifiers
contentMediaType"application/x.dash.dpp.identifier"Makes a 32-byte array an identifier.1Byte arrays and identifiers
minItems, maxItems, uniqueItems, containsinteger, boolean, schemaA byte array's length in bytes, or a typed array's number of elements (at most 1024); no repeats; an element that matches.1Arrays
itemsan element schemaMakes an array a typed array whose elements all follow this schema.14Typed Arrays · internals
properties, required, additionalProperties, minProperties, maxProperties, dependentRequiredas on a document typeA nested object's members and its bounds.1Objects
$ref"#/$defs/<name>"Uses a definition from the contract's schemaDefs.1$ref
$id, $comment, description, examplesannotationsNotes; consensus ignores them.1Annotations
requiredSincecontract versionLets an update add a required property that older documents may leave out.14requiredSince · internals
distinctFroma property path or "$ownerId"An identifier must differ from another identifier of the document, or from the owner.14distinctFrom · internals
encryptedFor{ "recipient", "recipientKey", "senderKey", "scheme" }Declares how an encrypted byte array was made: whose keys, which scheme.14encryptedFor · internals
encryptedFor.recipientidentifier property path or "$ownerId"The identity the value is encrypted to.14encryptedFor
encryptedFor.recipientKey, .senderKeyinteger property pathsThe properties holding the recipient's and the sender's key ids.14encryptedFor
encryptedFor.scheme"ecdh-secp256k1-aes256-cbc"How the ciphertext is made.14The scheme
generatedFrom{ "function", "params" }The platform generates the string from other properties of the document; on arrival when a document leaves it out.14generatedFrom · internals
generatedFrom.function"sys.stringTransformations.homographSafeASCII"The system function that generates the value: sys.stringTransformations. lowercase, uppercase, capitalize, camelCase, snakeCase or homographSafeASCII.14Functions
generatedFrom.paramsproperty pathsThe properties the function reads, in order.14Params
refersToa declarationWhat an identifier points at, checked when a document is written. See the keys.14References · internals

A typed array's element (items) takes type, enum, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, minLength, maxLength, pattern, format, minItems and maxItems (bytes of a byte array element), byteArray, contentMediaType, maxBytes, distinctFrom, refersTo, $comment and description. It takes no position, const, uniqueItems or examples.

refersTo

KeyTakesWhat it doesSinceRead more
typea target belowWhat the value points at.14Targets
type: "identity"The value is the id of an existing identity.14identity
type: "contract"The value is the id of an existing data contract.14contract
type: "token"The value is the id of an existing token.14token
type: "permanentDocument"The value is the id of a document whose type can never lose its documents.14permanentDocument
type: "deletableDocument"The value is the id of a document that can be deleted; checked again on every replace.14deletableDocument
type: "identityPublicKey"The value names an identity key that exists and is not disabled.14identityPublicKey
type: "listElement"The value is one of the identifiers a list on another document holds.14List Elements · internals
documentTypedocument type nameThe referenced document type.14documentType
contractIdidentifierThe contract holding documentType, when it is not this one.14contractId
propertyAgreement1 to 10 pairs { "<here>": "<there>" }Properties of the two documents that must be equal. $ownerId here makes a write gate.14propertyAgreement
propertyAgreement.<there>{ "function": "sys.hash.sha256d", "params" }A function pair, keyed by the referenced property: that property holds the hash of params (paths, { "const": text }, "." for a value without a path) and fills that key of the lookup, finding a commitment made earlier. At most one.14Commit and reveal · internals
lookup{ "index", "keys" }Finds the document through a unique index, with the value as one part of the key.14Lookups · internals
lookup.indexindex nameA unique index of documentType.14Lookups
lookup.keysindex property → ".", "$ownerId" or a pathWhere each part of the key comes from; "." is the value itself. Left out for the property a propertyAgreement function fills.14Lookups
minimumAgeBlocks1 to 4294967295Beside a lookup with a propertyAgreement function: the commitment was created at least this many blocks before the create.14Commit and reveal
consumetrueBeside a lookup with a propertyAgreement function, on a deletableDocument: the create deletes the writer's commitment.14Commit and reveal
inListtyped array pathThe list on the referenced document the value must be in.14List Elements
keyIdPropertyinteger property pathOn an identity property: the property holding the key id.14keyIdProperty and identityProperty
identityProperty"$ownerId", "$creatorId" or a pathOn a key id property: whose key it is.14keyIdProperty and identityProperty
keyRequirements.purposeauthentication, encryption, decryption, transfer, voting, ownerThe key's purpose.14keyRequirements
keyRequirements.boundTodocument type nameThe key must be bound to that document type of this contract.14keyRequirements
contractRequirements.moderation"elected", "electionOpen"The contract declares an elected team, or one whose election may be called.14contractRequirements · Elected Moderation
contractRequirements.minimumAgeSeconds, .minimumSecondsSinceUpdatesecondsThe contract was created, or last changed, at least this long ago.14contractRequirements
contractRequirements.owner"self", "other"The contract is owned by the writer, or by someone else.14contractRequirements
contractRequirements.readonly, .keepsHistorytrueThe contract can never be updated, or keeps history.14contractRequirements
contractRequirements.ownerProtectedbooleanThe contract's elected team does, or does not, protect its owner.14contractRequirements
anyOf, allOf2 to 4 operandsIn place of type: at least one, or every, operand holds. Nest at most 4 deep.14Expressions · internals

tokenCost and actionFees

<action> is one of create, replace, delete, transfer, update_price and purchase.

KeyTakesWhat it doesSinceRead more
tokenCost.<action>.tokenPosition0 to 65535, requiredWhich token is charged.9Token Costs
tokenCost.<action>.amountat least 1, requiredHow many tokens the action costs.9Token Costs
tokenCost.<action>.contractIdidentifierThe contract whose token is charged, when it is not this one.9contractId
tokenCost.<action>.effect0 to the contract owner (default), 1 burnWhat happens to the tokens paid.9effect
tokenCost.<action>.gasFeesPaidBy0 document owner (default), 1 contract owner, 2 prefer contract ownerWho the contract owner offers to have pay the gas. Accepted from 9, acted on from 14.14gasFeesPaidBy · Fees
tokenCost.<action>.optionalboolean, default falseA transition may skip the token and pay in credits.14Optional costs · Fees
actionFees.pricing"feeMultiplier" (default), "fixed"Whether the amounts scale with the epoch's fee multiplier.14Action Fees
actionFees.<action>.ownercreditsPaid into the contract owner's pot.14The pots and the claim
actionFees.<action>.moderatorscreditsPaid into the moderators' pot. Needs moderation.14The pots and the claim · Fee Pots

propertyConstraints

A rule is one condition. Conditions:

KeyTakesHolds whenSinceRead more
equal, notEqual[a, b]The two sides are equal, or differ: integer expressions, strings or identifiers.14Conditions
lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual[a, b]The integer comparison holds.14Conditions
in[a, [values]]a takes one of two or more listed integers, strings or identifiers.14Conditions
present, absenta pathThe document holds the property, or leaves it out (or null, or an object with no member present).14Conditions
anyOf, allOftwo or more conditionsAt least one, or every, condition holds, checked in order.14Evaluation order
nota conditionThe condition does not hold.14Conditions
ifThen, ifThenElse[if, then], [if, then, else]The second condition holds when the first does (and, for ifThenElse, the third when it does not); only the branch taken is evaluated.14Conditions
notIn[a, [values]]a takes none of the listed values.14Conditions
startsWith, endsWith[text, affix]A string starts or ends with another, byte for byte.14Conditions
contains[array, value]A typed array holds an element equal to the value.14Conditions

Expressions:

KeyTakesValueSinceRead more
an integer100Itself.14Expressions
a path"price", "meta.total"An integer or boolean property's value; 0 when left out.14Expressions
add, multiplytwo or more operandsThe sum or product.14Arithmetic
subtract, divide, modulo, power[a, b]The difference, Euclidean quotient or remainder, or power.14Arithmetic
min, max, abstwo or more operands, or one for absThe least, the greatest, or the absolute value.14Expressions
countOf, sumOf[type, filter?], [type, property, filter?]How many documents of a type of the contract match the filter, or the total of an integer property over them, from its count or sum trees.14Totals of other documents
ifAbsent[path, default]The property's value, or the default when left out (an integer, or a string for a string property).14Expressions
length, byteLengtha string pathA string's length in characters, or in UTF-8 bytes.14Expressions
countan array pathThe elements of a typed array, or the bytes of a byte array.14Expressions
$createdAt, $updatedAt, $transferredAt, $createdAtBlockHeight, $updatedAtBlockHeight, $transferredAtBlockHeight, $createdAtCoreBlockHeight, $updatedAtCoreBlockHeight, $transferredAtCoreBlockHeighta pathA time or height the document records, when listed in required.14Times and heights
consta stringA string constant, or a base58 identifier, as one side of equal or notEqual.14Strings
$ownerIdThe document's owner, as an identifier side.14Identifiers and $ownerId

Index

KeyTakesWhat it doesSinceRead more
name1 to 32 characters, requiredThe index's name, unique in the type.1name
properties1 to 10 { "<path>": "asc" }The indexed properties, in order. A flat index of an index-only type leaves it out.1properties · internals
uniquebooleanNo two documents share the indexed values.1unique
nullSearchableboolean, default truefalse leaves out documents whose indexed values are all null.1nullSearchable
contestedobjectMatching values are decided by a masternode vote, not first come.1Contested Indexes · internals
contested.resolution0 vote with lock, 1 vote without lockHow the contest is decided. 1 from 14.1The keys
contested.fieldMatches[{ "field", "regexPattern" }]Which values are contested.1The keys
contested.descriptionstringA note; consensus ignores it.1The keys
countable"notCountable", "countable", "countableAllowingOffset" or booleanKeeps a document count per indexed value.12countable · internals
summableproperty nameKeeps the sum of an integer property per indexed value.12summable · internals
averageableproperty nameShorthand for countable plus summable.12averageable
rangeCountable, rangeSummable, rangeAverageablebooleanProvable counts, sums or averages over ranges of the indexed value.12Index range keys
rankedCountableboolean or { "at": ... }Orders the indexed values by document count, for "top K" queries; at names the levels ranked.14rankedCountable · internals
rankedSummable, rankedAverageablebooleanOrders them by sum, or by average.14Ranked Indexes
timeRange{ "on", "range", "step", "phase", "ttl" }Buckets a system timestamp into time windows, for trending queries.14Time-Range Indexes · internals
timeRange.on"$createdAt", "$updatedAt", "$transferredAt"The timestamp to bucket: the index's first property.14The keys
timeRange.range, .stepsecondsEach window's length, and the time between window starts.14The keys
timeRange.phaseseconds, default 0Shifts the window boundaries.14The keys
timeRange.ttlseconds, at most one weekExpires the index's entries after their window; on an index-only type, the rows leave this index.14The keys · internals
integerRange{ "on", "range", "step", "phase" }Buckets an integer property into value windows, for counts and rankings per band.14Integer-Range Indexes
integerRange.onproperty nameThe integer property to bucket: the index's first property, required.14The keys
integerRange.range, .step, .phaseintegers, phase default 0Each window's length, the distance between window starts, and the shift of the window boundaries.14The keys
terminalproperty name or listOn an index-only type, what keys each entry in place of the document id.14terminal
preallocatedbooleanOn an index-only type, creates the index's trees with the referenced document.14preallocated · internals
skipIfAbsenttrue or property namesA document missing a property of the skip set writes no entry into the index.14skipIfAbsent · internals

System properties

PropertyHoldsRecordedSinceRead more
$idThe document's id.always1$id
$ownerIdThe identity that owns the document.always1$ownerId
$revision1 at creation, raised by every replace, transfer, price update and purchase.on types whose documents can change hands or content1$revision
$createdAt, $updatedAt, $transferredAtBlock times, in milliseconds, of the creation, the last replace or price update, and the last transfer or purchase.when listed in required1Timestamps
$createdAtBlockHeight, $updatedAtBlockHeight, $transferredAtBlockHeightPlatform block heights of the same events.when listed in required1Block heights
$createdAtCoreBlockHeight, $updatedAtCoreBlockHeight, $transferredAtCoreBlockHeightCore chain block heights of the same events.when listed in required1Block heights
$creatorIdThe identity that created the document.on transferable or tradeable types of format-1 contracts10$creatorId
$moderatedAt, $moderatedByBlock time and moderator of the last write of the fields only moderators write.on types listing moderatorAbilities.changeFields, once a moderator writes them14$moderatedAt and $moderatedBy

Limits

The first three limits come from the meta-schema, the rest from protocol version 14's SystemLimits. A contract over a limit is refused at registration.

LimitValueApplies to
Properties per object100properties, at the top and in each nested object
Indexes per document type10indices
Properties per index10an index's properties
max_field_value_size5120 bytesany one value a document stores (DocumentFieldMaxSizeExceededError, 10417)
max_typed_array_items1024a typed array's maxItems
max_references_per_document256references one document carries
max_reference_operands4operands in one anyOf or allOf of a reference
max_reference_expression_depth4nesting of reference expressions
max_property_constraints16rules in one propertyConstraints
max_property_constraint_nodes32nodes in one rule
min_document_ttl_seconds, max_document_ttl_seconds3600, 31536000ttl
max_time_range_ttl_seconds604800a timeRange index's ttl