aimo_client/types/
keys.rs

1use aimo_core::keys::{MetadataV1, SecretKeyV1};
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Deserialize)]
5pub struct MetadataCanonicalRequest {
6    pub metadata: MetadataV1,
7}
8
9#[derive(Debug, Clone, Serialize)]
10pub struct MetadataCanonicalResponse {
11    pub canonical_json: String,
12}
13
14#[derive(Debug, Clone, Deserialize)]
15pub struct GenerateKeyRequest {
16    pub payload: SecretKeyV1,
17}
18
19#[derive(Debug, Clone, Serialize)]
20pub struct GenerateKeyResponse {
21    pub secret_key: String,
22}
23
24#[derive(Debug, Clone, Deserialize)]
25pub struct VerifyKeyRequest {
26    pub secret_key: String,
27}
28
29#[derive(Debug, Clone, Serialize)]
30pub struct VerifyKeyResponse {
31    pub result: bool,
32    pub reason: Option<String>,
33    pub payload: SecretKeyV1,
34}
35
36#[derive(Debug, Clone, Deserialize)]
37pub struct RevokeKeyRequest {
38    pub signer: String,
39    pub signature: String,
40    pub secret_key: String,
41}