Settle Payments and Close Channels
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.
Close a specific channel
curl -i -X PATCH \
http://localhost:5001/api/v1/channels/0x9aBa529db3FF2D8409A1da4C9eB148879b046700/0x61C808D82A3Ac53231750daDc13c777b59310bD9 \
-H 'Content-Type: application/json' \
--data-raw '{"state": "closed"}'HTTP/1.1 200 OK
Content-Type: application/json
{
"token_network_address": "0x3C158a20b47d9613DDb9409099Be186fC272421a",
"channel_identifier": "99",
"partner_address": "0x61C808D82A3Ac53231750daDc13c777b59310bD9",
"token_address": "0x9aBa529db3FF2D8409A1da4C9eB148879b046700",
"balance": "350",
"total_deposit": "7331",
"total_withdraw": "0",
"state": "closed",
"settle_timeout": "500",
"reveal_timeout": "50"
}Leave a token network and close all channels
Last updated
Was this helpful?