0
Info {
  data: <Buffer 00 00 00 00 94 f7 95 8c c0 31 ae b3 72 e0 42 65 62 06 ea c6 76 c4 ef ae bb a2 16 bd 87 07 5a 05 10 44 4b c4 2f 29 b5 f7 4c 59 f0 06 09 
01 00 00 00 00 ... 32 more bytes>,
  executable: false,
  lamports: 2378332431981,
  owner: PublicKey [PublicKey(TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA)] {
    _bn: <BN: 6ddf6e1d765a193d9cbe146ceeb79ac1cb485ed5f5b37913a8cf5857eff00a9>
  },
  rentEpoch: 18446744073709552000,
  space: 82
}
here is info about account 7BgBvyjrZX1YKz4oh9mjb8ZScatkkwb8DzFx7LoiVkM3.I made it with this command:   const accountInfo = await connection.getAccountInfo(
    new web3.PublicKey(address)
  );
How I can deserialize something from data?

1 Answer 1

0

Copying a bit from How to deserialize data from getProgramAccounts?:

Try using getParsedAccountInfo, https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedAccountInfo, which will correctly parse this account.

Given the owner (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) and the length (82), this is an SPL Token Mint account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.