Hi, maybe this is similar to Libra clients for other languages, but I’m already using gRPC to send an UpdateToLatestLedger
request and get a proper account state response back. But the GetAccountStateResponse
only contains a AccountStateWithProof
which contains the AccountStateBlob
and a proof. The blob is exactly the same that the CLI prints as AccountStateBlob { Raw: ...
when using for example query account_state 0
, so it seems like I’m on the right track. But how should this be decoded?
In the Rust code there’s types/src/account_config.rs
and it contains pub fn make_from(account_map: &BTreeMap<Vec<u8>, Vec<u8>>) -> Result<Self>
, which seems to be the function that I need to port to the language I’m using, but I don’t speak Rust and don’t understand how this is being deserialized.
I also couldn’t find any spec in the documentation (like: “x bytes for the account number, 5 bytes for the balance, 3 bytes for the sequence number, …”).
Or is there some proto I’m overlooking that already lets me directly get the balance of an account for example?