Metodo RPC getMultipleAccounts
Restituisce le informazioni dell'account per un elenco di pubkey.
$ 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
Un array di pubkey da interrogare, come stringhe codificate in base-58 (fino a un massimo di 100)
objectoptional
Oggetto di configurazione contenente i seguenti campi:
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
Il risultato sarà un array contenente:
null
- se l'account con quel pubkey non esiste, oppure- Oggetti Account con i seguenti campi:
Is this page helpful?