Skip to main content

Questions tagged [deserialization]

The tag has no usage guidance.

0 votes
1 answer
54 views

Deserialize transaction input data with publickey

How can I deserialize input args with publicKey inputs? Full Code: const borsh = require('borsh'); const bs58 = require('bs58'); const schema = { 'struct': { 'discriminator': 'u64', 'mint': "...
Levente Bencze's user avatar
0 votes
0 answers
22 views

Transaction input args deserialization

How can I deserialize the input args on Solana if I know the data structure and the "Instruction Data Raw"? Example transaction: https://solscan.io/tx/...
Levente Bencze's user avatar
1 vote
1 answer
28 views

What is account serialize and deserialize?

I was going through the anchor documentation and got to the tic tac toe game. Now having a hard time understanding why we need account serialize and deserialize here. pub enum GameState { Active, ...
Anas's user avatar
  • 51
1 vote
1 answer
42 views

Not able to read the updated value in a Solana Data Account

I have a simple solana greeting-counter program, I have it deployed locally. When I am calling from my typescript code I am able to do pretty much all the transactions and verify them. Except the last ...
Md Tauhidul Islam's user avatar
0 votes
1 answer
64 views

anchor_lang::AccountDeserialize

How to implement correctly try_deserialize and try_deserialize_unchecked for this Example struct? I've been trying, but failing miserably. #[derive(Clone)] pub struct ExampleProgram; declare_id!(&...
beliveN DAOist.dev's user avatar
1 vote
2 answers
374 views

Decode account data

I am trying to decode data from accounts. This is the IDL for the data I want to decode: { "name": "deployment", "type": { "kind": "...
CryptoTioSam's user avatar
0 votes
0 answers
70 views

Problem with account data serialization and deserializatin

I'm working on a Solana program and encountered an issue related to state management with Program Derived Accounts (PDAs). I successfully created a state for my Solana program and saved it to a PDA (...
Nikita's user avatar
  • 1
0 votes
1 answer
63 views

Serialising/deserialising data on android

I am currently going though the Solana development course and I try to adapt what I learn onto an Android application. Everything is going great so far but now I am stuck when I try to serialise/...
xapgo's user avatar
  • 1
1 vote
1 answer
212 views

how to make a proper schema for the arguments

there are arguments "args": [ { "name": "decimals", "type": "u8" }, { "name": &...
slntrx's user avatar
  • 111
2 votes
1 answer
130 views

Deserialise getAccountInfo data from Rust rpcclient for a PDA from drift protocol

Basically I have the following code in devnet. I want to call getAccountInfo to get some account information. I have a PDA: JD71QyQpAJvoyq4p6mfwyaw4rY9qaDLk4CQpHeuPSpEK created by the programId: ...
panicKing's user avatar
1 vote
3 answers
1k views

Decoding account data buffer from an account owner by Raydium Liquidity Pool V4

I'm trying to decode the account data buffer that is provided when calling methods such as getAccountInfo or getProgramAccounts with web3.js. The account in question is the account whose address is a ...
dbykv234's user avatar
0 votes
1 answer
58 views

How to deserialize VoteState account from on-chain program

I would like to deserialize VoteState account in Solana on-chain program. https://github.com/solana-labs/solana/blob/v1.17.10/sdk/program/src/vote/state/mod.rs#L285 From what I can see it's not ...
chalda's user avatar
  • 1,402
1 vote
1 answer
196 views

Issues with Using AnchorSerialize and AnchorDeserialize Traits

so I'm looking to create an instruction that creates an account called GamePot that contains a field called TokenInfo that holds the data for what is meant to be any particular SPL token with a mint ...
Brian M.'s user avatar
  • 121
1 vote
1 answer
224 views

What's the difference of using Borsh and buffer layout to encode/decode?

I want to interact with a program and discover this website: https://bettercallsol.dev/ Basically it allows you to serialize the data using both Borsh & Buffer layout. Despite they are two ...
johnhckuo's user avatar
  • 137
1 vote
1 answer
941 views

How to decode base64 response?

Req: { "method": "getMultipleAccounts", "jsonrpc": "2.0", "params": [ [ "...
omm's user avatar
  • 27

15 30 50 per page