I generate a new key pair by running:
solana-keygen new --force
I print out the address:
solana address
2EHCPkQHcjiBUgWT6zpcHmLPbW2r6wKtb9RjYnoBwFb7
Now I tried to get the account details associated with the key pair and it fails:
solana account 2EHCPkQHcjiBUgWT6zpcHmLPbW2r6wKtb9RjYnoBwFb7
Error: AccountNotFound: pubkey=2EHCPkQHcjiBUgWT6zpcHmLPbW2r6wKtb9RjYnoBwFb7
But then I request some airdrop to the keypair:
solana airdrop 20 2EHCPkQHcjiBUgWT6zpcHmLPbW2r6wKtb9RjYnoBwFb7
Requesting airdrop of 20 SOL
Signature: 5mFtSdv5FznG9SE6yfJt3kDRAssdy7nQJRLdVTvMBni8nUPJDG8BFcjT1i7CLAWeqjfatvSdDjUUbPxhzberzjgn
20 SOL
After which, when I run solana account
again, the command works:
solana account 2EHCPkQHcjiBUgWT6zpcHmLPbW2r6wKtb9RjYnoBwFb7
Public Key: 2EHCPkQHcjiBUgWT6zpcHmLPbW2r6wKtb9RjYnoBwFb7
Balance: 20 SOL
Owner: 11111111111111111111111111111111
Executable: false
Rent Epoch: 0
Question is, what happens behind the scene with requesting the airdrop that only makes it possible to run the solana account
command after?
Also is it possible to create a keypair and its associated account via the command line without having to request an airdrop?