This method returns a SolanaInstruction. Add it to a transaction and use the Transaction Service to execute it on-chain. See Instructions & Transactions.
Transfer
Transfers SOL (in lamports) from one account to another.Request
The sender account. Must be a signer.
The recipient account.
Amount of SOL to transfer, in lamports. 1 SOL = 1,000,000,000 lamports.
Response
The System Program transfer instruction. Add to a transaction via CompileTransaction.
Code Examples
TransferWithSeed
Transfers SOL from a seed-derived account. The sending account’s address is derived from a base public key and seed, so the base key (not the derived address) signs the transaction.Request
The seed-derived sender account address.
Base public key used to derive
from. This account must be a signer.Seed string used to derive
from.The recipient account.
Amount to transfer, in lamports. 1 SOL = 1,000,000,000 lamports.
Response
The System Program transfer_with_seed instruction. Add to a transaction via CompileTransaction.