Μέθοδος RPC getBalance

Επιστρέφει το υπόλοιπο σε lamport του λογαριασμού του παρεχόμενου Pubkey

$ curl https://api.devnet.solana.com -s -X \
> POST -H "Content-Type: application/json" -d '
> {
> "jsonrpc": "2.0",
> "id": 1,
> "method": "getBalance",
> "params": [
> "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
> {
> "commitment": "finalized"
> }
> ]
> }
> '

params

stringrequired

Το pubkey του λογαριασμού προς αναζήτηση, ως συμβολοσειρά κωδικοποιημένη σε base-58.

objectoptional

Αντικείμενο διαμόρφωσης.

result

Response
{
"jsonrpc": "2.0",
"result": {
"context": { "slot": 1 },
"value": 0
},
"id": 1
}
u64

Αντικείμενο JSON RpcResponse με το πεδίο value ρυθμισμένο στο υπόλοιπο.

Is this page helpful?