getAccountInfo RPC 方法
返回与提供的 Pubkey 账户相关的所有信息
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getAccountInfo",> "params": [> "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",> {> "commitment": "finalized",> "encoding": "base58"> }> ]> }> '
params
stringrequired
要查询账户的 Pubkey,作为 base-58 编码的字符串。
objectoptional
配置对象。
result
Response
{"jsonrpc": "2.0","result": {"context": { "apiVersion": "2.0.15", "slot": 341197053 },"value": {"data": ["", "base58"],"executable": false,"lamports": 88849814690250,"owner": "11111111111111111111111111111111","rentEpoch": 18446744073709551615,"space": 0}},"id": 1}
object | null
如果请求的账户不存在,结果将为 null
。否则,将返回一个包含以下内容的对象:
Is this page helpful?