Build a did:jwk URI from an Ed25519 public key (32 bytes), the inverse of
ed25519_from_did_jwk. The JWK JSON is compact with SORTED keys
({"crv":"Ed25519","kty":"OKP","x":"<base64url-nopad pubkey>"}); the method id is
that JSON base64url-encoded WITH canonical ‘=’ padding, matching cogmem’s
agent_did_jwk so the two emit byte-identical issuer DIDs.
Create a did:web URI from a domain and optional path segments.
did:web encodes : as domain separators and path segments after the domain.
Example: did:web:example.com or did:web:example.com:users:alice
Extract the Ed25519 public key from a DID (supports both did:key and did:web documents).
For did:key, extracts directly from the URI.
For did:web, requires the DID document JSON to be passed in.
Extract the Ed25519 public key bytes from a did:jwk URI. The method id is a
base64url-encoded JWK; decoding tolerates the canonical padding c2pa-rs emits.