Truvera Documentation portal
WebsiteTruvera Workspace
  • Truvera overview
    • Decentralized identity explained
    • Roadmap
    • Subscription plans & billing
  • Solutions
    • Biometric-Bound Credentials
  • Truvera Workspace
    • Create an organization profile (DID)
    • Issue verifiable credentials
      • Filtering, downloading and deleting credentials
    • Verify credentials
    • Create a schema
    • Create a design
    • Team management
      • Inviting a team member
      • Removing a team member
      • Changing team member roles
      • Data retention policies
      • Sub-accounts
    • Revoking credentials
    • Ecosystem Tools
      • Ecosystem set up
      • Ecosystem example
    • Monetizing credentials
      • Setting up monetizable credentials
    • Creating API keys and webhook endpoints
    • Transaction history
    • Custom branded distribution emails
    • Truvera Workspace release notes
      • 2025 Release notes
        • Release notes Q1 2025
      • 2024 Release notes
        • Release Notes February 2024
        • Release Notes March 2024
        • Release Notes April 2024
        • Release Notes May 2024
        • Release Notes June 2024
        • Release Notes July 2024
        • Release Notes August 2024
        • Release Notes September 2024
        • Release Notes October 2024
        • Release notes November 2024
        • Release notes December 2024
  • Truvera API
    • Getting started
    • Webhooks
      • Webhooks API endpoints
    • Sample Postman collections
      • Issue-Store-Verify sample flow
      • Create ecosystems
      • Issue monetizable credentials
      • Create sub-accounts
      • Issue OpenID credentials
    • Truvera Swagger UI
    • DIDs
    • Profiles
    • Credentials
    • Presentations
      • Proof templates
      • Proof requests
      • Other proof endpoints
    • Registries
    • Revocation Status
    • Credential Schemas
    • Jobs
    • Templates
    • Sub-accounts
    • Teams
    • Messaging
    • OpenID
      • OpenID Issuance and Verification Integration Guide
    • iden3comm
    • Ecosystem Tools
      • Trust Registry Integration Guide
      • Creating a Trust Registry
      • Inviting participants
      • Verifiers and Public info
      • Trust Registry Schemas
      • Trust Registry Proof Templates
      • Reports
      • Updating and Deleting Trust Registry
    • Issuing paid credentials (KVAC algorithm integration)
    • Data
    • Verify
    • Keys
    • Schemas
  • System architecture
    • Proposed architecture with Truvera
    • Revocation
    • System scalability
    • Security policies
    • How data is processed and stored
  • Supported standards
    • Interoperability with OpenID
  • Credential wallet
    • Create and manage DIDs in the Truvera Wallet
    • White label wallet
      • Configuration
        • Enabling and Disabling Features
        • Customizing the Styling
        • Configuring for Android Builds
        • Configuring iOS Builds
      • Publishing in App Stores
        • Android Build Testing and Publishing
        • iOS Build Testing and Publishing
    • Wallet SDK
      • Getting started
        • Example Credential
        • Presentation definition
        • Verify credentials
      • Cloud wallet
      • Biometric plugin
      • Ecosystem Tools
    • Download Truvera Wallet
    • Truvera Wallet release notes
      • Release Notes 2025Q1
      • Release Notes 2024Q4
      • Release Notes 2024Q3
        • Release Notes September 2024
        • Release Notes August 2024
        • Release Notes July 2024
      • Release Notes June 2024
      • Release Notes May 2024
      • Release Notes April 2024
  • Open source community
    • Code of Conduct
    • Truvera Credential SDK
    • Blockchain archives
      • DOCK token
        • Migration terms and conditions
  • Support
    • System Status
    • Discord
    • Support services
    • Security policy
Powered by GitBook
On this page
  • Error
  • Hex32
  • Properties
  • JobStartedResult
  • Properties
  • JobId
  • JobStatus
  • JobDesc
  • Properties
  • DIDDock
  • Properties
  • KeyType
  • Enumerated Values
  • SigType
  • Enumerated Values
  • ProofPurpose
  • Enumerated Values
  • Context
  • DIDDoc
  • Properties
  • Credential
  • Properties
  • VerifiablePresentation
  • Properties
  • Child Properties of Proof
  • VerifiableCredential
  • Properties
  • Child Properties of Proof
  • Registry
  • Properties
  • VerificationResponse
  • Response
  • Message

Was this helpful?

Edit on GitHub
  1. Truvera API

Schemas

PreviousKeysNextSystem architecture

Last updated 7 months ago

Was this helpful?

Data Schemas are useful when enforcing a specific structure on a collection of data like a Verifiable Credential. Other than that, Data Verification schema and Data Encoding Schemas are used to verify and map the structure and contents of a Verifiable Credential.

