requestAirdrop RPC Method
Requests an airdrop of lamports to a Pubkey
Parameters#
stringrequired
Pubkey of account to receive lamports, as a base-58 encoded string
integerrequired
lamports to airdrop, as a "u64"
objectoptional
Configuration object containing the following fields:
The commitment describes how finalized a block is at that point in time.
Result#
<string> - Transaction Signature of the airdrop, as a base-58 encoded string
Code sample#
curl https://api.devnet.solana.com -s -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0", "id": 1,
"method": "requestAirdrop",
"params": [
"83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
1000000000
]
}
'
Response#
{
"jsonrpc": "2.0",
"result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
"id": 1
}
Try It