SsiAPI

Top

DeleteDID()

Delete a DID document or all DID documents originating from a given Volt.

Requires 'volt:delete-did' API privilege.

Request: DeleteDIDRequest
Response: DeleteDIDResponse

GetDIDRegistryUpdates()

Get all updates to the DID registry since the specified timestamp.

Internal use only.

Request: GetDIDRegistryUpdatesRequest
Response: GetDIDRegistryUpdatesResponse

ImportCredential()

Request: ImportCredentialRequest
Response: ImportCredentialResponse

ParseCredential()

Parse a verifiable credential from a URL or a verifiable presentation.

Request: ParseCredentialRequest
Response: ParseCredentialResponse

ResolveDID()

Resolve a DID to a DID document.

Request: ResolveDIDRequest
Response: ResolveDIDResponse

RegisterDIDDocument()

Register a DID document.

This is currently reserved for use by the DID registry when synchronising with other registries.

To register a new DID document, use the VoltAPI Authenticate method.

Request: RegisterDIDDocumentRequest
Response: RegisterDIDDocumentResponse

SaveCredential()

Save a verifiable credential.

Request: SaveCredentialRequest
Response: SaveCredentialResponse

SearchDIDRegistry()

Search the DID registry.

Request: SearchDIDRegistryRequest
Response: SearchDIDRegistryResponse

DeleteDIDRequest

FieldTypeDescription
didstring

The id of the identity to delete.

origin_voltstring

Force delete of all DIDs owned by the specified Volt.

key_passphrasestring

Optional passphrase of the DID controller key. Required if the key is encrypted.

DeleteDIDResponse

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

GetDIDRegistryUpdatesRequest

FieldTypeDescription
since_iduint64

The id of the last update received.

All updates since this id will be returned, limited to the maximum number of updates specified in the request.

To fully synchronise, clients should continue calling this method until the response contains no updates.

If this is the first call, then this should be set to 0.

max_updatesuint32

The maximum number of updates to return, defaults to 1000.

origin_voltstring

Filter by origin volt.

GetDIDRegistryUpdatesResponse

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

updateDIDRegistryUpdate repeated

The updates.

ImportCredentialRequest

FieldTypeDescription
idstring

Optional id of existing credential to import into. If not specified, a new credential will be created.

jsonstring

The JSON representation of the credential.

create_in_parent_idstring

Optional id of the folder resource to save the credential in. This is ignored if the id field is specified.

descriptionstring

Optional description of the credential.

ImportCredentialResponse

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

idstring

The id assigned to the credential.

ParseCredentialRequest

FieldTypeDescription
verifiable_presentationVerifiablePresentation

A presentation of the verifiable credential.

The presentation doesn't need to be signed, but if it is, the signature will be verified using the public key provided in the request.

urlstring

A URL to a verifiable credential.

Not yet implemented.

presentation_public_keystring

Optional public key to use to verify the presentation signature.

ParseCredentialResponse

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

verifiable_credentialVerifiableCredential

The parsed credential details.

RegisterDIDDocumentRequest

FieldTypeDescription
createbool

did_updateDIDRegistryUpdate

The DID document to save.

update_signaturestring

When updating an existing DID document, it is necessary to include a signature of the document JSON, signed by the DID document's current owner.

This is different from the proof contained in the DID document itself.

RegisterDIDDocumentResponse

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

did_documentDIDRegistryUpdate

ResolveDIDRequest

FieldTypeDescription
didstring

The DID to resolve.

include_registriesbool

Set to search all known registries rather than just the local registry.

ResolveDIDResponse

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

did_documentstring

The JSON representation of the DID document.

update_signaturestring

The signature used to save this version of the DID document.

origin_voltstring

The DID of the Volt that saved this version of the DID document.

descriptionstring

Optional description associated with the DID document.

SaveCredentialRequest

FieldTypeDescription
descriptionstring

A human-readable description of the credential.

verifiable_credentialVerifiableCredential

Details of the credential to save.

create_in_parent_idstring

Optional id of the folder resource to save the credential in.

SaveCredentialResponse

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

idstring

The id assigned to the credential.

jsonstring

The JSON representation of the credential.

SearchDIDRegistryRequest

FieldTypeDescription
did_filterstring

Filter by DID itself. This is a prefix match, so searching for 'did:volt:123' will match 'did:volt:1234'. You can also exclude the 'did:volt:' prefix.

description_filterstring

Filter by the (optional) description attached to the DID document. This will match any DID document whose description contains the specified string, for example 'John' will match 'John Smith', 'Elton John' and 'Jasper Johns-Frederick'.

origin_filterstring

Filter by the origin Volt. This will match any DID document whose origin Volt matches exactly the given DID.

page_numberuint32

The page number to retrieve, defaults to 1.

page_sizeuint32

The number of results per page, defaults to 100.

SearchDIDRegistryResponse

FieldTypeDescription
statusStatus

Details of any error that occurred on the call.

did_documentDIDRegistryUpdate repeated

The DID documents that matched the search criteria.

DIDRegistryUpdate

FieldTypeDescription
iduint64

The id of the update.

Reserved for internal use.

didstring

The id of the identity.

operationstring

The type of update, either "add", "update" or "delete".

documentstring

The DID document contained in the update.

hashstring

The hash of DID document.

This is for internal use in comparisons.

update_signaturestring

The signature of the update.

timestampuint64

The timestamp of this update.

vector_clockDIDRegistryUpdate.VectorClockEntry repeated

The vector clocks for this DID.

The vector clocks are a map of the peer ID to the id of the last update received for this DID.

origin_voltstring

The id of the Volt that first created this DID.

descriptionstring

Optional description of this document, this is not part of the DID document or signature.

DIDRegistryUpdate.VectorClockEntry

FieldTypeDescription
keystring

valueuint64

VerifiableCredential

FieldTypeDescription
idstring

The credential id. Leave empty when creating a new credential.

statusstring

The credential status, either "pending", "verified", or "revoked".

typestring repeated

The credential types.

issuer_idstring

The DID of the issuer.

subject_jsonstring

The JSON of the credential subject.

jsonstring

The full JSON of the credential.

VerifiablePresentation

FieldTypeDescription
credential_jsonstring

The credential JSON.

signaturestring

A signature of the credential JSON. The signature should usually be that of the credential subject.

Status

FieldTypeDescription
codeint32

A simple error code that can be easily handled by the client.

Mirrors the grpc StatusCode enum, 0 => OK

messagestring

A developer-facing human-readable error message in English. It should both explain the error and offer an actionable resolution to it.

descriptionstring

Long form error description.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)