Idena Client

https://travis-ci.com/iRhonin/idena.py.svg?branch=main

This is Python wrapper for Idene Node.

Please checkout API refrence for avaliable APIs.

Contents:

Installation

Idena.py can be installed using pip as follows:

$ pip install idena

For the development, clone the repository then:

$ pip install -e .

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')

Indices and tables