transfer_sol
Transfers SOL from the user's wallet to another wallet address.
_23use mirrorworld_sdk_rust::{ transfer_sol };_23_23fn main() {_23 let recipient: &str = "2BrLoxPTkPLyLuD3sPitNKXQRA9y8zzZ9P6vYwMTtgBL";_23 let amount: &str = "1000";_23 let result: TransferSpltoken = transfer_sol(recipient, amount).await?;_23}_23_23// Return Types_23// ============_23_23 #[derive(Debug, Serialize, Deserialize)]_23pub struct TransferSpltoken {_23 pub tx_signature: String_23}_23_23// Error response if any_23// =====================_23#[derive(Debug, Serialize, Deserialize)]_23pub struct Err {_23 #[serde(rename = "InstructionError")]_23 pub instruction_error: Option<String>,_23}
Edit this page on GitHub