Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 2.76 KB

File metadata and controls

48 lines (37 loc) · 2.76 KB

ae-channel-Interface

This is provided as a interactive helper which visualizes the messages on the state channel.

Screenshot:

Suggested approach (manual initiator, automatic backend)

In this example an automatic backend is spun up.

The backend logic operates according to rules specifed in the backed session which is located here

  • start the project as described in the main (root) readme
  • Point your browser to http://localhost:4000/
  • Click 'start backend channel'

the backend now spawns the responder. The responder now waits for the initiator to connect

effecitvely a get request is shot at the backend in the url form of http://127.0.0.1:4000/connect/new?initiator_id=ak_SVQ9RvinB2E8pio2kxtZqhRDwHEsmDAdQCQUhQHki5QyPxtMh&port=1610 which is shown in start backend channel field. You can shoot of the same get from you js or app to start the responder. The get returns the parameters you need to provide from you client. Click the link to try it your webbrowser. Check the response.

  • Click connect websocket for initiator

you have specified that your browser window represents the initiator

  • Click connect

messages should start arriving, you will shortly recieve a sign request

  • Click sign

as you might have noticed the method and data to_sign have been automatically populated. the same goes for channel_id which identifies the channel. channel_id must be provided to reestablish a lost connection. you need to wait for minimum confirmation time. Have patience (minutes), eventually you should see an open message

(Optional) Now, you can go and visit http://localhost:4000/channels which will list all currently active channels for channel backend service.

Suggested approach 2 (manual initiator, manual backend)

In this example you control both the initator and the responder

  • start the project as described in the main (root) readme
  • Point your browser to http://localhost:4000/
  • Click connect websocket for initiator

you have specified that your browser window represents the initiator

you have specified that your browser window represents the responder

  • On both browsers, click connect

messages should start arriving, you will shortly recieve a sign request sign in both ends

you need to wait for minimum confirmation time. Have patience (minutes), eventually you should see an open message