Build the `did:atomic:...` identifier for a public key. Both DID renderings are derived in `atomic-identity` — the DID *is* the identity's identifier, so it belongs with the type that owns identity, and having one derivation means a `did:atomic` here can never disagree with an `IdentityId` there.
(public_key: &PublicKey)
| 31 | /// having one derivation means a `did:atomic` here can never disagree with an |
| 32 | /// `IdentityId` there. |
| 33 | pub fn did_for_public_key(public_key: &PublicKey) -> String { |
| 34 | IdentityId::from_public_key(public_key).to_did() |
| 35 | } |
| 36 | |
| 37 | /// Build the standard `did:key` identifier for an Ed25519 public key |
| 38 | /// (multicodec `ed25519-pub` + key bytes, base58btc multibase). Always |