"Last of the typos"
This commit is contained in:
1 parent
c203040f3a
commit
785e10fa16
176 files changed
+449
-449
No files matched your search
@@ -2,7 +2,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
|
||||
/*
|
||||
This module represents the websockets interface of the Network Node.
|
||||
|
||||
A Network Nodes is epected to receive conections request from 2 different types
|
||||
A Network Nodes is expected to receive connection request from 2 different types
|
||||
of entities:
|
||||
|
||||
1. Other Network Nodes.
|
||||
@@ -58,7 +58,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
|
||||
function onConnectionOpened(socket)
|
||||
/*
|
||||
This function is executed every time a new Websockets connection
|
||||
is stablished.
|
||||
is established.
|
||||
*/ {
|
||||
let caller = {
|
||||
socket: socket,
|
||||
@@ -159,7 +159,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
|
||||
|
||||
function handshakeProducedure(caller, calledTimestamp, messageHeader) {
|
||||
/*
|
||||
The handshage producedure have 2 steps, we need to know
|
||||
The handshake procedure have 2 steps, we need to know
|
||||
now which one we are at.
|
||||
*/
|
||||
if (messageHeader.step === undefined) {
|
||||
@@ -268,7 +268,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
|
||||
|
||||
function handshakeStepTwo() {
|
||||
/*
|
||||
We will check that the caller role has beed defined at Step One.
|
||||
We will check that the caller role has been defined at Step One.
|
||||
*/
|
||||
if (caller.role === undefined) {
|
||||
let response = {
|
||||
@@ -343,7 +343,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
|
||||
}
|
||||
/*
|
||||
We will check that the signature includes this Network Node handle, to avoid
|
||||
man in the middle attackts.
|
||||
man in the middle attacks.
|
||||
*/
|
||||
if (signedMessage.calledProfileHandle !== SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).userProfileHandle) {
|
||||
let response = {
|
||||
@@ -365,7 +365,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock
|
||||
return
|
||||
}
|
||||
/*
|
||||
All validations have been completed, the Handshake Prcedure finished well.
|
||||
All validations have been completed, the Handshake Procedure finished well.
|
||||
*/
|
||||
/*
|
||||
We will remember the user profile behind this caller.
|
||||
|
||||
@@ -76,7 +76,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
User Profile Handle.
|
||||
|
||||
This Handle will be signed by the Network Node to prove
|
||||
it's ouwn identity, and later we will sign it's own handle
|
||||
it's own identity, and later we will sign it's own handle
|
||||
to prove ours.
|
||||
*/
|
||||
socketClient.onmessage = socketMessage => { stepOneResponse(socketMessage) }
|
||||
@@ -145,7 +145,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
}
|
||||
/*
|
||||
We will check that the profile handle we sent to the Network Node, is returned at the
|
||||
signed message, to avoid man in the middle attackts.
|
||||
signed message, to avoid man in the middle attacks.
|
||||
*/
|
||||
if (signedMessage.callerProfileHandle !== SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).userProfileHandle) {
|
||||
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerProfileHandle does not match my own userProfileHandle.')
|
||||
@@ -154,7 +154,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
}
|
||||
/*
|
||||
We will also check that the callerTimestamp we sent to the Network Node, is returned at the
|
||||
signed message, also to avoid man in the middle attackts.
|
||||
signed message, also to avoid man in the middle attacks.
|
||||
*/
|
||||
if (signedMessage.callerTimestamp !== callerTimestamp) {
|
||||
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerTimestamp does not match my own callerTimestamp.')
|
||||
@@ -196,7 +196,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
return
|
||||
}
|
||||
/*
|
||||
This was the end of the Handshake producere. We are connected to the
|
||||
This was the end of the Handshake procedure. We are connected to the
|
||||
Network Node and from now on, all response messages will be received
|
||||
at this following function.
|
||||
*/
|
||||
@@ -260,7 +260,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
|
||||
|
||||
let response = JSON.parse(socketMessage.data)
|
||||
/*
|
||||
We get the functioin that is going to resolve or reject the promise given.
|
||||
We get the function that is going to resolve or reject the promise given.
|
||||
*/
|
||||
onMenssageFunction = onMessageFunctionsMap.get(response.messageId)
|
||||
onMessageFunctionsMap.delete(response.messageId)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles() {
|
||||
/*
|
||||
This module is usefull for all Apps that needs to operate with all User Profiles loaded in
|
||||
This module is useful for all Apps that needs to operate with all User Profiles loaded in
|
||||
memory maps.
|
||||
|
||||
User Profiles are plugins of the Governance System. Besides the info they carry, we also
|
||||
@@ -56,7 +56,7 @@ exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles()
|
||||
SA.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile)
|
||||
/*
|
||||
Each User Profile might have Signing Accounts, meaning
|
||||
accounts that can be siging on behalf of the User Profile.
|
||||
accounts that can be signed on behalf of the User Profile.
|
||||
*/
|
||||
if (userProfilePlugin.signingAccounts !== undefined) {
|
||||
for (let j = 0; j < userProfilePlugin.signingAccounts.signingAccounts.length; j++) {
|
||||
|
||||
@@ -76,7 +76,7 @@ exports.newNetworkModulesWebSocketsAppClient = function newNetworkModulesWebSock
|
||||
User Profile Handle.
|
||||
|
||||
This Handle will be signed by the Network Node to prove
|
||||
it's ouwn identity, and later we will sign it's own handle
|
||||
it's own identity, and later we will sign it's own handle
|
||||
to prove ours.
|
||||
*/
|
||||
socketClient.onmessage = socketMessage => { stepOneResponse(socketMessage) }
|
||||
@@ -145,7 +145,7 @@ exports.newNetworkModulesWebSocketsAppClient = function newNetworkModulesWebSock
|
||||
}
|
||||
/*
|
||||
We will check that the profile handle we sent to the Network Node, is returned at the
|
||||
signed message, to avoid man in the middle attackts.
|
||||
signed message, to avoid man in the middle attacks.
|
||||
*/
|
||||
if (signedMessage.callerProfileHandle !== SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle) {
|
||||
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerProfileHandle does not match my own userProfileHandle.')
|
||||
@@ -154,7 +154,7 @@ exports.newNetworkModulesWebSocketsAppClient = function newNetworkModulesWebSock
|
||||
}
|
||||
/*
|
||||
We will also check that the callerTimestamp we sent to the Network Node, is returned at the
|
||||
signed message, also to avoid man in the middle attackts.
|
||||
signed message, also to avoid man in the middle attacks.
|
||||
*/
|
||||
if (signedMessage.callerTimestamp !== callerTimestamp) {
|
||||
console.log('[ERROR] Web Sockets Client -> stepOneResponse -> The Network Node callerTimestamp does not match my own callerTimestamp.')
|
||||
@@ -196,7 +196,7 @@ exports.newNetworkModulesWebSocketsAppClient = function newNetworkModulesWebSock
|
||||
return
|
||||
}
|
||||
/*
|
||||
This was the end of the Handshake producere. We are connected to the
|
||||
This was the end of the Handshake procedure. We are connected to the
|
||||
Network Node and from now on, all response messages will be received
|
||||
at this following function.
|
||||
*/
|
||||
@@ -260,7 +260,7 @@ exports.newNetworkModulesWebSocketsAppClient = function newNetworkModulesWebSock
|
||||
|
||||
let response = JSON.parse(socketMessage.data)
|
||||
/*
|
||||
We get the functioin that is going to resolve or reject the promise given.
|
||||
We get the function that is going to resolve or reject the promise given.
|
||||
*/
|
||||
onMenssageFunction = onMessageFunctionsMap.get(response.messageId)
|
||||
onMessageFunctionsMap.delete(response.messageId)
|
||||
|
||||
Reference in new issue
Block a user