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

Function issue

atomic-cli/src/commands/delegation.rs:332–340  ·  view source on GitHub ↗
(f: &Fixture, scope: DelegationScope, expires_in: Duration)

Source from the content-addressed store, hash-verified

330 }
331
332 fn issue(f: &Fixture, scope: DelegationScope, expires_in: Duration) -> String {
333 let terms = Delegation::new(&f.human, &f.agent, scope).expires_in(expires_in);
334 let doc = cert::mint(&f.human, &f.human_key, &terms);
335 let id = terms.id.to_base32();
336 f.store
337 .save_delegation(&id, &serde_json::to_string_pretty(&doc).unwrap())
338 .unwrap();
339 id
340 }
341
342 fn scope_for(server: &str) -> DelegationScope {
343 DelegationScope::builder()

Calls 5

mintFunction · 0.85
expires_inMethod · 0.80
save_delegationMethod · 0.80
to_base32Method · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected