Questions tagged [solana-web3js]
322 questions
2
votes
1 answer
Track Solana wallet change in Web
I'm building a Web3 app while using Solana.
I'm using @solana/wallet-adapter for wallet connection
Code:
const Wallet = ({ children }) => {
// The network can be set to 'devnet', 'testnet', or 'mainnet-beta'.
const network =…

nrjshka
- 189
- 8
2
votes
0 answers
Could not find a declaration file for module 'buffer-layout': @solana/spl-token
I'm trying to work with @solana/spl-token lib for transferring tokens but when I tried to install and run ng serve (using Angular 11). I'm getting the following error:
Could not find a declaration file for module 'buffer-layout'.…

user3516490
- 21
- 1
2
votes
0 answers
How to mint NFT in Magic Eden by rpc or web3
I want to know about mint method in Magic Eden.
In Candy Machine we can mint NFT by web3 like this.
await candyMachine.program.instruction.mintNft(creatorBump, {
accounts: {
candyMachine: candyMachineAddress,
candyMachineCreator,
…

needman9
- 96
- 5
2
votes
2 answers
SolanaWeb 3.js package TypeError: s.TransactionInstruction is not a constructor
I'm developing the front-end for a lending protocol where users lists NFT to lend on Solana. I'm getting an error on createListing:
await program.instruction.createListing(
listingBump,
params, {
accounts: {
…

ggiurca
- 118
- 1
- 12
2
votes
1 answer
How can I retrieve market ids for Solana token swap program?
Having mint addresses of two spl tokens on Solana mainnet, I need to find public key of all possible markets (i.e. marketId in the following code snippet) available on Solana to get token swap info from:
const tokenSwap = await…

Ehsan Khodarahmi
- 4,772
- 10
- 60
- 87
1
vote
1 answer
Non-base58 character error in create Fungible token in Solana
I am trying to creat fungible token using metaplex(here)
The rest is working fine but when sending transaction there was error.
I found that createCreateMetadataAccountV2Instruction in add transaction has different type of props in guide. If I use…

Alchemist
- 325
- 1
- 17
1
vote
1 answer
Solana Staking On Devnet
Getting error while delegating sol for staking on devnet
Trying to delegate sol on devnet
logs:
SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 1: incorrect program id for instruction
…

Rudraksh
- 91
- 1
- 5
1
vote
1 answer
How to pay rent fee when creating solana wallet in nodejs
hello I create solana wallet with the following code on my nodejs server.
const SolanaWeb3 = require("@solana/web3.js");
SolanaWeb3.Keypair.generate();
I don't think this is an active wallet. Because I haven't paid the rent fee for this…

scvvcs
- 13
- 3
1
vote
1 answer
Connect to a Solana custom program without a wallet / frontend
I would like to be able to connect to my custom solana program without using any frontend object.
Currently, my provider method uses "window.solana" which I want to avoid.
The idea is to be able to sign transaction from a backend without having to…

Maxence Dubois
- 17
- 1
1
vote
0 answers
How to close and transfer all SOL balance programatically without reserving the rent?
I have a Solana account A which is a fee payer, and another Solana account B with some SOL balance, I want to close and transfer all account B's SOL balance to another account C. How do I do that?
I saw the following error:
SendTransactionError:…

pengdu
- 1,331
- 2
- 14
- 21
1
vote
1 answer
solana-test-validator doesn't run
On mac 11.5.2
trying to run solana-test-validator doesn't work and throws next error in terminal
dyld: Symbol not found: __ZNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE7seekoffExNS_8ios_base7seekdirEj
Referenced from:…

Frolov Andrey
- 21
- 1
- 4
1
vote
1 answer
SendTransactionError: failed to send transaction: Node is unhealthy
I'm trying to send a transaction with a memo program inside it.
The problem appears on solana cli and web3 too.
This is the command:
solana transfer --from ./.cache/solana.json RECIVER_PUBLIC_KEY 0.00001 --allow-unfunded-recipient --url…

Sbardi fx
- 11
- 2
1
vote
2 answers
Is there any way to convert dollar to ether while making transaction using Ethereum payment as well as from dollar to Solana in Web3.js?
I am integrating payment transaction for two blockchains , ethereum and solana using Web3.js. But how to automatically convert the dollar price to Ethereum and Solana respectively?
Ethereum payment code
----------------------------------
const…

Abhishek Chatterjee
- 57
- 6
1
vote
0 answers
Ionic Cap Websocket connection refused during Handshake in Android Webview
I'm making a hybrid app working with Ionic React, using solana web3.js module.
Everything works fine when I launch web server, and access on computer and mobile (chrome, firefox).
To build on android, I pass a custom function to fetch when i start…

YfNk
- 94
- 5
1
vote
1 answer
Transaction with "SystemProgram.createAccount" results in "Error: Signature verification failed at Transaction.serialize"
What I'm tryding to achieve is a webpage on which the user connects its phantom wallet and then by a simple press of a button creates a token.
In order to achieve that, I created a simple transaction for now which creates an account for the future…

Procuste
- 61
- 3
- 5