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

Was this helpful?

Edit on GitHub
  1. Truvera API

DIDs

PreviousTruvera Swagger UINextProfiles

Last updated 1 month ago

Was this helpful?

DID stands for Decentralized IDentifiers. DIDs are meant to be globally unique identifiers that allow their owner to prove cryptographic control over them. A DID identifies any subject (e.g., a person, organization, thing, data model, abstract entity, etc.) that the controller of the DID decides that it identifies.

In Truvera, Decentralized Identifiers (DIDs) are created using the UUID v4 standard. This involves selecting a unique 128-bit identifier, typically represented as a 36-character hexadecimal string, along with an initial public key. Users have the flexibility to add and remove public keys associated with their DID document as needed. Additionally, the system supports various operations such as updating, deactivating, and listing all existing DIDs.

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

Create DID

A DID, a public key, and a controller are required to create a new DID. The controller is both the owner of the public key and a DID. The DID can be created using an auto-generated keypair, and the controller will be the same as the DID unless otherwise specified. The DID and public key have no cryptographic relation.

It is important to have a public key types that is supported by Truvera, the supported type of public key is ed25519.

List DIDs

Return a list of all DIDs that your user account controls as fully resolved DID documents.

Return ecosystems that DID participates in

Export DID

Exports the DID document and keys as an encrypted Universal Wallet JSON-LD document

Get DID

The API supports resolving many DID methods, some examples are:

  • did:cheqd:f48d2ace-4947-4cb7-8550-1cef3d63e651 - resolves through the cheqd blockchain

  • did:key:z6MkjRagNiMu91DduvCvgEsqLZDVzrJzFrwahc4tXLt9DoHd- the public key is embedded in the DID

Delete DID

Deletes a DID and its metadata from the blockchain and our platform. This will also delete the associated keypair from the key management system meaning that you cannot sign messages or credentials with it after this operation. The DID will no longer be able to be resolved. This operation is not reversible.

When a DID is provided in the path, the API will attempt to resolve that DID into a . This document contains the public keys and more information relating to that DID, check document to learn more.

DID document
the identity foundation did configuration
here

List DIDs

get

Return a list of all DIDs that your user account controls as fully resolved DID documents. More info about Get DID

Authorizations
Query parameters
offsetinteger · int32Optional

How many items to offset by for pagination

Default: 0
limitinteger · int32 · min: 1 · max: 64Optional

How many items to return at one time (max 64)

Default: 64
typestringOptional

The type of DID for filtering

Responses
200
All of a user's DIDs with additional information
application/json
400
Application error
application/json
get
GET /dids HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
    "did": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
    "type": "cheqd",
    "controller": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
    "credentialCount": "0",
    "updatedLast": "2024-09-26T12:38:10.871Z",
    "profile": {
      "name": "My Convener",
      "logo": "text",
      "description": "An ecosystem convener"
    },
    "keyId": "did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651#keys-1",
    "jobId": null,
    "trustRegistries": [
      {
        "id": "0x592a...c99b",
        "name": "Updated Name",
        "logoUrl": "https://logo.com/ecosystemnew"
      }
    ]
  }
]

Returns ecosystems that this DID is a participant in

get

Returns ecosystems that this DID is a participant in

Path parameters
didstring · min: 32Required

DID as fully qualified, typically. did:cheqd:

