Skip to main content

Python wrapper for the Raiden Network node API

Project description

raiden api client

The raiden api client wraps the API of raiden. It simplifies the usage of raiden's api to a few lines.

Installation

Use the package manager pip to install raiden API client.

pip install raiden-api-client

Usage

import raiden-api-client

raiden = raiden-api-client.RaidenAPIWrapper(ip="localhost", port=8545) # Parity running at localhost:8545

raiden.transfer(
   partner = "0x0000000000000000000000000000000000000000",
   amount = 1,
) # Transfering 1 Token to 0x00

Further examples can be found in the example folder.

Available Methods

- mint_tokens(receiver, token, amount) -> AttrDict
- register_token(token) -> AttrDict
- open_channel(partner, token, deposit, settle_timeout=500) -> AttrDict
- transfer(partner, token, amount, identifier=None ) -> AttrDict
- fund_channel(partner, token, deposit) -> AttrDict
- close_channel(partner, token) -> AttrDict
- leave_token_network(token) -> List[str]

- get_channels(token=None, partner=None) -> List[AttrDict]
- get_payments(partner=None, token=None) -> List[AttrDict]
- get_token_network(token=None) -> AttrDict
- get_raiden_version() -> AttrDict
- get_address() -> AttrDict
- get_pending_transfer(token=None, partner=None) -> List[AttrDict]
- get_connections() -> AttrDict
- get_node_status() -> AttrDict

Checkout the raiden api docs for further information about the returned objects.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

raiden-api-client-1.0.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

raiden_api_client-1.0.0-py2.py3-none-any.whl (8.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file raiden-api-client-1.0.0.tar.gz.

File metadata

  • Download URL: raiden-api-client-1.0.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for raiden-api-client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 400660229890a304b3eb664440079d7082301d2e5bf6ca7df253b8242957357d
MD5 55ee27f6171b1e57fa80b3c61714055f
BLAKE2b-256 398756d0e0130b87a043489746f04f2a18999d89ab1ad1c744199729b3690268

See more details on using hashes here.

File details

Details for the file raiden_api_client-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: raiden_api_client-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for raiden_api_client-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 68435723f12d7fd96eb8ef159fce440495448142e9fb96f619119797223e4aed
MD5 6f87f2b705f666cd921d562c0ee12fbc
BLAKE2b-256 63f2b10ddbc44a426231cd51caad75bb311122e4f1f958db73b53d280de4c29c

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