Schemas
Last updated
Was this helpful?
Last updated
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 .
This is a schema for an API Error.
status
integer
false
Status of the error.
type
string
false
Type of the error.
message
string
false
Message of the error.
32 byte hex string. Ignoring higher base (base64) for simplicity.
Hex32
string
false
32 byte hex string. Ignoring higher base (base64) for simplicity.
Object containing unique id of the background task and associated data. This id can be used to query the job status.
id
Unique id of the background task. This id can be used to query the job status.
data
object
Data of the object.
Unique id of the background task. This id can be used to query the job status
This is a schema used in Job operation to get a status of the job.
JobStatus
todo or finalized or in_progress or error.
Job Status variants.
This is a schema used in Job operation to get description of the job including the result if it is available.
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
DID as fully qualified, e.g., did:dock:
.
DID
string
false
DID as fully qualified, e.g., did:dock:
. You cannot specify your own DID, the DID value will be randomly generated.
This is a schema type of public key for DID.
KeyType
sr25519 or ed25519 or secp256k1
keyType DID variants.
This is a schema used in Presentation operation that represents a type of signature.
SigType
Sr25519Signature2020 or Ed25519Signature2018 or EcdsaSecp256k1Signature2019
SigType signature variants.
This is a schema that represents a purpose of credential.
ProofPurpose
assertionMethod or authentication
Purpose of credential.
This is a schema that represents a JSON-LD context used in DID and Presentation.
This is a schema that represents a DID document. The current set of properties is incomplete
@context
false
JSON-LD context.
id
false
DID as fully qualified, e.g., did:dock:
.
authentication
array
false
DID authentication.
This is a schema that represents a credential format expected by API caller when issuing a credential.
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.
This is a schema that represents a Verifiable (signed) Presentation returned by API. The current set of properties is almost complete
@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.
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
This is a schema that represents a verifiable (signed) Credential returned by API. The current set of properties is almost complete.
@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.
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.
This is a schema that represents a Revocation registry used in Revocation or Unrevocation.
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
.
This is a schema that is used to define whether a credential/presentation is verified or not
This is a schema that represents a default response for a request made.
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.
[]