3 - Wallets
To use Blockchain, the main entrypoint is the crypto wallet. In this lesson, we introduce the different types of wallets and how they work.
What is a cryptocurrency wallet?
A cryptocurrency wallet is a software that creates and stores your private and public keys, interacts with the blockchain, monitors your balances and allows you to send and receive cryptocurrency. Instead of thinking of a wallet in the traditional sense, where the cash or credit card are actually inside of your wallet, you must think about cryptocurrency wallet as a key to unlock your funds.
You cryptocurrencies are on the blockchain, more precisely in the running ledger of transactions distributed all over the world, and they are assigned to your private key so you are the only one who can send them. The amount of cryptocurrencies you own is not marked directly by your public key but instead by a shorter representation named an address that is unique and that is linked to your account.
What is an address?
An address is a string of text generated using cryptography to represent your account on the blockchain. This address can be shared publicly with others, and is completely safe to do so. You can send and receive funds from and to your wallet address. Basically, the address is your unique identifier on the blockchain and represents your ‘account’. An example of an Ethereum address is:
What are private keys?
A private key is the counterpart to an address. Each address has an associated private key. As the name suggests though, this is meant to be kept private and never shared with anyone. Anyone who has the private key can prove the ownership of the corresponding address using signature. It is based on asymmetric cryptography 📚.
A private key looks something like this:
Note: If you lose your private key, you lose access to your account and all its cryptocurrencies. Similarly, if someone steals your private key and steals your funds, you cannot do anything about it. It is VERY important to keep this private key safe.
For developers, we often use the private key as part of our codebase to perform certain transactions, such as deploying our own smart contracts to the Ethereum network. While you are still learning, we highly suggest you use a separate account entirely for development than you use for storing any sort of funds. Unfortunately, beginner developers often use the same account they have funds on, and accidentally share their codebase publicly - and hackers can see your private key in the codebase and end up stealing funds… More generally, some hackers are specialized in extracting private keys 📖 and it is a hot research topic 📖. How can check if your private key as been leaked using public databases 📖.
What is a seed phrase?
A seed phrase is readeable representation of the private key.
When you create a new crypto wallet, you will be presented with a seed phrase you should absolutely securely store and back up. Any new accounts you generate from inside that wallet will all be linked to the seed phrase. That one seed phrase will always generate the same accounts, with the same private keys and addresses for each. It is using key derivation (bip39) 📖.
An example of a seed phrase is:
much remove habit rural all prefer sand armed umbrella process snow normal
What is the difference between cold and hot wallets?
First to understand better how wallets are implemented to contain and manage private keys, you can read this book chapter 📖.
In this lesson, we looked at wallets and their architecture. In the next lesson, we will explore in more details public key cryptography and how it is used in Bitcoin and Ethereum