Questions tagged [buffer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

Error fetching Account Info on Android Kotlin `java.nio.BufferUnderflowException`

I want to fetch an account's data using [Metaplex KT Library][1]. I am still facing error while fetching an account: code: try { val serializer = SolanaAccountSerializer(...
Anam Ansari's user avatar
1 vote
1 answer

error while sending transaction with solanaweb3, [ReferenceError: Property 'Buffer' doesn't exist] in react native

the part of code that causes const connection = new Connection(''); console.log(privateKey, '+++++++++'); const feePayer = Keypair.fromSecretKey(bs58.decode(privateKey))...
Mian Bilal's user avatar
1 vote
0 answers

bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?) ,npm rebuild doesn't get rid of the error

I'm trying to make my javascript code that uses @solana/web3.js run faster. I tried npm rebuild and also npm install bigint-buffer, and neither got rid of the warning. Does the display of this warning ...
qqqqqqqq's user avatar
4 votes
1 answer

Just using the Browser bundle, how can I send a transaction (ReferenceError: Buffer is not defined)?

I've been messing around for a while with the @solana/web3.js browser bundle ( and I'm having some difficulty sending a transaction. My ...
jeffersonbenson's user avatar
4 votes
1 answer

Borsh Deserialization error: Trying to access beyond buffer length

I've seen some similar threads regarding this problem but none have provided a stable solution. I get the following error when attempting to fetch and deserialize account data: Deserialization error: ...
Sav's user avatar
  • 163
7 votes
1 answer

Verify Merkle tree in JS - Candy Machine v3

I am attempting to verify a Merkle Tree using the metaplex SDK for the Candy Guard from Cm v3. Specifically I wanna get this working in JS, same as this in Rust What I have is this: import { ...
Billy Mango's user avatar
3 votes
1 answer

How to safely close program buffers?

so recently I came across a tweet suggesting lazy developers to close program buffers with: solana program close --buffers -u m I know buffers are something like temp accounts used during program ...
vanderlinde's user avatar
1 vote
1 answer

Serialize float, int, Pubkey data using web3 js

I am trying to pass parameters of types: float, int, bool, pubkey to Solana anchor program instructions from web3js library #[account] pub struct Parent { pub field1: String, pub field2: u8, ...
Vivek's user avatar
  • 121
2 votes
1 answer

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
3 votes
1 answer

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
4 votes
1 answer

How can I get parse a public key from Buffer?

solana/web3.js has a function PublicKey.toBuffer(key). How do I get the public key back from that buffer? "decode()" only returns the correct key if i use "encode()" to turn it ...
coco's user avatar
  • 43
3 votes
2 answers

How to write a factory pattern contracts in solana

Is there a way to implement a factory pattern contracts with rust on solana? Is it similar to the ethereum way? Please show an example. Went through discord and docs, probably missed it, but couldn't ...
Solomon's user avatar
  • 315
9 votes
5 answers

Uncaught ReferenceError: Buffer is not defined. Using Phantom Wallet, Solana and React to make a transaction

I've created a simple app to figure out how to use a Phantom wallet to make Solana transactions. I'm trying to follow SolDev course: When I test the ...
Mario Enrique Yahuarcani Salin's user avatar