Skip to main content

Questions tagged [keypair]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
37 views

How is a Solana wallet created behind the hood?

I realize that the private key is generated based on the ed25519 algorithm and that the public key is extrapolated from the private key, but I am wondering how does the actual connection get made ...
ren's user avatar
  • 31
1 vote
4 answers
92 views

Using anchor_client with tokio

I'm trying to invoke a transaction with anchor_client from a tokio context. Here's how I'm doing it: let pid = Keypair::new().pubkey(); let payer = Rc::new(Keypair::new()); let client = ...
Ahri's user avatar
  • 4,897
0 votes
1 answer
200 views

How to get lp pair key from mint address of a raydium token?

I want to get a LP key pair(WSOL-TOKEN). For example in $WIF, the mint addres is EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm, but I want to get EP2ib6dYdEeqD8MfE2ezHCxX3kP3K2eLKkirfPm5eyMx. I'm using ...
Krix's user avatar
  • 1
1 vote
1 answer
111 views

MODULE NOT FOUND

import * as dotenv from 'dotenv'; dotenv.config(); import { getKeypairFromEnvironment } from '@solana-developers/helpers'; const keypair = getKeypairFromEnvironment("SECRET_KEY"); console....
Kabin Giri's user avatar
0 votes
1 answer
228 views

When setting up on testnet, "Error: airdrop request failed. This can happen when the rate limit is reached."

After generating keypairs locally and moving to the airdrop step I’m getting this error: "Error: airdrop request failed. This can happen when the rate limit is reached." I do have 1 sol it ...
Blarney77's user avatar
0 votes
0 answers
137 views

"Error: crypto.getRandomValues must be defined" on React Native Expo using @Solana/Web3.js

Im building a solwallet using Solana/Web3/js, and i need to create a wallet account, so my approach is generate mnemonic so it can become seeds for a keypair, so it'll be the recovery phrase if needed....
Fath Zulfa Ali's user avatar
1 vote
1 answer
37 views

How to convert mnemonic to Pub key

Ive been playing around SOL rn but I cant get my mnemonic to convert to the correct pub key It does spit out one keypair but its not correct it is valid tho here is my code from solana.keypair import ...
jakub's user avatar
  • 11
0 votes
0 answers
16 views

Error: Program is not executable after I launch client to interact with helloworld.sol

This is in reference to the following repo: https://github.com/solana-labs/example-helloworld/ So after a few hiccups I managed to compile helloworld.so I then deployed that beast using: solana ...
Mark's user avatar
  • 45
0 votes
1 answer
33 views

Who owns the private key of delegated Staked Accounts?

I see on solscan.io account pages that most of them have isOnCurve false, but my delegated staked account has isOnCurve true. Does this mean someone has the private key of this account? Who? Usual ...
Unicornist's user avatar
1 vote
0 answers
51 views

How do I securely allow users to export their private keys?

