Metadata-Version: 2.4
Name: aleph-sdk-python
Version: 2.3.0
Summary: Lightweight Python Client library for the Aleph.im network
Project-URL: Documentation, https://aleph.im/
Project-URL: Homepage, https://github.com/aleph-im/aleph-sdk-python
Author-email: "Aleph.im Team" <hello@aleph.im>
License: The MIT License (MIT)
        
        Copyright (c) 2019-2023 Aleph.im
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: AUTHORS.rst
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: aiohttp
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Dist: aiohttp>=3.8.3
Requires-Dist: aioresponses>=0.7.6
Requires-Dist: aleph-message>=1.0.5
Requires-Dist: aleph-superfluid>=0.3
Requires-Dist: base58==2.1.1
Requires-Dist: coincurve; python_version >= '3.9'
Requires-Dist: coincurve>=19; python_version >= '3.9'
Requires-Dist: eth-abi>=5.0.1; python_version >= '3.9'
Requires-Dist: eth-typing>=5.0.1
Requires-Dist: jwcrypto==1.5.6
Requires-Dist: ledgerblue>=0.1.48
Requires-Dist: ledgereth>=0.10
Requires-Dist: pydantic-settings>=2
Requires-Dist: pydantic<3,>=2
Requires-Dist: pynacl==1.5
Requires-Dist: python-magic
Requires-Dist: typing-extensions
Requires-Dist: web3>=7.10
Provides-Extra: all
Requires-Dist: aiodns; extra == 'all'
Requires-Dist: aiomqtt<=0.1.3; extra == 'all'
Requires-Dist: aleph-nuls2; extra == 'all'
Requires-Dist: base58; extra == 'all'
Requires-Dist: certifi; extra == 'all'
Requires-Dist: click; extra == 'all'
Requires-Dist: cosmospy; extra == 'all'
Requires-Dist: eciespy; (python_version < '3.11') and extra == 'all'
Requires-Dist: eciespy>=0.3.13; (python_version >= '3.11') and extra == 'all'
Requires-Dist: ledgereth==0.10; extra == 'all'
Requires-Dist: py-sr25519-bindings; extra == 'all'
Requires-Dist: pynacl; extra == 'all'
Requires-Dist: pytezos-crypto==3.13.4.1; extra == 'all'
Requires-Dist: sphinxcontrib-plantuml; extra == 'all'
Requires-Dist: substrate-interface<1.8; extra == 'all'
Provides-Extra: cosmos
Requires-Dist: cosmospy; extra == 'cosmos'
Provides-Extra: dns
Requires-Dist: aiodns; extra == 'dns'
Provides-Extra: docs
Requires-Dist: sphinxcontrib-plantuml; extra == 'docs'
Provides-Extra: encryption
Requires-Dist: eciespy; (python_version < '3.11') and extra == 'encryption'
Requires-Dist: eciespy>=0.3.13; (python_version >= '3.11') and extra == 'encryption'
Provides-Extra: ledger
Requires-Dist: ledgereth==0.10; extra == 'ledger'
Provides-Extra: mqtt
Requires-Dist: aiomqtt<=0.1.3; extra == 'mqtt'
Requires-Dist: certifi; extra == 'mqtt'
Requires-Dist: click; extra == 'mqtt'
Provides-Extra: nuls2
Requires-Dist: aleph-nuls2; extra == 'nuls2'
Provides-Extra: solana
Requires-Dist: base58; extra == 'solana'
Requires-Dist: pynacl; extra == 'solana'
Provides-Extra: substrate
Requires-Dist: py-sr25519-bindings; extra == 'substrate'
Requires-Dist: substrate-interface<1.8; extra == 'substrate'
Provides-Extra: tezos
Requires-Dist: pytezos-crypto==3.13.4.1; extra == 'tezos'
Description-Content-Type: text/markdown


# aleph-sdk-python
Python SDK for the Aleph.im network, next generation network of decentralized big data applications.

Development follows the [Aleph Whitepaper](https://github.com/aleph-im/aleph-whitepaper).

## Documentation
The latest documentation, albeit incomplete, is available at [https://docs.aleph.im/libraries/python-sdk/](https://docs.aleph.im/libraries/python-sdk/).

For the full documentation, please refer to the docstrings in the source code.

## Requirements
### Linux 
Some cryptographic functionalities use curve secp256k1 and require installing [libsecp256k1](https://github.com/bitcoin-core/secp256k1).

```shell
$ apt-get install -y python3-pip libsecp256k1-dev
```
Using some chains may also require installing `libgmp3-dev`.

### macOs
This project does not support Python 3.12 on macOS. Please use Python 3.11 instead.
```shell
$ brew install secp256k1
```

## Installation
Using pip and [PyPI](https://pypi.org/project/aleph-sdk-python/):

```shell
$ pip install aleph-sdk-python
```

### Additional dependencies
Some functionalities require additional dependencies. They can be installed like this:

```shell
$ pip install aleph-sdk-python[solana, dns]
```

The following extra dependencies are available:
- `solana` for Solana accounts and signatures
- `cosmos` for Substrate/Cosmos accounts and signatures
- `nuls2` for NULS2 accounts and signatures
- `polkadot` for Polkadot accounts and signatures
- `ledger` for Ledger hardware wallet support, see [Usage with LedgerHQ hardware](#usage-with-ledgerhq-hardware)
- `mqtt` for MQTT-related functionalities, see [examples/mqtt.py](examples/mqtt.py)
- `docs` for building the documentation, see [Documentation](#documentation)
- `dns` for DNS-related functionalities
- `all` installs all extra dependencies


## Installation for development
Setup a virtual environment using [hatch](https://hatch.pypa.io/):
```shell
$ hatch shell
```

Then install the SDK from source with all extra dependencies:

```shell
$ pip install -e .[all]
```

### Running tests & Hatch scripts
You can use the test env defined for hatch to run the tests:

```shell
$ hatch run testing:run
```

See `hatch env show` for more information about all the environments and their scripts.

### Generating the documentation [DEPRECATED]
The documentation is built using [Sphinx](https://www.sphinx-doc.org/).

To build the documentation, install the SDK with the `docs` extra dependencies:

```shell
$ pip install -e .[docs]
```

Then build the documentation:

```shell
$ cd docs
$ make html
```

## Usage with LedgerHQ hardware

The SDK supports signatures using [app-ethereum](https://github.com/LedgerHQ/app-ethereum),
the Ethereum app for the Ledger hardware wallets.

This has been tested successfully on Linux (amd64).
Let us know if it works for you on other operating systems.

Using a Ledger device on Linux requires root access or the setup of udev rules.

Unlocking the device is required before using the relevant SDK functions.

### Debian / Ubuntu

Install [ledger-wallets-udev](https://packages.debian.org/bookworm/ledger-wallets-udev).

`sudo apt-get install ledger-wallets-udev`

### On NixOS

Configure `hardware.ledger.enable = true`.

### Other Linux systems

See https://github.com/LedgerHQ/udev-rules


