sendTokensDecimal
Sends SPL tokens from the user's wallet and awaits network confirmation
(async() => {
await SOLPay.sendTokensDecimal("WALLET_ADDRESS", 0.00001, "TOKEN_ADDRESS"); // {"from": "...", "to": "WALLET_ADDRESS", "amount_decimal": 0.00001, "token_address": "TOKEN_ADDRESS", "signature": "..."}
await SOLPay.sendTokensDecimal("WALLET_ADDRESS", 0.00001, "TOKEN_ADDRESS", (details) => {
// {"from": "...", "to": "WALLET_ADDRESS", "amount_decimal": 0.00001, "token_address": "TOKEN_ADDRESS", "signature": "..."}
}); // {"from": "...", "to": "WALLET_ADDRESS", "amount_decimal": 0.00001, "token_address": "TOKEN_ADDRESS", "signature": "..."}
})();Parameters:
Returns:
Throws:
Last updated