ClientWithAirdrop
Represents a client that can request airdrops of SOL to a specified address.
The airdrop capability is typically available on test networks (devnet, testnet) and local validators. It allows funding accounts with SOL for testing purposes.
Example
Properties
airdrop()
Requests an airdrop of SOL to the specified address.
The returned promise resolves when the airdrop succeeds and rejects on failure. Some implementations (e.g., LiteSVM) update account balances directly without sending a transaction, in which case no signature is returned.
Parameters
| Parameter | Type | Description |
|---|---|---|
address | Address | The address to receive the airdrop. |
amount | Lamports | The amount of lamports to airdrop. |
abortSignal? | AbortSignal | An optional signal to abort the airdrop request. |
Returns
Promise<Signature | undefined>
A promise resolving to the transaction signature if the airdrop was
performed via a transaction, or undefined if no transaction was used.