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

Method for_keypair

atomic-repository/src/git_binding/codec.rs:231–236  ·  view source on GitHub ↗

Build a signer for a keypair using the in-tree `did:atomic` method.

(keypair: &KeyPair)

Source from the content-addressed store, hash-verified

229impl BindingSigner {
230 /// Build a signer for a keypair using the in-tree `did:atomic` method.
231 pub fn for_keypair(keypair: &KeyPair) -> Self {
232 Self {
233 did: atomic_canonical::did::did_for_public_key(&keypair.public),
234 verifying_key: *keypair.public.as_bytes(),
235 }
236 }
237}
238
239/// The unsigned V1 binding payload: every field except signature and id.

Callers

nothing calls this directly

Calls 2

did_for_public_keyFunction · 0.50
as_bytesMethod · 0.45

Tested by

no test coverage detected