Channels
The channels endpoints allow you to open channels with other Raiden nodes as well as closing channels, querying them for information and making deposits or withdrawals.
Channels Resource Overview
HTTP Method | Resource | Description |
GET | All unsettled channels | |
GET | All unsettled channels for a specific token | |
GET | Info about one of your channels | |
PUT | Create a channel | |
PATCH | Close a channel, increase deposit, withdraw tokens or update reveal timeout |
Alderaan Deposit Limits
The maximum deposits per token and node for Alderaan are:
DAI
The deposit limit is 1000 worth of DAI per channel participant making the maximum amount of DAI 2000 per channel.
WETH
Details on the deposit limit for WETH will be added soon.
Channels Resource Details
All Unsettled Channels
GET
http://localhost:5001/api/v1/channels
Path Parameters
Name | Type | Description |
---|---|---|
version | string | Version of the API |
All Unsettled Channels for a Specific Token
GET
http://localhost:5001/api/v1/channels/0xEA67...8ec8
Path Parameters
Name | Type | Description |
---|---|---|
version | string | Version of the API |
token_address | string | Address of a token |
Info About One of Your Channels
GET
http://localhost:5001/api/v1/channels/0xEA67...8ec8/0x61C8...0bD9
The channel is specified by the address of a token and the address of the partner node which the channel is opened with.
Path Parameters
Name | Type | Description |
---|---|---|
version | string | Version of the API |
token_address | string | Address of a token |
partner_address | string | Address of the partner node |
Create a Channel
PUT
http://localhost:5001/api/v1/channels
The request will open a channel and return a channel object.
Path Parameters
Name | Type | Description |
---|---|---|
version | string | Version of the API |
Request Body
Name | Type | Description |
---|---|---|
reveal_timeout | string | Value for the reveal timeout |
partner_address | string | Address of the partner node with whom we're opening the channel |
token_address | string | Address of the token to be used in the channel |
total_deposit | string | Amount of tokens to be deposited into the channel |
settle_timeout | string | The number of blocks after which a channel can be settled |
Example request body:
Close a Channel
PATCH
http://localhost:5001/api/v1/channels/0xEA67...8ec8/0x61C8...0bD9
Path Parameters
Name | Type | Description |
---|---|---|
version | string | Version of the API |
token_address | string | Address of a token |
partner_address | string | Address of the partner node |
Request Body
Name | Type | Description |
---|---|---|
state | string | Can only be set to "closed" |
Example request body:
Increase Deposit
PATCH
http://localhost:5001/api/v1/channels/0xEA67...8ec8/0x61C8...0bD9
Path Parameters
Name | Type | Description |
---|---|---|
version | string | Version of the API |
token_address | string | Address of a token |
partner_address | string | Address of the partner node |
Request Body
Name | Type | Description |
---|---|---|
total_deposit | string | Amount of tokens for increasing the total deposit |
Example request body:
Withdraw Tokens
PATCH
http://localhost:5001/api/v1/channels/0xEA67...8ec8/0x61C8...0bD9
Path Parameters
Name | Type | Description |
---|---|---|
version | string | Version of the API |
token_address | string | Address of a token |
partner_address | string | Address of the partner node |
Request Body
Name | Type | Description |
---|---|---|
total_withdraw | string | Amount of tokens to withdraw |
Example request body:
Update Reveal Timeout
PATCH
http://localhost:5001/api/v1/channels/0xEA67...8ec8/0x61C8...0bD9
This request will update the number of blocks that are allowed between setting a hashlock and the revealing of the related secret.
Path Parameters
Name | Type | Description |
---|---|---|
version | string | Version of the API |
token_address | string | Address of a token |
partner_address | string | Address of the partner node |
Request Body
Name | Type | Description |
---|---|---|
reveal_timeout | string | Value for the new reveal timeout |
Example request body:
Last updated