Questions tagged [solana-web3js]
322 questions
1
vote
1 answer
Solana Token transfer works in localhost but not on server
So I have a option on my site to "send" xy amount of custom solana token with connection to phantom wallet.
This exact same function works in localhost but not when I upload it to my server and go to the website through the ip adress. How is this…

LEMO
- 53
- 1
- 7
1
vote
1 answer
solana@web3.js / program transfer
I'm trying to have a simple program written in Solana that, on user approval, runs and transfers a given amount of SOL into the program's owner account.
From JS side I've this based on the HelloWorld example from Solana repo
...
…

tiagoapp
- 13
- 4
1
vote
1 answer
What is the alternative of "approve" in evm on Solana?
I have several wallets in evm. I give their X token access to my main wallet by calling Contract(x).approve() function. Thus i can make operations with these wallets. Now i want to do same thing on solana with solana web3 library. However i cannot…

0x_orkun
- 11
- 1
1
vote
1 answer
solana-web3.js Invalid param: unrecognized Token program id
I am trying to get all NFT's from a solana wallet. I am using Connection.getTokenAccountsByOwner method in the solana-web3.js API.
Error reads:
Error: failed to get token accounts owned by account : Invalid param: unrecognized Token…

Andrew Melbourne
- 82
- 1
- 8
1
vote
2 answers
Ability to provide keypair to solana spl-token command
I'm performing a call of this CLI function
spl-token balance --token--
So it requires a keypair.json file to be present at this location ~ .config/solana/id.json (for Mac)
Without this file CLI throws an error
error: No such file or directory (os…

Vlad Kolbaia
- 267
- 4
- 11
1
vote
2 answers
NotImplementedError in publickey.PublicKey().find_program_address() solana-py
I am trying to get the PDA for a mint account in order to get NFT metadata. I am using solana-py library.
from solana import publickey
pda =…

CryptoTioSam
- 63
- 7
1
vote
1 answer
Solana allowing other wallet to mint or transfer token from my wallet
How do I make other wallet able to mint or transfer token from my wallet if my wallet's keypair is provided, but I want the network fee to be paid by the other's wallet not my wallet?
Is this possible in Solana web3js?

Sudarmin Then
- 11
- 2
1
vote
0 answers
Signature verification failed When transferring spl-token to user connected phantom wallet
bs58.decode(
"2YQDdnfxiHPKu9GypLX1yXaQTQojvDSPgFkDxrU********************************************"
)
const mintPubkey =
"A8SJfwzKJAaMrY6Lb*************************";
const getProvider = async () => {
// opens…

Amir Alam
- 155
- 1
- 12
1
vote
1 answer
How to transfer NFT spl-token using phantom wallet and solana web3js
I can transfer the Solana from one account to another account using phantom wallet using this code
const transferTransaction = new Transaction()
.add(SystemProgram.transfer({
fromPubkey: alice.publicKey,
toPubkey: feePayer.publicKey,
…

Amir Alam
- 155
- 1
- 12
1
vote
1 answer
Uncaught ReferenceError: __VITE_IS_MODERN__ is not defined
I am working with @solana/web3.js and @solana/spl-token but I am getting error
Uncaught ReferenceError: __VITE_IS_MODERN__ is not defined
at modulepreload-polyfill:43:3
I am not sure which library is causing this.
My import packages list is…

stwpd
- 79
- 2
- 13
1
vote
0 answers
getTokenAccountsByOwner - odd result?
I have created a token using SPL. And I have minted some supply into a wallet address on testnet
Token address: 668JcT5AiLYNi8XVaDNntTaLWzuQ8EnbBzA9zSmKbipW…

1977
- 2,580
- 6
- 26
- 37
1
vote
1 answer
Is there a way to get transaction data from Solana blockchain live?
I would like to be able to "listen" live to transactions on Solana for specific NFTs, is this possible?
I have managed to do this for Ethereum, using web3, a hash address and ABIs which allow us to listen to any NFT transaction within the NFT…

Jonny
- 15
- 1
- 4
1
vote
1 answer
How to see what NFTs a website visitor has in their Phantom Wallet
I've created some NFTs on the Solana Blockchain and now have them in my Phantom Wallet.
How would I create a website that checks the users' wallet to see which NFTs they have in it, eg to make them available in a web based game I might create?
I…

Jonathan Plackett
- 2,346
- 2
- 20
- 33
1
vote
1 answer
Get Balance and all custom token list of Solana tokens in Wallet
I'm actually stuck at the first step on connecting to phantom wallet. I'm trying to perform the following step.
Connect to Phantom wallet
Get a Public key
Get Balance of all tokens
Perform Buy/Sell
I'm able to connect to a phantom wallet with the…

Deepak Bandi
- 1,854
- 4
- 21
- 37
1
vote
0 answers
What is the "mint" key referring to in Metaplex SDK JS's token burning function parameters?
I am trying to burn a token (that is definitely minted and exists) on the Solana network using the javascript Metaplex SDK.
Their token burning function (written at the bottom) takes in an object of this interface for a parameter:
interface…

codename
- 11
- 2