Idena RPC client
Project description
This is Python wrapper for Idene Node.
Highly inspired by Web3.py and cookiecutter-pypackage.
Installation
Idena.py can be installed using pip as follows:
$ pip install idena
For the development, clone the repository then:
$ poetry install
Using Idena
This library depends on a connection to an Idena node and there are 2 ways to configure them.
Calling client.init
>>> from idena import client
>>> client.init('http://localhost:9009/', 'api-key')
Setting environment variables
Set IDENA_RPC_NODE and IDENA_API_KEY envars:
$ export IDENA_RPC_NODE=http://localhost:9009/
$ export IDENA_API_KEY=api-key
Getting Blockchain Info
>>> client.blockchain.get_last_block()
Block(coinbase='0xbe854231db69ab042073b7ff8309ae3ee265a40f',
hash='0xa88e6ab305d7ee311ad2de35338cdbf7e664d860709e5a53f0307baeeaa6f968',
parentHash='0xe324a208892241e0294e5a6334965660375dda7a3ad8d8a42a5f3f2ef2857a22',
height=2159398,
timestamp=1606904853,
root='0xd874709bdd4c6fcd95e2e531cc07a4ce42ab23334dfd12ceb45350535b36664c',
identityRoot='0x9f3661f19e13d4860f2f2f1610abbbaf86abc8adf1a2781b371189e683745a97',
ipfsCid=None,
transactions=None,
flags=['OfflinePropose'],
isEmpty=False,
offlineAddress='0x0df427ad7e1906ab4fcc5fd31118932256f5dc7a')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
idena-0.2.2.tar.gz
(7.9 kB
view details)
Built Distribution
idena-0.2.2-py3-none-any.whl
(9.0 kB
view details)
File details
Details for the file idena-0.2.2.tar.gz
.
File metadata
- Download URL: idena-0.2.2.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.6.7 Linux/4.15.0-1077-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50ededf77b93738e6aeb70aa6ec192a87bdca95933bdf5c09c41b59c2dbdc154 |
|
MD5 | ab7f602d36496f0094f0577957f4c7d5 |
|
BLAKE2b-256 | 49b21c6a42b167c33bd3e7fb5952ef6c63931a9a1555cf0d7383df0b94efefa6 |
File details
Details for the file idena-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: idena-0.2.2-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.6.7 Linux/4.15.0-1077-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5373a250b277f90a149519149dfb06f953a624a05db2eebe06a7acb879b8435d |
|
MD5 | 3e9dbd50a087462a76de6da674e8a01d |
|
BLAKE2b-256 | 87e8d47309d576a08ecc5696b7dec9e0350b9abaa5f87dff9e7abc7828787805 |