DuniterPy issueshttps://git.duniter.org/clients/python/duniterpy/-/issues2023-07-08T15:26:03+02:00https://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/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/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/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.0