From 53b0712a950d5d3431d69472cce432113ecd7249 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 25 Nov 2021 12:16:02 +0100 Subject: [PATCH] Network fixed with signing accounts chlld of each network client --- .../User-Profiles/Luis-Fernando-Molina.json | 430 +++++++++++++++--- Projects/Network/SA/Modules/UserProfiles.js | 68 ++- 2 files changed, 396 insertions(+), 102 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 19edc9749..dd0cbca69 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -17044,15 +17044,43 @@ "name": "Social Trading Desktop App #1", "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-1\",\n \"host\": \"localhost\",\n \"webPort\": \"33248\",\n \"webSocketsPort\": \"17042\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xc0aaf26d4eda5d88a99ac03d9efc3596ef255eac4dfd876d07140ac8abe3685d\",\n \"s\": \"0x7f8b4fbded9159a5b68f87f509f9055d6bb05168686bd810ab97255b1330ded1\",\n \"signature\": \"0xc0aaf26d4eda5d88a99ac03d9efc3596ef255eac4dfd876d07140ac8abe3685d7f8b4fbded9159a5b68f87f509f9055d6bb05168686bd810ab97255b1330ded11c\"\n }\n}", + "project": "Governance", + "id": "37571576-8c99-49d9-ab4d-50aa4707d7ba", + "savedPayload": { + "position": { + "x": 37947.26095580142, + "y": 19649.585369022054 + }, + "targetPosition": { + "x": 37687.45333466609, + "y": 19499.585369022054 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "33c4f8e9-f8a3-4dea-91f4-1539e3aed0d3", "savedPayload": { "position": { - "x": 37260.790742777994, - "y": 19483.620781198504 + "x": 37687.45333466609, + "y": 19499.585369022054 }, "targetPosition": { - "x": 37130.625621042724, - "y": 19213.330120827777 + "x": 37427.64571353076, + "y": 19349.585369022054 }, "floatingObject": { "isPinned": false, @@ -17072,15 +17100,43 @@ "name": "Social Trading Desktop App #2", "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-2\",\n \"host\": \"localhost\",\n \"webPort\": \"33248\",\n \"webSocketsPort\": \"17042\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x3e67720de3bdbf45880cf18c0fe04c5e41300abdaa4ae91b0966738187d3032b\",\n \"s\": \"0x148e2948cdd112046bacac87fdaf5111e012318a201c0543334e02c9e7b0c649\",\n \"signature\": \"0x3e67720de3bdbf45880cf18c0fe04c5e41300abdaa4ae91b0966738187d3032b148e2948cdd112046bacac87fdaf5111e012318a201c0543334e02c9e7b0c6491b\"\n }\n}", + "project": "Governance", + "id": "947be666-7f33-4b4b-88ca-5d579b3e3158", + "savedPayload": { + "position": { + "x": 37582.93714059227, + "y": 19929.140864795496 + }, + "targetPosition": { + "x": 37505.291427061515, + "y": 19639.363116908775 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "ad887d5f-998f-48c5-9db7-78e17c66f4e4", "savedPayload": { "position": { - "x": 37031.54190245617, - "y": 19496.495119920288 + "x": 37505.291427061515, + "y": 19639.363116908775 }, "targetPosition": { - "x": 37130.625621042724, - "y": 19213.330120827777 + "x": 37427.64571353076, + "y": 19349.585369022054 }, "floatingObject": { "isPinned": false, @@ -17102,15 +17158,43 @@ "name": "Algo Traders Platform #1", "config": "{\n \"codeName\": \"Algo-Traders-Platform-1\",\n \"host\": \"localhost\",\n \"webPort\": \"34248\",\n \"webSocketsPort\": \"18041\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Algo-Traders-Platform-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x00127bd29163215cf0a4b695f7514c11d9ee7a7d2c8440a1b957b02d7702ce0c\",\n \"s\": \"0x43d93148fc30f3e8e9ed8fbbff9ad324841e42c08de4520ad6b00e3c946346f3\",\n \"signature\": \"0x00127bd29163215cf0a4b695f7514c11d9ee7a7d2c8440a1b957b02d7702ce0c43d93148fc30f3e8e9ed8fbbff9ad324841e42c08de4520ad6b00e3c946346f31c\"\n }\n}", + "project": "Governance", + "id": "d29d5158-2332-437e-9b58-deb65df48932", + "savedPayload": { + "position": { + "x": 37127.64571353076, + "y": 19869.20061129272 + }, + "targetPosition": { + "x": 37277.64571353076, + "y": 19609.392990157387 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "0a06a54b-825b-4ff4-93cc-36465348ad26", "savedPayload": { "position": { - "x": 36860.334960672, - "y": 19343.495242563044 + "x": 37277.64571353076, + "y": 19609.392990157387 }, "targetPosition": { - "x": 37130.625621042724, - "y": 19213.330120827777 + "x": 37427.64571353076, + "y": 19349.585369022054 }, "floatingObject": { "isPinned": false, @@ -17129,12 +17213,12 @@ "id": "abcc6b01-099e-42b4-84cc-24fb6daa7a15", "savedPayload": { "position": { - "x": 37130.625621042724, - "y": 19213.330120827777 + "x": 37427.64571353076, + "y": 19349.585369022054 }, "targetPosition": { - "x": 37229.70933962928, - "y": 18930.165121735266 + "x": 37350, + "y": 19059.807621135333 }, "floatingObject": { "isPinned": false, @@ -17160,15 +17244,43 @@ "name": "Social Trading Mobile App #1", "config": "{\n \"codeName\": \"Social-Trading-Mobile-App-1\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"15042\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Social-Trading-Mobile-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x18d7d409ae20bece50d35d9a5e080e45ec8b749bc30853c3be1becf553b6d19e\",\n \"s\": \"0x3d25345dc9125c99d85c784113523cc04b3770db4a78e18dbbe9bcfb7a154654\",\n \"signature\": \"0x18d7d409ae20bece50d35d9a5e080e45ec8b749bc30853c3be1becf553b6d19e3d25345dc9125c99d85c784113523cc04b3770db4a78e18dbbe9bcfb7a1546541b\"\n }\n}", + "project": "Governance", + "id": "5dea7a2d-a534-4391-a801-a3bef25dacfa", + "savedPayload": { + "position": { + "x": 36900, + "y": 19839.23048454133 + }, + "targetPosition": { + "x": 37050, + "y": 19579.422863406 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "42843263-b1f3-4e4e-885a-5d8b9d7b647a", "savedPayload": { "position": { - "x": 36689.12801888783, - "y": 19190.4953652058 + "x": 37050, + "y": 19579.422863406 }, "targetPosition": { - "x": 36959.41867925855, - "y": 19060.330243470533 + "x": 37200, + "y": 19319.615242270665 }, "floatingObject": { "isPinned": false, @@ -17187,12 +17299,12 @@ "id": "de1b0ac7-1bcf-4412-af43-4597443c0ec3", "savedPayload": { "position": { - "x": 36959.41867925855, - "y": 19060.330243470533 + "x": 37200, + "y": 19319.615242270665 }, "targetPosition": { - "x": 37229.70933962928, - "y": 18930.165121735266 + "x": 37350, + "y": 19059.807621135333 }, "floatingObject": { "isPinned": false, @@ -17218,15 +17330,43 @@ "name": "Social Trading Server App #1", "config": "{\n \"codeName\": \"Social-Trading-Server-App-1\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"16042\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Social-Trading-Server-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x62dbf304e3178ed47587598d9d7eb3def4f149c946fb59b6a6880334d4312c03\",\n \"s\": \"0x1803dfd451aa6fe660b70a789854875fb9996efaf64c5ca02c91a8e58afe94bf\",\n \"signature\": \"0x62dbf304e3178ed47587598d9d7eb3def4f149c946fb59b6a6880334d4312c031803dfd451aa6fe660b70a789854875fb9996efaf64c5ca02c91a8e58afe94bf1b\"\n }\n}", + "project": "Governance", + "id": "6285c67f-f669-44bf-8cfe-46309e6da4e2", + "savedPayload": { + "position": { + "x": 36480.66675633984, + "y": 19292.744761727605 + }, + "targetPosition": { + "x": 36770.44450422656, + "y": 19215.099048196847 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "0216b143-0e46-4da6-b2cb-e95556fc1bfd", "savedPayload": { "position": { - "x": 36663.37934144426, - "y": 18731.997684562168 + "x": 36770.44450422656, + "y": 19215.099048196847 }, "targetPosition": { - "x": 36946.54434053677, - "y": 18831.081403148717 + "x": 37060.22225211328, + "y": 19137.45333466609 }, "floatingObject": { "isPinned": false, @@ -17245,12 +17385,12 @@ "id": "b0db0d19-5529-4b96-ab4f-ac7d54e1e6db", "savedPayload": { "position": { - "x": 36946.54434053677, - "y": 18831.081403148717 + "x": 37060.22225211328, + "y": 19137.45333466609 }, "targetPosition": { - "x": 37229.70933962928, - "y": 18930.165121735266 + "x": 37350, + "y": 19059.807621135333 }, "floatingObject": { "isPinned": false, @@ -17278,7 +17418,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 @@ -17318,12 +17458,12 @@ "id": "a9484759-a37e-4c5f-a11a-964bc88371ba", "savedPayload": { "position": { - "x": 36165.4101775664, - "y": 18811.89932962496 + "x": 36567.838092395425, + "y": 19499.585369022054 }, "targetPosition": { - "x": 36361.09640094984, - "y": 18584.507812681324 + "x": 36490.19237886467, + "y": 19209.807621135333 }, "floatingObject": { "isPinned": false, @@ -17346,12 +17486,12 @@ "id": "a8bf7c62-5df7-475b-a43d-77c47cf1af5d", "savedPayload": { "position": { - "x": 36061.93526179549, - "y": 18606.926840757253 + "x": 36340.19237886467, + "y": 19469.615242270665 }, "targetPosition": { - "x": 36361.09640094984, - "y": 18584.507812681324 + "x": 36490.19237886467, + "y": 19209.807621135333 }, "floatingObject": { "isPinned": false, @@ -17374,12 +17514,12 @@ "id": "30d456e2-e263-4e12-a486-9f1aa5cc2bf1", "savedPayload": { "position": { - "x": 36133.704884006205, - "y": 18388.821589297888 + "x": 36200.414630977946, + "y": 19287.45333466609 }, "targetPosition": { - "x": 36361.09640094984, - "y": 18584.507812681324 + "x": 36490.19237886467, + "y": 19209.807621135333 }, "floatingObject": { "isPinned": false, @@ -17429,12 +17569,40 @@ "id": "e42dfedc-6906-4833-8737-44d5f45ab82e", "savedPayload": { "position": { - "x": 36361.09640094984, - "y": 18584.507812681324 + "x": 36490.19237886467, + "y": 19209.807621135333 }, "targetPosition": { - "x": 36660.2575401042, - "y": 18562.088784605396 + "x": 36640.19237886467, + "y": 18950 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Social-Trading-Bot-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x5031e2c0c479c5ca15c9328bc1c03df6a6c95b9a656185e435666154fbb8faeb\",\n \"s\": \"0x667728bba0ce67a3b691ea4c63d9143f42d03136e5314e50955bbcb111cb51f3\",\n \"signature\": \"0x5031e2c0c479c5ca15c9328bc1c03df6a6c95b9a656185e435666154fbb8faeb667728bba0ce67a3b691ea4c63d9143f42d03136e5314e50955bbcb111cb51f31b\"\n }\n}", + "project": "Governance", + "id": "363574ea-edf4-4cab-8b52-c04ce8f037c6", + "savedPayload": { + "position": { + "x": 36560.19237886467, + "y": 19002 + }, + "targetPosition": { + "x": 36640.19237886467, + "y": 18950 }, "floatingObject": { "isPinned": false, @@ -17452,12 +17620,12 @@ "id": "5167a23f-1e17-4cd5-85a7-3c7f2a3019ac", "savedPayload": { "position": { - "x": 36660.2575401042, - "y": 18562.088784605396 + "x": 36640.19237886467, + "y": 18950 }, "targetPosition": { - "x": 36959.41867925855, - "y": 18539.669756529467 + "x": 36900, + "y": 18800 }, "floatingObject": { "isPinned": false, @@ -17477,15 +17645,43 @@ "name": "Social Trading Bot #2", "config": "{\n \"codeName\": \"Social-Trading-Bot-2\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Social-Trading-Bot-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xbd2b196f2f930a15a87c5a8aaa992a444bf0faa8e76a5caa7321a1cc9a2d4fdc\",\n \"s\": \"0x190b24c211994122a10664864d1d1a41c094bacb9c6c03d9bdbb76259550953c\",\n \"signature\": \"0xbd2b196f2f930a15a87c5a8aaa992a444bf0faa8e76a5caa7321a1cc9a2d4fdc190b24c211994122a10664864d1d1a41c094bacb9c6c03d9bdbb76259550953c1c\"\n }\n}", + "project": "Governance", + "id": "dc038dd9-ce63-4d0d-89ac-d8c97191bafa", + "savedPayload": { + "position": { + "x": 36723.19237886467, + "y": 18561 + }, + "targetPosition": { + "x": 36640.19237886467, + "y": 18650 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "c27748af-db60-44fc-a095-530401057beb", "savedPayload": { "position": { - "x": 36790.42266183947, - "y": 18291.79812423467 + "x": 36640.19237886467, + "y": 18650 }, "targetPosition": { - "x": 36959.41867925855, - "y": 18539.669756529467 + "x": 36900, + "y": 18800 }, "floatingObject": { "isPinned": false, @@ -17504,12 +17700,12 @@ "id": "4809934c-d45d-4565-a686-5d96bd695b4f", "savedPayload": { "position": { - "x": 36959.41867925855, - "y": 18539.669756529467 + "x": 36900, + "y": 18800 }, "targetPosition": { - "x": 37229.70933962928, - "y": 18669.834878264734 + "x": 37200, + "y": 18800 }, "floatingObject": { "isPinned": false, @@ -17694,6 +17890,34 @@ } } }, + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Social-Persona-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xad610ea563d92f743911519fd2aeaa975dcd68a2eeb0bdf7608e653899781069\",\n \"s\": \"0x3bafa717f124faaa58cac2ef2a7dbb3fba9fb39e0868a9563c03588c2f433d46\",\n \"signature\": \"0xad610ea563d92f743911519fd2aeaa975dcd68a2eeb0bdf7608e6538997810693bafa717f124faaa58cac2ef2a7dbb3fba9fb39e0868a9563c03588c2f433d461b\"\n }\n}", + "project": "Governance", + "id": "f7fdce94-4bd6-49f9-b7d8-383163ef2103", + "savedPayload": { + "position": { + "x": 37289.19189848183, + "y": 18276.606064796506 + }, + "targetPosition": { + "x": 37229.19189848183, + "y": 18287.606064796506 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "ed15b68f-c9e0-447a-9ef7-660db229244c", "savedPayload": { "position": { @@ -17722,6 +17946,34 @@ "name": "Social Persona #2", "config": "{\n \"socialHandle\": \"\",\n \"bio\": \"\",\n \"codeName\": \"Social-Persona-2\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"Social-Persona-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xa0a840db6208d9f780bad53a54312e691cb629c9c718a2ea0ad2c80b73e8f5fd\",\n \"s\": \"0x53524acb6f10a4d0955a5a1aede8c0bade23396c9be599a0fae164a8eb785882\",\n \"signature\": \"0xa0a840db6208d9f780bad53a54312e691cb629c9c718a2ea0ad2c80b73e8f5fd53524acb6f10a4d0955a5a1aede8c0bade23396c9be599a0fae164a8eb7858821b\"\n }\n}", + "project": "Governance", + "id": "4fbd1349-c156-4716-8f7c-208f14241a4b", + "savedPayload": { + "position": { + "x": 37617.670272136376, + "y": 18269.84978460961 + }, + "targetPosition": { + "x": 37521.670272136376, + "y": 18220.84978460961 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "01c33294-124f-4d68-8619-8e1d1cca7e0a", "savedPayload": { "position": { @@ -17780,6 +18032,34 @@ "name": "P2P Network Node #1", "config": "{\n \"codeName\": \"P2P-Network-Node-1\",\n \"host\": \"localhost\",\n \"webPort\": \"31248\",\n \"webSocketsPort\": \"18042\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"P2P-Network-Node-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x6c2ef80f6cb8b4dd1203006fde816d29425fc3ae118caaf18705dbccf9b56ccf\",\n \"s\": \"0x024ca25e8145f4638d62b9b45906bbf7ce91201c1e513875761333301ba1db3f\",\n \"signature\": \"0x6c2ef80f6cb8b4dd1203006fde816d29425fc3ae118caaf18705dbccf9b56ccf024ca25e8145f4638d62b9b45906bbf7ce91201c1e513875761333301ba1db3f1b\"\n }\n}", + "project": "Governance", + "id": "f8feca97-5cf6-4731-a774-155fb8f8222a", + "savedPayload": { + "position": { + "x": 37650, + "y": 17940.192378864667 + }, + "targetPosition": { + "x": 37650, + "y": 18240.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "56cc0c90-4a58-4e25-a63f-4f9a6921d0f3", "savedPayload": { "position": { @@ -17808,6 +18088,34 @@ "name": "P2P Network Node #2", "config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"host\": \"localhost\",\n \"webPort\": \"31248\",\n \"webSocketsPort\": \"18042\"\n}", "project": "Governance", + "signingAccount": { + "type": "Signing Account", + "name": "New Signing Account", + "config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x9323774a587c6aeef9a52cbf35b2cdc9543a07ac7010c418224f48ed44da8b8f\",\n \"s\": \"0x160bcfc59a7d10d7bcd33fcfee3bd399061a1b6fab54c3f355dae71dbb19dd04\",\n \"signature\": \"0x9323774a587c6aeef9a52cbf35b2cdc9543a07ac7010c418224f48ed44da8b8f160bcfc59a7d10d7bcd33fcfee3bd399061a1b6fab54c3f355dae71dbb19dd041b\"\n }\n}", + "project": "Governance", + "id": "0d4c4724-3c0a-4fdf-aaeb-4a282ae0787f", + "savedPayload": { + "position": { + "x": 38169.615242270665, + "y": 18240.192378864667 + }, + "targetPosition": { + "x": 37909.80762113533, + "y": 18390.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "352cd906-c36c-48c7-8f01-728ff78b78e9", "savedPayload": { "position": { diff --git a/Projects/Network/SA/Modules/UserProfiles.js b/Projects/Network/SA/Modules/UserProfiles.js index 6a1a8aef3..ee068b497 100644 --- a/Projects/Network/SA/Modules/UserProfiles.js +++ b/Projects/Network/SA/Modules/UserProfiles.js @@ -97,39 +97,29 @@ exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles() SA.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile) SA.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile) SA.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOKCHAIN_ACCOUNT.set(blockchainAccount, userProfile) - /* - Each User Profile might have Signing Accounts, meaning - accounts that can sign on behalf of the User Profile. - */ - if (userProfilePlugin.signingAccounts !== undefined) { - let algoTradersPlatform = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userApps, 'Algo Traders Platform') - let socialTradingDesktopApp = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userApps, 'Social Trading Desktop App') - let socialTradingMobileApp = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userApps, 'Social Trading Mobile App') - let socialTradingServerApp = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userApps, 'Social Trading Server App') - let socialTradingBots = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userBots, 'Social Trading Bot') - let socialPersonas = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.socialPersonas, 'Social Persona') - let p2pNetworkNodes = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.p2pNetworkNodes, 'P2P Network Node') + let algoTradersPlatform = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userApps, 'Algo Traders Platform') + let socialTradingDesktopApp = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userApps, 'Social Trading Desktop App') + let socialTradingMobileApp = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userApps, 'Social Trading Mobile App') + let socialTradingServerApp = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userApps, 'Social Trading Server App') + let socialTradingBots = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.userBots, 'Social Trading Bot') + let socialPersonas = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.socialPersonas, 'Social Persona') + let p2pNetworkNodes = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(userProfilePlugin.p2pNetworkNodes, 'P2P Network Node') - let networkClientsMap = new Map() + checkNwetworkClients(algoTradersPlatform) + checkNwetworkClients(socialTradingDesktopApp) + checkNwetworkClients(socialTradingMobileApp) + checkNwetworkClients(socialTradingServerApp) + checkNwetworkClients(socialTradingBots) + checkNwetworkClients(socialPersonas) + checkNwetworkClients(p2pNetworkNodes) - addToNetworkClientMap(algoTradersPlatform) - addToNetworkClientMap(socialTradingDesktopApp) - addToNetworkClientMap(socialTradingMobileApp) - addToNetworkClientMap(socialTradingServerApp) - addToNetworkClientMap(socialTradingBots) - addToNetworkClientMap(socialPersonas) - addToNetworkClientMap(p2pNetworkNodes) + function checkNwetworkClients(netwokClients) { - function addToNetworkClientMap(nodeArray) { - for (let i = 0; i < nodeArray.length; i++) { - let currentNode = nodeArray[i] - networkClientsMap.set(currentNode.id, currentNode) - } - } - - for (let j = 0; j < userProfilePlugin.signingAccounts.signingAccounts.length; j++) { - let signingAccount = userProfilePlugin.signingAccounts.signingAccounts[j] + for (let j = 0; j < netwokClients.length; j++) { + let networkClient = netwokClients[j] + let signingAccount = networkClient.signingAccount + if (signingAccount === undefined) { continue } let config = JSON.parse(signingAccount.config) let signatureObject = config.signature let web3 = new SA.nodeModules.web3() @@ -138,19 +128,15 @@ exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles() /* If the Signing Account is for a P2P node, we will add the node to the array of available nodes at the p2p network. */ - if (signingAccount.savedPayload === undefined) { continue } - if (signingAccount.savedPayload.referenceParent === undefined) { continue } - signingAccount.referenceParent = networkClientsMap.get(signingAccount.savedPayload.referenceParent.id) if ( - signingAccount.referenceParent !== undefined && - signingAccount.referenceParent.type === "P2P Network Node" && - signingAccount.referenceParent.config !== undefined + networkClient.type === "P2P Network Node" && + networkClient.config !== undefined ) { let config try { - config = JSON.parse(signingAccount.referenceParent.config) + config = JSON.parse(networkClient.config) } catch (err) { - console.log('P2P Network Node Config not in JSON format. userProfileHandle = ' + userHandle + ' NodeId = ' + signingAccount.referenceParent.id) + console.log('P2P Network Node Config not in JSON format. userProfileHandle = ' + userHandle + ' NodeId = ' + networkClient.id) continue } if (config.host === undefined) { @@ -161,22 +147,22 @@ exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles() } let p2pNetworkNode = SA.projects.network.modules.p2pNetworkNode.newNetworkModulesP2PNetworkNode() - p2pNetworkNode.initialize(signingAccount.referenceParent, userProfile, blockchainAccount) + p2pNetworkNode.initialize(networkClient, userProfile, blockchainAccount) SA.projects.network.globals.memory.arrays.P2P_NETWORK_NODES.push(p2pNetworkNode) } /* Now, we will extract the information from the User Profile, specifically of our identity at the p2p network. */ if ( - signingAccount.referenceParent !== undefined && - signingAccount.referenceParent.id === SA.secrets.map.get(nodeCodeName).nodeId + networkClient.id === SA.secrets.map.get(nodeCodeName).nodeId ) { - p2pNetworkIdentity.node = signingAccount.referenceParent + p2pNetworkIdentity.node = networkClient p2pNetworkIdentity.blockchainAccount = blockchainAccount p2pNetworkIdentity.userProfile = userProfile } } } + } } }