solana paper wallets are stored in ~/.config/solana/id.json. Everytime I need to use the wallet I have to either declare the keypair in my project or create a helper function that loads the keypair from the path.
When working and you need a signer that does not change and you do not want to have to declare the keypair in your config files,
having a function like loadFromFilePath(path: string) might be nice
Details
Could be implemented in the Keypair interface.
have a function loadFromFilePath(path: string?) for this that optionally takes in a path argument since the default Solana config location for a wallet is config/solana/id.json else if the user supplies an argument to this function load the wallet from the supplied location.
Motivation
1562
solana paper wallets are stored in
~/.config/solana/id.json
. Everytime I need to use the wallet I have to either declare the keypair in my project or create a helper function that loads the keypair from the path.Example use case
When working and you need a signer that does not change and you do not want to have to declare the keypair in your config files,
having a function like
loadFromFilePath(path: string)
might be niceDetails
Could be implemented in the
Keypair
interface.have a function
loadFromFilePath(path: string?)
for this that optionally takes in a path argument since the default Solana config location for a wallet isconfig/solana/id.json
else if the user supplies an argument to this function load the wallet from the supplied location.