Skip to main content

Module did

Module did 

Source
Expand description

DID resolution (spec §22): turn did:key AIDs into verifying keys without any network, and construct did:web resolution URLs.

did:key:z<base58btc(0xed 0x01 || ed25519_pubkey)> per the did:key spec (W3C CC work). did:web URL construction follows did:web §2.2; actual fetching is the caller’s transport concern.

Functions§

did_key_to_verifying_key
Parse a did:key:z... AID into an Ed25519 verifying key.
did_web_url
Build the did:web resolution URL (did:web §2.2): did:web:example.com → https://example.com/.well-known/did.json did:web:example.com:path:to → https://example.com/path/to/did.json Returns the URL; fetching is the caller’s job.
verifying_key_to_did_key
Encode an Ed25519 verifying key as a did:key AID.