Example: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
Responses
200
Ecosystems list that the DID participates in
application/json
400
Application error
application/json
404
DID was not found.
application/json
get
GET /dids/{did}/ecosystems HTTP/1.1
Host: api-testnet.truvera.io
Accept: */*
{
  "total": 1,
  "list": [
    {
      "id": "0xe7e0f253c5f05059904109e33fb63b104edddd7e114a8746a5faf07a944d58aa",
      "slug": "truvera-ecosystem-419",
      "convener": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
      "created": "2024-09-26T13:18:51.534Z",
      "name": "Truvera Ecosystem",
      "description": "This is my new awesome ecosystem!",
      "logoUrl": "https://logo.truvera.io/trust-registry",
      "ecosystemUrl": "https://ecosystem.truvera.io",
      "governanceFramework": "This is a markdown document describing my framework",
      "governanceFrameworkVersion": "1.0.0",
      "participantRole": "verifier",
      "participantStatus": "active",
      "participantName": "My Convener",
      "participantLogoUrl": "https://logo.com/participant",
      "participantInfoUrl": "https://participant.truvera.io"
    }
  ]
}

Get DID

get

Returns the complete information about the provided "did" which is provided via parameters text box. More info about Get DID

Authorizations
Path parameters
didstring · min: 32Required

DID as fully qualified, typically. did:cheqd:

Example: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
Responses
200
The DIDDoc
application/json
400
Application error
application/json
404
DID was not found.
application/json
get
GET /dids/{did} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
  "authentication": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1",
  "assertionMethod": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1",
  "publicKey": [
    {
      "id": "did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59#keys-1",
      "type": "Sr25519VerificationKey2020",
      "controller": "ddid:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59",
      "publicKeyBase58": "BFHGE7DyTM5HtAKz58pkJN4evS4yRtDMYaxqRYtzT5nj"
    }
  ]
}

Get DID metadata

get

Returns the metadata for your DID

Authorizations
Path parameters
didstring · min: 32Required

DID as fully qualified, typically. did:cheqd:

Example: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
Responses
200
The DIDDoc
application/json
400
Application error
application/json
404
DID was not found.
application/json
get
GET /dids/{did}/metadata HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{
  "id": "did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651",
  "jobId": "0"
}

Delete DID

delete

Deletes a provided DID from the blockchain, further attempts to resolve this DID will fail. More info about Delete DID

Authorizations
Path parameters
didstring · min: 32Required

DID as fully qualified, typically. did:cheqd:

Example: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
Responses
200
Will remove DID.
application/json
400
Something went wrong with deleting the DID
application/json
401
Unauthorized.
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
404
DID does not exist
application/json
delete
DELETE /dids/{did} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{
  "id": "2430",
  "data": {
    "status": "pending"
  }
}
  • Create DID
  • POSTCreate DID
  • List DIDs
  • GETList DIDs
  • Return ecosystems that DID participates in
  • GETReturns ecosystems that this DID is a participant in
  • Export DID
  • POSTExport DID document and keys
  • Get DID
  • GETGet DID
  • GETGet DID metadata
  • Delete DID
  • DELETEDelete DID

Create DID

post

Creates a new DID on chain with an auto generated keypair, the controller will be the same as the DID unless otherwise specified. More info about Create DID

Authorizations
Body
typestring · enumOptionalDefault: cheqdPossible values:
didstring · min: 32Optional

DID as fully qualified, typically. did:cheqd:

Example: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
controllerstring · min: 32Optional

DID as fully qualified, typically. did:cheqd:

Example: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
keyTypestring · enumOptional

Type of public key for DID (NOTE: secp256k1, sr25519 are deprecated)

Possible values:
Responses
200
DID will be created on the network.
application/json
400
Invalid params
application/json
401
Unauthorized
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
409
Conflict or duplicate
application/json
post
POST /dids HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 169

{
  "type": "cheqd",
  "did": "did:cheqd:testnet:3b68ef6c-1eea-493e-9fd5-6f51e5a87fa9",
  "controller": "did:cheqd:testnet:3b68ef6c-1eea-493e-9fd5-6f51e5a87fa9",
  "keyType": "ed25519"
}
{
  "id": "2432",
  "data": {
    "did": "did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651",
    "controller": "did:cheqd:testnet:f48d2ace-4947-4cb7-8550-1cef3d63e651"
  }
}

Export DID document and keys

post

Exports the DID document and keys as an encrypted Universal Wallet JSON-LD document

Authorizations
Path parameters
didstring · min: 32Required

DID as fully qualified, typically. did:cheqd:

Example: did:cheqd:testnet:ac2b9027-ec1a-4ee2-aad1-1e316e7d6f59
Body
passwordstring · min: 2 · max: 128Optional
Responses
200
An encrypted Universal Wallet document containing the DID and its keypairs
application/json
400
Invalid params
application/json
401
Unauthorized
application/json
404
DID was not found.
application/json
post
POST /dids/{did}/export HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "password": "astrongpassword"
}
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/wallet/v1"
  ],
  "id": "did:key:z6LS...Wa19#encrypted-wallet",
  "type": [
    "VerifiableCredential",
    "EncryptedWallet"
  ],
  "issuer": "did:key:z6LS...Wa19",
  "issuanceDate": "2024-09-26T12:08:18.803Z",
  "credentialSubject": {
    "id": "did:key:z6LS...Wa19",
    "encryptedWalletContents": {
      "protected": "eyJlbmMiOiJYQzIwUCJ9",
      "recipients": [
        {
          "encrypted_key": "OHwaAnWZThM_lGP-9g_zBSBhbRjOeFEG4LsvTEA5V-5WW63J--Xw4w",
          "header": {
            "kid": "did:key:z6LS...Wa19#z6LS...Wa19",
            "alg": "ECDH-ES+A256KW",
            "epk": {
              "kty": "OKP",
              "crv": "X25519",
              "x": "4xA5LWWdfhLed5AUvHPsDAYaxhsMdV4UBw1kN0As1Hs"
            },
            "apu": "4xA5LWWdfhLed5AUvHPsDAYaxhsMdV4UBw1kN0As1Hs",
            "apv": "ZGlkOmtleTp6NkxTaFZ0VlJiUlA4REFoZm05ODFyQ244WWhNVFBhZzlWNFNNakN..."
          }
        }
      ],
      "iv": "NyMwyU-0QGnaqRVy0u0_Ilae3ETvcZq_",
      "ciphertext": "8MJvLT..._wYO54",
      "tag": "b-fL728NLEZkqz5SEIMI8Q"
    }
  }
}