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

Function agent

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

Source from the content-addressed store, hash-verified

630 }
631
632 fn agent(name: &str, parent: &Identity) -> Party {
633 let keypair = KeyPair::generate();
634 let identity = Identity::builder(name)
635 .identity_type(IdentityType::Agent)
636 .public_key(keypair.public.clone())
637 .delegated_by(parent.id)
638 .build()
639 .unwrap();
640 Party { identity, keypair }
641 }
642
643 fn scope() -> DelegationScope {
644 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