get_did
Generate a Decentralized Identifier (DID) for an agent from its public key and entity type, with optional metadata to document protocol or description.
Instructions
Create a DID (Decentralized Identifier) record for an agent from its public key.
Required:
entity_type: the kind of agent/entity, e.g. "AI Agent" or "Toolbox".
pk: the agent's raw Ed25519 public key as a hex string
(64 hex chars, as produced by keygen.generate_raw_keys()).
Validated: must decode to 32 bytes, else ValueError.
Stored in the DID document as publicKeyMultibase.
pktype: the public key algorithm label, e.g. "ed25519"; recorded
as the verification method's type.
Optional metadata (recorded as top-level fields on the returned record):
description: human-readable description, e.g. "AIassistant".
protocol: protocol the agent speaks, e.g. "MCP".
transparency: transparency-log reference, e.g. "6GPDL".
Returns the DID record dict: containing its "id" (the DID).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pk | Yes | ||
| pktype | Yes | ||
| protocol | No | ||
| description | No | ||
| entity_type | Yes | ||
| transparency | No |