Skip to main content

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)

# Withdraw token
raiden.withdraw_token_channel(token_address='0x9B740B496dea54d747680e941921aD28BDA5789C', 
                              partner_address='0x2645bcF95d1c3fE89dB435be8AaEFb887832803b',
                              total_withdraw=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')

Metadata

Release files for raiden-py 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for raiden-py 0.1.2
File Size Uploaded
raiden_py-0.1.2.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for raiden-py 0.1.2
File Interpreter ABI Platform
raiden_py-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / raiden_py-0.1.2.tar.gz

Download URL raiden_py-0.1.2.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
adc0914cb439410ced289d1e39e7f6c8cf7b50cd9bdab5e23d4f529f6ce8e6d5
BLAKE2b-256 checksum
How to use checksums
89c94a8d37744fbc414c8333a8016d07698b69eb2e508b8e94a7e95c35b6f6ba
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / raiden_py-0.1.2-py3-none-any.whl

Download URL raiden_py-0.1.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cea4f62e30c4ef7a1ee4e9510d17590849b2ffb760b0a52daf047431eaadf412
BLAKE2b-256 checksum
How to use checksums
d59c30d5e7889e0f5920dd67be6d9f2a412c88ad3ab7be01bf396c2024f92d93
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page