Questions tagged [solana-program-library]

90 questions
0
votes
1 answer

Instruction: SetAuthority Error: owner does not match

I get this error when trying to mint master edition nft using CPI of the metaplex program Program log: Setting mint authority Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [3] Program log: Instruction: SetAuthority Program…
Anoushk
  • 551
  • 7
  • 20
0
votes
1 answer

How to achieve Solidity's mapping in Solana?

How to achieve the functionality of Solidity's mapping in Solana? What I need is a map with an arbitrary number of entries (it'll be evergrowing). So how to calculate the rent exemption and how to actually do this? Is it even possible? I just need 1…
6b86b273ff
  • 11
  • 2
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
1 answer

Calling an anchor (solana) program through classic javascript ? custom program error: 0x64

i deployed a program on the devnet, when i run anchor test, everything runs fine. The program needs 3 keys, and just return ok() (i commented everything inside). I am trying to call this program in my single page app (with a phantom signature), but…
0
votes
1 answer

What is the flow for transferring SOL through program?

I would like to write a program that can be used to exchange a token against sol (like buying action for an nft). I have a working example for a token A against token B. But i would like to replace token B by SOL. This example use anchor & escrow…
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

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?
0
votes
3 answers

Solana installation failure with curl: (23) Failure writing output to destination

When following the Solana tool suite installation guide I got the following error which says curl: (23) Failure writing output to destination. sh -c "$(curl -N -sSfL https://release.solana.com/v1.9.4/install)" downloading v1.9.4 installer curl:…
Eranda
  • 1,439
  • 1
  • 17
  • 30
-1
votes
1 answer

Init Token Account error - "Error processing Instruction 0: custom program error: 0x0"

In my program I'm trying to init PDA Token Accounts so that my program can store tokens of specified mints like this: #[derive(Accounts)] pub struct StartAuction<'info> { #[account(init, seeds=[&state.positions_count.to_ne_bytes()], bump, payer…
zdev
  • 75
  • 1
  • 2
  • 9
-1
votes
1 answer

How can i get the public key of the Candy Machine of collection

Please Help i want to get NFT Mint Addresses and this function below return what i want but it requires the candy machine id : import { Connection, clusterApiUrl, PublicKey } from '@solana/web3.js'; import bs58 from 'bs58'; const connection = new…
-1
votes
2 answers

Tokio macro requires rt or rt-multi-thread in Solana program

Anyone able to guide me on why I can be getting this error on my tests? The #[tokio::test] macro requires rt or rt-multi-thread. It is more a Rust question than a Solana one, but I have been following the examples (and I am learning Rust), so just…
awesomeQ
  • 11
  • 2
-1
votes
2 answers

Program, Account, Publickey and Keypair in Anchor

I'm beginner of solana programming using anchor. Now I have no clear understanding about these items. **Program, Account, PublicKey, Keypair** Appreciate any help to understand what these are and relationship between each other.
-1
votes
1 answer

How to add a Pubkey to an account containing a vector of Pubkeys in an anchor program

use anchor_lang::prelude::*; use rand::Rng; use solana_program::{declare_id, pubkey::Pubkey}; declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); #[program] pub mod raffle_impl { use super::*; pub fn create_raffle(ctx:…
-2
votes
1 answer

Keeping private data private in a Solana Rust program

I am trying to write a guess-the-number game on Solana. I am trying to write a Solana program (smart-contract) where the smart contract randomly picks a random number and whoever guesses it wins. Its a simple hello-world kind of a situation. Can I…
Marci-man
  • 2,113
  • 3
  • 28
  • 76
-7
votes
1 answer

How to generate keyphrase, mnemonic, seed, private key and public key on the Solana Blockchain

How to generate a keyphrase, mnemonic, seed, private key and public key on the Solana Blockchain (Mainet, Testnet & Devnet)?
1 2 3 4 5
6