Create Development Wallet
Wallets are repositories of public-private key pairs. Private keys are needed to sign operations performed on the blockchain. Wallets are accessed using infra-cli.
Step 1: Create a Wallet
The first step is to create a wallet. Use infra-cli wallet create
to create a new "default" wallet using the option --to-console
for simplicity. If using infra-cli
in production, it's wise to instead use --to-file
so your wallet password is not in your bash history. For development purposes and because these are development and not production keys --to-console
poses no security threat.
infra-cli
will return a password, save this password somewhere as you will likely need it later in the tutorial.
About Wallets A common misconception in cryptocurrency regarding wallets is that they store tokens. However, in reality, a wallet is used to store private keys in an encrypted file to sign transactions. Wallets do not serve as a storage medium for tokens.
A user builds a transaction object, usually through an interface, sends that object to the wallet to be signed, the wallet then returns that transaction object with a signature which is then broadcast to the network. When/if the network confirms that the transaction is valid, it is included into a block on the blockchain.
Step 2: Open the Wallet
Wallets are closed by default when starting a infra-keychain
instance, to begin, run the following
Run the following to return a list of wallets.
and it will return
Step 3: Unlock it
The infra-keychain
wallet(s) have been opened, but is still locked. Moments ago you were provided a password, you're going to need that now.
You will be prompted for your password, paste it and press enter.
Now run the following command
It should now return
Pay special attention to the asterisk (*). This means that the wallet is currently unlocked
Step 4: Import keys into your wallet
Generate a private key, infra-cli
has a helper function for this, just run the following.
It will return something like..
Step 5: Follow this tutorial series more easily
Enter the public key provided in the last step in the box below. It will persist the development public key you just generated throughout the documentation.
Development Public Key
Step 6: Import the Development Key
Every new InfraBlockchain-Antelope chain has a default "system" user called "eosio". This account is used to setup the chain by loading system contracts that dictate the governance and consensus of the InfraBlockchain-Antelope chain. Every new InfraBlockchain-Antelope chain comes with a development key, and this key is the same. Load this key to sign transactions on behalf of the system user (eosio)
You'll be prompted for a private key, enter the eosio
development key provided below
Important Never use the development key for a production account! Doing so will most certainly result in the loss of access to your account, this private key is publicly known. Wonderful, you now have a default wallet unlocked and loaded with a key, and are ready to proceed.
What's Next?
Start Your Node: Steps to start
infra-keychain
andinfra-node
.
Last updated