CLI Commands on Rootstock CLI
The Rootstock CLI (rsk-cli) allows for creating and managing wallets on the Rootstock network. Create, manage, and fund your wallet with tokens directly from the terminal or via a Sandbox.
With the Rootstock CLI, managing your wallet is simple. You can view saved wallets, switch between them, update wallet names, or delete wallets. Its user-friendly design ensures easy handling of all wallet tasks quickly and efficiently from the terminal.
Managing Your Wallet
To begin managing your wallet using Rootstock CLI, run the following command in your terminal:
rsk-cli wallet
This command opens up a prompt that will guide you through managing your wallet. Once executed, you will see a screen with several options, like the one below:
📁 Wallet data file found.
? What would you like to do? (Use arrow keys)
❯ 🆕 Create a new wallet
🔑 Import existing wallet
🔍 List saved wallets
🔁 Switch wallet
📝 Update wallet name
❌ Delete wallet
-
Use the arrow keys to navigate through the options.
-
Press Enter to select the desired action.
This interface allows you to manage your wallets with the following options:
-
🆕 Create a new wallet: Generate a brand-new wallet for managing your assets securely on the Rootstock network.
-
🔑 Import existing wallet: Import an existing wallet by providing your private key or recovery phrase.
-
🔍 List saved wallets: View a list of all wallets saved locally in your application.
-
🔁 Switch wallet: Quickly switch between your saved wallets to access the one you need.
-
📝 Update wallet name: Rename your saved wallets for better organization and identification.
-
❌ Delete wallet: Remove a wallet from your saved list (note: this action does not delete the wallet from the blockchain).
Creating a New Wallet
When creating a a new wallet, the system generates a new wallet address and private key. You'll see a screen like this:
🎉 Wallet created successfully on Rootstock!
📄 Address: 0x05BFa711ef4B2f40855C4E73bA96a8Da86a4be9F
🔑 Private Key: 0x5c8250445d6d6b08d6debb4e9137e189b8bd7fe06299c0452b517178415b278a
The private key is a critical piece of information that enables users access funds. Never share it with anyone and store it securely, as losing the private key means losing access to your wallet.
You’ll be prompted to enter a password to encrypt your wallet:
? 🔒 Enter a password to encrypt your wallet: