I'm trying to figure out how to get my pubkey that is the default account for my file system wallet. I know where the json file is located (ie ~/.config/solana/id.json) and of course I looked into it. It's just an array of numbers, I can probably figure out what base the file is in and convert it to get my pub and private keys, but there has to be some kind of built in solana cli command to do this. Can anyone help?
Ok, I was using the wrong cli tool. I thought it was in "solana-keygen" but the command was:
solana address
if you want to get the pubkey of a keypair in a file you can also use the following command:
solana-keygen pubkey file.json
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.