Python-Cardano
Python implementation of Cardano project, including network protocol, crypto primitives, wallet logic, and more.
Why This Project
We want to explore alternate design decisions to support lightweight wallet, and start developing the mobile wallet for Cardano. Current official wallet node is not enough yet.
Explore the design space of clustered wallet node.
Provide alternative implementation of Cardano protocols and specifications in another programming language.
In the future, it could be an alternative foundation for projects in Cardano ecosystem: wallets, side-chains, MPCs.
Why Python
Python is still one of the most cleanly designed, developer friendly programming language out there, has a reputation of executable pseudocode. And lightweight thread provided by gevent makes it suitable to write networking software, and easy interoperability with C thanks to Cython enables us to improve performance incrementally.
With python, we can develop clean prototype very fast, with good performance. And in the future we can always move the CPU intensive code to C after we indentified the hotspot.
Build & Test
$ virtualenv -p python3 .env
$ source .env/bin/activate
$ pip install -r requirements.txt
$ python setup.py build_ext --inplace
$ mkdir ./test_db
$ python scripts/pycardano.py run
sync block data from mainnet and subscribing for new blocks automatically.
$ python scripts/pycardano.py wallet create default
generate wallet
Features
Store block data of different epochs in seperate rocksdb database, provides better disk usage(fully synchronized mainchain takes 1.3G disk space), and allows faster synchronization in the future.
pycardano.py sign sign a message with wallet, prove an wallet address belongs to you.
pycardano.py verify verify a signed message.
pycardano.py utxo stat Some statistics of global UTxOs.
Modules
cardano.address
Implement Cardano HD address derivation and encoding, and wallet recovering for lagacy address format.
cardano.transport
Implement Haskell’s network-transport-tcp, multiplex multiple lightweight unidirectional connections on a single tcp connection.
cardano.node
Implement cardano-sl’s Node, allow bidirectional conversation between endpoints.
cardano.storage
Storage api of block and wallet’s data.
cardano.block
Block data structures.
cardano.logic
Workers and listeners of default node.
cardano.retrieve
Retrieve block data with cardano-sl mainnet.
cardano.wallet
Implement wallet logic according to formal specification.
TODOs
wallet state storage, a simple solution first, hopefully something like Haskell’s acid-state in the end.
block verification.
relay block data with stream api.
wallet cli app.
wallet V1 api and api for SPV light client.
clustered wallet storage.
Metadata
Release files for python-cardano 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python-cardano-1.0.1.tar.gz | 1.3 MB | Without provenance | Details |
Release files / python-cardano-1.0.1.tar.gz
| Download URL | python-cardano-1.0.1.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
826fa4709d905e5c8875e840a0e60891c15020edd1851c5c90ad663c25dd126b
|
|
BLAKE2b-256 checksum How to use checksums |
d49dd221f219fbc01fccdbf744d974dd107a81a3b6f5f3732b0ec9757be0e411
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|
Security for python-cardano 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.