These are the schemas used in all API operations mentioned before, such as Error, Credential, Jobs, Anchor, Registry, and so on.

For a detailed example of the schema workflow. Please refer .

Error

This is a schema for an API Error.

Properties

Name
Type
Required
Description

status

integer

false

Status of the error.

type

string

false

Type of the error.

message

string

false

Message of the error.

Object Schemas
{
  "status": 0,
  "type": "string",
  "message": "string"
}

Hex32

32 byte hex string. Ignoring higher base (base64) for simplicity.

Properties

Name
Type
Required
Description

Hex32

string

false

32 byte hex string. Ignoring higher base (base64) for simplicity.

"string"

JobStartedResult

Object containing unique id of the background task and associated data. This id can be used to query the job status.

Properties

Name
Type
Description

id

Unique id of the background task. This id can be used to query the job status.

data

object

Data of the object.

{
  "id": "string",
  "data": {
    "did": "did:dock:xyz",
    "hexDid": "0x00",
  }
}

JobId

Unique id of the background task. This id can be used to query the job status

"string"

JobStatus

This is a schema used in Job operation to get a status of the job.

Enumerated Values

Property
Value
Description

JobStatus

todo or finalized or in_progress or error.

Job Status variants.

"in_progress"

JobDesc

This is a schema used in Job operation to get description of the job including the result if it is available.

Properties

Name
Type
Description

id

Unique id of the background task. This id can be used to query the job status.

status

Status of the job.

result

object

false

{
  "id": "string",
  "result": {},
  "status": "todo",

}

DIDDock

DID as fully qualified, e.g., did:dock:.

Properties

Name
Type
Required
Description

DID

string

false

DID as fully qualified, e.g., did:dock:. You cannot specify your own DID, the DID value will be randomly generated.

"did:dock:xyz"

KeyType

This is a schema type of public key for DID.

Enumerated Values

Property
Value
Description

KeyType

sr25519 or ed25519 or secp256k1

keyType DID variants.

"sr25519"

SigType

This is a schema used in Presentation operation that represents a type of signature.

Enumerated Values

Property
Value
Description

SigType

Sr25519Signature2020 or Ed25519Signature2018 or EcdsaSecp256k1Signature2019

SigType signature variants.

"Sr25519Signature2020"

ProofPurpose

This is a schema that represents a purpose of credential.

Enumerated Values

Property
Value
Description

ProofPurpose

assertionMethod or authentication

Purpose of credential.

"assertionMethod"

Context

This is a schema that represents a JSON-LD context used in DID and Presentation.

[
  "string"
]

DIDDoc

This is a schema that represents a DID document. The current set of properties is incomplete

Properties

Name
Type
Required
Description

@context

false

JSON-LD context.

id

false

DID as fully qualified, e.g., did:dock:.

authentication

array

false

DID authentication.

OBJECT SCHEMAS
{
  "@context": [
    "string"
  ],
  "id": "did:dock:xyz",
  "authentication": [
    {}
  ]
}

Credential

This is a schema that represents a credential format expected by API caller when issuing a credential.

Properties

Name
Type
Required
Description

id

string(uri)

false

Credential ID. The default value is a creds.dock.io uri with random ID.

context

[string or object]

false

Credential context array of string URIs and/or embedded JSON-LD context objects. If no context parameter is supplied, we will auto generate contexts for you. If you do supply this parameter, you must ensure that all JSON-LD terms are defined. This is for advanced users.

type

[string]

false

Credential type. The default value is ['VerifiableCredential']

subject

object or [object]

true

Credential subject or subjects array.

schema

string

false

Schema ID returned by create schema route or a valid URI

issuer

false

Credential issuer. DID as fully qualified, e.g., did:dock:. If not supplied the credential will not be signed.

issuanceDate

string(date-time[RFC3339])

false

The date and time in GMT that the credential was issued specified in RFC 3339 format. The issuanceDate will be automatically set if not provided.

expirationDate

string(date-time[RFC3339])

false

The date and time in GMT that the credential expired is specified in RFC 3339 format. The default value of the expirationDate will be empty if the user does not provide it.

status

object or string

false

Revocation registry id or user supplied status object containg a Dock revocation registry identifier.

OBJECT SCHEMAS
{
  "context": [
    "string"
  ],
  "type": [
    "string"
  ],
  "subject": {},
  "issuer": "did:dock:xyz",
  "issuanceDate": "2019-08-24T14:15:22Z",
  "expirationDate": "2019-08-24T14:15:22Z",
  "status": "90b7dc6e8642bf1425c5a5ef2c3ff62bb689770843fdc0e2d79b97beb6c73311"
}

VerifiablePresentation

This is a schema that represents a Verifiable (signed) Presentation returned by API. The current set of properties is almost complete

