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

Function agent

atomic-canonical/src/delegation.rs:667–676  ·  view source on GitHub ↗
(name: &str, parent: &Identity)

Source from the content-addressed store, hash-verified

665 }
666
667 fn agent(name: &str, parent: &Identity) -> Party {
668 let keypair = KeyPair::generate();
669 let identity = Identity::builder(name)
670 .identity_type(IdentityType::Agent)
671 .public_key(keypair.public.clone())
672 .delegated_by(parent.id)
673 .build()
674 .unwrap();
675 Party { identity, keypair }
676 }
677
678 fn scope() -> DelegationScope {
679 DelegationScope::builder()

Calls 6

delegated_byMethod · 0.80
unwrapMethod · 0.45
buildMethod · 0.45
public_keyMethod · 0.45
identity_typeMethod · 0.45
cloneMethod · 0.45