aimo-client 0.4.0

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

#[derive(Serialize, Deserialize)]
pub struct InternalTopupRequest {
    pub mainnet_tx_signature: String,
    pub token: String,
    pub user_address: String,
}

#[derive(Serialize, Deserialize)]
pub struct TransactionResponse {
    pub tx: String,
}

#[derive(Serialize, Deserialize)]
pub struct InternalTopupResponse {
    pub success: bool,
    pub devnet_tx_signature: Option<String>,
    pub amount_transferred: u64, // Original amount from mainnet
    pub user_amount_ui: f64,     // Amount sent to user after fee
    pub fee_amount_ui: f64,      // Fee taken (3%)
    pub sender: String,
    pub message: String,
}

#[derive(Serialize, Deserialize)]
pub struct VerifyAssetRequest {
    pub phase: String,
    pub user_address: String,
}

#[derive(Serialize, Deserialize)]
pub struct VerifyAssetResponse {
    pub verified: bool,
    pub community: String,
    pub collection: String,
    pub total: i32,
    pub items: serde_json::Value,
    pub devnet_tx: String,
    pub token: String,
    pub amount: u64,
    pub amount_ui: f64,
}