Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
65 views

How to Handle Base64-Encoded Signed Transactions in Rust

does anyone know the correct way to handle a string payload that is a signed transaction in Uint8Array format encoded in base64? const signedTransactionDecoded = base58.decode(transaction); const ...
Luigi Remor's user avatar
1 vote
1 answer
84 views

What is the difference between `serialize`,`try_to_vec` and `try_serialize` in anchor?

If I have an account let a : MyAccount and I try to serialize it to borsh, there's seemingly three ways to do this: a.try_to_vec a.try_serialize a.serialize Are these all the same?
McBain's user avatar
  • 5,384
1 vote
1 answer
68 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
  • 71
0 votes
1 answer
77 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
2 votes
1 answer
468 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
  • 157
1 vote
1 answer
1k views

How to properly deserialize encoded transaction?

// Sign the transaction const feePayer = USER_KEYPAIR; const deserializedTx = Transaction.from(Buffer.from(swapTransaction, 'base64')); deserializedTx.partialSign(feePayer); const ...
omm's user avatar
  • 27
0 votes
2 answers
1k views

Offline Transaction: Transaction signature verification failure?

we are recently been having some issues with our transactions on Solana. We serialize the transaction, send it to the user, deserialize it, make the user sign, extract the signature, send back the ...
Jinspe's user avatar
  • 3
1 vote
1 answer
91 views

What does range full operator do in borsh serialize?

I follow hackernoon-solana to see the syntax in non anchor project. this is the function signature pub fn process_instruction(program_id:&Pubkey,accounts:&[AccountInfo],input:&[u8])->...
Yilmaz's user avatar
  • 1,264
3 votes
1 answer
263 views

Recommended serialization library for dynamically sized objects

I am trying to write a vector of objects into a solana account. The problem is, the pre-allocated size of the account might be too small for my vector. I know i can re-size the account with realloc, ...
Ripleys 0x's user avatar
2 votes
1 answer
84 views

Is it possible to use type `char` in an account field / as funciton arguments?

The goal is to use to use the char type. I couldn't find a way or ressource on how to solve to borsh serialization errors that get thrown when trying to store a char type in an #[account] struct field....
tenxsoydev's user avatar