Skip to content
Snippets Groups Projects
Commit 84bd82b8 authored by Jono Wenger's avatar Jono Wenger
Browse files

Update comments and README

parent 2ba837f3
No related branches found
No related tags found
1 merge request!6XX-4050 / Send E2E test
...@@ -5,24 +5,24 @@ message to the other. ...@@ -5,24 +5,24 @@ message to the other.
## Running the Test ## Running the Test
First, compile the WASM binary and start the local HTTP server. Refer to 1. First, compile the WASM binary and start the local HTTP server. Refer to
[Testing and Examples](../../README.md#Testing and Examples) in the repository [Testing and Examples](../../README.md#Testing and Examples) in the
README for details on how to do this. Open the two clients, the sender and repository README for details on how to do this. Open the two clients, the
receiver. sender and receiver.
First start the network using the wasm-network.sh script in integration. This 2. Next, start the network using the `run.sh` script in the `wasmTest` directory
will start all the gateways and client registrar using localhost as their public in integration. This will start all the gateways and client registrar using
IP addresses and the NDF will be provided by the permissioning server rather localhost as their public IP addresses and the NDF will be provided by the
than downloaded from a gateway. permissioning server rather than downloaded from a gateway.
Once rounds are running, on the receiver webpage, navigate to the results folder 3. Once rounds are running, on the receiver webpage, navigate to the results
in integration and select the `permissions-ndfoutput.json` file. Doing this will folder in integration and select the `permissions-ndfoutput.json` file. Doing
start the client. Once the client generates keys and joins the network, it will this will start the client. Once the client generates keys and joins the
prompt its contact file for download. Copy the contents of this file into the network, it will prompt its contact file for download. Copy the contents of
`recipientContactFile` const in `sender.html`. this file into the `recipientContactFile` const in `sender.html`.
On the sender webpage (make sure to refresh the page), select the NDF file as 4. On the sender webpage (make sure to refresh the page), select the NDF file as
described for the recipient above. This will start the sender client. Once it described for the recipient above. This will start the sender client. Once it
generates its keys and joins the network, it will add the receiver client as a generates its keys and joins the network, it will add the receiver client as
partner, they will exchange requests and confirmations, and finally, the sender a partner, they will exchange requests and confirmations, and finally, the
will send an E2E message to the recipient. sender will send an E2E message to the recipient.
\ No newline at end of file \ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<link rel="shortcut icon" type="image/x-icon" href="receiver.ico"/> <link rel="shortcut icon" type="image/x-icon" href="receiver.ico"/>
<script type="text/javascript" src="xxdk.js"></script> <script type="text/javascript" src="sendE2ejs"></script>
<script type="text/javascript" src="../assets/utils.js"></script> <script type="text/javascript" src="../assets/utils.js"></script>
<script type="text/javascript" src="../assets/wasm_exec.js"></script> <script type="text/javascript" src="../assets/wasm_exec.js"></script>
<script> <script>
......
File moved
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<link rel="stylesheet" type="text/css" href="../assets/styles.css"> <link rel="stylesheet" type="text/css" href="../assets/styles.css">
<link rel="shortcut icon" type="image/x-icon" href="sender.ico"/> <link rel="shortcut icon" type="image/x-icon" href="sender.ico"/>
<script type="text/javascript" src="xxdk.js"></script> <script type="text/javascript" src="sendE2ejs"></script>
<script type="text/javascript" src="../assets/utils.js"></script> <script type="text/javascript" src="../assets/utils.js"></script>
<script type="text/javascript" src="../assets/wasm_exec.js"></script> <script type="text/javascript" src="../assets/wasm_exec.js"></script>
<script> <script>
......
...@@ -28,18 +28,23 @@ type ChannelsManager struct { ...@@ -28,18 +28,23 @@ type ChannelsManager struct {
func newChannelsManagerJS(api *bindings.ChannelsManager) map[string]interface{} { func newChannelsManagerJS(api *bindings.ChannelsManager) map[string]interface{} {
cm := ChannelsManager{api} cm := ChannelsManager{api}
channelsManagerMap := map[string]interface{}{ channelsManagerMap := map[string]interface{}{
"GetID": js.FuncOf(cm.GetID), // Basic Channel API
"JoinChannel": js.FuncOf(cm.JoinChannel), "GetID": js.FuncOf(cm.GetID),
"GetChannels": js.FuncOf(cm.GetChannels), "JoinChannel": js.FuncOf(cm.JoinChannel),
"GetChannelId": js.FuncOf(cm.GetChannelId), "GetChannels": js.FuncOf(cm.GetChannels),
"GetChannel": js.FuncOf(cm.GetChannel), "GetChannelId": js.FuncOf(cm.GetChannelId),
"LeaveChannel": js.FuncOf(cm.LeaveChannel), "GetChannel": js.FuncOf(cm.GetChannel),
"ReplayChannel": js.FuncOf(cm.ReplayChannel), "LeaveChannel": js.FuncOf(cm.LeaveChannel),
"SendGeneric": js.FuncOf(cm.SendGeneric), "ReplayChannel": js.FuncOf(cm.ReplayChannel),
"SendAdminGeneric": js.FuncOf(cm.SendAdminGeneric),
"SendMessage": js.FuncOf(cm.SendMessage), // Channel Sending Methods and Reports
"SendReply": js.FuncOf(cm.SendReply), "SendGeneric": js.FuncOf(cm.SendGeneric),
"SendReaction": js.FuncOf(cm.SendReaction), "SendAdminGeneric": js.FuncOf(cm.SendAdminGeneric),
"SendMessage": js.FuncOf(cm.SendMessage),
"SendReply": js.FuncOf(cm.SendReply),
"SendReaction": js.FuncOf(cm.SendReaction),
// Channel Receiving Logic and Callback Registration
"RegisterReceiveHandler": js.FuncOf(cm.RegisterReceiveHandler), "RegisterReceiveHandler": js.FuncOf(cm.RegisterReceiveHandler),
} }
...@@ -200,7 +205,7 @@ func (ch *ChannelsManager) ReplayChannel(_ js.Value, args []js.Value) interface{ ...@@ -200,7 +205,7 @@ func (ch *ChannelsManager) ReplayChannel(_ js.Value, args []js.Value) interface{
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Channel Sending Methods & Reports // // Channel Sending Methods and Reports //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// SendGeneric is used to send a raw message over a channel. In general, it // SendGeneric is used to send a raw message over a channel. In general, it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment