Questions tagged [buffer]

The tag has no usage guidance.

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

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
3k views

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('https://api.testnet.solana.com'); console.log(privateKey, '+++++++++'); const feePayer = Keypair.fromSecretKey(bs58.decode(privateKey))...
Mian Bilal's user avatar
1 vote
0 answers
185 views

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
140 views

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 (https://docs.solana.com/developing/clients/javascript-api#bundle) and I'm having some difficulty sending a transaction. My ...
jeffersonbenson's user avatar
4 votes
1 answer
399 views

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
183 views

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
305 views

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
79 views

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
488 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
3 votes
1 answer
274 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
4 votes
1 answer
370 views

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
136 views

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
4k views

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: https://soldev.app/course/interact-with-wallets. When I test the ...
Mario Enrique Yahuarcani Salin's user avatar