Client¶
Autogenerated documentation.
-
class
raiden_client.
Client
(endpoint='http://127.0.0.1:5001/', version='v1')[source]¶ -
address
()[source]¶ Query your address.
When raiden starts, you choose an ethereum address which will also be your raiden address.
-
channel
(token_address, partner_address)[source]¶ Query information about one of your channels.
The channel is specified by the address of the token and the partner’s address. :params: token_address (address) :params: partner_address (address) :rtype:
Dict
[str
,ChannelType
] :returns: channel dict
-
channel_increase_deposit
(token_address, partner_address, total_deposit)[source]¶ Channel increase deposit.
-
channel_increase_withdraw
(token_address, partner_address, total_withdraw)[source]¶ Channel increase withdraw.
-
channel_open
(token_address, partner_address, settle_timeout, total_deposit)[source]¶ Opens (i. e. creates) a channel.
- Params
partner_address (address) – The partner we want to open a channel with.
- Params
token_address (address) – The token we want to be used in the channel.
- Params
total_deposit (int) – Total amount of tokens to be deposited to the channel
- Params
settle_timeout (int) – The amount of blocks that the settle timeout should have.
- Return type
- Returns
channel
-
connection_disconnect
(token_address)[source]¶ Leave a token network.
The request will only return once all blockchain calls for closing/settling a channel have completed. :params: token_address (address)
-
connections_connect
(token_address, funds, initial_channel_target=None, joinable_funds_target=None)[source]¶ Automatically join a token network.
The request will only return once all blockchain calls for opening and/or depositing to a channel have completed. :params: token_address (address) :params: funds (int) Amount of funding you want to put into the network :params: initial_channel_target (int) (optional) Number of channels to open proactively :params: joinable_funds_target (float) (optional) Fraction of funds to join opened channels :rtype:
Dict
[str
,ConnectionType
] :returns: Connection object
-
property
is_connected
¶ Check if raiden node is connected.
Try to get address, if excpetion occured - node is not connected
- Return type
-
mint_tokens
(token_address, to, value, contract_method='mintFor')[source]¶ Mint tokens. This requires the token at token_address to implement a minting method with one of the common interfaces: - mint(address,uint256) - mintFor(uint256,address) - increaseSupply(uint256,address) Depending on the token, it may also be necessary to have minter privilege.
-
non_settled_partners
(token_address)[source]¶ Returns a list of all partners with whom you have non-settled channels for a certain token.
-
payment_events
(token_address, target_address)[source]¶ Query the payment history.
This includes successful (EventPaymentSentSuccess) and failed (EventPaymentSentFailed) sent payments as well as received payments (EventPaymentReceivedSuccess).
-
pending_transfers
(token_address=None, partner_address=None)[source]¶ Returns a list of all transfers that have not been completed yet.
-