Solana
Solana
Solana
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
requestAirdrop asks a Solana test cluster to mint free SOL into an address so you can pay fees and rent while developing. You pass the base-58 pubkey and an amount in lamports (1 SOL = 1,000,000,000 lamports), and the node returns the airdrop transaction signature. It works only on devnet and testnet faucets — on mainnet it is a no-op or error, since real SOL cannot be conjured. Call it on TheRPC at https://solana.therpc.io/YOUR_API_KEY, then confirm the funds with getBalance.
| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | pubkey | string | Oui | Base-58 address to fund. |
| 2 | lamports | integer | Oui | Amount to airdrop, in lamports. |
| 3 | config | object | Non | Options: commitment. |
| Type | Description |
|---|---|
| string | The airdrop transaction signature (base-58 string). |
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |