Skip to main content

Questions tagged [seed]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
118 views

How to use timestamp as seed for my PDA?

I'm wondering what are the best practices when using timestamps as a seed to calculate a PDA (or if using a timestamp is recommended at all). I should generate the timestamp from within my program: ...
Matheus Baptistella's user avatar
0 votes
0 answers
16 views

can someone add a pull request to https://github.com/iancoleman/jsbip39 so that we can generate private keys from seed phrases. sol is missing

please for the love of solana can someone add a pr to https://github.com/iancoleman/jsbip39 so that we can use that resource to generate private keys from bip39 seed phrases. Sadly above my skill cap....
tobo's user avatar
  • 1
2 votes
1 answer
72 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
0 votes
1 answer
89 views

Can I recover one of my wallets without having my private key or seed phrase?

I somehow deleted one of my wallets created in phantom without saving the seed phrase or private key. Is there any chance to recover this wallet? And if so how?
Billy's user avatar
  • 1
2 votes
1 answer
151 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
  • 392
3 votes
1 answer
131 views

Anchor PDA Seed

I want to create an anchor PDA using the following logic: seeds = [ b"some-text", user.key().as_ref(), Vec<Pubkey>, bool ] Is this possible? The array of pubkeys are ...
AceGravity's user avatar
3 votes
1 answer
375 views

When importing a mnemonic phrase into a phantom app, the wallet addresses do not match

I tested a code example for generating a mnemonic phrase and restoring a wallet using a mnemonic phrase from the official Solan documentation and a question arose. const mnemonic = "pill ...
Leo Loki's user avatar
  • 392
1 vote
1 answer
77 views

I'm facing custom program error: 0x0 when try to derivated a PDA with custom seeds

I'm facing an issue in my instruction trying to generate a PDA from a string and user.key(), just like in the PDA Anchor tutorial. I tried it in various ways and still, I get the same error: Error: ...
0xNicko's user avatar
  • 41
2 votes
2 answers
238 views

Instruction index: 0 Reason: A seeds constraint was violated. Getting this while testing in playground for the UpdateFund ctx

#[program] pub mod fund { use super::*; pub fn initialize_user( ctx:Context<InitializeUser>, ) -> Result<()> { msg!("User Initialized"); ...
0xmadhan's user avatar
1 vote
1 answer
199 views

Recover address wallet

How do I recover address wallet by use private-key? Following solana doc, it just showing recover address by seed phrase, and I want to recover by private-key
soler's user avatar
  • 11
3 votes
3 answers
159 views

Can't initialize PDA cause of seed constraint, even though seeds are correct

I am trying to create a PDA with variable seeds like this #[derive(Accounts)] #[instruction(i: u8)] pub struct SendRequest<'info> { #[account(mut)] pub owner: Signer<'info>, #...
Abhishek Faliya's user avatar
2 votes
1 answer
160 views

Are there any rules as for what derived path can look like?

For my application I need to generate new addresses constanly. I want to do it via mnemonic phrases because it'll allow me to restore a private key of an address if I lose it. I need to generate ...
Camila326's user avatar
  • 159
2 votes
1 answer
969 views

How to generate address out of a seed phrase and a derivation path for Solana and some tokens?

I know how to generate addresses out of a seed phrase and a derivation path in Ethereum. And I need to do the same thing for Solana too. However, I've done a research and barely found anything. Also, ...
Camila326's user avatar
  • 159
2 votes
2 answers
182 views

How to use timestamp as seed

I'm trying to use the current timestamp as seed but i can't find the right way, i even try to passing as string and getting a deserialize error. here is the code for my program: use anchor_lang::...
Juan Marchetto's user avatar
3 votes
1 answer
141 views

Is there a way to get all accounts for pda with one missing seed?

#[account( init, payer = signer, seeds = ["dummySeed".as_bytes(), party.key().as_ref(), member.key().as_ref()], bump, space = DummyStruct::LEN )] ...
Mehmet Ayd's user avatar
1 vote
1 answer
60 views

Error processing Instruction 0: Cross-program invocation with unauthorized signer or writable account

i'm getting the error in the title mentioned above and none of the solutions online seem to fix my error. This is the error msg in its entirety: Error: failed to send transaction: Transaction ...
ZeRo's user avatar
  • 33
1 vote
1 answer
432 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
4 votes
2 answers
170 views

Consecutive seed pdas

Is it possible to have an account with a counter, and an instruction that can be called by any user at any time and will init a new pda with the counter number as seed and add 1 to the counter? I find ...
user3688985's user avatar
2 votes
1 answer
482 views

How to use u64 as seed

I am creating pda accounts with a variable seed. To do this I created an account with a counter u64. For every pda account created, the counter will increment in 1, so the seeds of the account created ...
user3688985's user avatar
2 votes
1 answer
162 views

Use u64 as PDA seed

I want to initialize a PDA with a big number for seed, but findProgramAddress returns an error: Uncaught (in promise) TypeError: (intermediate value).toBuffer is not a function import { BN } from &...
user3688985's user avatar
5 votes
2 answers
183 views

Variable seeds for PDA

I am trying to initialize a PDA using the u64 value stored in another account. The idea is that the stored counter increments and the value determines the seed. My code: #[derive(Accounts)] pub struct ...
user3688985's user avatar
2 votes
1 answer
237 views

Seed and Private Key

I use, for example, a Phantom, and I created 10 wallets by seed phase. Then I shared the private key (via export private key) of one of the wallets. Can anyone access the rest of the wallets based on ...
Kanitelk's user avatar
1 vote
0 answers
52 views

PDA seeds element size problems

I encountered an oddproblem with the seeds array when searching for a PDA via macro #account(init, seeds ...)]. Since each of the seeds array elements can be up to 32 bytes, I want to use the first 32 ...
Sebastian Dine's user avatar
2 votes
2 answers
39 views

Make reading from PDAs private

If I remember correctly, PDA can be found out by anyone who knows the seed, Public Keys and the Program ID related to a Solana program. Is there a mechanism through which no one except the public key ...
felix's user avatar
  • 270
1 vote
3 answers
191 views

Unauthorized signer on CPI transfer call

so I am trying to write an app where we can deposit native SOL to a wallet, that wallet would be a PDA, and based on some event I would like to transfer SOL to a particular wallet via a CPI call but I ...
Sing's user avatar
  • 111
1 vote
1 answer
112 views

What seeds should I use in `invoke_signed()` for PDA derived via `create_with_seed()`

I have a PDA generated with: const SEED: &str = "My Seed"; let pda = Pubkey::create_with_seed(program_id, SEED, &owner_id).unwrap(); Where program_id and owner_id are some fixed ...
totikom's user avatar
  • 375
0 votes
1 answer
50 views

Solana mobile sdk seed vault unauthorized

We are trying to make a wallet compatible with the Solana Mobile SDK seed vault, but it's throwing an error? Does anyone know what is wrong here? See the screenshot attached.
Yogesh Trivedi's user avatar
6 votes
2 answers
174 views

CPI call succeeds with one input and fails with another one (same length)

There are two programs: master and puppet. On the client side the puppet is called in order to initialize an account on the puppet using an uuid v4 as seed. Then, the client calls the master to proxy ...
blasrodri's user avatar
  • 205