requestAirdrop
https://api.triport.io/v1/solRequests an airdrop of lamports to a Solana public key — for use on devnet and testnet only.
requestAirdrop asks the cluster to credit a given account with a number of
lamports and returns the base-58 transaction signature of the airdrop
transfer. It is the standard way to fund a wallet with test SOL during local
development and integration testing.
Devnet / testnet only. Airdrops are a faucet feature of Solana's test
clusters. This method has no effect on mainnet — there is no faucet on mainnet
and any request routed there will fail. Point your client at a devnet or testnet
endpoint when calling requestAirdrop.
The returned value is just the signature string; use a confirmation method such
as getSignatureStatuses (or poll getBalance) to wait until the airdrop has
landed before relying on the funds. Faucets are rate-limited and may cap the
lamports granted per request, so request modest amounts and retry if a drop is
declined.
Parameters
JSON-RPC params is a positional array: [pubkey, lamports, config?].
pubkeystring (base-58)required^[1-9A-HJ-NP-Za-km-z]{32,44}$.lamportsintegerrequiredconfigobjectoptionalcommitmentstringoptionalprocessed, confirmed, or finalized.minContextSlotintegeroptionalResponse
Response fields
| Field | Type | Description |
|---|---|---|
result | string (base-58) | The transaction signature of the airdrop transfer. |
Errors
Errors are returned in the standard JSON-RPC error envelope. See the shared errors reference for the full envelope shape and shared codes.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | pubkey is missing or not valid base-58, lamports is missing or not an integer, or config is malformed. |
-32600 | Invalid request | The airdrop faucet declined the request (e.g. amount too large, faucet exhausted, or called against a cluster with no faucet such as mainnet). |
401 | Unauthorized | Missing or invalid Authorization: Bearer key. |
429 | Rate limited | More than your tier's RPS for sol_send_tx (5 / 10 / 50 / 150). |
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/sol", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "requestAirdrop",
params: [
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
1_000_000_000,
{ commitment: "finalized" },
],
}),
});
const { result: signature } = await res.json();
console.log(`Airdrop signature: ${signature}`);TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY });
const signature = await client.solana.requestAirdrop(
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
1_000_000_000,
{ commitment: "finalized" }
);
console.log(`Airdrop signature: ${signature}`);Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
signature = client.solana.request_airdrop(
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
1_000_000_000,
commitment="finalized",
)
print(f"Airdrop signature: {signature}")Notes
- Devnet / testnet only. There is no faucet on mainnet; airdrops only succeed against a test cluster.
- Lamports, not SOL:
lamportsis an integer count. Multiply your desired SOL amount by1e9(1 SOL = 1,000,000,000 lamports). - Confirm before using funds: the returned signature only means the airdrop
was submitted. Poll
getSignatureStatuses, or watch the destination balance withgetBalance, until the transfer is confirmed. - Faucet limits: test-cluster faucets cap the amount per request and can be temporarily exhausted. Request smaller amounts and retry rather than asking for a large drop at once.
- Related methods: use
sendTransactionto submit your own signed transactions, andgetBalanceto verify the funded balance.