TriportRPC

requestAirdrop

POSThttps://api.triport.io/v1/sol

Requests an airdrop of lamports to a Solana public key — for use on devnet and testnet only.

Solanasol_send_txfree+ — 5 / 10 / 50 / 150 RPS (free / basic / pro / business)

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
The account public key to fund. Must match ^[1-9A-HJ-NP-Za-km-z]{32,44}$.
lamportsintegerrequired
Amount to airdrop, in lamports (1 SOL = 1,000,000,000 lamports).
configobjectoptional
Optional configuration object (see below).
commitmentstringoptional
Commitment level used to evaluate the request: processed, confirmed, or finalized.
minContextSlotintegeroptional
Minimum slot the request must be evaluated at.

Response

Response fields

FieldTypeDescription
resultstring (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.

CodeMeaningWhen it happens
-32602Invalid paramspubkey is missing or not valid base-58, lamports is missing or not an integer, or config is malformed.
-32600Invalid requestThe airdrop faucet declined the request (e.g. amount too large, faucet exhausted, or called against a cluster with no faucet such as mainnet).
401UnauthorizedMissing or invalid Authorization: Bearer key.
429Rate limitedMore 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: lamports is an integer count. Multiply your desired SOL amount by 1e9 (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 with getBalance, 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 sendTransaction to submit your own signed transactions, and getBalance to verify the funded balance.