use paratro_sdk::{MpcClient, Config, CreateWalletRequest, CreateAccountRequest};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = MpcClient::new(
"your-api-key",
"your-api-secret",
Config::production(),
);
// Create wallet
let wallet = client.create_wallet(&CreateWalletRequest {
wallet_name: "My Wallet".into(),
description: "Primary wallet".into(),
}).await?;
println!("Wallet ID: {}", wallet.wallet_id);
// Create account
let account = client.create_account(&CreateAccountRequest {
wallet_id: wallet.wallet_id.clone(),
chain: "ethereum".into(),
account_type: None,
label: Some("Deposit Account".into()),
}).await?;
println!("Account: {} ({})", account.account_id, account.address);
// Add asset
let asset = client.create_asset(&CreateAssetRequest {
account_id: account.account_id.clone(),
symbol: "USDT".into(),
chain: Some("ethereum".into()),
}).await?;
println!("Asset: {} ({})", asset.asset_id, asset.symbol);
// Create transfer
let transfer = client.create_transfer(&CreateTransferRequest {
from_address: account.address.clone(),
to_address: "0xbbbb...".into(),
chain: "ethereum".into(),
token_symbol: "USDT".into(),
amount: "10.5".into(),
memo: None,
}).await?;
println!("Transfer: {} ({})", transfer.tx_id, transfer.status);
Ok(())
}