This is provided as a interactive helper which visualizes the messages on the state channel.
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 instart backend channel
field. You can shoot of the sameget
from you js or app to start the responder. Theget
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 datato_sign
have been automatically populated. the same goes forchannel_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 anopen
message
(Optional) Now, you can go and visit http://localhost:4000/channels which will list all currently active channels for channel backend service.
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
- Point another browser to http://localhost:4000/
- Click
connect websocket for responder
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