Skip to content
Snippets Groups Projects
Commit f9beaf54 authored by Nicolas80's avatar Nicolas80
Browse files

* Updated version to 0.4.1

* Added Changelog entry for the new version
* Adapted some of the examples in config.md to take into account the new `-c` argument
** Did a simple addition of "-c sr25519" so that current examples still make sense and link to the same SS58 addresses
parent bbd95707
No related branches found
No related tags found
2 merge requests!46Json output,!44feat: Can choose between ed25519 ans sr25519
Pipeline #40185 passed
...@@ -2,6 +2,35 @@ ...@@ -2,6 +2,35 @@
List of changelogs ordered from latest to oldest List of changelogs ordered from latest to oldest
## [0.4.1] - 2025-03-23
### Added / Changed
- We now use `ed25519` crypto scheme by default for all commands. It means that if you import your substrate mnemonic without giving a specific argument to change the crypto scheme, the resulting SS58 address will not be the same as before (it was using `sr25519` for substrate mnemonic previously)
- Extra `-c` / `--crypto-scheme` argument allows to specify which crypto scheme to use (`sr25519` or `ed25519`) and having a default value of `ed25519` in most places.
- this argument is present in all places where you could provide `-S` / `--secret-format` argument
- Due to that change, the display of the vault (`vault list ...` commands) will not display the g1v1 public key of all `ed25519` \<Base\> keys by default anymore; you will have to provide an extra `--show-g1v1` argument for that.
- Another impact is that we can now `vault derive` any key; including the ones with `ed25519` crypto-scheme.
- It is still highly recommended to **only derive** keys based on a **substrate mnemonic**; as old `g1v1` keys with their _manual_ `id` & `secret` are not as secure as using a generated substrate mnemonic.
- There is an exception to the impacted commands: `vault migrate` will still import old key files as `sr25519` crypto-scheme keys; as it would otherwise not correspond to the SS58 Address of those key files.
- It is now possible to perform `vault import` and `vault derive` commands without interactive prompts if all necessary optional arguments are provided.
- Please check for more details with commands:
- `vault import --help`
- `vault derive --help`
- If the command tries to override an existing vault entry, then it will still require manual input from the user!
### Fixed
- None
### Deprecated
- Two commands are still deprecated and will be removed in a future release:
- `gcli vault list-files`
- `gcli vault migrate`
### Removed
- None
### CI/CD
- None
## [0.4.0] - 2025-02-xx ## [0.4.0] - 2025-02-xx
### Changed ### Changed
- Old key files cannot be used directly anymore, they have to be migrated to the SQLite file database. You can use the following commands for that: - Old key files cannot be used directly anymore, they have to be migrated to the SQLite file database. You can use the following commands for that:
......
...@@ -2338,7 +2338,7 @@ dependencies = [ ...@@ -2338,7 +2338,7 @@ dependencies = [
[[package]] [[package]]
name = "gcli" name = "gcli"
version = "0.4.0" version = "0.4.1"
dependencies = [ dependencies = [
"age", "age",
"anyhow", "anyhow",
......
...@@ -10,7 +10,7 @@ license = "AGPL-3.0-only" ...@@ -10,7 +10,7 @@ license = "AGPL-3.0-only"
name = "gcli" name = "gcli"
repository = "https://git.duniter.org/clients/rust/gcli-v2s" repository = "https://git.duniter.org/clients/rust/gcli-v2s"
description = "A command-line interface for Duniter v2s uses" description = "A command-line interface for Duniter v2s uses"
version = "0.4.0" version = "0.4.1"
[dependencies] [dependencies]
# subxt is main dependency # subxt is main dependency
......
...@@ -5,7 +5,7 @@ Some Ğcli commands require to have an address configured (for example to get ac ...@@ -5,7 +5,7 @@ Some Ğcli commands require to have an address configured (for example to get ac
```sh ```sh
# save Alice address to config file # save Alice address to config file
gcli -S predefined -s Alice config save gcli -S predefined -s Alice -c sr25519 config save
# show config # show config
gcli config show gcli config show
...@@ -46,10 +46,9 @@ Here is an example that: ...@@ -46,10 +46,9 @@ Here is an example that:
* makes a transfer from selected Address * makes a transfer from selected Address
```sh ```sh
# add a new secret to the vault using substrate uri # add a new secret to the vault using substrate uri and crypto scheme sr25519
gcli vault import gcli vault import -c sr25519
# [stdout] # [stdout]
# gcli vault import
# Substrate URI can be a mnemonic or a mini-secret ('0x' prefixed seed) together with optional derivation path # Substrate URI can be a mnemonic or a mini-secret ('0x' prefixed seed) together with optional derivation path
# > Substrate URI: ******** # > Substrate URI: ********
# #
...@@ -159,8 +158,9 @@ gcli --help ...@@ -159,8 +158,9 @@ gcli --help
# Options: # Options:
# -i, --indexer <INDEXER> Overwrite indexer endpoint # -i, --indexer <INDEXER> Overwrite indexer endpoint
# --no-indexer Do not use indexer # --no-indexer Do not use indexer
# -s, --secret <SECRET> Secret key or BIP39 mnemonic (only used when secret format is compatible) (eventually followed by derivation path)
# -S, --secret-format <SECRET_FORMAT> Secret key format (seed, substrate, g1v1) # -S, --secret-format <SECRET_FORMAT> Secret key format (seed, substrate, g1v1)
# -s, --secret <SECRET> Secret key or BIP39 mnemonic (only used when secret format is compatible) (eventually followed by derivation path)
# -c, --crypto-scheme <CRYPTO_SCHEME> Crypto scheme to use (sr25519, ed25519) [default: ed25519]
# -a <ADDRESS> SS58 Address # -a <ADDRESS> SS58 Address
# -v <NAME> Name of an SS58 Address in the vault # -v <NAME> Name of an SS58 Address in the vault
# -u, --url <URL> Overwrite duniter websocket RPC endpoint # -u, --url <URL> Overwrite duniter websocket RPC endpoint
...@@ -203,20 +203,32 @@ gcli vault derive --help ...@@ -203,20 +203,32 @@ gcli vault derive --help
# [stdout] # [stdout]
# Add a derivation to an existing SS58 Address. # Add a derivation to an existing SS58 Address.
# #
# Only "sr25519" crypto scheme is supported for derivations. # Both "sr25519" and "ed25519" crypto schemes are supported
# #
# Use command `vault list base` to see available <Base> account and their crypto scheme # Use command `vault list base` to see available <Base> account and their crypto scheme
# And then use command 'vault list for' to find all accounts linked to that <Base> account. # And then use command 'vault list for' to find all accounts linked to that <Base> account
# #
# Usage: gcli vault derive <-a <ADDRESS>|-v <NAME>> # Usage: gcli vault derive [OPTIONS] <-a <ADDRESS>|-v <VAULT_NAME>>
# #
# Options: # Options:
# -a <ADDRESS> # -a <ADDRESS>
# SS58 Address # SS58 Address
# #
# -v <NAME> # -v <VAULT_NAME>
# Name of an SS58 Address in the vault # Name of an SS58 Address in the vault
# #
# -d, --derivation-path <DERIVATION_PATH>
# Derivation path (non-interactive mode)
#
# -p, --password <PASSWORD>
# Password to decrypt the <Base> account key (non-interactive mode)
#
# --no-password
# Use empty password to decrypt the <Base> account key (non-interactive mode)
#
# -n, --name <NAME>
# Name for the wallet entry (non-interactive mode) - "" empty string will be considered as None
#
# -h, --help # -h, --help
# Print help (see a summary with '-h') # Print help (see a summary with '-h')
``` ```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment