Configuration support
- `$HOME/.config/silkaj/silkaj.cfg`: currency specific configuration to be done in the hierarchy of the file
### Formats
- `toml`: have a look: based on `ini`, but improved
- ini: poezio, BeetleBot
- json: duniter
- opml: pipenv
- yml
Toml is the best by far. [`tomllib` is available from Py3.11](https://docs.python.org/3.11/library/tomllib.html). A replacement with similar API should be found for version < Py3.11
- [**configparser**](https://docs.python.org/3/library/configparser.html) is available in stdlib and allow configuration management, the best so far, and was already used.
### Configurations per currency
- `member_id`
- `wallets`
- `endpoint`: rather than default one
- `contact aliases` (correspondence between contact_id and a pubkey)
- `approved_license`: `bool`: won’t ask to approve the license again when doing an WoT action on the blockchain from this member account: certifying, renewing the membership, inviting a member account (v2)
- …
```ini
[g1]
member_id = moul
wallets = <pubkey1>:<pubkey2>
endpoint = <hostmame>:<port>
alice = <pubkey>
approved_license = True/False
[g1-test]
member_id = moul-test
wallets = <pubkey1>:<pubkey2>
endpoint = <hostname>:<port>
bob = <pubkey>
```
### Command
```bash
silkaj config <attribute> <value>
```
### Behaviours
- [x] `amount`: sum-up `member_id` plus `wallets`’ amounts
- [x] `id` and `wot`: if no arguments specified choose `member_id`
- [x] `endpoint`: change endpoint
- [ ] `diffi` and `issuers`: highlight identity with ** or bold text
- ~~[ ] `cert`: certifieur is `member_id`~~ (Useless as authentication is mandatory and that this information is here)
### Thoughts
- think about configuration not related to a currency, like:
- language
- when the configuration file is red (at every silkaj launch), then Vim detect that the it as been modified and needs to _overwritten_.
### Documentation
- [ ] document configuration file and behaviors
### Configuration managemgent implementation
#### Click integration
- [click-configfile](https://github.com/click-contrib/click-configfile)
- [click-config](https://github.com/EverythingMe/click-config)
#### Others
- [In Textual roadmap](https://textual.textualize.io/roadmap/)
issue