MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / did_is_stable_and_key_bound

Function did_is_stable_and_key_bound

atomic-canonical/src/did.rs:70–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68
69 #[test]
70 fn did_is_stable_and_key_bound() {
71 let kp = KeyPair::generate();
72 let did = did_for_public_key(&kp.public);
73 assert!(did.starts_with("did:atomic:"));
74 assert_eq!(did, did_for_public_key(&kp.public));
75 assert!(did_matches_public_key(&did, &kp.public));
76
77 let other = KeyPair::generate();
78 assert!(!did_matches_public_key(&did, &other.public));
79 }
80
81 #[test]
82 fn did_key_has_ed25519_multicodec_shape_and_verifies() {

Callers

nothing calls this directly

Calls 1

did_for_public_keyFunction · 0.85

Tested by

no test coverage detected