aimo_client/types/
internal.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize)]
4pub struct InternalTopupRequest {
5    pub mainnet_tx_signature: String,
6    pub token: String,
7    pub user_address: String,
8}
9
10#[derive(Serialize, Deserialize)]
11pub struct TransactionResponse {
12    pub tx: String,
13}
14
15#[derive(Serialize, Deserialize)]
16pub struct InternalTopupResponse {
17    pub success: bool,
18    pub devnet_tx_signature: Option<String>,
19    pub amount_transferred: u64, // Original amount from mainnet
20    pub user_amount_ui: f64,     // Amount sent to user after fee
21    pub fee_amount_ui: f64,      // Fee taken (3%)
22    pub sender: String,
23    pub message: String,
24}