requestAirdrop
Requests an airdrop of lamports to a Pubkey
请求参数
<string>
- Pubkey of account to receive lamports, as base-58 encoded string<integer>
- lamports, as a u64<object>
- (optional) Commitment (used for retrieving blockhash and verifying airdrop success)
响应结果
<string>
- Transaction Signature of airdrop, as base-58 encoded string
示例代码
请求:
curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
{"jsonrpc":"2.0","id":1, "method":"requestAirdrop", "params":["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri", 1000000000]}
响应:
{"jsonrpc":"2.0","result":"5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW","id":1}