Create DID-Linked Resource
Create a DID-Linked Resource (DLR) on cheqd using the Credo Agent.
The createResource
method from the Credo cheqd module allows you to create a DID-Linked Resource and publish it to the cheqd network under a did:cheqd
identifier.
DID-Linked Resources are uniquely identified by a UUIDv4 resource ID and persistently attached to the DID on-chain. These resources can later be resolved by ID or query parameters (e.g., resourceName
, resourceType
).
Required Parameters
did
â
The did:cheqd
identifier under which the resource is created
id
â
A UUID string that acts as the permanent resource ID
name
â
A human-readable resource name
resourceType
â
A short type identifier (e.g. TrustRegistry
, Logo
, StatusList
)
data
â
The content to store (object, Base64-encoded string, or plain text)
version
â
Optional semantic version string (e.g. "1.0"
)
alsoKnownAs
â
Optional array of aliases for the resource
Example
đĄ The
id
field must be a UUIDv4. You are responsible for generating and tracking this ID.
Recommendations
Ensure the
id
is a UUIDv4, generated using a reliable UUID library (e.g.,uuid
in Node.js)Keep
resourceName
andresourceType
descriptive but concise â they are used for resolutionIf the resource data is sensitive or large, consider encoding as a base64 string
Use
version
to manage changes to the resource over time
Last updated
Was this helpful?