Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Claims and Entities

Claims

A claim is the atomic unit of data in Carry. Every claim is a triple:

(the: relation, of: entity, is: value)

For example:

- the: com.app.person/name
  of:  did:key:zAlice
  is:  Alice

This says: “the com.app.person/name of the entity did:key:zAlice is Alice.”

When you retract a claim, it is removed from the indexes and no longer appears in query results. Each claim records a Cause link to its predecessor for basic provenance. A full temporal index preserving complete assertion/retraction history is planned but not yet implemented.

Claim Components

ComponentWhat it isExample
theThe relation – identifies the kind of association. Composed of domain/name.com.app.person/name
ofThe entity this claim is about. Always a DID.did:key:zAlice
isThe value being associated. Can be a scalar or a reference to another entity.Alice

Entities

An entity is anything with an identity. In Carry, entities are identified by DIDs (Decentralized Identifiers) in did:key:z... format.

Entities are not defined explicitly – they come into existence when claims are asserted about them. An entity is simply the set of claims that reference it.

Entity Identity

When you create a new entity via carry assert, its DID is derived deterministically from its content:

  1. The field values are sorted and hashed with BLAKE3.
  2. The hash is used as an Ed25519 signing key seed.
  3. The public key is encoded as a did:key:z....

This means that asserting the same data twice produces the same entity DID. Identity is content-derived, not randomly assigned.

# Both produce the same entity DID because the content is identical:
carry assert com.app.person name=Alice age=28
carry assert com.app.person name=Alice age=28

Explicit Entity Targeting

You can target an existing entity with this=:

# Update Alice's age
carry assert com.app.person this=did:key:zAlice age=29

Named Entities (Bookmarks)

Entities can be given human-readable names using the @name syntax:

carry assert attribute @person-name \
  the=com.app.person/name as=Text cardinality=one

The @person-name asserts dialog.meta/name on the entity, creating a bookmark. You can then reference this entity by name in other commands:

carry assert concept @person with.name=person-name

Names are shared across the repository and travel with synced data.

Value Types

Claims support the following value types:

TypeDescriptionExample
TextUTF-8 string"Alice"
UnsignedIntegerNon-negative integer28
SignedIntegerSigned integer-5
FloatFloating-point number3.14
BooleanTrue or falsetrue
SymbolA namespaced symbolcarry.profile/work
EntityReference to another entity (a DID)did:key:zAlice
BytesRaw bytes(binary data)

When asserting values via the CLI, Carry auto-detects the type: DIDs are recognized as entity references, numbers as integers or floats, true/false as booleans, and everything else as strings.