I see how I can create a PDA then use this PDA to call my program with the JS client, but how can I do it with the solana CLI ?

solana create-address-with-seed "test" 4hN644A4rMrusDEHgAUth5ubTKD7PtRLRL8LBXsTg8Gw create the address but not the account from what I understand. After I get the address from the past command, I cannot find the account with solana account

2 Answers 2


You cannot create an account with the solana cli. You can only generate an address with the CLI and find accounts that already exist


You cannot initialize PDAs outside of programs. You need to have an instruction in your program that initializes it for you/ modify and upon calling that program. Your PDA will be initialized.

For further information : What is a Program Derived Address (PDA) exactly?

  • I just deployed a program, then created a PDA knowing the programId of that program in my client code (JS). So I succeed to initialize a PDA in client code from what I understand. Commented Aug 14, 2022 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.