Skip to main content

Data Models

Pluto persists data in flat, storable Model interfaces. Each model has a uuid primary key and declares its schema via schemaFactory.

Fields marked 🔒 are encrypted at rest when using an encrypted store.


Credential​

Table: credentials | Schema version: 2

Represents a verifiable credential (JWT, SD-JWT, or AnonCreds).

FieldTypeRequiredDescription
uuidstring✅Primary key
recoveryIdstring✅Credential type identifier
dataJson 🔒string✅Serialised credential payload
idstring✅Credential identifier
issuerstringIssuer DID
subjectstringSubject DID
credentialCreatedstringCreation timestamp
credentialUpdatedstringLast update timestamp
credentialSchemastringSchema identifier
validUntilnumberExpiry (epoch ms)
revokedbooleanRevocation status
statusstringGeneral status

CredentialMetadata​

Table: credential-metadata | Schema version: 0

Metadata for credential schemas.

FieldTypeRequiredDescription
uuidstring✅Primary key
recoveryIdstring✅Recovery identifier
dataJson 🔒string✅Serialised metadata
namestring✅Lookup key

DID​

Table: dids | Schema version: 0

A Decentralized Identifier.

FieldTypeRequiredDescription
uuidstring✅Primary key (full DID string)
schemastring✅DID schema
methodstring✅DID method (prism, peer, etc.)
aliasstringHuman-readable name
statusstringDID status

Key​

Table: keys | Schema version: 0

A private key.

FieldTypeRequiredDescription
uuidstring✅Primary key
recoveryIdstring✅Key type identifier
rawHex 🔒string✅Hex-encoded raw key bytes
aliasstringHuman-readable name
indexnumberDerivation index

Message​

Table: messages | Schema version: 1

A DIDComm message.

FieldTypeRequiredDescription
uuidstring✅Primary key
dataJson 🔒string✅Full serialised message
idstring✅Protocol-level message id
piuristring✅Protocol message type URI
isReceivednumber✅Direction flag (0 = sent, 1 = received)
readboolean✅Read status
createdTimenumberCreation timestamp
thid 🔒stringThread identifier
fromstringSender DID
tostringRecipient DID

Table: didkey-link | Schema version: 0

Links a DID to a Key.

FieldTypeRequiredDescription
uuidstring✅Primary key
didIdstring✅UUID of the related DID
keyIdstring✅UUID of the related Key
aliasstringRelationship name

Table: did-link | Schema version: 0

Links two DIDs together with a role.

FieldTypeRequiredDescription
uuidstring✅Primary key
rolenumber✅Relationship type (see below)
hostIdstring✅UUID of the host DID
targetIdstring✅UUID of the target DID
aliasstringRelationship name

Role values:

ValueNameDescription
0unknownUnmapped
1pairDID pair
2mediatorMediator DID
3routingRouting DID

Settings​

Table: settings | Schema version: 0

Arbitrary key-value settings.

FieldTypeRequiredDescription
uuidstring✅Primary key
idstring✅Application-defined identifier
keystring✅Setting name
value 🔒string✅Setting payload

Issuance​

Table: issuance | Schema version: 0

Credential issuance records.

FieldTypeRequiredDescription
uuidstring✅Primary key
idstring✅Application-defined identifier
claims 🔒Claim[]✅Array of { name, value, type }
credentialFormatstring✅Format (e.g. jwt, anoncreds)
issuingDIDstring✅Issuer DID string
automaticIssuancebooleanAuto-issue flag