aimo-client 0.1.3

AiMo Network REST API types and client
Documentation
use aimo_core::keys::{MetadataV1, SecretKeyV1};
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Deserialize)]
pub struct MetadataCanonicalRequest {
    pub metadata: MetadataV1,
}

#[derive(Debug, Clone, Serialize)]
pub struct MetadataCanonicalResponse {
    pub canonical_json: String,
}

#[derive(Debug, Clone, Deserialize)]
pub struct GenerateKeyRequest {
    pub payload: SecretKeyV1,
}

#[derive(Debug, Clone, Serialize)]
pub struct GenerateKeyResponse {
    pub secret_key: String,
}

#[derive(Debug, Clone, Deserialize)]
pub struct VerifyKeyRequest {
    pub secret_key: String,
}

#[derive(Debug, Clone, Serialize)]
pub struct VerifyKeyResponse {
    pub result: bool,
    pub reason: Option<String>,
    pub payload: SecretKeyV1,
}

#[derive(Debug, Clone, Deserialize)]
pub struct RevokeKeyRequest {
    pub signer: String,
    pub signature: String,
    pub secret_key: String,
}