We have finally implemented encrypted profile functionality in Clive. This introduced many changes in CLI (command line interface) and TUI (text-based user interface). Additionally, we changed the way we use Beekeeper, now instead of implementing its Python handler in the Clive, we use the new Beekeepy library.
There are no changes to how Clive is run, you can still use the scripts we have prepared, one for running TUI, and the second for CLI. You can find links at the end of the text.
Encrypted profile
We introduced the changes gradually, so I have written about some of them before, but here I would like to sum up the entire encrypted profile functionality.
Clive stores the following data about your profile on your disk:
- your working account,
- tracked accounts - accounts you observe,
- known accounts,
- added key aliases,
- selected node,
- chain id,
- transaction in the cart (list of operations, Tapos, Expiration date, Transaction ID, and signatures - if the transaction is signed).
After implementing the encrypted profile functionality, all the above information is encrypted and available only after entering the password.
Due to these changes, if you have already used Clive, you have to recreate your profile.
Encrypted profile - changes in TUI
The main change here is that you must enter a password to log in before using Clive. If you don’t have a profile, you need to create one.
You can have more than one profile.
After using Clive, you can lock the wallet by pressing Unlocked
wallet status or using a dedicated “Lock wallet” binding.
Encrypted profile - changes in CLI
The easiest way to run CLI Clive is the start_clive_cli.sh
script. It sets up Beekeeper and saves a session token.
Similarly to the TUI, before you start using the CLI Clive, you have to select a profile (if you have any) or create a new one (by executing the clive configure profile add
command).
Once you enter a password, the selected profile is unlocked. While working with the unlocked profile, you don’t need to enter a password to execute every command.
Be aware that only one profile can be unlocked at a time.
Previously, there was a default profile functionality but we removed it because it wasn’t in line with the new functionality.
In order to lock or unlock a profile, you can use commands clive lock
or clive unlock
. You can switch the profile by locking the previous one and unlocking another one.
So if you want to broadcast a transaction, you need to do two steps: unlock a profile and process a transaction.
Beekeepy
The change from Beekeeper to Beekeepy from the users' point of view is unnoticeable, but this is a huge change from the developers' perspective. Beekeepy is a library with a strong focus on an object-oriented approach to the raw beekeeper network interface, aiming to guide users with abstract interfaces. It was created based on experience and solutions in the corresponding library in TypeScript.
You can try to use it in your project - it needs just a few lines of code - like in the following example!
from beekeepy import Beekeeper
# Create new local instance (works on both sync and async)
with Beekeeper.factory() as beekeeper,
beekeeper.create_session() as session,
session.create_wallet(name="my_wallet", password="password") as wallet:
public_key = wallet.import_key(private_key=my_private_key)
wallet.sign_digest(digest=my_digest, public_key=public_key)
To make Clive more user-friendly
We changed the way the list of operations looks. Now, all operations are available on a single page, grouped by operation category: Financial and Governance.
Complete list of corrected issues
The scripts that allow you to run Clive are here: https://gtg.openhive.network/get/clive/
TL;DR
docker run -ti hiveio/clive:v1.27.5.20
Congratulations @thebeedevs! Your post has been a top performer on the Hive blockchain and you have been rewarded with this rare badge
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
This is great news!I'm excited to see the encrypted profile functionality in Clive.The changes to the CLI and TUI sound very user-friendly,especially the ability to have multiple profiles.I'm also interested in learning more about the Beekeepy library.Thanks for the update!
Great job for such achievement
!hueso
any chance Clive adds the ability to broadcast a custom_json in the future?
It's already there; custom_json support in CLI Clive was introduced seven months ago.
awesome. I have not looked at it for a while.
Thank you. Time to download and test.
CLI currently works kind of slow but that's known issue.
Make sure you are using script to start it, so it will handle user data (profile, keys) otherwise simple docker run will keep data inside container which will be gone with it.
appreciate the info.
The rewards earned on this comment will go directly to the people( @seckorama ) sharing the post on Reddit as long as they are registered with @poshtoken. Sign up at https://hiveposh.com. Otherwise, rewards go to the author of the blog post.
Congratulations @thebeedevs! Your post has been a top performer on the Hive blockchain and you have been rewarded with this rare badge
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
!hueso
!