use super::error::Result;
use crate::types::{CryptoAmount, GasCostEstimation, WalletTransaction};
use async_trait::async_trait;
use std::fmt::Debug;
pub struct TransactionIntent {
pub address_to: String,
pub amount: CryptoAmount,
pub data: Option<Vec<u8>>,
}
#[derive(Debug, Default)]
pub struct MnemonicDerivationOption {
pub account: u32,
pub index: u32,
}
#[cfg_attr(any(test, feature = "mock"), mockall::automock)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
pub trait WalletUser: Debug {
async fn get_address(&self) -> Result<String>;
async fn get_balance(&self) -> Result<CryptoAmount>;
async fn send_amount(&self, intent: &TransactionIntent) -> Result<String>;
async fn get_wallet_tx_list(&self, start: usize, limit: usize) -> Result<Vec<String>>;
async fn get_wallet_tx(&self, tx_id: &str) -> Result<WalletTransaction>;
async fn estimate_gas_cost(&self, intent: &TransactionIntent) -> Result<GasCostEstimation>;
}