Transfer SOL in Lamports)
Transfers SOL from one wallet to another.
Returns: Promise<Signature>
const signature = await connection.transferLamports({
source: senderWallet,
destination: recipientAddress,
amount: 1_000_000_000n,
skipPreflight: true,
maximumClientSideRetries: 0,
});
Options
source
:KeyPairSigner
- The wallet to send SOL fromdestination
:Address
- The wallet to send SOL toamount
:Lamports
- Amount of lamports to sendskipPreflight
:boolean
(optional) - Whether to skip preflight checks (default: true)maximumClientSideRetries
:number
(optional) - Maximum number of times to retry sending the transaction (default: 0)abortSignal
:AbortSignal | null
(optional) - Signal to abort the transaction (default: null)
See also: Get Lamport Balance, Airdrop if Required
Last updated on