I am generating multiple keypairs and would like to keep track of keypairs I have already generated. The two simplest ways I can think of to do this would be

  • to send a tiny amount of Sol to each generated account to indicate the keypair for this account has already been generated.
  • to use a centralized database to keep track of this.

Is there any way I can do this that does not require me to fund these accounts or use some sort of centralized storage?

2 Answers 2


You can store the public keys in an account, you pay the tx fee to update the account but you can batch them to reduce the cost.

Where are you generating them though? Wherever they are you can look up the pubkey using the solana CLI for all the keypairs present. Or store them as their pubkey.json and just look at the file names? You'll need to store the private keys somewhere anyway so may as well store the list of pubkeys there too?

Or as someone else suggested use PDAs as these are generated from seed and deterministic.


You can use System Account PDAs with memorable or obvious seeds. e.g. 1,2,3 etc... But you have to create the program logic to handle those PDAs for you. (Withdrawing etc...)

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.