Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 96 characters in body
Source Link
Dev Bharel
  • 224
  • 1
  • 7

I get a b64 encoded data for an account from the transaction. I need to decode it into my account data struct called "Entity".

I deserialize the b64 data into bytes then :-

I tried to straight Entity::try_from_slice(bytes) but that throws an unexpected length of input error. This leads me to believe that that data is an AccountInfo struct, but there's no AccountInfo::try_from_slice() as I would have expected and the try_from() fn doesn't take in bytes.

Stuck on trying to figure out how to deserialize raw account data into an AccountInfo struct or better yet directly into my data struct.

This is for deserializing account info data on a rust client! Not the data within an account

I get a b64 encoded data for an account from the transaction. I need to decode it into my account data struct called "Entity".

I deserialize the b64 data into bytes then :-

I tried to straight Entity::try_from_slice(bytes) but that throws an unexpected length of input error. This leads me to believe that that data is an AccountInfo struct, but there's no AccountInfo::try_from_slice() as I would have expected and the try_from() fn doesn't take in bytes.

Stuck on trying to figure out how to deserialize raw account data into an AccountInfo struct or better yet directly into my data struct.

I get a b64 encoded data for an account from the transaction. I need to decode it into my account data struct called "Entity".

I deserialize the b64 data into bytes then :-

I tried to straight Entity::try_from_slice(bytes) but that throws an unexpected length of input error. This leads me to believe that that data is an AccountInfo struct, but there's no AccountInfo::try_from_slice() as I would have expected and the try_from() fn doesn't take in bytes.

Stuck on trying to figure out how to deserialize raw account data into an AccountInfo struct or better yet directly into my data struct.

This is for deserializing account info data on a rust client! Not the data within an account

Source Link
Dev Bharel
  • 224
  • 1
  • 7

How to deserialize raw account data from tx in rust?

I get a b64 encoded data for an account from the transaction. I need to decode it into my account data struct called "Entity".

I deserialize the b64 data into bytes then :-

I tried to straight Entity::try_from_slice(bytes) but that throws an unexpected length of input error. This leads me to believe that that data is an AccountInfo struct, but there's no AccountInfo::try_from_slice() as I would have expected and the try_from() fn doesn't take in bytes.

Stuck on trying to figure out how to deserialize raw account data into an AccountInfo struct or better yet directly into my data struct.