Questions tagged [decode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 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
61 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
  • 97
1 vote
1 answer
61 views

how to make a proper schema for the arguments

there are arguments "args": [ { "name": "decimals", "type": "u8" }, { "name": &...
slntrx's user avatar
  • 97
1 vote
1 answer
329 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
  • 97
2 votes
1 answer
76 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
  • 21
1 vote
1 answer
299 views

How to decode base64 response?

Req: { "method": "getMultipleAccounts", "jsonrpc": "2.0", "params": [ [ "...
omm's user avatar
  • 27
0 votes
0 answers
37 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
188 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
89 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
154 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
  • 3,875
1 vote
0 answers
489 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
88 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
77 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
  • 3,875
2 votes
1 answer
873 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
155 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
554 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
113 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
  • 33
1 vote
1 answer
1k 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