diff --git a/README.md b/README.md index dbee37f1cfe642e594030592570b14e5987cabf1..74aedf6d8c470e55f18bc1beef92ae31dcdbe99c 100644 --- a/README.md +++ b/README.md @@ -97,10 +97,11 @@ silkaj -ep <hostname>:<port>/<path> <sub-command> ### Authentication -- Authentication methods: Scrypt, file, and (E)WIF +- Authentication methods: Scrypt, Seedhex, PubSec, and (E)WIF ### Others +- Account storage - Display Ğ1 monetary license - Public key checksum diff --git a/docs/usage/account_storage.md b/docs/usage/account_storage.md new file mode 100644 index 0000000000000000000000000000000000000000..817db0803c0c188c561d6bbf8151e4794e8c2eac --- /dev/null +++ b/docs/usage/account_storage.md @@ -0,0 +1,72 @@ +# Account storage + +Silkaj features the account storage to store and read security-wise important documents from a location on your local computer. +It is used to store and read authentication and revocation files with Silkaj. +It is recommended to use the storage instead of storing and reading these files anywhere on your system. + +They are stored into `$XDG_DATA_HOME/silkaj`, aka `$HOME/.local/share/silkaj/$currency/$account_name` as: + +- `revocation.txt` +- `authentication_file_ed25519.dewif` for v1 WIF and EWIF formats based on the approved [RFC n°13](https://git.duniter.org/documents/rfcs/-/blob/master/rfc/0013_Duniter_Encrypted_Wallet_Import_Format.md?ref_type=heads). +- `authentication_file_sr25519.json` for v2 encrypted json format + +The account name is a local name given to a wallet. +It does not necessarily need to be the same identity nickname/alias stored into the blockchain. +No verification what so ever is performed to check any correspondence between the local name stored into Silkaj account storage and the one stored on the blockchain or the indexer. + +## Per currency storage + +The storage is organized per currencies. +Depending on the specified endpoint with the endpoint options (`--endpoint`, `--gtest`) the currency will be determined. Based on the latter, it will stored into `g1` or `g1-test` directory. + +## Authentication + +### Import + +Import your authentication file into the storage. +In case you want to use an other authentication method than the default Scrypt method, use one of the authentication options which can be find in `silkaj authentication --help` usage. + +Next command will store the authentication file in `$HOME/.local/share/silkaj/g1/test/authentication_file_ed25519.dewif` + +``` +silkaj --account test authentication <authentication option> +``` + +Note: `g1` and `test` folders comes respectively from the default Ğ1 endpoint and `test` from the account passed. + +### Reading + +Commands using authentication such as `money transfer`, `wot certify`, `wot membership`, and `money balance` will read the authentication file from the account storage. +With the general `--account` option, it will use the authentication file created in previous step. + +``` +silkaj --account test money transfer +``` + +## Revocation + +### Input/Output + +The general `--account` option (placed between `silkaj` and the sub-command) is used to read the authentication file and to write the revocation file in the same directory. + +``` +silkaj --account test authentication +``` + +### Creation + +``` +silkaj --gtest --account john wot revocation create +``` + +Will be stored into `$HOME/.local/share/silkaj/g1-test/john/revocation.txt` + +### Reading + +The revocation document can be read with `wot revocation publish` and `verify` commands as follow: + +``` +silkaj --gtest --account john wot revocation verify +``` + +Here we are reading the revocation file generated in previous step. diff --git a/docs/usage/index.md b/docs/usage/index.md index 2b4b5717bf1665087ecd6be30a0239bf883db0c1..afcab28e8c3225323f8e6e73ee245f31d45b9465 100644 --- a/docs/usage/index.md +++ b/docs/usage/index.md @@ -1,4 +1,5 @@ # Usage +- [Account storage](account_storage.md) - [Multi-recipients transfers and automation](multi-recipients_transfers_and_automation.md) - [DeathReaper](deathreaper.md) diff --git a/mkdocs.yml b/mkdocs.yml index b3061b97f1a42299bf95e944785ef4858a218a85..2a548970136259ae0e638206fbab3d6fe1fc9f6f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -50,6 +50,7 @@ nav: - Installation: install.md - Usage: - usage/index.md + - usage/account_storage.md - usage/multi-recipients_transfers_and_automation.md - DeathReaper: usage/deathreaper.md - Blog: