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

Language:

Rust Integration Guide

This guide will walk you through the setup process for the Mirror World Smart SDK on Rust.

1. Create a Developer Account

Create a developer account on the Developer dashboard. Create project and create an API Key. If you already have an API Key, you may skip this step and proceed to the next one.

2. Install dependencies

Add the mirrorworld-sdk-rust to your Cargo.toml. Alternativly you can run cargo add mirrorworld-sdk-rust.

shell.sh
Copy

cargo add mirrorworld-sdk-rust

3. Import the SDK in your file

Import the installed SDK into your file and start building!

shell.sh
main.rs
Copy

// Import all modules
use mirrorworld_sdk_rust::*;
// Or you may import specific methods
use mirrorworld_sdk_rust::{
// ...
login_with_email,
// ...
};

Marketplace Module initialization

When developing with the Marketplace service on the Mirror World Rust SDK, you need to create an instance of the Marketplace interface to access these methods.

Here's an example of how the Marketplace is instantiated.

Always make sure you have an instance of the Marketplace in your context before invoking the marketplace service methods.

shell.sh
main.rs
marketplace.rs
Copy

use mirrorworld_sdk_rust::{ marketplace::Marketplace, NetEnv };
use mirrorworld_sdk_rust::marketplace::GeneralPayload;
fn main() {
let APIKEY: &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(KEY.to_string(), NetEnv::DEVNET, TOKEN.to_string());
}

Going Further

Great! At this point you're pretty much ready to start doing building with the Rust SDK for Mirror World. There are a few things you can do to proceed from here:

Getting Support

If you're stuck or just looking for support, you may also schedule a support call with our team.

Rust Integration Guide

This guide will walk you through the setup process for the Mirror World Smart SDK on Rust.

1. Create a Developer Account

Create a developer account on the Developer dashboard. Create project and create an API Key. If you already have an API Key, you may skip this step and proceed to the next one.

2. Install dependencies

Add the mirrorworld-sdk-rust to your Cargo.toml. Alternativly you can run cargo add mirrorworld-sdk-rust.

3. Import the SDK in your file

Import the installed SDK into your file and start building!

Marketplace Module initialization

When developing with the Marketplace service on the Mirror World Rust SDK, you need to create an instance of the Marketplace interface to access these methods.

Here's an example of how the Marketplace is instantiated.

Always make sure you have an instance of the Marketplace in your context before invoking the marketplace service methods.

Going Further

Great! At this point you're pretty much ready to start doing building with the Rust SDK for Mirror World. There are a few things you can do to proceed from here:

Getting Support

If you're stuck or just looking for support, you may also schedule a support call with our team.

shell.sh
CopyExpandClose

cargo add mirrorworld-sdk-rust

Edit this page on GitHub

Copyright © Mirror World, Inc. 2023

Home

Tutorials

Guides

API Reference