raiden_py
Raiden Python Client Library
Installation
python 3.7+
pip install raiden-py
Documentation
https://viraja1.github.io/raiden_py/docs/raiden_py/raiden.html
Sample Usage
from raiden_py import Raiden
raiden = Raiden("http://localhost:5001", "v1")
# Querying Information About Your Raiden Node
raiden.get_address()
# Register a token
raiden.register_token(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C')
# Get a list of all unsettled channels
raiden.get_channels()
# Get a list of all unsettled channels for the given token address.
raiden.get_channels_token(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C')
# Query information about one of your channels
raiden.get_channel_info(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C',
partner_address='0x2645bcF95d1c3fE89dB435be8AaEFb887832803b')
# Get a list of addresses of all registered tokens.
raiden.get_token_addresses()
# Get the address of the corresponding token network for the given token, if the token is registered.
raiden.get_token_network_address(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C')
# Get a list of all partners with whom you have non-settled channels for a certain token.
raiden.get_partners(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C')
# Get a list of all transfers that have not been completed yet
raiden.get_pending_transfers()
# Get a list of all transfers that have not been completed yet for specified token
raiden.get_pending_transfers_token(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C')
# Returns a list of all transfers that have not been completed yet for specified channel
raiden.get_pending_transfers_channel(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C',
partner_address='0x2645bcF95d1c3fE89dB435be8AaEFb887832803b')
# Create a channel
raiden.create_channel(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C',
partner_address='0x2645bcF95d1c3fE89dB435be8AaEFb887832803b',
total_deposit=1, settle_timeout=500)
# Close a channel
raiden.close_channel(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C',
partner_address='0x2645bcF95d1c3fE89dB435be8AaEFb887832803b')
# Increase the deposit in the channel
raiden.increase_deposit_channel(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C',
partner_address='0x2645bcF95d1c3fE89dB435be8AaEFb887832803b',
total_deposit=1)
# Get a dict containing all joined token networks.
raiden.get_joined_token_networks()
# Automatically join a token network
raiden.join_token_network(token_address='0x46E75a569Be6BdDe5d5E8351c5c035e8DfEa5C62', funds=1)
# Leave a token network
raiden.leave_token_network(token_address='0x46E75a569Be6BdDe5d5E8351c5c035e8DfEa5C62')
# Initiate a payment
raiden.initiate_payment(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C',
target_address='0x2645bcF95d1c3fE89dB435be8AaEFb887832803b',
amount=1)
# Query the payment history
raiden.get_payment_history(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C',
target_address='0x2645bcF95d1c3fE89dB435be8AaEFb887832803b')
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
raiden_py-0.1.1.tar.gz
(6.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file raiden_py-0.1.1.tar.gz.
File metadata
- Download URL: raiden_py-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
944ef5903278cfbe058e5f99e630e71d03577402059bcbb03d887af0e1b08eb3
|
|
| MD5 |
889db28059b8822a8ed0b016c2925b03
|
|
| BLAKE2b-256 |
63d2575c43e63f055c1425766f4946ea37455c1c5f400bb89a50658794ec7d6a
|
File details
Details for the file raiden_py-0.1.1-py3-none-any.whl.
File metadata
- Download URL: raiden_py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31905aa6c471d0c23af5b06c783a71c6656ded6418709d5dee0bc76c5b9cfaef
|
|
| MD5 |
be9d3bf4d3f8f837d9262a4f89531187
|
|
| BLAKE2b-256 |
74d45ab8eb3f3a33829ced101fd096d7c75d34100e68e88f65ae61d846c85ea8
|