Solana Provider
The Tomo Telegram SDK provides a Solana Provider for querying and sending SOL and SPL tokens.
Connect with the Wallet
Before using the provider, the user needs to log in to the wallet through the modal by following the method:
Query Methods
Solana providers support two query methods:
getAddress
getBalance
Signing Methods
In Solana providers, we provide four signing methods:
signMessage
signTransaction
signTransactions
signTokenTransaction
Sign message
signMessage
method will create a simple signed transaction for one message and return the signed transaction in hex.
SOL transfer transaction
signTransaction
is typically used to send SOL to another address and return the signed transaction. You can also use signTransactions
it to pass an array of transactions for signing.
SPL token transaction
and signTokenTransaction
supports signing transactions for sending SPL tokens. You need to provide a mint address for this transaction.
Sending Methods
After signing transactions, you can use sendTransaction
it for sending the transaction. The return value is the transaction hash.
Last updated