Skip to content

Instantly share code, notes, and snippets.

@CosminNechifor
Last active September 20, 2018 11:19
Show Gist options
  • Select an option

  • Save CosminNechifor/b454a7a3383ba90b2a5875f8919376ef to your computer and use it in GitHub Desktop.

Select an option

Save CosminNechifor/b454a7a3383ba90b2a5875f8919376ef to your computer and use it in GitHub Desktop.
raiden git:(master) ✗ curl -i -X PUT http://localhost:5002/api/1/connections/0x6f576941799EEF4c7714a5e383443285402E042f -H 'Content-Type: application/json' --data-raw '{"funds": 100, "joinable_funds_target": 0.6, "initial_channel_target": 0}'
HTTP/1.1 204 NO CONTENT
mimetype: application/json
Content-Type: application/json
Content-Length: 0
Date: Thu, 20 Sep 2018 11:06:51 GMT
raiden git:(master) ✗ curl -i -X PUT http://localhost:5002/api/1/connections/0x6f576941799EEF4c7714a5e383443285402E042f -H 'Content-Type: application/json' --data-raw '{"funds": 100, "joinable_funds_target": 0, "initial_channel_target": 0.3}'
HTTP/1.1 204 NO CONTENT
mimetype: application/json
Content-Type: application/json
Content-Length: 0
Date: Thu, 20 Sep 2018 11:08:22 GMT
raiden git:(master) ✗ curl -i -X PUT http://localhost:5002/api/1/connections/0x6f576941799EEF4c7714a5e383443285402E042f -H 'Content-Type: application/json' --data-raw '{"funds": 0, "joinable_funds_target": 0, "initial_channel_target": 0}'
HTTP/1.1 409 CONFLICT
mimetype: application/json
Content-Type: application/json
Content-Length: 78
Date: Thu, 20 Sep 2018 11:11:16 GMT
{"errors": "The funds to use in the connection need to be a positive integer"}%
curl -i -X PUT http://localhost:5002/api/1/connections/0x6f576941799EEF4c7714a5e383443285402E042f -H 'Content-Type: application/json' --data-raw '{"funds": 100, "joinable_funds_target": 0, "initial_channel_target": 5}'
HTTP/1.1 204 NO CONTENT
mimetype: application/json
Content-Type: application/json
Content-Length: 0
Date: Thu, 20 Sep 2018 11:16:38 GMT
In this case it opened 5 channels each one with a balance of 20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment