Skip to content

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. A replacement with similar API should be found for version < Py3.11

  • configparser 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)
[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

silkaj config <attribute> <value>

Behaviours

  • amount: sum-up member_id plus wallets’ amounts
  • id and wot: if no arguments specified choose member_id
  • 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

Others

Edited by Moul
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information