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

Method execute

atomic-cli/src/commands/identity/lookup_key.rs:94–112  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

92
93impl LookupKey {
94 async fn execute(&self) -> CliResult<()> {
95 let canonical = self.normalize_and_validate()?;
96
97 let client = build_apex_client(self.server.as_deref()).await?;
98
99 let info = client
100 .resolve_identity_by_public_key(&canonical)
101 .await
102 .map_err(|e| self.map_remote_error(e, &canonical))?;
103
104 let expected_did = did_atomic(&canonical);
105
106 match self.format.to_lowercase().as_str() {
107 "json" => self.output_json(&info, &canonical, &expected_did),
108 _ => self.output_default(&info, &canonical, &expected_did),
109 }
110
111 Ok(())
112 }
113
114 /// Normalize user input (case, optional prefixes) and validate it as a
115 /// base32-encoded Ed25519 public key.

Callers 1

runMethod · 0.45

Calls 8

build_apex_clientFunction · 0.85
did_atomicFunction · 0.85
map_remote_errorMethod · 0.80
as_strMethod · 0.45
output_jsonMethod · 0.45
output_defaultMethod · 0.45

Tested by

no test coverage detected