Questions tagged [solana-web3js]

322 questions
15
votes
1 answer

solana web3 confirmTransaction @deprecated using a TransactionConfirmationConfig example

With this code VS show a deprecated warning: (method) Connection.confirmTransaction(strategy: string, commitment?: Commitment): Promise (+1 overload) @deprecated — Instead, call confirmTransaction using…
user3887366
  • 2,226
  • 4
  • 28
  • 41
10
votes
3 answers

Error loading workspace IDL for Solana Anchor Testing

For some reason, my mocha test is unable to find my IDL. I am getting the error below: name@Mabels-MacBook-Pro solana-anchor-reactjs-payment % anchor test BPF SDK:…
Mabel Oza
  • 557
  • 8
  • 22
9
votes
2 answers

How get all the NFTs in a collection in Solana?

Hello to fetch all the NFTs in a collection using the symbol of the collection. Is any API available that provides the data?
9
votes
1 answer

How to find all NFTs minted from a v2 candy machine

I'm minting Solana NFTs. Candy machine v2 was recently released and v1 is deprecated. If I create a v2 candy machine and mint some NFTs, how can I later find the hashes from all the tokens that were minted?
emersonthis
  • 32,822
  • 59
  • 210
  • 375
8
votes
4 answers

Minting NFTs in Solana. Transaction fees

I have already prepared the Candy Machines for minting an NFT collection in the Solana network, and I am testing the Mint process using its Devnet. Even if you can find a lot of tutorials about how to prepare the candy machines, there are some…
Jaume
  • 3,672
  • 19
  • 60
  • 119
8
votes
3 answers

How to get Metadata from a Token adress using web3 js on SOLANA

I get a list of tokens own by a publicKey thanks to that method : connection .getParsedTokenAccountsByOwner( new PublicKey(publicKey.toBase58()), { programId: TOKEN_PROGRAM_ID } ) .then((b) => { const owner =…
matt
  • 329
  • 4
  • 11
7
votes
0 answers

How to find all editions from a master edition NFT in Solana

I'm trying to get all the editions that come from a master edition NFT. According to the docs there is a PDA that links the edition back to the master edition but I can't find this relationship programatically with the Metaplex/Solana sdk. My…
Ari
  • 5,301
  • 8
  • 46
  • 120
6
votes
2 answers

how to verify the signature of a message in phantom solana?

I am trying to authenticate phantom wallet by signing it with a message I used below code to sign the message and it returns me a signature how can I verify that signature in the backend. const encodedMessage = new TextEncoder().encode("Message…
SUMANTH ALE
  • 69
  • 1
  • 3
6
votes
1 answer

How to transfer (using Program instructions) custom SPL token from my own account to another user's wallet?

This is my situation: I have created a wallet solana-keygen new I have created my own custom SPL Token spl-token create-token Then I created an Account for this SPL Token spl-token create-account The SPL token is now in my wallet A In the…
6
votes
1 answer

Get program id/address from Solana transaction data (solana/web3.js)

I want to determine whether a transaction has interacted with a specific program id "cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ" (being the Candy Machine program address). I'm using @solana/web3.js to get the below (bottom of post) Candy Machine…
5
votes
1 answer

How to register a Solana Fungible token in 2022

Since June 20, 2022, the rules for registering tokens have changed: https://github.com/solana-labs/token-list I have tried the following: 1). Create new tokens through the services: Strata Protocol Token Launchpad Token Creator Demo After creating…
Alexandr Kazakov
  • 682
  • 1
  • 7
  • 15
5
votes
2 answers

Solana websocket RPC with @solana/web3.js

I'm trying to connect to Solana mainnet using websockets. I can't find out how to connect using web3.js. Maybe someone faced this issue and can help me ? Thanks Here's a simple line of code I made: let con = new…
mercvry.eth
  • 89
  • 1
  • 6
4
votes
1 answer

Conceptual difference between Token, Account and Associated account in Solana

I'm coming from an Ethereum environment and the Solana concepts are a bit confusing. I found various tutorials that guide thru the code steps, but don't really explain the concept behind the logic. I understand that in Solana we've got Programs,…
Milkncookiez
  • 6,817
  • 10
  • 57
  • 96
4
votes
1 answer

Can't import the named export 'PublicKey' from non EcmaScript module (only default export is available)

Describe the bug Hi, I'm trying using Metaplex to upload the assets and verify the collection, I am now moving towards "Minting Website": https://docs.metaplex.com/candy-machine-v2/mint-frontend run rpm start inside the folder…
4
votes
0 answers

How to use @solana/spl-token in vanilla JS after importing in HTML using CDN?

I am trying to use @solana/spl-token(https://www.npmjs.com/package/@solana/spl-token) npm module with the below react implementation and convert it to vanilla js accessing it via CDN(https://www.jsdelivr.com/package/npm/@solana/spl-token) link after…
1
2 3
21 22