Properties

Name
Type
Required
Description

@context

true

JSON-LD context.

id

string(uri)

true

Verifiable (signed) presentation id.

type

string

true

Verifiable (signed) presentation type.

verifiableCredential

true

Verifiable (signed) Credential returned by API. The current set of properties is almost complete.

proof

object

true

Proof of credential.

Child Properties of Proof

Name
Type
Required
Description

type

true

Type of signature.

proofPurpose

true

Purpose of credential.

verificationMethod

string

true

Verification method.

created

string(date-time[RFC3339])

true

The date and time in GMT that the credential was created specified in RFC 3339 format.

proofValue

string

true

none

OBJECT SCHEMAS
{
  "@context": [
    "string"
  ],
  "id": "http://example.com",
  "type": [
    "string"
  ],
  "verifiableCredential": {
    "@context": [
      "string"
    ],
    "id": "https://creds.dock.io/f087cbfabc90f8b996971ba47598e82b1a03523cb9460217ad58a819cd9c09eb",
    "type": [
      "string"
    ],
    "credentialSubject": {},
    "issuer": "did:dock:xyz",
    "issuanceDate": "2019-08-24T14:15:22Z",
    "expirationDate": "2019-08-24T14:15:22Z",
    "credentialStatus": {},
    "proof": {
      "type": "Sr25519Signature2020",
      "proofPurpose": "assertionMethod",
      "verificationMethod": "string",
      "created": "2019-08-24T14:15:22Z",
      "proofValue": "string"
    }
  },
  "proof": {
    "type": "Sr25519Signature2020",
    "proofPurpose": "assertionMethod",
    "verificationMethod": "string",
    "created": "2019-08-24T14:15:22Z",
    "proofValue": "string"
  }
}

VerifiableCredential

This is a schema that represents a verifiable (signed) Credential returned by API. The current set of properties is almost complete.

Properties

Name
Type
Required
Description

@context

false

JSON-LD context.

id

string(uri)

false

Credential id.

type

[string]

false

Credential type.

credentialSubject

any

false

Credential subject.

issuer

false

Credential issuer or DID as fully qualified, e.g., did:dock:.

issuanceDate

string(date-time[RFC3339])

false

The date and time in GMT that the credential was issued specified in RFC 3339 format. The issuanceDate will be automatically set if not provided.

expirationDate

string(date-time[RFC3339])

false

The date and time in GMT that the credential expired is specified in RFC 3339 format. The default value of the expirationDate will be empty if the user does not provide it.

credentialStatus

any

false

Revocation registry id or user supplied status object.

proof

object

false

Proof of credential.

Child Properties of Proof

Name
Type
Required
Description

type

false

Type of signature.

proofPurpose

false

Purpose of credential.

verificationMethod

string

false

Verification method.

created

string(date-time[RFC3339])

false

The date and time in GMT that the credential was created specified in RFC 3339 format.

proofValue

string

false

Value of credential.

OBJECT SCHEMAS
{
  "@context": [
    "string"
  ],
  "id": "https://creds.dock.io/f087cbfabc90f8b996971ba47598e82b1a03523cb9460217ad58a819cd9c09eb",
  "type": [
    "string"
  ],
  "credentialSubject": {},
  "issuer": "did:dock:xyz",
  "issuanceDate": "2019-08-24T14:15:22Z",
  "expirationDate": "2019-08-24T14:15:22Z",
  "credentialStatus": {},
  "proof": {
    "type": "Sr25519Signature2020",
    "proofPurpose": "assertionMethod",
    "verificationMethod": "string",
    "created": "2019-08-24T14:15:22Z",
    "proofValue": "string"
  }
}

Registry

This is a schema that represents a Revocation registry used in Revocation or Unrevocation.

Properties

Name
Type
Required
Description

addOnly

boolean

false

If the addOnly value is true, they cannot unrevoke and delete the registry. The default value for this is false.

policy

false

Only one policy supported as of now called OneOf.

{
  "addOnly": true,
  "policy": [
    "did:dock:xyz"
  ]
}

VerificationResponse

This is a schema that is used to define whether a credential/presentation is verified or not

{
  "verified": true,
  "results": [...]
}

Response

This is a schema that represents a default response for a request made.

{
  "code": 0
}

Message

This is a schema that represents a message send request. If the message is signed or encrypted use the ciphertext field. The typ field must be a valid DIDComm message type.

{
  "to": ["did:example:bob"],
  "ciphertext": "eyJhsad...AQ",
  "typ":"application/didcomm..."
}

[]

here
JobId
JobId
JobStatus
Context
DIDDock
DIDDock
Context
VerifiableCredential
SigType
ProofPurpose
Context
DIDDock
SigType
ProofPurpose
DIDDock