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

Language:

get_token

Get wallet tokens for an authenticated user.


use mirrorworld_sdk_rust::{ get_token, login };
fn main() {
// User should be authenticated
login( /*...*/ );
let res: &WalletTokens = get_token();
}
#[derive(Debug, Serialize, Deserialize)]
pub struct WalletTokens {
pub sol: u32,
pub tokens: Option<Vec<WalletToken>>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct WalletToken {
pub ata: Option<String>,
pub mint: Option<String>,
pub amount: Option<u32>,
pub decimals: Option<u32>
}

Edit this page on GitHub

Copyright © Mirror World, Inc. 2023
On this page

    Home

    Tutorials

    Guides

    API Reference