Create DID-Linked Resource
Create a DID-Linked Resource associated with a cheqd DID over REST API
Last updated
Create a DID-Linked Resource associated with a cheqd DID over REST API
Last updated
Using the /resource/create
API, users are able to create custom DID-Linked Resources, including:
Schemas
Credential Definitions
Trust Registries
Status Lists
Logos associated with DIDs
Governance files
Make sure you have set up your account with cheqd Studio and are logged in, using our guide below:
Before you can create a DID-Linked Resource, you need to create a "parent" DID which is used to link the Resource on-ledger. Use the API in the page below to create a DID:
DID-Linked Resources can be any type of file or content that is below ~45kb in size.
For the purpose of an example, lets use an AnonCreds schema (JSON file) as the resource:
Save this file locally and call it something like resource.json.
Prepare a file with resource and encode it into base64, base64url
or hex
. On Unix systems, you can use the following command input:
Expected output:
Resources are grouped by having identical names and types. This means if you want to create a new version of the same Resource, you will need to specify the same name and type in the following request.
Set up your account
Set up your account with cheqd Studio and log in to start using the APIs.
Create an Issuer DID
Create a W3C conformant DID on cheqd using the did:cheqd
DID Method.
Learn more about DID-Linked Resources
Understand the context and technical composition of cheqd's DID-Linked Resources.
This endpoint creates a DID-Linked Resource. As input, it can take the DID identifier and the resource parameters via a form, or the fully-assembled resource itself.
DID identifier to link the resource to.
Encoded string containing the data to be stored in the DID-Linked Resource.
Encoding format used to encode the data.
Name of DID-Linked Resource.
Type of DID-Linked Resource. This is NOT the same as the media type, which is calculated automatically ledger-side.
Optional field to assign a set of alternative URIs where the DID-Linked Resource can be fetched from.
Optional field to assign a human-readable version in the DID-Linked Resource.
List of key references (publicKeys) which will be used for signing the message. The should be in hexadecimal format and placed in the wallet of current user.
The request was successful.
"did:cheqd:testnet:55dbc8bf-fba3-4117-855c-1e0dc1d3bb47/resources/398cee0a-efac-4643-9f4c-74c48c72a14b"
"55dbc8bf-fba3-4117-855c-1e0dc1d3bb47"
"398cee0a-efac-4643-9f4c-74c48c72a14b"
"cheqd-issuer-logo"
"CredentialArtwork"
"image/png"
"1.0"
"a95380f460e63ad939541a57aecbfd795fcd37c6d78ee86c885340e33a91b559"
"2021-09-01T12:00:00Z"
"d4829ac7-4566-478c-a408-b44767eddadc"
"ad7a8442-3531-46eb-a024-53953ec6e4ff"