# Silkaj v0.7.x releases: DuniterPy, click, history, Debian, website

**URL:** https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099
**Category:** Silkaj
**Tags:** duniterpy, release, silkaj
**Created:** [21 May 2019 22:00 UTC](https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099 "2019-05-21T22:00:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [21 May 2019 22:00 UTC](https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099/1 "2019-05-21T22:00:00Z")

</div>

Six months after the [previous major release](https://forum.duniter.org/t/silkaj-v0-6-0-release-let-s-install/4858/1), I am pleased to announce the release of Silkaj v0.7.0 for the [thirteenth Free Currency Meeting](http://rml13.creationmonetaire.info/).

This release comes with 157 commits, the migration to DuniterPy and Click, the display of transaction history, the packaging into Debian Buster and Ubuntu 19.04, and the update of the website.

Those two migrations do not bring much new features for now as the goal was to migrate to better libraries while keeping the same functionalities.

# Highlights

## DuniterPy migration

 ![DuniterPy_logo](https://forum.duniter.org/uploads/default/original/2X/4/4c559388d1b62b707e6ca3431f146cc5f6abbe54.png)

[DuniterPy](https://git.duniter.org/clients/python/duniterpy) is a Python library which implements methods to request from and send information to the Duniter nodes. It also has authentication methods that sign documents such as transactions and certifications. DuniterPy was written for the Sakia client. Silkaj and Sakia are now sharing the same code. The migration to DuniterPy was tough, but it was worth it: It allows to implement new features for future versions.

There were many challenges: keeping the same functionalities, making Silkaj’s code asynchronous, and replacing the authentication and the network code by the ones implemented in DuniterPy. One struggling issue was that the [intermediaries transactions were no longer working](https://git.duniter.org/clients/python/silkaj/issues/178), because, the equality method of the transaction outputs was no longer working, as they used to be stored in a string and are now stored into an `OutputSource` object. So, the equality had to be implemented.

Check-out [DuniterPy versions from v0.50.0 to v0.54.1](https://forum.duniter.org/t/duniterpy-evolution-de-la-bibliotheque-python/5127) to follow the evolution of DuniterPy. These versions were made for Silkaj. In the future, following functionalities are planned: to send identity, membership, and revocation documents, to fully employ the authentication methods implemented in DuniterPy, and to use the planned GVA API.

## Click migration

[![](https://forum.duniter.org/uploads/default/original/2X/8/899402be4d56ca941de09afdeb8872f378a0fed6.png)](https://click.palletsprojects.com/)

Since Debian Buster freeze was very soon and [`commandlines`](https://github.com/chrissimpkins/commandlines) library wasn’t packaged into Debian, the migration to [Click](https://click.palletsprojects.com/) “_Command Line Interface Creation Kit_” had to be done very fast. I decided to migrate to this really nice library, since it is much more maintained, comes with a better code, and has no bugs.

```bash
Usage: silkaj [OPTIONS] COMMAND [ARGS]...

Options:
  -h, --help Show this message and exit.
  -v, --version Show the version and exit.
  -p, --peer TEXT Default endpoint will reach Ğ1 currency with
                           `https://g1.duniter.org` endpoint. Custom endpoint
                           can be specified with `-p` option followed by
                           <domain>:<port>
  -gt, --gtest ĞTest: `https://g1-test.duniter.org` endpoint
  --auth-scrypt, --scrypt Scrypt authentication: default method
  --nrp TEXT Scrypt parameters: defaults N,r,p: "4096,16,1"
  -af, --auth-file Authentication file. Defaults to: './authfile'
  --file TEXT Path file specification with '--auth-file'
                           [default: authfile]
  --auth-seed, --seed Seed hexadecimal authentication
  --auth-wif, --wif WIF and EWIF authentication methods

Commands:
  about Display program information
  argos Display currency information formatted for Argos or BitBar
  authfile Generate authentication file
  balance Get wallet balance
  blocks Display blocks: default: 0 for current window size
  cert Send certification
  diffi Display the current Proof of Work difficulty level to generate...
  history Display transaction history
  id Find corresponding identity or pubkey from pubkey or identity
  info Display information about currency
  license Display Ğ1 license
  net Display network view
  tx Send transaction
  wot Check received and sent certifications and consult the...

```

The command line interface has changed. General parameters (options and arguments) should be placed in between the command and the sub-command. Specific parameters should be placed after the sub-command.

**For instance**  
In the following command `--gtest`, and `--auth-file` are general parameters and `--amount`, and `--output` specific parameters separated by the `tx` sub-command.

```bash
silkaj --gtest --auth-file tx --amount 5 --output <pubkey>

```

You can display general parameters with `silkaj --help` and specific parameters with `silkaj tx --help` for instance.

## CLI changes

- `issuers`, `amount`, and `generate_auth_file` commands have been respectively renamed to `blocks`, `balance`, and `authfile`.
- The long sub-commands `certification`, `transaction`, `network`, `identities` were removed. Now you have to use the small ones: `cert`, `tx`, `net`, `id`.
- `blocks` defaults to `0` which stands for the current windows size and now has a limit of 5.000 blocks as set by BMA.
- `balance`: public keys separator does no longer use colons `:`, it uses spaces instead.
- Additionally, there are the new smaller authentication options: `--scrypt`, `-af`, `--seed`, `--wif`, without the `--auth` prefix.

You might discover other breaking changes. To know more about those changes [read this](https://git.duniter.org/clients/python/silkaj/issues/77#breaking-changes).

## Transaction history

It is now possible to display the transactions history of a wallet:

```bash
silkaj history GfKERHnJTYzKhKUma5h1uWhetbA8yHKymhVH2raf2aCP --uids

Transactions history from: moul GfKERHnJTYzKhKUma5h1uWhetbA8yHKymhVH2raf2aCP
Current balance: 17296.86 Ğ1, 1717.66 UD Ğ1 on the 2019-05-12 13:32:30
+---------------------+------------------------+------------+--------------+-----------------------+
| Date | Issuers/Recipients | Amounts Ğ1 | Amounts UDĞ1 | Comment |
+=====================+========================+============+==============+=======================+
| 2019-04-23 21:31:27 | CvrMiUhAJpNyX5sdAy | 100.700 | 10 | Silkaj sur Ubuntu c |
| | | | | est une tres belle |
| | | | | surprise. Merci ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-22 18:59:34 | HugoTrentesaux - | 100.700 | 10 | Merci pour Duniter |
| | 55oM6F9ZE2MGi | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-15 14:35:15 | ArthurLutz - | 200 | 19.861 | pour les paquets |
| | 4C4jsvxmFQBoH | | | yunohost ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-15 10:40:11 | SonqoZEfZXHDBxi4Kx | 30.210 | 3 | [G1SMS] VIREMENT 300 |
| | | | | LOVE (30.21 G1) |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-15 08:04:58 | fbuland - | 200 | 19.861 | merci resolution bug |
| | 4bD7J3uA5pH2N | | | |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-13 16:37:20 | Vivakvo - | 100.700 | 10 | Merci pour Duniter |
| | 4wUdA1dx1NCZU | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-12 08:59:04 | C4pUj26pVgPVPLEZ96 | 50 | 4.965 | Bravo pour le bug |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-08 16:48:04 | 73ArdqtsQScypV35H4 | 100.700 | 10 | Merci pour Duniter |
| | | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-08 15:58:06 | Lucas - HY2nJUyxpzyrw | 100.700 | 10 | Merci pour Duniter |
| | | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-08 15:10:25 | BenoitLavenier - | 100.700 | 10 | Merci pour Duniter |
| | 38MEAZN68Pz1D | | | v1.7.16 ! |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-08 14:11:00 | 4sfQWXBBy811CCDV6J | 100.700 | 10 | 1.7.16 |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-07 22:59:00 | elois - D9D2zaJoWYWve | 100 | 9.930 | merci pour le debug |
| | | | | de duniter et du |
| | | | | process de release |
| | | | | aussi |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-07 21:51:41 | Matograine - | 100.700 | 10 | V1.7.16 |
| | CmFKubyqbmJWb | | | |
+---------------------+------------------------+------------+--------------+-----------------------+
| 2019-04-07 01:18:44 | cgeek - 2ny7YAdmzReQx | 1007 | 100 | Duniter v1.7.16 |
+---------------------+------------------------+------------+--------------+-----------------------+

```

## Debian and Ubuntu package

[![](https://forum.duniter.org/uploads/default/original/2X/9/9717fce42e8304b28213be23ae594c4f8f829a3a.svg)](https://packages.debian.org/buster/silkaj)

Silkaj v0.6.5 was packaged for Debian Buster v10, which is planned te be release for July 6th 2019. This package greatly benefits all Debian-based distributions. Moreover, Silkaj was incorporated in the repository of Ubuntu 19.04, published in March 2019. For more details check-out [where Silkaj was included into the Debian-based distributions](https://repology.org/project/silkaj/versions). Silkaj v0.6.5 now comes with Click migration, auto-completion, and bug fixes, however it does not include DuniterPy migration and v0.7.0 features.

You can install Silkaj with following command:

```bash
sudo apt install silkaj

```

This work have been made possible thanks to @jonas, a Debian developer.

## Difficulty level

Since we are using DuniterPy which includes WebSocket, this latter can be used to improve the network connection. Previously, Silkaj was sending queries every five seconds to check if a new block was added to the blockchain. Now, Silkaj gets a notification every time a new block is appended to the blockchain. This improvement dramatically reduces the network traffic.

To better monitor the network, the header was improved and now displays the current block’s number and its date of generation:

```bash
Current block: n°219981, generated on the 2019-05-12 14:36:35
Generation of next block n°219982 possible by at least 31/44 members
Common Proof-of-Work difficulty level: 89, hash starting with `00000[0-6]*`

```

## New website

[![silkaj_website_screenshot](https://forum.duniter.org/uploads/default/original/2X/b/b32baa2ff5e6143a5f2b7fac005c2db2e41f868c.png)](https://silkaj.duniter.org/)

A simple [website](https://silkaj.duniter.org/) was made at the beginning of the project.  
Since then, Silkaj evolved and have brought new features.

More content was added to the website, which now has three pages: a main one, one for the features and the other one for the installation.

@Attilax worked to give the website a new black style, to make it looks like a terminal.  
He also translated it in French which makes the website available in two languages.

## Changelog

For further details, please check out the [changelog](https://git.duniter.org/clients/python/silkaj/blob/dev/CHANGELOG.md).

## Thanks

@Attilax, @Bernard, @cebash, @jonas, @matograine, @vit

* * *

## Install and upgrade

- [Install and upgrade documentation](https://silkaj.duniter.org/install.html)

## Future development cycles

Future releases will add new features based on DuniterPy such as [new authentication methods](https://git.duniter.org/clients/python/silkaj/issues/173) as well as being able to send WoT documents: [identity publication](https://git.duniter.org/clients/python/silkaj/issues/90), [membership publication and renewal](https://git.duniter.org/clients/python/silkaj/issues/88), and [revocation](https://git.duniter.org/clients/python/silkaj/issues/89). It is also planned to use features brought by Click usage, to set-up CI/CD pipeline, and locking the code with tests.

## Contribute

If you are pleased with the achievement, please contribute by reporting bugs, contributing to the code or giving to [Duniter developers](https://g1.duniter.fr/#/app/wot/78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8/) libre units to improve our little world.

## Share on social networks

- [Mastodon](https://framapiaf.org/@inso/102143656918574377)

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [29 May 2019 21:27 UTC](https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099/4 "2019-05-29T21:27:55Z")

</div>

## Silkaj v0.7.1 release (29th May 2019)

- Bug fix transaction generation

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [25 June 2019 17:01 UTC](https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099/5 "2019-06-25T17:01:45Z")

</div>

## Silkaj v0.7.2 release (25th June 2019)

- Fix result of the multiplication of the amount passed as float for the transaction command

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [25 July 2019 19:30 UTC](https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099/6 "2019-07-25T19:30:11Z")

</div>

## v0.7.3 (25th July 2019)

[#239](https://git.duniter.org/clients/python/silkaj/issues/239): Bug fix release for broken successives transactions due to wrongly calculated pending inputs:

- remove already used inputs: restore previous behaviour which haven’t been kept the same during the migration
- `enumerate()` wrongly moved to the non appropriate `for` loop

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [22 January 2020 19:44 UTC](https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099/7 "2020-01-22T19:44:23Z")

</div>

## v0.7.4 (22th January 2020)

- [#273](https://git.duniter.org/clients/python/silkaj/issues/273): Fix broken PubSec authfile importation regex

Thanks to @matograine for this bugfix and the release!

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [23 January 2020 10:02 UTC](https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099/8 "2020-01-23T10:02:31Z")

</div>

## v0.7.5 (23th January 2020)

- [#276](https://git.duniter.org/clients/python/silkaj/issues/276): Publish on PyPI with the previous method: `setup.py`, `wheel`, and `twine`.
- `silkaj` binary does not get installed to `$HOME/.local/bin` via Poetry

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [25 January 2020 10:19 UTC](https://forum.duniter.org/t/silkaj-v0-7-x-releases-duniterpy-click-history-debian-website/6099/9 "2020-01-25T10:19:11Z")

</div>

## v0.7.6 (24th January 2020)

- Update DuniterPy to v0.55.1 in order to have the PubSec regex fixed
