DuniterPy issueshttps://git.duniter.org/clients/python/duniterpy/-/issues2023-08-14T17:13:26+02:00https://git.duniter.org/clients/python/duniterpy/-/issues/206ModuleNotFoundError: No module named 'libnacl.version'2023-08-14T17:13:26+02:00FredModuleNotFoundError: No module named 'libnacl.version'I found that error using duniterpy-1.1.0 ```pip3 install duniterpy```
```
./tools/key_create_dunikey.py coucou coucou
Traceback (most recent call last):
File "/home/pi/.zen/Astroport.ONE/./tools/key_create_dunikey.py", line 18, in <mo...I found that error using duniterpy-1.1.0 ```pip3 install duniterpy```
```
./tools/key_create_dunikey.py coucou coucou
Traceback (most recent call last):
File "/home/pi/.zen/Astroport.ONE/./tools/key_create_dunikey.py", line 18, in <module>
from duniterpy.key import SigningKey
File "/usr/local/lib/python3.9/dist-packages/duniterpy/__init__.py", line 22, in <module>
from . import api, documents, key
File "/usr/local/lib/python3.9/dist-packages/duniterpy/key/__init__.py", line 21, in <module>
from .ascii_armor import AsciiArmor
File "/usr/local/lib/python3.9/dist-packages/duniterpy/key/ascii_armor.py", line 20, in <module>
from libnacl.version import version as libnacl_version
ModuleNotFoundError: No module named 'libnacl.version'
```
is it a bug?1.1.0MoulMoulhttps://git.duniter.org/clients/python/duniterpy/-/issues/180Remove problematic base58 module2023-07-08T15:26:03+02:00Vincent TexierRemove problematic base58 moduleA french user reported this:
Avec la dernière version de duniterpy (0.62.0), same avec python 3.8 et 3.9:
`AttributeError: module 'duniterpy.key.base58' has no attribute 'b58decode'`
Résolu par:
```python
pubkey_byte = base58.Base58E...A french user reported this:
Avec la dernière version de duniterpy (0.62.0), same avec python 3.8 et 3.9:
`AttributeError: module 'duniterpy.key.base58' has no attribute 'b58decode'`
Résolu par:
```python
pubkey_byte = base58.Base58Encoder.decode(str.encode(pubkey))
hash = hashlib.sha256(hashlib.sha256(pubkey_byte).digest()).digest()
return base58.Base58Encoder.encode(hash)[:3]
```
DuniterPy’s `base58` module only checks data types. So, not really useful and overrides [`base58`](https://pypi.org/project/base58/) module. Should be removed to use `base58` module instead.1.3.0https://git.duniter.org/clients/python/duniterpy/-/issues/168Add example for mnemonic account creation2021-06-13T11:11:10+02:00Vincent TexierAdd example for mnemonic account creationThis example is special as it requires a python dependency.
https://github.com/trezor/python-mnemonic
As examples are in the main package, the dependency is added in the package.This example is special as it requires a python dependency.
https://github.com/trezor/python-mnemonic
As examples are in the main package, the dependency is added in the package.1.0.0Vincent TexierVincent Texierhttps://git.duniter.org/clients/python/duniterpy/-/issues/161Add DUBP Mnemonic example2021-06-16T09:37:50+02:00Vincent TexierAdd DUBP Mnemonic exampleAdd a DUBP Mnemonic example in examples folder.
Add the [official Python Mnemonic package](https://github.com/trezor/python-mnemonic) as dependency.
Requires MR #160 to be merged.Add a DUBP Mnemonic example in examples folder.
Add the [official Python Mnemonic package](https://github.com/trezor/python-mnemonic) as dependency.
Requires MR #160 to be merged.1.0.0Vincent TexierVincent Texierhttps://git.duniter.org/clients/python/duniterpy/-/issues/151Add DEWIF file format support for wallets2023-07-08T15:26:36+02:00Vincent TexierAdd DEWIF file format support for walletsAdd a `save_dewif_v1_file` and `from_dewif_file` functions to `SigningKey` class.
Follow the [RFC0013](https://git.duniter.org/documents/rfcs/-/blob/dewif/rfc/0013_Duniter_Encrypted_Wallet_Import_Format.md) of the Duniter Project.Add a `save_dewif_v1_file` and `from_dewif_file` functions to `SigningKey` class.
Follow the [RFC0013](https://git.duniter.org/documents/rfcs/-/blob/dewif/rfc/0013_Duniter_Encrypted_Wallet_Import_Format.md) of the Duniter Project.Backloghttps://git.duniter.org/clients/python/duniterpy/-/issues/150Add DUBP Mnemonic SigningKey feature2021-05-20T19:18:33+02:00Vincent TexierAdd DUBP Mnemonic SigningKey featureAdd a `from_dubp_mnemonic` function in SigningKey class to create a DUBP Mnemonic wallet from a 12 words mnemonic passphrase.
Follow the [RFC 0014](https://git.duniter.org/documents/rfcs/blob/dubp-mnemonic/rfc/0014_Dubp_Mnemonic.md) of ...Add a `from_dubp_mnemonic` function in SigningKey class to create a DUBP Mnemonic wallet from a 12 words mnemonic passphrase.
Follow the [RFC 0014](https://git.duniter.org/documents/rfcs/blob/dubp-mnemonic/rfc/0014_Dubp_Mnemonic.md) of the Duniter Project.1.0.0Vincent TexierVincent Texier2021-05-06https://git.duniter.org/clients/python/duniterpy/-/issues/133AttributeError: module 'libnacl' has no attribute '__version__'2020-11-30T20:16:27+01:00FredAttributeError: module 'libnacl' has no attribute '__version__'pip3 install duniterpy
```
#!/usr/bin/env python3
from sys import argv
from duniterpy.key import SigningKey
# path to save to
path = "/tmp/secret.dunikey"
key = SigningKey.from_credentials(argv[1], argv[2], None)
key.save_pubsec_file(...pip3 install duniterpy
```
#!/usr/bin/env python3
from sys import argv
from duniterpy.key import SigningKey
# path to save to
path = "/tmp/secret.dunikey"
key = SigningKey.from_credentials(argv[1], argv[2], None)
key.save_pubsec_file(path)
print(
key.pubkey,
)
```
throw this error
```
Traceback (most recent call last):
File "dunikey.py", line 3, in <module>
from duniterpy.key import SigningKey
File "/home/pi/.local/lib/python3.7/site-packages/duniterpy/__init__.py", line 22, in <module>
from . import api, documents, key
File "/home/pi/.local/lib/python3.7/site-packages/duniterpy/key/__init__.py", line 21, in <module>
from .ascii_armor import AsciiArmor
File "/home/pi/.local/lib/python3.7/site-packages/duniterpy/key/ascii_armor.py", line 34, in <module>
VERSION_FIELD_VALUE = "Python Libnacl " + libnacl.__version__
AttributeError: module 'libnacl' has no attribute '__version__'
```0.61.0MoulMoulhttps://git.duniter.org/clients/python/duniterpy/-/issues/131Implement checksum computation2023-06-23T19:51:53+02:00matograineImplement checksum computationChecksum should be part of Duniterpy. It may be implemented as a separate function, or as a part of the SigningKey type.Checksum should be part of Duniterpy. It may be implemented as a separate function, or as a part of the SigningKey type.Backloghttps://git.duniter.org/clients/python/duniterpy/-/issues/129Add HD wallet generator feature2023-07-08T15:26:55+02:00Vincent TexierAdd HD wallet generator featureAdd HD wallet generation feature.
Follow the [RFC0015](https://git.duniter.org/documents/rfcs/blob/hd_wallet/rfc/0015_Dubp_HD_Wallet.md) of the Duniter Project.
Some documentation:
https://coinsutra.com/hd-wallets-deterministic-wallet...Add HD wallet generation feature.
Follow the [RFC0015](https://git.duniter.org/documents/rfcs/blob/hd_wallet/rfc/0015_Dubp_HD_Wallet.md) of the Duniter Project.
Some documentation:
https://coinsutra.com/hd-wallets-deterministic-wallet/
https://pypi.org/project/pywallet/Backloghttps://git.duniter.org/clients/python/duniterpy/-/issues/123Implement authentification from Scuttlebutt .ssb file2021-05-09T16:15:51+02:00Vincent TexierImplement authentification from Scuttlebutt .ssb file[Scuttlebutt](https://scuttlebutt.nz/) store the secret key-pair of a user in the `$HOME/.ssb` folder.
Add support for authentication by loading the ssb file.
Scuttlebutt key-pair is of the same ed25519 protocol than Duniter.[Scuttlebutt](https://scuttlebutt.nz/) store the secret key-pair of a user in the `$HOME/.ssb` folder.
Add support for authentication by loading the ssb file.
Scuttlebutt key-pair is of the same ed25519 protocol than Duniter.0.57.0Vincent TexierVincent Texierhttps://git.duniter.org/clients/python/duniterpy/-/issues/113Handle block signature verification2020-11-07T08:54:12+01:00Vincent TexierHandle block signature verificationDuniterPy correctly check the signature of the user (tx, wot) and the peer documents.
The signature of this document is based on its raw format.
Excepted the block document signature which is based on the `InnerHash` and the `Nonce` of t...DuniterPy correctly check the signature of the user (tx, wot) and the peer documents.
The signature of this document is based on its raw format.
Excepted the block document signature which is based on the `InnerHash` and the `Nonce` of the block.
For the `Block` document, a special case should be handled as follow:
```python
#prepended = signature + bytes(document.raw(), "ascii")
prepended = signature + bytes("InnerHash: {0}\nNonce: {1}\n".format(document.inner_hash, document.nonce), "ascii")
```
So we need to handle it correctly in the line:
https://git.duniter.org/clients/python/duniterpy/blob/dev/duniterpy/key/verifying_key.py#L370.56.0MoulMoulhttps://git.duniter.org/clients/python/duniterpy/-/issues/86Scrypt: migrate from pylibscrypt to hashlib.scrypt from the standard Python 3...2020-09-24T20:41:17+02:00MoulScrypt: migrate from pylibscrypt to hashlib.scrypt from the standard Python 3.6 libDuniterPy currently uses [pylibscrypt](https://github.com/jvarho/pylibscrypt):
- It is [not packaged into Debian](https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=pylibscrypt)
Other Python li...DuniterPy currently uses [pylibscrypt](https://github.com/jvarho/pylibscrypt):
- It is [not packaged into Debian](https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=pylibscrypt)
Other Python libraries implementing Scrypt:
- [pyscrypt](https://github.com/ricmoo/pyscrypt): pure Python, but not in Debian
- [py-srcypt](https://bitbucket.org/mhallin/py-scrypt/src). [In Debian](https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=python3-scrypt), Python wrapper around C, was used in Silkaj 0.6.0 before DuniterPy migration
---
- #68: Will allow Debian packaging0.60.0MoulMoulhttps://git.duniter.org/clients/python/duniterpy/-/issues/83libsodium: Migrate from libnacl to PyNaCl2023-07-07T20:32:33+02:00Fredlibsodium: Migrate from libnacl to PyNaClI am willing to retrieve Cesium+ member data
1. Installed duniterpy with:
`pip3 install duniterpy`
OK
2. Made my script from example: nano request_cesium_profile.py
```
import asyncio
from duniterpy.api.client import Client
ES_CORE_EN...I am willing to retrieve Cesium+ member data
1. Installed duniterpy with:
`pip3 install duniterpy`
OK
2. Made my script from example: nano request_cesium_profile.py
```
import asyncio
from duniterpy.api.client import Client
ES_CORE_ENDPOINT = "ES_CORE_API g1.data.duniter.fr 443"
ES_USER_ENDPOINT = "ES_USER_API g1.data.duniter.fr 443"
async def main():
"""
Main code (synchronous requests)
"""
# Create Client from endpoint string in Duniter format
client = Client(ES_USER_ENDPOINT)
# prompt entry
# pubkey = input("\nEnter a public key to get the user profile: ")
pubkey = "DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech"
# Get the profil of a public key (direct REST GET request)
# print("\nGET user/profile/{0}/_source:".format(pubkey))
response = await client.get('user/profile/{0}/_source'.format(pubkey.strip(' \n')))
print(response)
# Close client aiohttp session
await client.close()
# Latest duniter-python-api is asynchronous and you have to use asyncio, an asyncio loop and a "as" on the data.
# ( https://docs.python.org/3/library/asyncio.html )
asyncio.get_event_loop().run_until_complete(main())
```
python3 request_cesium_profile.py
```
Traceback (most recent call last):
File "request_cesium_profile.py", line 2, in <module>
from duniterpy.api.client import Client
File "/usr/local/lib/python3.5/dist-packages/duniterpy/__init__.py", line 24, in <module>
from . import api, documents, key
File "/usr/local/lib/python3.5/dist-packages/duniterpy/documents/__init__.py", line 10, in <module>
from .crc_pubkey import CRCPubkey
File "/usr/local/lib/python3.5/dist-packages/duniterpy/documents/crc_pubkey.py", line 7, in <module>
from ..helpers import ensure_str
File "/usr/local/lib/python3.5/dist-packages/duniterpy/helpers.py", line 2, in <module>
from libnacl.encode import hex_decode, hex_encode
File "/usr/local/lib/python3.5/dist-packages/libnacl/__init__.py", line 83, in <module>
nacl = _get_nacl()
File "/usr/local/lib/python3.5/dist-packages/libnacl/__init__.py", line 81, in _get_nacl
raise OSError(msg)
OSError: Could not locate nacl lib, searched for libsodium.so, libsodium.so.23, libsodium.so.18, libsodium.so.17, libsodium.so.13, libsodium.so.10, libsodium.so.5, libsodium.so.4,
```
What is wrong?1.3.0https://git.duniter.org/clients/python/duniterpy/-/issues/78Ascii Armor Messages support2019-07-29T15:42:15+02:00Vincent TexierAscii Armor Messages supportFollowing the [RFC 0007 on Ascii Armor Messages](https://git.duniter.org/nodes/common/doc/blob/ascii_armor_messages/rfc/0007%20Ascii%20Armor%20Messages.md),
add class and examples to create, encrypt, decrypt, sign and verify Ascii Armor ...Following the [RFC 0007 on Ascii Armor Messages](https://git.duniter.org/nodes/common/doc/blob/ascii_armor_messages/rfc/0007%20Ascii%20Armor%20Messages.md),
add class and examples to create, encrypt, decrypt, sign and verify Ascii Armor Messages.0.53.xVincent TexierVincent Texierhttps://git.duniter.org/clients/python/duniterpy/-/issues/77Implement Scrypt authentication from file2020-04-26T16:09:35+02:00MoulImplement Scrypt authentication from fileUsefull for Shell applications on top of Silkaj.
Cf. https://forum.duniter.org/t/authentification-scrypt-automatisee/5828
---
A format for this authentication file should be defined.
A simple proposition can be the same format as smb...Usefull for Shell applications on top of Silkaj.
Cf. https://forum.duniter.org/t/authentification-scrypt-automatisee/5828
---
A format for this authentication file should be defined.
A simple proposition can be the same format as smb credentials text file for linux mount command :
```
salt
password
```0.57.0Vincent TexierVincent Texierhttps://git.duniter.org/clients/python/duniterpy/-/issues/74Encrypt and decrypt bytes instead of str2019-06-14T09:49:13+02:00Pascal EngélibertEncrypt and decrypt bytes instead of str`key.decrypt_seal` cannot handle decrypted binary data because it uses `str` instead of `bytes`. For example:
e = pubkey.encrypt_seal(b"Hello\xebHello") # no error
d = privkey.decrypt_seal(e) # error
# UnicodeDecodeError: 'u...`key.decrypt_seal` cannot handle decrypted binary data because it uses `str` instead of `bytes`. For example:
e = pubkey.encrypt_seal(b"Hello\xebHello") # no error
d = privkey.decrypt_seal(e) # error
# UnicodeDecodeError: 'utf-8' codec can't decode byte 0xeb in position 5: invalid continuation byte
It should be possible to encrypt/decrypt binary contents.0.53.xVincent TexierVincent Texierhttps://git.duniter.org/clients/python/duniterpy/-/issues/71Add seedhex (in hexadecimal format) authentication2019-07-29T15:43:25+02:00MoulAdd seedhex (in hexadecimal format) authenticationOr at least a helpers to convert from `seedhex` to `seed` and inversely.Or at least a helpers to convert from `seedhex` to `seed` and inversely.0.52.xMoulMoulhttps://git.duniter.org/clients/python/duniterpy/-/issues/69Allow to import Ğannonce format2019-07-29T15:43:37+02:00MoulAllow to import Ğannonce format- https://gannonce.duniter.org/#/connect- https://gannonce.duniter.org/#/connect0.52.xhttps://git.duniter.org/clients/python/duniterpy/-/issues/62Sign messages with credentials and verify it with public key2019-07-29T15:44:28+02:00Vincent TexierSign messages with credentials and verify it with public keyAdd functions and examples to:
- Sign arbitrary text messages with Duniter credentials (secret key)
- Verify signed messages with the Duniter public key.
* [x] Signed messages are in binary format file, and exchanged by email attachment.
Add functions and examples to:
- Sign arbitrary text messages with Duniter credentials (secret key)
- Verify signed messages with the Duniter public key.
* [x] Signed messages are in binary format file, and exchanged by email attachment.
0.50.0Vincent TexierVincent Texierhttps://git.duniter.org/clients/python/duniterpy/-/issues/51Import secret keys as PubSec, WIF and EWIF format2019-07-29T15:46:42+02:00Vincent TexierImport secret keys as PubSec, WIF and EWIF formatWe only import json file format for now.
Add secret key files import in PubSec ,WIF and EWIF formats.We only import json file format for now.
Add secret key files import in PubSec ,WIF and EWIF formats.0.52.xVincent TexierVincent Texier