Skip to main content

Idena RPC client

Project description

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

This is Python wrapper for Idene Node.

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


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.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

idena-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file idena-0.1.0.tar.gz.

File metadata

  • Download URL: idena-0.1.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

Hashes for idena-0.1.0.tar.gz
Algorithm Hash digest
SHA256 45f02f5d6abee7db007be719b0058e47dd3341601680c919381f453505f701e0
MD5 f1f958a5a370e145ca678acd34f4a138
BLAKE2b-256 1b0ca0ce36bf8ddecfdff653b1addf9f03219087865a6c6381ce09f25b6854ed

See more details on using hashes here.

File details

Details for the file idena-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: idena-0.1.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

Hashes for idena-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e67b06ce883da8156b51489891c3b0b51c1e85b4642cb291d5b43d6a6010f92
MD5 7e7f0ccfa8d588026793de705b0fa770
BLAKE2b-256 804f73c9d7b72989f537ab56b8dc9289273ec2f407d33683ed1d8799e1ff8150

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page