Skip to main content
HomeIntegration BuilderAPI ReferenceGuidesChangelog
View Mirror World on Github
Join the Discord server



Transfers an NFT from the current user's wallet address to another wallet address.

use mirrorworld_sdk_rust::{ marketplace::Marketplace, NetEnv };
fn main() {
// First create the SDK instance
let api_key: &str = "SUPER_SECRET_API_KEY"; // Can be gotten from the developer dashboard
let access_token: &str = "USER_AUTH_ACCESS_TOKEN"; // Current user's auth token
let marketplace = Marketplace::new(api_key.to_string(), NetEnv::DEVNET, access_token.to_string());
// Transfer NFT params
let mint_address: &str = "5eGe5EaC5w5L9nCdmqM4eCe8ZLkBanBVMYBB4gj71qg";
let recipient_wallet_address: &str = "2BrLoxPTkPLyLuD3sPitNKXQRA9y8zzZ9P6vYwMTtgBL";
let transfer_result: NftListing = marketplace.transfer_nft(mint_address, recipient_wallet_address).await.unwrap();
// Return Types
// ============
#[derive(Debug, Serialize, Deserialize)]
pub struct NftListing {
pub id: usize,
#[serde(rename = "type")]
pub type_name: String,
pub wallet_address: String,
pub mint_address: String,
pub price: String,
pub seller_address: String,
pub to_wallet_address: Option<String>,
pub signature: String,
pub status: String,
#[serde(rename = "updatedAt")]
pub updated_at: String,
#[serde(rename = "createdAt")]
pub created_at: String,
// Error response if any
// =====================
#[derive(Debug, Serialize, Deserialize)]
pub struct Err {
#[serde(rename = "InstructionError")]
pub instruction_error: Option<String>,

Edit this page on GitHub

Copyright © Mirror World, Inc. 2023
On this page




    API Reference