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.0.tar.gz
(7.9 kB
view details)
Built Distribution
idena-0.2.0-py3-none-any.whl
(9.0 kB
view details)
File details
Details for the file idena-0.2.0.tar.gz
.
File metadata
- Download URL: idena-0.2.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.0 Linux/4.15.0-1077-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 331d0e1703b24390c5edc7de2f1b3788fbd4cf29b6c867e089d260a6169fb6ff |
|
MD5 | aae3f08b322292cb2ba17135360fff10 |
|
BLAKE2b-256 | 3b0a0e442f120175fcaea6e05db131a6ed168c61328df1bbcf60c60c1aad47ff |
File details
Details for the file idena-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: idena-0.2.0-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.8.0 Linux/4.15.0-1077-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba8f8875dcd56cc8c3e05f205e872180b312d7a009ae2567bd19fbd724e8c12b |
|
MD5 | ff03dd53727f3e9281bbb972280f48a0 |
|
BLAKE2b-256 | b7c6e83f96c1ea922b63a8ff36faf1012bb4724fc9d4fdf5e56e1a34eeb9b4a3 |