Clive Updates - CLI - create a new hive account with one easy command

in HiveDevsyesterday (edited)

Shortly after the last release, we prepared a new release, because we wanted to give you this new feature as soon as possible. Now, you can now create a new account for someone using a single, simple command in Clive CLI. The account can be created either by using a token (which you can also claim by using Clive CLI) or by paying for it in Hive. The thresholds and the weights of all authority levels are set to 1.

CLI - Creating an account using a token

To create an account using a token, you need a new account name, generated public keys and a token. The command account-creation uses a token by default, so it will create the create_claimed_account_operation operation.
There are two ways to use this command, you can either use positional arguments or named options.
If you don’t have a token, but you have enough RC, you can claim a token using the following command:
clive process claim new-account-token.

If you need to generate keys, you check out my previous post.

CLI - Creating an account using token with positional arguments

When you use the command with positional arguments, the order is as follows:
clive process account-creation <new-account-name> <owner-key> <active-key> <posting-key> <memo-key>

Example:
clive process account-creation alice-test STM7wDGVVCkXJK7bdRs2Utj72iKmyA74nS11X3rHCc8msygCsZBKf STM6bWaeMe87uLucTHm8wfc3httqbUCzL6sCAWQJEptdmS8yEcGKs STM6nZ8yeHjZ8rteNofo8p6d7N4sLf1pstRSivyMhbxS9S5HU8Agy STM8GhEv54m11gXNBKw67dLZoBaacA5LAFkfHzg9tKq9ycmLxZBCz

Creating an account using token with positional arguments

CLI - Creating an account using token with named options

When you use the command with named options, the syntax is as follows:
clive process account-creation --new-account-name <new-account-name> --owner <owner-key> --active <active-key> --posting <posting-key> --memo <memo-key>

Example:
clive process account-creation --new-account-name alice-test2 -owner STM7wDGVVCkXJK7bdRs2Utj72iKmyA74nS11X3rHCc8msygCsZBKf --active STM6bWaeMe87uLucTHm8wfc3httqbUCzL6sCAWQJEptdmS8yEcGKs --posting STM6nZ8yeHjZ8rteNofo8p6d7N4sLf1pstRSivyMhbxS9S5HU8Agy --memo STM8GhEv54m11gXNBKw67dLZoBaacA5LAFkfHzg9tKq9ycmLxZBCz

Creating an account using token with named options

CLI - Creating an account by paying in Hive

To create an account by paying in Hive, you need a new account name, generated public keys, and 3 Hive. You also need to indicate that you want to pay a fee by using the --fee option explicitly.
The command uses the account_create_operation operation.
As with creating an account using a token, there are two ways to use this command, you can either use positional arguments or named options.

CLI - Creating an account by paying in Hive with positional arguments

When you use the command with positional arguments, the order is as follows (don’t forget to add --fee):
clive process account-creation --fee <new-account-name> <owner-key> <active-key> <posting-key> <memo-key>

Example:
clive process account-creation --fee alice-test3 STM7wDGVVCkXJK7bdRs2Utj72iKmyA74nS11X3rHC c8msygCsZBKf STM6bWaeMe87uLucTHm8wfc3httqbUCzL6sCAWQJEptdmS8yEcGKs STM6nZ8yeHjZ8rteNofo8p6d7N4sLf1pstRSivyMhbxS9S5HU8Agy STM8GhEv54m 11gXNBKw67dLZoBaacA5LAFkfHzg9tKq9ycmLxZBCz

Creating an account by paying in Hive with positional arguments

CLI - Creating an account by paying in Hive with named options

When you use the command with named options, the syntax is as follows (don’t forget to add --fee):
clive process account-creation –fee --new-account-name <new-account-name> --owner <owner-key> --active <active-key> --posting <posting-key> --memo <memo-key>

Example:
clive process account-creation --fee --new-account-name alice-test4 --owner STM7wDGVVCkXJK 7bdRs2Utj72iKmyA74nS11X3rHCc8msygCsZBKf --active STM6bWaeMe87uLucTHm8wfc3httqbUCzL6sCAWQJEptdmS8yEcGKs --posting STM6nZ8yeHjZ8rteNof o8p6d7N4sLf1pstRSivyMhbxS9S5HU8Agy --memo STM8GhEv54m11gXNBKw67dLZoBaacA5LAFkfHzg9tKq9ycmLxZBCz

Creating an account by paying in Hive  with named options

Release information

The scripts that allow you to run Clive are here:
https://gtg.openhive.network/get/clive/

Your feedback is invaluable and always welcome.