One of the easiest ways to create a wallet is through the DFINITY Cycles Faucet, which rewards 20 trillion worth of free cycles to every Twitter user. This reward can only be redeemed once per user.
To begin, visit https://faucet.dfinity.org and authenticate with your Twitter account.
Please make sure not to go "back" on your browser while you're on the Cycles Faucet verification steps page. Doing so will prevent you from claiming free cycles.
Once you sign in with Twitter, you'll be eligible for 20 trillions worth of cycles, which is enough to deploy your first canister. Select NEXT to continue.
Then follow the instructions on screen to claim cycles for your canister. You'll have to run certain commands on your console to create a canister that is pre-loaded with free cycles.
The provided command calls a global “cycles wallet” canister using a “well-known” address.
The value is the redeem code generated by the cycles faucet. The return value is the address of the freshly deployed wallet canister. You'll be able to use this canister to store and utilize your ICP cycles. This canister will belong only to you and will be controlled by the current principal select on your machine.
You can check the controller of this canister by using the following command:
% dfx canister --network=ic status Principal Address
Canister status call result for Principal Address.
Controllers: Controllers Value
Memory allocation: 0
Compute allocation: 0
The “Controllers” value should be equal to your currently selected principal.
% dfx identity get-principal
Make sure to set the wallet as the default wallet for your current identity.
% dfx identity --network=ic set-wallet Principal Address
Setting wallet for identity 'old_identity' on network 'ic' to id 'Principal Address'
Wallet set successfully.
You can check your current wallet by using the following command:
% dfx identity --network=ic get-wallet
The current wallet setting is stored in your file system in the folder ~/.config/dfx/identity/<identity_name>/wallets.json. It should look something like the following:
"ic": "Principal Address"
Since ICP cycles are valuable, make sure that you backup your identity file in case your computer data is lost. You can find your identity file at the path ~/.config/dfx/identity/<identity_name>/identity.pem.
You can also check your wallet balance using the following command:
% dfx wallet --network=ic balance