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

Method output_json

atomic-cli/src/commands/identity/lookup_key.rs:188–199  ·  view source on GitHub ↗

Print JSON output.

(&self, info: &atomic_remote::IdentityInfo, canonical: &str, expected_did: &str)

Source from the content-addressed store, hash-verified

186
187 /// Print JSON output.
188 fn output_json(&self, info: &atomic_remote::IdentityInfo, canonical: &str, expected_did: &str) {
189 let obj = serde_json::json!({
190 "name": info.name,
191 "identity_id": info.id,
192 "public_key": canonical,
193 "status": info.status,
194 "created_at": info.created_at.to_rfc3339(),
195 "did_atomic": expected_did,
196 "server_public_key": info.public_key,
197 });
198 println!("{}", serde_json::to_string_pretty(&obj).unwrap());
199 }
200}
201
202/// Compute the `did:atomic:` identifier for a canonical base32 public key.

Callers 1

executeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected