Closing a channel will settle the balance between you and your peer. This means that both of you will receive your net balance of tokens back on-chain and the balance of the channel will be 0.
The settle timeout period will start as soon as a channel is closed and the channel is settled once the settle timeout period is over. The state of the channel will then be changed tosettled.
Once done, the response will return a list containing the addresses of all closed channels.
HTTP/1.1 200 OK
Content-Type: application/json
[
"0x41BCBC2fD72a731bcc136Cf6F7442e9C19e9f313",
"0x5A5f458F6c1a034930E45dC9a64B99d7def06D7E",
"0x8942c06FaA74cEBFf7d55B79F9989AdfC85C6b85"
]
Please note that leaving a token network will take some time since you need to wait for the settle timeout to expire for each channel before a settle can happen.
If you wish to leave a token network altogether you can do so by making a DELETE request to the endpoint with the token address as a path parameter.