I'm experimenting with the RPC methods using websockets from solana.py.
I didn't find a documentation describing precisely all fields in reply. As an example, AccountSubscribe
methods should give the following (source):
{
"jsonrpc": "2.0",
"method": "accountNotification",
"params": {
"result": {
"context": {
"slot": 5199307
},
"value": {
"data": [
"11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHPXHRDEHrBesJhZyqnnq9qJeUuF7WHxiuLuL5twc38w2TXNLxnDbjmuR",
"base58"
],
"executable": false,
"lamports": 33594,
"owner": "11111111111111111111111111111111",
"rentEpoch": 635,
"space": 80
}
},
"subscription": 23784
}
}
For example, the field data
is encoded in base58
. But the decoded data is not a string.
What is the format of the decoded data
field ? How to decode (after base58
decoding) it ? How to interpret it ?
The same documentation says the notification format is the same as getAccountInfo
. And getAccountInfo
documentation says this:
data: <[string, encoding]|object> - data associated with the account, either as encoded binary data or JSON format {<program>: <state>} - depending on encoding parameter
Any clue ?