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

Function delegate_public_key

atomic-canonical/src/delegation.rs:234–237  ·  view source on GitHub ↗

Recover the delegate's Ed25519 public key from a parsed certificate. This is the payoff of carrying `did:key` alongside `did:atomic`: given a certificate you trust, you can verify the agent's own signatures.

(delegation: &Delegation)

Source from the content-addressed store, hash-verified

232/// This is the payoff of carrying `did:key` alongside `did:atomic`: given a
233/// certificate you trust, you can verify the agent's own signatures.
234pub fn delegate_public_key(delegation: &Delegation) -> Result<PublicKey> {
235 PublicKey::from_did_key(&delegation.delegate_key)
236 .map_err(|e| CanonicalError::Proof(format!("malformed delegateKey: {e}")))
237}
238
239/// Recover the delegator's Ed25519 public key from a parsed certificate.
240pub fn delegator_public_key(delegation: &Delegation) -> Result<PublicKey> {

Callers 1

verifyFunction · 0.85

Calls 1

ProofClass · 0.85

Tested by

no test coverage detected