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

Language:

transferSPLToken

Transfers Spl Tokens From User S Wallet Address To Another Wallet Address


import { type SolanaTransferSPLTokenPayloadV2 } from "@usemirrorworld/web3.js"
// See https://explorer.solana.com/address/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
const USDC_MINT = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
const USDC_DECIMALS = 6
const payload: SolanaTransferSPLTokenPayloadV2 = {
to_publickey: "5VoC23rdfGxLG9G28eDEppza6atiQuuVwCM1cwGC2MaW",
amount: 2 * 10 ** USDC_DECIMALS, // => 2 USDC
token_mint: USDC_MINT,
decimals: USDC_DECIMALS,
}
await mirrorworld.Solana.Wallet.transferSPLToken(payload)

Edit this page on GitHub

Copyright © Mirror World, Inc. 2023
On this page

    Home

    Integration

    Guides

    API Reference