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.0.tar.gz
(6.3 kB
view details)
Built Distributions
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
raiden_py-0.1-py3.7.egg
(10.6 kB
view details)
File details
Details for the file raiden_py-0.1.0.tar.gz.
File metadata
- Download URL: raiden_py-0.1.0.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.20.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a28ee27a485523287a70e93148b83a3bffc35b0fdf839c44ca158d142ab4715e
|
|
| MD5 |
74d61145b6c62707765f4d3413c5f926
|
|
| BLAKE2b-256 |
6b4941a7479adfab6bc3418531c50777d0f2357ce4c0b2897b77ed89d9037798
|
File details
Details for the file raiden_py-0.1.0-py3-none-any.whl.
File metadata
- Download URL: raiden_py-0.1.0-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.20.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bffa0b102c97baa9d306062e4ba879cf3163b22e6d9ca77453d94f22684996b
|
|
| MD5 |
98f440302bcc585a4130394bb16d7712
|
|
| BLAKE2b-256 |
88cea711e8dec5efe4d5b838383687e9e24362680dc09868c3ad5819950704ea
|
File details
Details for the file raiden_py-0.1-py3.7.egg.
File metadata
- Download URL: raiden_py-0.1-py3.7.egg
- Upload date:
- Size: 10.6 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff26bf46258057e87759dce2d393c1b2dece70bbd47a22b3aaa3392bd3a89a71
|
|
| MD5 |
b6d1d308403227d1c8eb8d866f8a7871
|
|
| BLAKE2b-256 |
474c89f7597a7f7380342c92d589ff03c958fe18e6097555a31f4ac6ef90c922
|