Questions tagged [solana-web3js]
322 questions
0
votes
3 answers
Import web3 not found... in solana web3.js
I npm installed everything, yet only web3 is not working? Is this a bug or is there an alternative to this solution?
import React,{useEffect, useState}from 'react';
import { Connection, PublicKey,Account } from '@solana/web3.js';
import {…

slim.syd
- 25
- 2
- 5
0
votes
3 answers
How to create account/signer using Phantom Wallet provider?
I am following the inner instructions of a Solana NFT to create the process of listing an NFT for sale.
According to this NFT, https://solscan.io/tx/25g9L7rDCn8ZbZAZoCvyVNe5woZUoK2PVU3VEXftqySa2EYsLUJB2GA42qDwxsezUBRH2A9eJX1iUUD2LCK9Fua9, the first…

Bryan Bastida
- 33
- 1
- 2
- 9
0
votes
1 answer
How to get all confirmed sold transactions by using Metaplex Solana?
I'm wondering if anyone here knows to use Metaplex to get all confirmed sold transactions by using mint address? SolScan.io has a sample endpoint
https://api.solscan.io/nft/trade?mint=Cipp5qJe9XGcZ4bMcSYC5RdoewmEjpkLo12RytkyDsQC&offset=0&limit=20.…

Ryang
- 1
0
votes
1 answer
Phantom wallet addresses not making sense
If I import a seed phrase with @solana/web3.js I seem to get different public address than the ones generated by Phantom wallet when I import the same seed phrase. Anyone any idea why?
const seed = Bip39.mnemonicToSeedSync("<12 word…

1977
- 2,580
- 6
- 26
- 37
0
votes
1 answer
mintTo - is there a way to get the transaxtion signature?
After I create my own token program I am thne minting some supply into another tokenaccount.
I notice the mintTo is a void function, is there any easy way to get the associated transaction signature ?
const token = new splToken.Token(
…

1977
- 2,580
- 6
- 26
- 37
0
votes
2 answers
How to modify my code to send custom SPL Token instead of regular SOL?
I'm building a website where people log in to their phantom wallet then by clicking on a button they will send a certain amount of our custom token to one wallet.
The code shown below is working with SOL and I would like to make it work with our…

Jerowd
- 1
- 1
0
votes
1 answer
Send a custom token on mainnet using phantom @solana/web3.js
I'm currently trying to dev a website allowing people to buy things that are available on the web site by using tokens from our project. (so it's just about sending tokens, not a trade between tokens and a NFT).
I've done almost everything needed,…

Jerowd
- 1
- 1
0
votes
1 answer
web3.js to use with web development
I want to use web3.js together with my web page but the require function is not working for me. I have tried using browserify , importing instead of declaring as const but none worked, one problem solution lead to another problem. I tried to bundle…
0
votes
1 answer
Solana check address ownership
is there in solana web3js any way how to check address ownership?
For example in ETH I sign a message with PK and then recover the address with message and signiture. If the address which I am checking equals to the address from recover function I…

Hancs
- 83
- 4
0
votes
1 answer
Create SPL staking on Solana Ecosystem
I'm newbie in programming, so the questiong is: is there any guides how i can create staking pool on solana ecosystem for created token? And what is the steps?

faaer
- 1
0
votes
2 answers
Getting address of a token account given a Solana wallet address
I've been trying the code below to get the spl-token account address for a specific token in a Solana wallet from the Solana wallet address, but I am having issues getting the result I am looking for. I run:
const web3 =…

Iceee
- 31
- 1
- 4
0
votes
1 answer
What is the difference between minting NFT's on Solana and Ethereum?
I am a little confused about the workflow of NFT's on the Solana blockchain. I come from Ethereum and everything there is very clear. There is a smart contract that is executed on the blockchain which requires a specific amount of Ether to accept…

justanotherguy
- 395
- 4
- 17
0
votes
2 answers
Commitment Level
I've written a basic rpc client which polls the state of an Solana account to look for a specific condition (i.e. a unique int64 Id being written to it). When the condition arises, I call a smart contract which takes the same account as a mutable…

Andy Johnson
- 189
- 3
- 10
0
votes
1 answer
solana getParsedAccountInfo returns null in value
I have this test wallet:
% solana account 9AYXoP3b22KHRhVuvjZbynpjNd2SXKFLoC1jrPMkyFkS
Public Key: 9AYXoP3b22KHRhVuvjZbynpjNd2SXKFLoC1jrPMkyFkS
Balance: 12.98943736 SOL
Owner: (removed by me)
Executable: false
Rent Epoch: 248
And I have this…

dizzystar
- 1,055
- 12
- 22
0
votes
1 answer
index out of bounds error in my Solana program
I'm learning how to program on Solana's blockchain and well I'm stuck...
I'm trying to run this code
import web3 = require('@solana/web3.js');
const connection = new web3.Connection(web3.clusterApiUrl("devnet"));
const key: Uint8Array =…

Lord of Grok
- 323
- 3
- 12