Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
wallet: allow the user to supply a keypair .json file in addition to pubkey for some commands #5439
show-stake-account, show-vote-account, and delegate-stake (probably others too) make the use figure the public key from a keypair json file and supply that public key on the wallet command-line. This is a little annoying/painful. eg:
$ VOTE_PUBKEY=$(solana-keygen pubkey ~/validator-vote-keypair.json) $ IDENTITY_PUBKEY=$(solana-keygen pubkey ~/validator-keypair.json) $ solana-wallet create-vote-account "$VOTE_PUBKEY" "$IDENTITY_PUBKEY" 1
Let's also permit this form:
$ solana-wallet create-vote-account ~/validator-vote-keypair.json ~/validator-keypair.json 1
as a convenience to users who don't mind giving the full keypair, even though only the public key is required.