Connections

The connections endpoints allow you to automatically connect to a token network as well as leave a token network by closing and settling all open channels.

Connections Resource Overview

HTTP Method

Resource

Description

GET

Details of all joined token networks

circle-exclamation

Connections Resource Details

Details of All Joined Token Networks

GET http://localhost:5001/api/v1/connections

Each key in the JSON response object is a token address for which you have open channels.

Path Parameters

Name
Type
Description

version

string

Version of the API

{
    "0x2a65Aca4D5fC5B5C859090a6c34d164135398226": {
        "sum_deposits": "67",
        "channels": "3"
    },
    "0x0f114A1E9Db192502E7856309cc899952b3db1ED": {
        "sum_deposits": "31",
        "channels": "1"
    }
}

Leave a Token Network

DELETE http://localhost:5001/api/v1/connections/0x2a65...8226

The request might take some time and will only return once all blockchain calls for closing and settling a channel have been completed. The response is a list with addresses of all closed channels.

Path Parameters

Name
Type
Description

version

string

Version of the API

token_address

string

Address of a token

Last updated

Was this helpful?