In Solana providers, we provide four signing methods:
signMessage
signTransaction
signTransactions
signTokenTransaction
Sign message
signMessage the method will create an offchain signature for one message and return the signed transaction in hex.
To verify the signature, you need to add the header "\xffsolana offchain" before the `signMsg`
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 to send the transaction. The return value is the transaction hash: