Skip to main content

Questions tagged [decode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
0 answers
37 views

Decoding an instruction for a token on the spl token program

Hello you may have seen my last post, Error : TypeError: Cannot read properties of undefined (reading 'equals') This is a follow up to that post. I decided to experiment more with ...
Golden's user avatar
  • 49
0 votes
0 answers
42 views

Error : TypeError: Cannot read properties of undefined (reading 'equals')

Hello im trying to decode a possible MintToInstruction if there is one present in the transaction im looking at. This is my code: const { decodeMintToInstruction, decodeMintToCheckedInstruction, ...
Golden's user avatar
  • 49
1 vote
1 answer
91 views

Decoding instructions

Hello I hope you are all having a great day!! I wanted to ask how I would go about decoding transaction instructions into a readable format. This is my code below const { decodeMintToInstruction, ...
Golden's user avatar
  • 49
0 votes
0 answers
84 views

decode raydium transaction detail information

Solscan has introduced a new feature called "defi activities." By opening any token address, you can see all the transaction details for that token. Currently, I am using the WebSocket ...
blueboy's user avatar
  • 23
1 vote
1 answer
22 views

Is there anyway to decode program account change that I don’t know the struct?

I’m trying to decode update that I got from the call of “connection.onProgramAcccountChange” but I don’t know the struct of possible outcome, is there anyway to get the struct or decode it somehow ? ...
Daniel Kotlarov's user avatar
0 votes
1 answer
78 views

Decoding transaction instructions in order to listen to outputs of those transactions

currently working on a project and it's all coming together nicely apart from this part. So what I want to achieve is listening to instructions, so I'm already subsribed and listening to the address ...
Niek Kamer's user avatar
0 votes
0 answers
208 views

Decode data returned by programSubscribe

I can't figure out how to decode the 'data' received when subscribed (via websocket) to the Jupiter Limit Order Program (jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu). I'm using the program's IDL. This ...
TheLastSamurai's user avatar
0 votes
1 answer
114 views

what the numbers in the array indicate?

I work with decoding data. I use the @solana/spl-token package for that. sometimes I get the TokenInvalidInstructionKeysError error I have this code ts. as keys I provide an array of keys that I have ...
slntrx's user avatar
  • 111
1 vote
1 answer
177 views

how to make a proper schema for the arguments

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

how to decode data instructions with javascript

upd: https://docs.solana.com/developing/programming-model/transactions#instruction-data here, my task is to decode this data using js I tried to solve the issue with this post How to get Solana ...
slntrx's user avatar
  • 111
3 votes
1 answer
171 views

Deserializing an Enum with borsh

How do I make a "kind": "enum" using borsh? In the IDL, it says that it's an enum instead of "struct". Here is what I tried: const WhitelistMode = borsh.rustEnum([ ...
Garen's user avatar
  • 31
1 vote
1 answer
805 views

How to decode base64 response?

Req: { "method": "getMultipleAccounts", "jsonrpc": "2.0", "params": [ [ "...
omm's user avatar
  • 27
0 votes
0 answers
50 views

ntexapi.rs file not working

Keep getting this error involving the ntexapi.rs file: error[E0793]: reference to packed field is unaligned. Tried to modify the code but nothing works. Files are up to date, can anyone help me out?
Simon's user avatar
  • 1
3 votes
1 answer
369 views

Getting transaction info on account changes using JS

Using JS, how would I go about getting transaction information on transactions that affect the balance of a specific account? I've been able to listen for account changes with the following code, but ...
gxc's user avatar
  • 165
1 vote
1 answer
138 views

Document for the parsed instruction data of transferChecked

I would like to know where the document for the parsed instruction data returned from RPC:getBlock with encoding=jsonParsed for Token/Token-2022 program. Or where is the "program-specific ...
mission.liao's user avatar
3 votes
1 answer
207 views

Anchor IdlError: Type not Found for usize

When parsing an account using Anchor, I receive the following error: IdlError: Type not found: "type":{"defined":"usize"} My code import * as anchor from "@project-...
vicyyn's user avatar
  • 4,095
1 vote
0 answers
664 views

Deserialize metaplex token metadata instruction data

I would like to dezerialise instruction data to the metaplex token metadata program in node js. For example the instruction data of creating a metadata account v2 or when creating a master edition v3. ...
Tomvkgames's user avatar
1 vote
1 answer
163 views

Getting RangeError when calling decodeTransferCheckedInstructionUnchecked

Getting the following error RangeError: The value of "offset" is out of range. It must be >= 0 and <= 8. Received 9 When I try to call decodeTransferCheckedInstructionUnchecked on the ...
Shak's user avatar
  • 11
0 votes
1 answer
93 views

How to get the changes that happened in an account in a signature?

I have a data account with 187 bytes allocated After each signature, the data changes. Yet I can't seem to find how to get the changes in the data that happened in that account. e.g. this transaction ...
vicyyn's user avatar
  • 4,095
2 votes
1 answer
1k views

how to decode data of specific account

how can i deocode the buffer data of account. let pb = new PublicKey("GnAwACYKCx5LEv8QJUKvGigcix8AjnsrjLEn2Cu6UJrH") let a= await connection.getAccountInfo(pb) Output
Hamza Bhatti's user avatar
1 vote
1 answer
325 views

How to convert a Phantom signature to string in order to pas it via API?

I have a signature from the Phantom wallet in the Uint8Array format which I receive in the following way. const encodedMessage = new TextEncoder().encode("sign me please"); const ...
Sasha Shpota's user avatar
3 votes
1 answer
1k views

Decoding data buffer of an account - @solana/buffer-layout - Rust u64 to Typescript Number conversion

I figured out how to decode the data buffer manually for a solana account data. I used the USDC account address to get the account data and then I used the @solana/buffer-layout for u64 buffer ...
andromeda's user avatar
0 votes
2 answers
156 views

"network request failed..." when trying to use metaboss

I installed metaboss on my Ubuntu server using this: bash <(curl -sSf https://raw.githubusercontent.com/samuelvanderwaal/metaboss/main/scripts/install.sh). When I run metaboss decode mint -a ...
Maxisy's user avatar
  • 43
1 vote
1 answer
2k views

How to decode the instruction data of a transaction retrieved via getTransaction

Hey I wanted to build a parser, for spl transactions to figure out the kind of instruction via instruction data(first byte)/u8/first index of the byte array( tells me if its burn,transfer,etc. but the ...
Nabeel Naveed's user avatar