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.
## Running the Test
First, compile the WASM binary and start the local HTTP server. Refer to
[Testing and Examples](../../README.md#Testing and Examples) in the repository
README for details on how to do this. Open the two clients, the sender and
receiver.
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 README for details on how to do this. Open the two clients, the
sender and receiver.
First start the network using the wasm-network.sh script in integration. This
will start all the gateways and client registrar using localhost as their public
IP addresses and the NDF will be provided by the permissioning server rather
than downloaded from a gateway.
2. Next, start the network using the `run.sh` script in the `wasmTest` directory
in integration. This will start all the gateways and client registrar using
localhost as their public IP addresses and the NDF will be provided by the
permissioning server rather than downloaded from a gateway.
Once rounds are running, on the receiver webpage, navigate to the results folder
in integration and select the `permissions-ndfoutput.json` file. Doing this will
start the client. Once the client generates keys and joins the network, it will
prompt its contact file for download. Copy the contents of this file into the
`recipientContactFile` const in `sender.html`.
3. Once rounds are running, on the receiver webpage, navigate to the results
folder in integration and select the `permissions-ndfoutput.json` file. Doing
this will start the client. Once the client generates keys and joins the
network, it will prompt its contact file for download. Copy the contents of
this file into the `recipientContactFile` const in `sender.html`.
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
generates its keys and joins the network, it will add the receiver client as a
partner, they will exchange requests and confirmations, and finally, the sender
will send an E2E message to the recipient.
\ No newline at end of file
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
generates its keys and joins the network, it will add the receiver client as
a partner, they will exchange requests and confirmations, and finally, the
sender will send an E2E message to the recipient.
\ No newline at end of file
......@@ -15,7 +15,7 @@
<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/wasm_exec.js"></script>
<script>
......
File moved
......@@ -14,7 +14,7 @@
<link rel="stylesheet" type="text/css" href="../assets/styles.css">
<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/wasm_exec.js"></script>
<script>
......
......@@ -28,18 +28,23 @@ type ChannelsManager struct {
func newChannelsManagerJS(api *bindings.ChannelsManager) map[string]interface{} {
cm := ChannelsManager{api}
channelsManagerMap := map[string]interface{}{
"GetID": js.FuncOf(cm.GetID),
"JoinChannel": js.FuncOf(cm.JoinChannel),
"GetChannels": js.FuncOf(cm.GetChannels),
"GetChannelId": js.FuncOf(cm.GetChannelId),
"GetChannel": js.FuncOf(cm.GetChannel),
"LeaveChannel": js.FuncOf(cm.LeaveChannel),
"ReplayChannel": js.FuncOf(cm.ReplayChannel),
"SendGeneric": js.FuncOf(cm.SendGeneric),
"SendAdminGeneric": js.FuncOf(cm.SendAdminGeneric),
"SendMessage": js.FuncOf(cm.SendMessage),
"SendReply": js.FuncOf(cm.SendReply),
"SendReaction": js.FuncOf(cm.SendReaction),
// Basic Channel API
"GetID": js.FuncOf(cm.GetID),
"JoinChannel": js.FuncOf(cm.JoinChannel),
"GetChannels": js.FuncOf(cm.GetChannels),
"GetChannelId": js.FuncOf(cm.GetChannelId),
"GetChannel": js.FuncOf(cm.GetChannel),
"LeaveChannel": js.FuncOf(cm.LeaveChannel),
"ReplayChannel": js.FuncOf(cm.ReplayChannel),
// Channel Sending Methods and Reports
"SendGeneric": js.FuncOf(cm.SendGeneric),
"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),
}
......@@ -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
......
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