Solana
Solana
Solana
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.
| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | pubkey | string | Sim | Base-58 address to fund. |
| 2 | lamports | integer | Sim | Amount to airdrop, in lamports. |
| 3 | config | object | Não | Options: commitment. |
| Tipo | Descrição |
|---|---|
| string | The airdrop transaction signature (base-58 string). |
| Código | Mensagem | Causa |
|---|---|---|
-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. |