I am working on a Telegram based trading bot which gives each new user a new wallet, into which they can transfer SOL for further trading. I am using Keypair.generate() from solana/web3js(Node.js,...
Anish Mukherjee's user avatar
1 vote
1 answer
20 views

How is the keypair for every contract generated?

When we build a smart contract e.g., program-examples/basics/hello-solana there are two files in the target/so directory hello_solana_program-keypair.json hello_solana_program.so How is the ...
A. K.'s user avatar
  • 175
2 votes
4 answers
512 views

How to generate a number of Solana addresses

I would like to generate a number of Solana addresses and store them in a database. I plan to use them to display and receive payments. I don't need to verify (I only need to display a receiving ...
Robert Lefebvre's user avatar
2 votes
1 answer
80 views

Solana Keygen Pubkey Prompt Won't Let Me Type

Following the Solana documentation here, when I follow the instructions for some reason it doesn't let me type in the seed phrase to connect a wallet to the command interface. It brings up the cursor ...
The Con Crypto's user avatar
1 vote
1 answer
208 views

WSOL Account Keypairs

I created a WSOL token account so I don't have to be creating temporary token accounts every time I want to make a transaction. Thing is, I created that account using Python and the function that does ...
lsrth's user avatar
  • 21
2 votes
1 answer
177 views

When importing wallet by mnemonic phrase, how can I check whether it is correct or not?

For import wallet by mnemonic phrase i use next code: const seed = bip39.mnemonicToSeedSync(mnemonic_phrase, ""); const hd = HDKey.fromMasterSeed(seed.toString("hex")); const ...
Leo Loki's user avatar
  • 401
0 votes
0 answers
14 views

What happens to a mint account secret key after an NFT is created? [duplicate]

When you create a new traditional NFT, people generate a random keypair that gets used as the mint. This key signs the transaction so the account gets allocated on chain. Does the secret key for this ...
nickfrosty's user avatar
  • 1,058
2 votes
2 answers
623 views

How do I create a keypair using a custom derivation path with Javascript?

I have a seed phrase that I used to generate an address with and sent tokens to it. I entered the seed phrase into Solflare wallet but it can't find the address with tokens on it. How do I create a ...
Raza's user avatar
  • 51
1 vote
1 answer
384 views

Error when importing secret key from .env

I am working through https://www.soldev.app/course/intro-to-cryptography and at the point where I am attempting to import the secret key from a .env I am getting an error: My keypair is set using: ...
GoodBurger03's user avatar
0 votes
2 answers
69 views

When to not use PDAs

I'm building a project that uses PDAs quite extensively. It seems to me that PDAs are very useful for almost every type of application (alternative for hash maps, storing user data etc) and not having ...
AceGravity's user avatar
2 votes
3 answers
1k views

How to convert Keypair.secret_key to Phantom compatible private key in python?

CODE keypair = Keypair.generate() key = keypair.secret_key This secret key isn't compatible in phantom wallet. I figured that the phantom private key can be converted to Keypair compatible secret key ...
aste123's user avatar
  • 171
0 votes
2 answers
55 views

Does program keypair has any other usage besides program deployment?

When we are doing program deployment on Solana using Anchor, it will read the key pair generated at target/deploy/<program>-keypair.json and use it to sign the instruction for initial deployment....
johnhckuo's user avatar
  • 137
0 votes
1 answer
80 views

In the basic Solana network, which parties have access to which data?

When trying to reason about whether SOL transactions provide certain types of privacy, it would be very helpful to have a complete list of the information accessible to each party in the basic (...
SapereAude's user avatar
0 votes
1 answer
62 views

Assuming confidential transactions, is the use of a different public key for each Solana transaction a reasonable way to achieve anonymity?

In the field of cryptocurrency design, there is a critical question of whether we can build, or have already built, a cryptocurrency that both (1) is highly efficient at scale (i.e., capable of ...
SapereAude's user avatar
5 votes
2 answers
1k views

How do you generate a base58 private key?

I know how to generate a keypair that has the uint8Array private key and generate a mnemonic, but how do you generate a base58 private key?
Jacob Creech's user avatar
  • 3,894
1 vote
1 answer
2k views

Deriving a public key from a private key programmatically

I'm stuck between a rock and a hard place right now. I'm developing an app with react native, and users need to be able to import their wallets via their private keys (and hopefully mnemonic phrases) ...
Morgandril's user avatar
2 votes
1 answer
39 views

Can another wallet pay for, Sign and Send transaction signature of another Keypair

if i create a custom instruction that requires a Keypair can another Keypair or client wallet sign or pay the transaction fees of said instruction please also explain how such things work.
Alex's user avatar
  • 51
3 votes
1 answer
349 views

ValueError: signature error: Cannot decompress Edwards point

I use example in docs solana for python from solders.keypair import Keypair from mnemonic import Mnemonic mnemo = Mnemonic("english") words = mnemo.generate(strength=256) seed = mnemo....
Leo Loki's user avatar
  • 401
3 votes
2 answers
321 views

Why does a "bad format" error occur when importing a key into phantom app?

I use example in docs solana for python I try get key pair and import to phantom by private key: from solders.keypair import Keypair from mnemonic import Mnemonic mnemo = Mnemonic("english")...
Leo Loki's user avatar
  • 401
2 votes
2 answers
2k views

How to get public and secret key from keypair Solders

Sorry if this is a really basic question but I am new to this. I am using Solders for python to generate Solana wallets and transactions. https://kevinheavey.github.io/solders/api_reference/keypair....
Ryan Thomas's user avatar
3 votes
2 answers
2k views

Keypair.generate() vs creating keypair with solana-keygen?

I see two ways of generating Keypair. the easiest one is import { Keypair } from "@solana/web3.js"; const randomKey = Keypair.generate(); I see the other way which needs more work to do. ...
Yilmaz's user avatar
  • 1,164
1 vote
1 answer
78 views

How to retrieve a FileSystem Wallet in a .ts file

I am new to learning Solana development. Is there any way to retrieve the keypair from a Filesystem path? I am doing a tutorial and I want to use the same keypair to sign transactions, instead of ...
LAUR_NASA's user avatar
  • 183
5 votes
1 answer
2k views

How do off-curve public keys work?

I'm trying to retrieve an associated token address, and found this random vanity wallet while looking through solscan. From running the code below, here are the results. Expected token address: ...
Lifok's user avatar
  • 53
1 vote
2 answers
1k views

Creating a Custom Vanity Key / Wallet

I recently tried to create a paper wallet following the command below; solana-keygen grind --starts-with kiz:1 --use-mnemonic --word-count 24 --language english --no-outfile --no-bip39-passphrase The ...
kiz's user avatar
  • 21
1 vote
0 answers
108 views

Metaplex Create NFT Signature Verification Error

This is the code I have: const { Metaplex, keypairIdentity, bundlrStorage } = require("@metaplex-foundation/js"); const { Connection, clusterApiUrl, Keypair } = require("@solana/web3.js&...
Helix Development's user avatar
1 vote
0 answers
54 views

Is it possible that a duplicate keypair can be created and used?

Solana_sdk::signature::Keypair is used to create the account address, this method is being used by everyone across the world and then the client program submit to the cluster. So my question is, could ...
Souvagya's user avatar
  • 131
1 vote
0 answers
42 views

Ledger Nano X 'Failed to read keypair file' error when running sugar

I keep getting this error - I've used Sugar before, but not with a hardware wallet: Error running command (re-run needed): Failed to read keypair file: usb:ledger\?key=0, The filename, directory name, ...
Patrick Keene's user avatar
2 votes
1 answer
108 views

How should generate account keys be treated?

If an account is not generated via PDA and is instead created as a new keypair, how should this new keypair be treated? Is it important to custody this somewhere secure? https://github.com/coral-xyz/...
AceGravity's user avatar
2 votes
2 answers
663 views

How I can create a wallet from keypair in frontend?

I want to sign some view transactions in frontend using a random keypair instead of wallet provider like phantom or solflare to avoid Approve popup I tried to create wallet like this: import { Wallet ...
Mahesh Ghamaand's user avatar
1 vote
0 answers
34 views

Solana "delegate-stake" fails on devnet

When trying delegate stake using: solana delegate-stake \ --fee-payer ~/staker-wallet-keypair.json \ --stake-authority ~/staker-wallet-keypair.json \ <STAKE_ACCOUNT_PUBKEY> <...
MusicMan's user avatar
6 votes
6 answers
5k views

Splitting a Solana Keypair into Public and Private Keys

I have the JSON file containing the keypair which has an array containing 64 values: $ cat ~/my-solana-wallet/demo.json [4,182,130,247,119,117,227,207,112,73,170,126,222,197,244,99,215,107,255,202,33,...
Rajat's user avatar
  • 137
0 votes
1 answer
397 views

How to i sign message with Keypair in rust

How to sign some message(like phantom signature) having a Keypair? I've seen some javascript implementations but i couldn't find any rust one. const provider = getProvider(); // see "Detecting ...
Meczka's user avatar
  • 1
1 vote
1 answer
927 views

Verify public and private key combination

If we have both a wallet address and private key, what is the best way to determine if the private key is indeed corresponding to the wallet address using a NodeJS server. Is the best way to sign a ...
Tomvkgames's user avatar
1 vote
1 answer
454 views

How can I generate a new wallet based off of a seed phrase

I see wallets like phantom and solflare pop up with a list of accounts when you import a seed phrase. How does that work? How can you find all of those through code? Can you generate new ones? Also if ...
Pixeled's user avatar
  • 476
1 vote
2 answers
64 views

Mainnet program deployment hygiene

Clearly having a single local keypair control mainnet program deployments is a horrible idea. Are there any well defined workflows to increasing security for deployments? Any handy multisig tools ...
Rohan Kapur's user avatar
1 vote
0 answers
52 views

Error Undefined is not an object (evaluating 'this.wallet.publicKey.toBuffer'), when using Metaplex with Bundlr

I am making a call to metaplex.nfts().uploadMetadata and using the keypairIdentity with a Solana id.json file. I believe this issue is in the Bundlr code but not sure why. Is anyone else using a ...
David Choi's user avatar
0 votes
0 answers
205 views

Error: Invalid arguments: authority not provided for transaction signed by keypair

I have a code that uses keypair from file to sign transactions. const payer = Keypair.fromSecretKey(BufferJs.from(keypair)); const wallet = new anchor.Wallet(payer); //// //// const tx = ...
agentp's user avatar
  • 235
4 votes
1 answer
129 views

Are wallet addresses "created" or are they "discovered"?

As I experiment and learn, I realized something that I wanted to confirm. It seems as though the network doesn't need to register the existence of a wallet in any way for it to become active and ...
OCDev's user avatar
  • 762
2 votes
1 answer
335 views

how can I read a keypair from a json file that contains many objects?

My json file looks like { "keypairs": { "keypair1":[12345678], "keypair2":[12345678], "keypair3":[12345678], } } where [12345678] is ...
coco's user avatar
  • 83
0 votes
2 answers
1k views

Converting a generated keypair into a base58 or seed phrase?

I did the following in my html file in the chrome console. After I get the following public and private keypair. How do I convert it into a base58 or seed phrase? The docs below don't state how to go ...
Patoshi パトシ's user avatar
9 votes
2 answers
268 views

How to bypass wallet approval and use the keypair on backend?

OK, Im trying to make transactions on backend(Nodejs). I want to make transactions that are made on the backend and want to store there as well(This parts easy). I just want to make sure, Because I ...
Syed Murtaza Ali Shah's user avatar