getMultipleAccounts RPC 方法
返回一组 Pubkeys 的账户信息。
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getMultipleAccounts",> "params": [> [> "vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",> "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"> ],> {> "encoding": "base58",> "commitment": "finalized"> }> ]> }> '
params
arrayrequired
一个要查询的 Pubkeys 数组,使用 base-58 编码的字符串(最多 100 个)。
objectoptional
包含以下字段的配置对象:
result
Response
{"jsonrpc": "2.0","result": {"context": { "apiVersion": "2.0.15", "slot": 341197247 },"value": [{"data": ["", "base58"],"executable": false,"lamports": 88849814690250,"owner": "11111111111111111111111111111111","rentEpoch": 18446744073709551615,"space": 0},{"data": ["", "base58"],"executable": false,"lamports": 998763433,"owner": "2WRuhE4GJFoE23DYzp2ij6ZnuQ8p9mJeU6gDgfsjR4or","rentEpoch": 18446744073709551615,"space": 0}]},"id": 1}
array
结果将是一个包含以下内容的数组:
null
- 如果该 Pubkey 的账户不存在,或者- 包含以下字段的账户对象:
Is this page helpful?