diff --git a/DesktopRoot.js b/DesktopRoot.js index 5a95acdf1..5dbb2c26b 100644 --- a/DesktopRoot.js +++ b/DesktopRoot.js @@ -64,7 +64,7 @@ exports.newDesktopRoot = function newDesktopRoot() { } for (let i = 0; i < SA.secrets.array.length; i++) { let secret = SA.secrets.array[i] - SA.secrets.map.set (secret.signingAccountChildCodeName, secret) + SA.secrets.map.set (secret.nodeCodeName, secret) } run() diff --git a/Environment.js b/Environment.js index 26a20db91..544f5ffa1 100644 --- a/Environment.js +++ b/Environment.js @@ -28,6 +28,7 @@ exports.newEnvironment = function () { PATH_TO_DESKTOP: './Desktop', PATH_TO_DEFAULT_WORKSPACE: path.join(basePath, './Projects/Foundations/Plugins/Workspaces'), PATH_TO_MY_WORKSPACES: path.join(basePath, './Platform/My-Workspaces'), + PATH_TO_SECRETS: path.join(basePath, './My-Secrets'), PATH_TO_FONTS: path.join(basePath, './Platform/WebServer/Fonts'), DESKTOP_APP_SIGNING_ACCOUNT: 'Social-Trading-Desktop-App-1', DESKTOP_APP_MAX_OUTGOING_PEERS: 1, diff --git a/NetworkRoot.js b/NetworkRoot.js index eab6a7d4e..4e6a3c927 100644 --- a/NetworkRoot.js +++ b/NetworkRoot.js @@ -62,7 +62,7 @@ exports.newNetworkRoot = function newNetworkRoot() { } for (let i = 0; i < SA.secrets.array.length; i++) { let secret = SA.secrets.array[i] - SA.secrets.map.set(secret.signingAccountChildCodeName, secret) + SA.secrets.map.set(secret.nodeCodeName, secret) } NT.app = require('./Network/NetwokNode.js').newNetworkNode() diff --git a/Platform/Client/githubServer.js b/Platform/Client/githubServer.js index b72259bb2..b3b08503e 100644 --- a/Platform/Client/githubServer.js +++ b/Platform/Client/githubServer.js @@ -367,6 +367,11 @@ exports.newGithubServer = function newGithubServer() { if (await validateUserProfileBlockchainAccountDoesNotBelongtoAnotherUserProfile() === false) { continue } if (await validateUserProfileSigningAccountsDoesNotBelongtoAnotherUserProfile() === false) { continue } + /* + TODO: We need to check before merging a User Profile that none of id of the node of the profile hierearchy exists at any other + User Profile already at the repository, to avoid atacts of users highjacking references of other user profiles. + */ + if (await mergePullRequest() === false) { console.log('[WARN] Github Server -> mergeGithubPullRequests -> Merge Failed -> Pull Request "' + pullRequest.title + '" not merged because Github could not merge it. -> mergeResponse.message = ' + mergeResponse.data.message) } else { diff --git a/Platform/Client/httpInterface.js b/Platform/Client/httpInterface.js index 62a398f49..e355b31ca 100644 --- a/Platform/Client/httpInterface.js +++ b/Platform/Client/httpInterface.js @@ -139,7 +139,7 @@ exports.newHttpInterface = function newHttpInterface() { return } default: { - SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify({error: 'Method ' + params.method + ' is invalid.'}), httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify({ error: 'Method ' + params.method + ' is invalid.' }), httpResponse) } } } catch (err) { @@ -325,6 +325,42 @@ exports.newHttpInterface = function newHttpInterface() { } } break + case 'Secrets': { + switch (requestPath[2]) { // switch by command + case 'Save-Secrets-File': { + SA.projects.foundations.utilities.httpRequests.getRequestBody(httpRequest, httpResponse, processRequest) + + async function processRequest(body) { + try { + + let filePath = global.env.PATH_TO_SECRETS + '/' + let fileName = "Secrets.json" + + createNewDir(filePath) + SA.nodeModules.fs.writeFileSync(filePath + '/' + fileName, body) + + console.log('[SUCCESS] ' + filePath + '/' + fileName + ' created.') + + SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse) + + } catch (err) { + console.log('[ERROR] httpInterface -> Secrets -> Save-Secrets-File -> Method call produced an error.') + console.log('[ERROR] httpInterface -> Secrets -> Save-Secrets-File -> err.stack = ' + err.stack) + console.log('[ERROR] httpInterface -> Secrets -> Save-Secrets-File -> Params Received = ' + body) + + let error = { + result: 'Fail Because', + message: err.message, + stack: err.stack + } + SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(error), httpResponse) + } + } + break + } + } + } + break case 'Docs': { switch (requestPath[2]) { // switch by command case 'Save-Node-Schema': { @@ -633,16 +669,6 @@ exports.newHttpInterface = function newHttpInterface() { } } } - - function createNewDir(path) { - try { - fs.mkdirSync(path, {recursive: true}) - } catch (err) { - if (err.message.indexOf('file already exists') < 0) { - throw (err) - } - } - } } return noErrorsDuringSaving @@ -697,7 +723,7 @@ exports.newHttpInterface = function newHttpInterface() { contribute() async function contribute() { - const {lookpath} = SA.nodeModules.lookpath + const { lookpath } = SA.nodeModules.lookpath const gitpath = await lookpath('git') if (gitpath === undefined) { console.log('[ERROR] `git` not installed.') @@ -768,7 +794,7 @@ exports.newHttpInterface = function newHttpInterface() { async function doGithub() { - const {Octokit} = SA.nodeModules.octokit + const { Octokit } = SA.nodeModules.octokit const octokit = new Octokit({ auth: token, @@ -832,7 +858,7 @@ exports.newHttpInterface = function newHttpInterface() { update() async function update() { - const {lookpath} = SA.nodeModules.lookpath + const { lookpath } = SA.nodeModules.lookpath const gitpath = await lookpath('git'); if (gitpath === undefined) { console.log('[ERROR] `git` not installed.') @@ -873,11 +899,11 @@ exports.newHttpInterface = function newHttpInterface() { let message try { message = await git.pull('https://github.com/Superalgos/Superalgos', currentBranch) - return {message: message} + return { message: message } } catch (err) { console.log('[ERROR] Error updating ' + currentBranch) console.log(err.stack) - return {error: err} + return { error: err } } } @@ -903,7 +929,7 @@ exports.newHttpInterface = function newHttpInterface() { checkout() async function checkout() { - const {lookpath} = SA.nodeModules.lookpath + const { lookpath } = SA.nodeModules.lookpath const gitpath = await lookpath('git'); if (gitpath === undefined) { console.log('[ERROR] `git` not installed.') @@ -1001,7 +1027,7 @@ exports.newHttpInterface = function newHttpInterface() { branch() async function branch() { - const {lookpath} = SA.nodeModules.lookpath + const { lookpath } = SA.nodeModules.lookpath const gitpath = await lookpath('git'); if (gitpath === undefined) { console.log('[ERROR] `git` not installed.') @@ -1354,7 +1380,7 @@ exports.newHttpInterface = function newHttpInterface() { async function doGithubUser() { - const {Octokit} = SA.nodeModules.octokit + const { Octokit } = SA.nodeModules.octokit const octokit = new Octokit({ auth: token, @@ -1366,7 +1392,7 @@ exports.newHttpInterface = function newHttpInterface() { const head = username + ':' + contributionsBranch //const base = currentBranch let base = undefined - if(process.env.SA_MODE === 'gitDisable') { + if (process.env.SA_MODE === 'gitDisable') { base = 'develop' } else { base = currentBranch @@ -1446,11 +1472,11 @@ exports.newHttpInterface = function newHttpInterface() { async function getSHA(path) { let sha = '' - const {graphql} = SA.nodeModules.graphql + const { graphql } = SA.nodeModules.graphql try { - const {repository} = await graphql( + const { repository } = await graphql( '{ ' + ' repository(name: "SuperAlgos", owner: "' + username + '") {' + ' object(expression: "develop:' + path + '") {' + @@ -1535,7 +1561,7 @@ exports.newHttpInterface = function newHttpInterface() { return } default: { - SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify({error: 'Method ' + params.method + ' is invalid.'}), httpResponse) + SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify({ error: 'Method ' + params.method + ' is invalid.' }), httpResponse) } } } catch (err) { @@ -1566,132 +1592,132 @@ exports.newHttpInterface = function newHttpInterface() { } break case 'Images': // This means the Images folder. - { - let path = global.env.PATH_TO_PLATFORM + '/WebServer/Images/' + requestPath[2] + { + let path = global.env.PATH_TO_PLATFORM + '/WebServer/Images/' + requestPath[2] - if (requestPath[3] !== undefined) { - path = path + '/' + requestPath[3] + if (requestPath[3] !== undefined) { + path = path + '/' + requestPath[3] + } + + if (requestPath[4] !== undefined) { + path = path + '/' + requestPath[4] + } + + if (requestPath[5] !== undefined) { + path = path + '/' + requestPath[5] + } + + path = unescape(path) + + SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse) } - - if (requestPath[4] !== undefined) { - path = path + '/' + requestPath[4] - } - - if (requestPath[5] !== undefined) { - path = path + '/' + requestPath[5] - } - - path = unescape(path) - - SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse) - } break case 'Icons': // This means the Icons folder under Projects. - { - let path = global.env.PATH_TO_PROJECTS + '/' + requestPath[2] + '/Icons' + { + let path = global.env.PATH_TO_PROJECTS + '/' + requestPath[2] + '/Icons' - if (requestPath[3] !== undefined) { - path = path + '/' + requestPath[3] + if (requestPath[3] !== undefined) { + path = path + '/' + requestPath[3] + } + + if (requestPath[4] !== undefined) { + path = path + '/' + requestPath[4] + } + + if (requestPath[5] !== undefined) { + path = path + '/' + requestPath[5] + } + + path = unescape(path) + + SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse) } - - if (requestPath[4] !== undefined) { - path = path + '/' + requestPath[4] - } - - if (requestPath[5] !== undefined) { - path = path + '/' + requestPath[5] - } - - path = unescape(path) - - SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse) - } break case 'GIFs': // This means the GIFs folder under Projects. - { - let path = global.env.PATH_TO_PROJECTS + '/' + requestPath[2] + '/GIFs' + { + let path = global.env.PATH_TO_PROJECTS + '/' + requestPath[2] + '/GIFs' - if (requestPath[3] !== undefined) { - path = path + '/' + requestPath[3] + if (requestPath[3] !== undefined) { + path = path + '/' + requestPath[3] + } + + if (requestPath[4] !== undefined) { + path = path + '/' + requestPath[4] + } + + if (requestPath[5] !== undefined) { + path = path + '/' + requestPath[5] + } + + path = unescape(path) + SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse) } - - if (requestPath[4] !== undefined) { - path = path + '/' + requestPath[4] - } - - if (requestPath[5] !== undefined) { - path = path + '/' + requestPath[5] - } - - path = unescape(path) - SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse) - } break case 'PNGs': // This means the PNGs folder under Projects. - { - let path = global.env.PATH_TO_PROJECTS + '/' + requestPath[2] + '/PNGs' + { + let path = global.env.PATH_TO_PROJECTS + '/' + requestPath[2] + '/PNGs' - if (requestPath[3] !== undefined) { - path = path + '/' + requestPath[3] + if (requestPath[3] !== undefined) { + path = path + '/' + requestPath[3] + } + + if (requestPath[4] !== undefined) { + path = path + '/' + requestPath[4] + } + + if (requestPath[5] !== undefined) { + path = path + '/' + requestPath[5] + } + + path = unescape(path) + SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse) } - - if (requestPath[4] !== undefined) { - path = path + '/' + requestPath[4] - } - - if (requestPath[5] !== undefined) { - path = path + '/' + requestPath[5] - } - - path = unescape(path) - SA.projects.foundations.utilities.httpResponses.respondWithImage(path, httpResponse) - } break case 'WebServer': // This means the WebServer folder. - { - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/' + requestPath[2], httpResponse) - } + { + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/' + requestPath[2], httpResponse) + } break case 'externalScripts': // This means the WebServer folder. - { - // This allows to have sub-folders in externalScripts - let fullPath = '' - for (let i = 2; i < requestPath.length; i++) { - fullPath += requestPath[i] - if (i !== requestPath.length - 1) { - fullPath += '/' + { + // This allows to have sub-folders in externalScripts + let fullPath = '' + for (let i = 2; i < requestPath.length; i++) { + fullPath += requestPath[i] + if (i !== requestPath.length - 1) { + fullPath += '/' + } } + + /** + * Sometimes libs will call fonts/images etc. by themselves thus we should have a filter for file type to respond with the correct content and headers, but from the externalScripts folder + * This code should be improved when needed with specific file types + */ + + let requestedFileExtension = requestPath[requestPath.length - 1].split('.').pop() + switch (requestedFileExtension) { + case 'otf': + case 'ttf': + case 'eot': + case 'woff': + case 'woff2': + SA.projects.foundations.utilities.httpResponses.respondWithFont(global.env.PATH_TO_PLATFORM + '/WebServer/externalScripts/' + fullPath, httpResponse) + break + default: + SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/externalScripts/' + fullPath, httpResponse) + } + } - - /** - * Sometimes libs will call fonts/images etc. by themselves thus we should have a filter for file type to respond with the correct content and headers, but from the externalScripts folder - * This code should be improved when needed with specific file types - */ - - let requestedFileExtension = requestPath[requestPath.length - 1].split('.').pop() - switch (requestedFileExtension) { - case 'otf': - case 'ttf': - case 'eot': - case 'woff': - case 'woff2': - SA.projects.foundations.utilities.httpResponses.respondWithFont(global.env.PATH_TO_PLATFORM + '/WebServer/externalScripts/' + fullPath, httpResponse) - break - default: - SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/externalScripts/' + fullPath, httpResponse) - } - - } break case 'Plotters': // This means the plotter folder, not to be confused with the Plotters script! - { - let project = requestPath[2] - let dataMine = requestPath[3] - let codeName = requestPath[4] - let moduleName = requestPath[5] - let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/' + 'Bots-Plotters-Code' + '/' + dataMine + '/plotters/' + codeName + '/' + moduleName - SA.projects.foundations.utilities.httpResponses.respondWithFile(filePath, httpResponse) - } + { + let project = requestPath[2] + let dataMine = requestPath[3] + let codeName = requestPath[4] + let moduleName = requestPath[5] + let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/' + 'Bots-Plotters-Code' + '/' + dataMine + '/plotters/' + codeName + '/' + moduleName + SA.projects.foundations.utilities.httpResponses.respondWithFile(filePath, httpResponse) + } break case 'ChartLayers': { SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/UI/' + endpointOrFile + '/' + requestPath[2], httpResponse) @@ -1889,8 +1915,8 @@ exports.newHttpInterface = function newHttpInterface() { fileName ) .then(response => { - SA.projects.foundations.utilities.httpResponses.respondWithContent(response, httpResponse) - } + SA.projects.foundations.utilities.httpResponses.respondWithContent(response, httpResponse) + } ) .catch(err => { let error = { @@ -2070,7 +2096,7 @@ exports.newHttpInterface = function newHttpInterface() { /* Create Dir if it does not exist */ if (!fs.existsSync(dir)) { - fs.mkdirSync(dir, {recursive: true}); + fs.mkdirSync(dir, { recursive: true }); } fs.writeFile(filePath, fileContent, onFileWritten) @@ -2214,4 +2240,14 @@ exports.newHttpInterface = function newHttpInterface() { } } } + + function createNewDir(path) { + try { + SA.nodeModules.fs.mkdirSync(path, { recursive: true }) + } catch (err) { + if (err.message.indexOf('file already exists') < 0) { + throw (err) + } + } + } } diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js index a0c7e9de4..db324af90 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/Snapshots.js @@ -150,7 +150,7 @@ exports.newAlgorithmicTradingBotModulesSnapshots = function(processIndex) { } /* Now we go down through all this node children */ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(node.project + '-' + node.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEngine.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEngine.js index ff2312b66..59f511acc 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEngine.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingEngine.js @@ -112,7 +112,7 @@ exports.newAlgorithmicTradingBotModulesTradingEngine = function (processIndex) { destinationNode.value = originNode.value /* Now we go down through all the children of the origin node, assuming the destination node has the same children structure*/ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(originNode.project + '-' + originNode.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(originNode.project + '-' + originNode.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { @@ -151,7 +151,7 @@ exports.newAlgorithmicTradingBotModulesTradingEngine = function (processIndex) { nodesMap.set(node.id, node) /* Now we go down through all this node children */ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(node.project + '-' + node.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { @@ -194,7 +194,7 @@ exports.newAlgorithmicTradingBotModulesTradingEngine = function (processIndex) { } /* Now we go down through all this node children */ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(node.project + '-' + node.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOutput.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOutput.js index 115f3d9b0..71628a8c0 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOutput.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOutput.js @@ -31,7 +31,7 @@ exports.newAlgorithmicTradingBotModulesTradingOutput = function (processIndex) { /* Preparing everything for the Simulation */ let tradingSimulationModuleObject = TS.projects.algorithmicTrading.botModules.tradingSimulation.newAlgorithmicTradingBotModulesTradingSimulation(processIndex) - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') let outputDatasetsMap = new Map() await TS.projects.foundations.functionLibraries.outputManagementFunctions.readFiles( diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingRecords.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingRecords.js index 8c8e4877c..fed2368bc 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingRecords.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingRecords.js @@ -37,7 +37,7 @@ exports.newAlgorithmicTradingBotModulesTradingRecords = function (processIndex) we have a pointer to the node that have the information we need to extract. Later, based on the product record definition we will extract each individual value. */ - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') for (let i = 0; i < outputDatasets.length; i++) { let outputDatasetNode = outputDatasets[i] diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js index 837fdcd0c..83e4c1a30 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSimulation.js @@ -372,8 +372,8 @@ exports.newAlgorithmicTradingBotModulesTradingSimulation = function (processInde } function positionChart(chart) { - let dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') - dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies) + let dataDependencies = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') + dataDependencies = SA.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies) /* Finding the Current Element on Daily Files */ if (TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_PROCESSING_DAILY_FILES) { diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSystem.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSystem.js index c451d7d02..606af9450 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSystem.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingSystem.js @@ -272,7 +272,7 @@ exports.newAlgorithmicTradingBotModulesTradingSystem = function (processIndex) { } /* Now we go down through all this node children */ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(node.project + '-' + node.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { diff --git a/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js b/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js index 13d8bb576..0489a27fe 100644 --- a/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js +++ b/Projects/Data-Mining/TS/Bot-Modules/API-Data-Fetcher-Bot/FetchingProcess.js @@ -201,7 +201,7 @@ exports.newDataMiningBotModulesFetchingProcess = function (processIndex) { if (recordProperty.apiResponseFieldReference !== undefined) { if (recordProperty.apiResponseFieldReference.referenceParent !== undefined) { let apiResponseField = recordProperty.apiResponseFieldReference.referenceParent - let endpointNodeFound = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(apiResponseField, 'API Endpoint') + let endpointNodeFound = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(apiResponseField, 'API Endpoint') /* Every Record Property with an apiResponseFieldReference must be on the path to a certain endpoint. diff --git a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js index 6e93538bd..a24c8b723 100644 --- a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/IndicatorOutput.js @@ -52,13 +52,13 @@ } /* The first phase here is about checking that we have everything we need at the definition level. */ - let dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray( + let dataDependencies = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray( TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency' ) if (TS.projects.foundations.functionLibraries.singleMarketFunctions.validateDataDependencies(processIndex, dataDependencies, callBackFunction) !== true) { return } - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray( + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray( TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset' ) if (TS.projects.foundations.functionLibraries.singleMarketFunctions.validateOutputDatasets(processIndex, outputDatasets, callBackFunction) !== true) { return } @@ -138,9 +138,9 @@ contextSummary.dataset = outputDatasetNode.referenceParent.config.codeName contextSummary.product = outputDatasetNode.referenceParent.parentNode.config.codeName - let botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Indicator Bot') + let botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Indicator Bot') contextSummary.bot = botNode.config.codeName - let dataMineNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Data Mine') + let dataMineNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Data Mine') contextSummary.dataMine = dataMineNode.config.codeName contextSummary.mineType = dataMineNode.type.replace(' ', '-') contextSummary.project = dataMineNode.project diff --git a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js index f0b3d0d0f..207f3ff2f 100644 --- a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameDaily.js @@ -513,7 +513,7 @@ } function writeDataRanges(callBack) { - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray( + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray( TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') let outputDatasetIndex = -1; controlLoop() diff --git a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js index 9fb933475..254a43563 100644 --- a/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js +++ b/Projects/Data-Mining/TS/Bot-Modules/Indicator-Bot/MultiTimeFrameMarket.js @@ -151,7 +151,7 @@ function writeTimeFramesFiles(callBack) { let outputDatasets = - TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') let outputDatasetIndex = -1; controlLoop() diff --git a/Projects/Foundations/SA/Globals/Schemas.js b/Projects/Foundations/SA/Globals/Schemas.js new file mode 100644 index 000000000..6fb91b966 --- /dev/null +++ b/Projects/Foundations/SA/Globals/Schemas.js @@ -0,0 +1,8 @@ +exports.newFoundationsGlobalsSchemas = function () { + + let thisObject = { + APP_SCHEMA_MAP: new Map() + } + + return thisObject +} \ No newline at end of file diff --git a/Projects/Foundations/TS/Function-Libraries/DataDependenciesFunctions.js b/Projects/Foundations/TS/Function-Libraries/DataDependenciesFunctions.js index 41b6192a4..7ac10f433 100644 --- a/Projects/Foundations/TS/Function-Libraries/DataDependenciesFunctions.js +++ b/Projects/Foundations/TS/Function-Libraries/DataDependenciesFunctions.js @@ -375,14 +375,14 @@ exports.newFoundationsFunctionLibrariesDataDependenciesFunctions = function () { THe first thing we do is to build an array of all the declared dependencies of the Bot Process. */ - let dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') + let dataDependencies = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') /* Then we will filter out declared dependencies that are not referencing nodes currently present at the workspace. This will allow the user to have less Data Mines loaded at the workspace that the ones that a the Bot process depends on. */ - dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies) + dataDependencies = SA.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies) /* We will run some validations to prevent starting the process if all needed config and nodes are not present. @@ -394,7 +394,7 @@ exports.newFoundationsFunctionLibrariesDataDependenciesFunctions = function () { we do it just to be able to validate that all nodes and config are ok before letting this process run too far. */ - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') /* Here we check that all output datasets configs are ok. */ diff --git a/Projects/Foundations/TS/Function-Libraries/FromOneMinToMultiTimeFrameFunctions.js b/Projects/Foundations/TS/Function-Libraries/FromOneMinToMultiTimeFrameFunctions.js index 8ed254b7d..1713b694a 100644 --- a/Projects/Foundations/TS/Function-Libraries/FromOneMinToMultiTimeFrameFunctions.js +++ b/Projects/Foundations/TS/Function-Libraries/FromOneMinToMultiTimeFrameFunctions.js @@ -48,7 +48,7 @@ exports.newFoundationsFunctionLibrariesFromOneMinToMultiTimeFrameFunctions = fun node.dataDependency = dataDependenciesModule.curatedDependencyNodeArray[0] } - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray( + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray( TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset' ) diff --git a/Projects/Foundations/TS/Function-Libraries/ProcessFilesFunctions.js b/Projects/Foundations/TS/Function-Libraries/ProcessFilesFunctions.js index 81dfc978d..8fdc4e16c 100644 --- a/Projects/Foundations/TS/Function-Libraries/ProcessFilesFunctions.js +++ b/Projects/Foundations/TS/Function-Libraries/ProcessFilesFunctions.js @@ -123,7 +123,7 @@ exports.newFoundationsFunctionLibrariesProcessFilesFunctions = function () { async function writeProcessFiles(processIndex, contextVariables, currentTimeFrame, processDate, statusDependencies) { let fileStorage = TS.projects.foundations.taskModules.fileStorage.newFileStorage(processIndex) - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') await writeTimeFramesFiles() await writeDataRanges() diff --git a/Projects/Foundations/TS/Function-Libraries/SingleMarketFunctions.js b/Projects/Foundations/TS/Function-Libraries/SingleMarketFunctions.js index 11dc25fbf..fa73c9078 100644 --- a/Projects/Foundations/TS/Function-Libraries/SingleMarketFunctions.js +++ b/Projects/Foundations/TS/Function-Libraries/SingleMarketFunctions.js @@ -91,12 +91,12 @@ return } - let botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Indicator Bot') + let botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Indicator Bot') if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Trading Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Trading Bot') } if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Learning Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Learning Bot') } if (botNode === undefined) { TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[ERROR] start -> Product Definition not attached to a Bot. "); @@ -110,11 +110,11 @@ return } - let dataMineNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Data Mine') + let dataMineNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Data Mine') if (dataMineNode === undefined) { - let tradingMineNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Trading Mine') + let tradingMineNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Trading Mine') if (tradingMineNode === undefined) { - let learningMineNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Learning Mine') + let learningMineNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDatasetNode, 'Learning Mine') if (learningMineNode === undefined) { TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[ERROR] start -> Bot not attached to a Data Mine, Trading Mine or Learning Mine."); callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_FAIL_RESPONSE); diff --git a/Projects/Foundations/TS/Globals/TaskConstants.js b/Projects/Foundations/TS/Globals/TaskConstants.js index 114787146..a3c8e5cc9 100644 --- a/Projects/Foundations/TS/Globals/TaskConstants.js +++ b/Projects/Foundations/TS/Globals/TaskConstants.js @@ -8,7 +8,6 @@ exports.newFoundationsGlobalsTaskConstants = function () { NETWORK_NODE: undefined, PROJECT_DEFINITION_NODE: undefined, PROJECTS_SCHEMA: undefined, - APP_SCHEMA_MAP: new Map(), EVENT_SERVER_CLIENT_MODULE_OBJECT: undefined, // This is an instance of the Event Server Client pointing to the localhost server TASK_HEARTBEAT_INTERVAL_HANDLER: undefined } diff --git a/Projects/Foundations/TS/Process-Modules/DataDependencies.js b/Projects/Foundations/TS/Process-Modules/DataDependencies.js index 72e77dc56..62df1f3cc 100644 --- a/Projects/Foundations/TS/Process-Modules/DataDependencies.js +++ b/Projects/Foundations/TS/Process-Modules/DataDependencies.js @@ -50,7 +50,7 @@ /* First we will get all the data dependencies of the bot, as defined at the Trading Mine. */ - thisObject.curatedDependencyNodeArray = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') + thisObject.curatedDependencyNodeArray = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') if (thisObject.curatedDependencyNodeArray.length === 0) { TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[ERROR] initialize -> onInitilized -> It is not possible to not have data dependencies at all.") callBackFunction(TS.projects.foundations.globals.standardResponses.DEFAULT_FAIL_RESPONSE) @@ -61,7 +61,7 @@ This will allow the user to have less Data Mines loaded at the workspace that the ones that a Trading Mine depends on. */ - thisObject.curatedDependencyNodeArray = TS.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(thisObject.curatedDependencyNodeArray) + thisObject.curatedDependencyNodeArray = SA.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(thisObject.curatedDependencyNodeArray) } else { TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[ERROR] initialize -> onInitilized -> It is not possible not to have process dependencies, which means not data dependencies.") diff --git a/Projects/Foundations/TS/Process-Modules/Dataset.js b/Projects/Foundations/TS/Process-Modules/Dataset.js index 685777744..74c76193a 100644 --- a/Projects/Foundations/TS/Process-Modules/Dataset.js +++ b/Projects/Foundations/TS/Process-Modules/Dataset.js @@ -222,7 +222,7 @@ exports.newFoundationsProcessModulesDataset = function (processIndex) { function scanNodeMesh(startingNode) { if (startingNode === undefined) { return } - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(startingNode.project + '-' + startingNode.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(startingNode.project + '-' + startingNode.type) if (schemaDocument === undefined) { return } if (startingNode.id === productDefinition.id) { diff --git a/Projects/Foundations/TS/Process-Modules/ProcessOutput.js b/Projects/Foundations/TS/Process-Modules/ProcessOutput.js index 876af534d..c76eee859 100644 --- a/Projects/Foundations/TS/Process-Modules/ProcessOutput.js +++ b/Projects/Foundations/TS/Process-Modules/ProcessOutput.js @@ -18,23 +18,23 @@ /* We will raise the events for the datasets impacted by the process that just finished. */ if (TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput !== undefined) { - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') for (let j = 0; j < outputDatasets.length; j++) { let outputDataset = outputDatasets[j] - let botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Indicator Bot') + let botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Indicator Bot') if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Trading Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Trading Bot') } if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Sensor Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Sensor Bot') } if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'API Data Fetcher Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'API Data Fetcher Bot') } if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Learning Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Learning Bot') } /* Some validations to verify that everything is in place. */ @@ -112,23 +112,23 @@ function asyncRaiseEvents(lastFile, timeFrames) { if (TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput !== undefined) { - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') for (let j = 0; j < outputDatasets.length; j++) { let outputDataset = outputDatasets[j] - let botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Indicator Bot') + let botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Indicator Bot') if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Trading Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Trading Bot') } if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Sensor Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Sensor Bot') } if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'API Data Fetcher Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'API Data Fetcher Bot') } if (botNode === undefined) { - botNode = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Learning Bot') + botNode = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(outputDataset, 'Learning Bot') } /* Some validations to verify that everything is in place. */ diff --git a/Projects/Foundations/UI/Function-Libraries/SuperScripts.js b/Projects/Foundations/UI/Function-Libraries/SuperScripts.js deleted file mode 100644 index 9a2c7d6e5..000000000 --- a/Projects/Foundations/UI/Function-Libraries/SuperScripts.js +++ /dev/null @@ -1,90 +0,0 @@ -function newFoundationsFunctionLibrarySuperScriptsFunctions() { - let thisObject = { - runSuperScript: runSuperScript - } - - return thisObject - - function runSuperScript(node, rootNodes) { - try { - let clone = UI.projects.visualScripting.functionLibraries.nodeCloning.getNodeClone - let executionResult = true - let superAction = node - - function setup(templateClone, target, exchange, exchangeNodeType, arrayPropertyName) { - spawnPosition.x = target.payload.position.x - spawnPosition.y = target.payload.position.y - - if (exchange === undefined) { - UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.createUiObjectFromNode(templateClone, target, target) - } else { - let definition = getSchemaDocument(target) - for (let i = 0; i < definition.childrenNodesProperties.length; i++) { - let property = definition.childrenNodesProperties[i] - if (property.childType === exchangeNodeType) { - let exchanges = target[property.name] - if (exchanges === undefined) { - exchanges = [] - } - let targetExchange - for (let j = 0; j < exchanges.length; j++) { - let thisExchange = exchanges[j] - if (thisExchange.payload.referenceParent !== undefined) { - if (thisExchange.payload.referenceParent.id === exchange.id) { - targetExchange = thisExchange - } - } - } - if (targetExchange === undefined) { - targetExchange = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(target, exchangeNodeType) - UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(targetExchange, exchange) - } - let nodesArray = targetExchange[arrayPropertyName] - nodesArray.push(templateClone) - UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.createUiObjectFromNode(templateClone, targetExchange, targetExchange) - } - } - } - } - - function deleteNode(node) { - UI.projects.visualScripting.functionLibraries.nodeDeleter.deleteUIObject(node, rootNodes) - } - - /* Validations */ - if (executionResult === true && node.payload.parentNode === undefined) { - node.payload.uiObject.setErrorMessage('Super Action node needs a Parent Node.') - executionResult = false - } - if (executionResult === true && node.payload.referenceParent === undefined) { - node.payload.uiObject.setErrorMessage('Super Action node needs to reference a Master Script Node.') - executionResult = false - } - if (executionResult === true && node.payload.referenceParent.javascriptCode === undefined) { - node.payload.uiObject.setErrorMessage('Master Script Node needs to have a child Javascript Code Node.') - executionResult = false - } - - let masterScript = node.payload.referenceParent - - eval(masterScript.javascriptCode.code) - - let masterScriptInstance = newNewMasterScriptInstance() - - if (executionResult === true) { - executionResult = masterScriptInstance.runValidations(superAction, masterScript) - } - if (executionResult === true) { - executionResult = masterScriptInstance.runScript(superAction, masterScript) - } - if (executionResult === true) { - superAction.payload.uiObject.setValue('Execution Completed Successfully') - } else { - superAction.payload.uiObject.setValue('Execution Failed') - } - } catch (err) { - superAction.payload.uiObject.setErrorMessage(err.message) - superAction.payload.uiObject.setValue('Execution Failed') - } - } -} diff --git a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js index 1580e85e2..c73040b9d 100644 --- a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js +++ b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js @@ -332,7 +332,7 @@ function newFoundationsCodeEditorEditorPage() { }) // Enrich chart data with market and exchange structure - UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes.forEach(node => { +/* UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes.forEach(node => { if (node.type === 'Crypto Ecosystem') { node.cryptoExchanges.forEach(cxs => { cxs.exchanges.forEach(exchange => { @@ -342,19 +342,21 @@ function newFoundationsCodeEditorEditorPage() { let baseAsset = marketPair.split('/')[0] let quotedAsset = marketPair.split('/')[1] stringObjects.forEach(chartObj => { - /** + /!** * We will provide auto-complete only for assets pair found in Markets * Doing so we will avoid providing completion for assets that are not used in a market - */ + *!/ + + //TODO: Disabled on purpose, causes high memory consumption when multiple exchanges are loaded let market = marketPrefix + baseAsset + dot + quotedAsset + dot + chartObj - stringObjects.push(market) - stringObjects.push(exchangePrefix + exchangeName + dot + market) + // stringObjects.push(market) + // stringObjects.push(exchangePrefix + exchangeName + dot + market) }) }) }) }) } - }) + })*/ //Actually building the objects for chart, market and exchange, no need for multiple objects, as one is enough for the autocomplete to work stringObjects.forEach(stringRepresentation => { diff --git a/Projects/Governance/Icons/desktop-apps.png b/Projects/Governance/Icons/desktop-apps.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/desktop-apps.png differ diff --git a/Projects/Governance/Icons/mobile-apps.png b/Projects/Governance/Icons/mobile-apps.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/mobile-apps.png differ diff --git a/Projects/Governance/Icons/p2p-network-nodes.png b/Projects/Governance/Icons/p2p-network-nodes.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/p2p-network-nodes.png differ diff --git a/Projects/Governance/Icons/server-apps.png b/Projects/Governance/Icons/server-apps.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/server-apps.png differ diff --git a/Projects/Governance/Icons/social-persona-followed.png b/Projects/Governance/Icons/social-persona-followed.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/social-persona-followed.png differ diff --git a/Projects/Governance/Icons/social-persona.png b/Projects/Governance/Icons/social-persona.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/social-persona.png differ diff --git a/Projects/Governance/Icons/social-personas-following.png b/Projects/Governance/Icons/social-personas-following.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/social-personas-following.png differ diff --git a/Projects/Governance/Icons/social-personas.png b/Projects/Governance/Icons/social-personas.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/social-personas.png differ diff --git a/Projects/Governance/Icons/social-trading-bot-followed.png b/Projects/Governance/Icons/social-trading-bot-followed.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/social-trading-bot-followed.png differ diff --git a/Projects/Governance/Icons/social-trading-bot.png b/Projects/Governance/Icons/social-trading-bot.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/social-trading-bot.png differ diff --git a/Projects/Governance/Icons/social-trading-bots-following.png b/Projects/Governance/Icons/social-trading-bots-following.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/social-trading-bots-following.png differ diff --git a/Projects/Governance/Icons/social-trading-bots.png b/Projects/Governance/Icons/social-trading-bots.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/social-trading-bots.png differ diff --git a/Projects/Governance/Icons/user-apps.png b/Projects/Governance/Icons/user-apps.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/user-apps.png differ diff --git a/Projects/Governance/Icons/user-bots.png b/Projects/Governance/Icons/user-bots.png new file mode 100644 index 000000000..a4ee2a209 Binary files /dev/null and b/Projects/Governance/Icons/user-bots.png differ diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index a60755b4f..a66be7be8 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -127,11 +127,11 @@ "id": "f4d39b02-4324-438d-9f74-2bea2b7272ef", "savedPayload": { "position": { - "x": 33783.333333333336, + "x": 37950, "y": 18540.192378864667 }, "targetPosition": { - "x": 33633.333333333336, + "x": 37800, "y": 18800 }, "floatingObject": { @@ -516,11 +516,11 @@ "id": "b6e3c87d-a11b-4b2a-b6a6-edc96375f5da", "savedPayload": { "position": { - "x": 33893.14095446867, + "x": 38059.80762113533, "y": 18650 }, "targetPosition": { - "x": 33633.333333333336, + "x": 37800, "y": 18800 }, "floatingObject": { @@ -565,11 +565,11 @@ "id": "2571cea1-2b6d-40f5-9331-8786bf57c184", "savedPayload": { "position": { - "x": 34560.56441588615, + "x": 38727.23108255281, "y": 18282.57653858252 }, "targetPosition": { - "x": 34482.91870235539, + "x": 38649.585369022054, "y": 18572.354286469243 }, "floatingObject": { @@ -5592,11 +5592,11 @@ "id": "75487f1d-1ec0-4431-8693-ce9653018e81", "savedPayload": { "position": { - "x": 34742.72632349072, + "x": 38909.39299015739, "y": 18422.354286469243 }, "targetPosition": { - "x": 34482.91870235539, + "x": 38649.585369022054, "y": 18572.354286469243 }, "floatingObject": { @@ -7689,11 +7689,11 @@ "id": "800e3388-1ea6-40ee-ace5-1811a3373e39", "savedPayload": { "position": { - "x": 34968.38267362554, - "y": 18422.608483056363 + "x": 39121.99154561139, + "y": 18411.99399791263 }, "targetPosition": { - "x": 34772.69645024211, + "x": 38939.363116908775, "y": 18650 }, "floatingObject": { @@ -14945,11 +14945,11 @@ "id": "aa848510-1260-46ed-a855-6c0fb9dca9eb", "savedPayload": { "position": { - "x": 35047.66512700311, - "y": 18530.032392704077 + "x": 39199.17073804411, + "y": 18500 }, "targetPosition": { - "x": 34772.69645024211, + "x": 38939.363116908775, "y": 18650 }, "floatingObject": { @@ -15252,11 +15252,11 @@ "id": "12a12abf-c6f9-4a62-a21e-4442b2fbbada", "savedPayload": { "position": { - "x": 35072.48666167863, - "y": 18661.2173582829 + "x": 39236.79657532092, + "y": 18610.842142333986 }, "targetPosition": { - "x": 34772.69645024211, + "x": 38939.363116908775, "y": 18650 }, "floatingObject": { @@ -15370,11 +15370,11 @@ "id": "f1ef36d6-3284-408b-9601-aa1bf4875c0a", "savedPayload": { "position": { - "x": 35037.931068293496, - "y": 18790.18058848192 + "x": 39229.140864795496, + "y": 18727.645713530757 }, "targetPosition": { - "x": 34772.69645024211, + "x": 38939.363116908775, "y": 18650 }, "floatingObject": { @@ -15939,11 +15939,11 @@ "id": "4ece8c41-7a25-4514-9ff5-de3f609c7a00", "savedPayload": { "position": { - "x": 34950.84250591416, - "y": 18891.37933393 + "x": 39177.36911899615, + "y": 18832.628428702617 }, "targetPosition": { - "x": 34772.69645024211, + "x": 38939.363116908775, "y": 18650 }, "floatingObject": { @@ -16103,11 +16103,11 @@ "id": "37988155-ac7c-4eb2-937b-6d3b64842a3a", "savedPayload": { "position": { - "x": 34828.46993239099, - "y": 18944.769941969986 + "x": 39089.363116908775, + "y": 18909.807621135333 }, "targetPosition": { - "x": 34772.69645024211, + "x": 38939.363116908775, "y": 18650 }, "floatingObject": { @@ -16158,15 +16158,44 @@ "poolWeightVotes": [], "assetWeightVotes": [], "featureWeightVotes": [], - "positionWeightVotes": [], + "positionWeightVotes": [ + { + "type": "Position Weight Vote", + "name": "", + "config": "{}", + "project": "Governance", + "id": "2d9f36e1-d393-4d2d-a8fd-23a3f69ed439", + "savedPayload": { + "position": { + "x": 38978.52097457479, + "y": 18947.433458412142 + }, + "targetPosition": { + "x": 38939.363116908775, + "y": 18650 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], "id": "1d398124-3f36-40a1-8b3b-6c77ad489b92", "savedPayload": { "position": { - "x": 34772.69645024211, + "x": 38939.363116908775, "y": 18650 }, "targetPosition": { - "x": 34482.91870235539, + "x": 38649.585369022054, "y": 18572.354286469243 }, "floatingObject": { @@ -16188,11 +16217,11 @@ "id": "2b8d3ce7-515c-44ad-8d80-3c2be6d7736f", "savedPayload": { "position": { - "x": 34482.91870235539, + "x": 38649.585369022054, "y": 18572.354286469243 }, "targetPosition": { - "x": 34223.11108122006, + "x": 38389.77774788672, "y": 18722.354286469243 }, "floatingObject": { @@ -16216,11 +16245,11 @@ "id": "e9c0e495-7985-4381-bf75-865d87289038", "savedPayload": { "position": { - "x": 34523.11108122006, + "x": 38689.77774788672, "y": 18722.354286469243 }, "targetPosition": { - "x": 34223.11108122006, + "x": 38389.77774788672, "y": 18722.354286469243 }, "floatingObject": { @@ -16239,11 +16268,11 @@ "id": "d5ed432e-78bf-432e-be3b-8649932f7a65", "savedPayload": { "position": { - "x": 34223.11108122006, + "x": 38389.77774788672, "y": 18722.354286469243 }, "targetPosition": { - "x": 33933.333333333336, + "x": 38100, "y": 18800 }, "floatingObject": { @@ -16400,11 +16429,11 @@ "id": "796dd30f-c90d-4b8d-a63d-89867347407b", "savedPayload": { "position": { - "x": 34223.11108122006, + "x": 38389.77774788672, "y": 18877.645713530757 }, "targetPosition": { - "x": 33933.333333333336, + "x": 38100, "y": 18800 }, "floatingObject": { @@ -16423,17 +16452,17 @@ "id": "bb390957-b8a2-4a8a-9fbf-963ea20f6eaf", "savedPayload": { "position": { - "x": 33933.333333333336, + "x": 38100, "y": 18800 }, "targetPosition": { - "x": 33633.333333333336, + "x": 37800, "y": 18800 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 @@ -16711,11 +16740,11 @@ "id": "4246052a-0eab-43a6-bdc4-d9a42a9bd694", "savedPayload": { "position": { - "x": 34152.948575604, + "x": 38319.615242270665, "y": 19100 }, "targetPosition": { - "x": 33893.14095446867, + "x": 38059.80762113533, "y": 18950 }, "floatingObject": { @@ -16734,17 +16763,17 @@ "id": "ed112539-01ea-4937-85cf-69612ee6115d", "savedPayload": { "position": { - "x": 33893.14095446867, + "x": 38059.80762113533, "y": 18950 }, "targetPosition": { - "x": 33633.333333333336, + "x": 37800, "y": 18800 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 @@ -16772,12 +16801,12 @@ "id": "5fd55dc1-69c8-473e-9d3d-b39b58818b07", "savedPayload": { "position": { - "x": 5377.381582729962, - "y": 24015.099048196847 + "x": 38529.55549577344, + "y": 19215.099048196847 }, "targetPosition": { - "x": 5087.603834843242, - "y": 23937.45333466609 + "x": 38239.77774788672, + "y": 19137.45333466609 }, "floatingObject": { "isPinned": false, @@ -16795,12 +16824,12 @@ "id": "a081e0a9-ee60-4a56-b5a6-aadb7bd8b052", "savedPayload": { "position": { - "x": 5087.603834843242, - "y": 23937.45333466609 + "x": 38239.77774788672, + "y": 19137.45333466609 }, "targetPosition": { - "x": 4797.826086956522, - "y": 23859.807621135333 + "x": 37950, + "y": 19059.807621135333 }, "floatingObject": { "isPinned": false, @@ -16827,12 +16856,12 @@ "id": "eab98bcc-39ee-411d-95e2-b5c6c33067cc", "savedPayload": { "position": { - "x": 5097.826086956522, - "y": 24379.422863406 + "x": 38250, + "y": 19579.422863406 }, "targetPosition": { - "x": 4947.826086956522, - "y": 24119.615242270665 + "x": 38100, + "y": 19319.615242270665 }, "floatingObject": { "isPinned": false, @@ -16850,12 +16879,12 @@ "id": "68d6085b-3226-4842-b100-80a8c647e7ec", "savedPayload": { "position": { - "x": 4947.826086956522, - "y": 24119.615242270665 + "x": 38100, + "y": 19319.615242270665 }, "targetPosition": { - "x": 4797.826086956522, - "y": 23859.807621135333 + "x": 37950, + "y": 19059.807621135333 }, "floatingObject": { "isPinned": false, @@ -16882,12 +16911,12 @@ "id": "90876ef0-3d01-4a3f-afc8-52914972a040", "savedPayload": { "position": { - "x": 4642.534659895009, - "y": 24439.363116908775 + "x": 37794.708572938485, + "y": 19639.363116908775 }, "targetPosition": { - "x": 4720.1803734257655, - "y": 24149.585369022054 + "x": 37872.35428646924, + "y": 19349.585369022054 }, "floatingObject": { "isPinned": false, @@ -16905,12 +16934,12 @@ "id": "8c213687-2520-41ff-8b89-f5abaf6f2f2e", "savedPayload": { "position": { - "x": 4720.1803734257655, - "y": 24149.585369022054 + "x": 37872.35428646924, + "y": 19349.585369022054 }, "targetPosition": { - "x": 4797.826086956522, - "y": 23859.807621135333 + "x": 37950, + "y": 19059.807621135333 }, "floatingObject": { "isPinned": false, @@ -16929,11 +16958,11 @@ "id": "ba3bc469-3c94-444d-a5d0-8ed851aa3778", "savedPayload": { "position": { - "x": 33783.333333333336, + "x": 37950, "y": 19059.807621135333 }, "targetPosition": { - "x": 33633.333333333336, + "x": 37800, "y": 18800 }, "floatingObject": { @@ -16952,17 +16981,17 @@ "id": "f8182a9c-f830-4ec1-a238-ac3a5efd69e6", "savedPayload": { "position": { - "x": 33633.333333333336, + "x": 37800, "y": 18800 }, "targetPosition": { - "x": 33333.333333333336, + "x": 37500, "y": 18800 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 @@ -16979,11 +17008,11 @@ "id": "9870ca2a-cefc-484b-b7fc-206d62782ebc", "savedPayload": { "position": { - "x": 33183.333333333336, - "y": 19059.807621135333 + "x": 37687.04694055762, + "y": 19034.54944474041 }, "targetPosition": { - "x": 33333.333333333336, + "x": 37500, "y": 18800 }, "floatingObject": { @@ -17006,29 +17035,604 @@ "signingAccounts": [ { "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xc321c45055b32456d938c214e00cbfb035efe8bda6fa20268be4683b3b89f64b\",\n \"s\": \"0x053be15689ecf8a29369814c9d6d6be0c1238497d56f6edb6be045d07df4dfea\",\n \"signature\": \"0xc321c45055b32456d938c214e00cbfb035efe8bda6fa20268be4683b3b89f64b053be15689ecf8a29369814c9d6d6be0c1238497d56f6edb6be045d07df4dfea1c\"\n }\n}", + "name": "Algo Traders Platform #1", + "config": "{\n \"codeName\": \"Algo-Traders-Platform-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xe4566a497221d797935bf52fcfc4ac379142ff4fd04eb5dab9f895225c5efc3f\",\n \"s\": \"0x169e3cc82bd518811122af751964d4ebaff089bc47b586fd6fa8aab6ff93510e\",\n \"signature\": \"0xe4566a497221d797935bf52fcfc4ac379142ff4fd04eb5dab9f895225c5efc3f169e3cc82bd518811122af751964d4ebaff089bc47b586fd6fa8aab6ff93510e1b\"\n }\n}", "project": "Governance", - "signingAccountChild": { + "id": "bc6d5f74-265d-4c43-a1f7-d266ca6f2864", + "savedPayload": { + "position": { + "x": 37698.47833786449, + "y": 19232.658962136466 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Algo Traders Platform", + "name": "Algo Traders Platform #1", + "id": "0a06a54b-825b-4ff4-93cc-36465348ad26" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New User Apps", + "User Apps" + ], + [ + "New Desktop Apps", + "Desktop Apps" + ], + [ + "Algo Traders Platform #1", + "Algo Traders Platform" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "Social Trading Server App #1", + "config": "{\n \"codeName\": \"Social-Trading-Server-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x6366189e1139c88e1207a1d7572107e91ee4d022ac327ad10b72fcc409fe170a\",\n \"s\": \"0x3a63f7735b50c54cdd11f4745c63e05567605a8d018a587e2fd5906cf299e137\",\n \"signature\": \"0x6366189e1139c88e1207a1d7572107e91ee4d022ac327ad10b72fcc409fe170a3a63f7735b50c54cdd11f4745c63e05567605a8d018a587e2fd5906cf299e1371b\"\n }\n}", + "project": "Governance", + "id": "8411cea1-d4f8-4014-91e3-8d25da5a37b9", + "savedPayload": { + "position": { + "x": 37653.15928136206, + "y": 19296.530194985822 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Trading Server App", + "name": "Social Trading Server App #1", + "id": "0216b143-0e46-4da6-b2cb-e95556fc1bfd" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New User Apps", + "User Apps" + ], + [ + "New Server Apps", + "Server Apps" + ], + [ + "Social Trading Server App #1", + "Social Trading Server App" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "Social Trading Desktop App #1", + "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xe90c72318a537fa499c2168d0968a77a258d121b79db659a732efb645952c45b\",\n \"s\": \"0x3cdae989d8414d89583e4237771ba1a50246dd594f9426138293c02e0bc8e277\",\n \"signature\": \"0xe90c72318a537fa499c2168d0968a77a258d121b79db659a732efb645952c45b3cdae989d8414d89583e4237771ba1a50246dd594f9426138293c02e0bc8e2771c\"\n }\n}", + "project": "Governance", + "id": "79b79d42-906b-4f7e-859f-307c1f59c609", + "savedPayload": { + "position": { + "x": 37592.85334276771, + "y": 19346.495633423034 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Trading Desktop App", + "name": "Social Trading Desktop App #1", + "id": "33c4f8e9-f8a3-4dea-91f4-1539e3aed0d3" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New User Apps", + "User Apps" + ], + [ + "New Desktop Apps", + "Desktop Apps" + ], + [ + "Social Trading Desktop App #1", + "Social Trading Desktop App" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "Social Trading Bot #1", + "config": "{\n \"codeName\": \"Social-Trading-Bot-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x8c4d79e56bad649717fdd43dadea04af3501101828415fec6c8e154a88b9274c\",\n \"s\": \"0x510c3d0eea03e630fed4babbba9733f2f9769a3af46f886ad309ba06b5962f84\",\n \"signature\": \"0x8c4d79e56bad649717fdd43dadea04af3501101828415fec6c8e154a88b9274c510c3d0eea03e630fed4babbba9733f2f9769a3af46f886ad309ba06b5962f841c\"\n }\n}", + "project": "Governance", + "id": "33e9a11c-fd0f-4a93-94b5-8ec4a0e36872", + "savedPayload": { + "position": { + "x": 37521.670272136376, + "y": 19379.15021539039 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Trading Bot", + "name": "Social Trading Bot #1", + "id": "5167a23f-1e17-4cd5-85a7-3c7f2a3019ac" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New User Bots", + "User Bots" + ], + [ + "New Social Trading Bots", + "Social Trading Bots" + ], + [ + "Social Trading Bot #1", + "Social Trading Bot" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "Social Trading Desktop App #2", + "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xe954670fce311d449291afd63d2c583801b198f5bffbd354a17dc0953c0d246b\",\n \"s\": \"0x65ce3dbf442db3f5fe4885b9abf30163d1902673cfc422489f670f3691b30513\",\n \"signature\": \"0xe954670fce311d449291afd63d2c583801b198f5bffbd354a17dc0953c0d246b65ce3dbf442db3f5fe4885b9abf30163d1902673cfc422489f670f3691b305131b\"\n }\n}", + "project": "Governance", + "id": "2e7afb68-f902-48e6-862c-fe920cbbf6a0", + "savedPayload": { + "position": { + "x": 37444.46107809601, + "y": 19392.268585091068 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Trading Desktop App", + "name": "Social Trading Desktop App #2", + "id": "ad887d5f-998f-48c5-9db7-78e17c66f4e4" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New User Apps", + "User Apps" + ], + [ + "New Desktop Apps", + "Desktop Apps" + ], + [ + "Social Trading Desktop App #2", + "Social Trading Desktop App" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "Social Trading Mobile App #1", + "config": "{\n \"codeName\": \"Social-Trading-Mobile-App-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x781eefd6933468afc56d0fadbde7e970325963f21538e810a6ca1aad00f20c0e\",\n \"s\": \"0x3f7a4f4ce85e58212da363641f5d4c7362f858f4ebfefe8430b16ac845debc2c\",\n \"signature\": \"0x781eefd6933468afc56d0fadbde7e970325963f21538e810a6ca1aad00f20c0e3f7a4f4ce85e58212da363641f5d4c7362f858f4ebfefe8430b16ac845debc2c1b\"\n }\n}", + "project": "Governance", + "id": "b981e982-39a2-407c-aaee-f83fd149aeed", + "savedPayload": { + "position": { + "x": 37366.48743962622, + "y": 19384.956747309094 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Trading Mobile App", + "name": "Social Trading Mobile App #1", + "id": "42843263-b1f3-4e4e-885a-5d8b9d7b647a" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New User Apps", + "User Apps" + ], + [ + "New Mobile Apps", + "Mobile Apps" + ], + [ + "Social Trading Mobile App #1", + "Social Trading Mobile App" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "Social Trading Bot #2", + "config": "{\n \"codeName\": \"Social-Trading-Bot-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xf0499a689d4b09f8a3ba68dbd748ca757b9d7749eea50a52a3cb9673583b0608\",\n \"s\": \"0x7ca826f7198a2dd15ae23e0fd376c43a4d060fffdd8e293748b6592c450b42e1\",\n \"signature\": \"0xf0499a689d4b09f8a3ba68dbd748ca757b9d7749eea50a52a3cb9673583b06087ca826f7198a2dd15ae23e0fd376c43a4d060fffdd8e293748b6592c450b42e11c\"\n }\n}", + "project": "Governance", + "id": "0c931463-b609-43e6-9353-1b13450895a7", + "savedPayload": { + "position": { + "x": 37293.06313133119, + "y": 19357.71299170593 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Trading Bot", + "name": "Social Trading Bot #2", + "id": "c27748af-db60-44fc-a095-530401057beb" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New User Bots", + "User Bots" + ], + [ + "New Social Trading Bots", + "Social Trading Bots" + ], + [ + "Social Trading Bot #2", + "Social Trading Bot" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "Social Persona #1", + "config": "{\n \"codeName\": \"Social-Persona-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xbd9657c69743d2fd097c5728391f971b00b8bc9d2ea787a13436263b6cfd1423\",\n \"s\": \"0x5b4b7593b3a221f636ff16825c8f49d5bd409c83dcd47f20badc1797596afb27\",\n \"signature\": \"0xbd9657c69743d2fd097c5728391f971b00b8bc9d2ea787a13436263b6cfd14235b4b7593b3a221f636ff16825c8f49d5bd409c83dcd47f20badc1797596afb271b\"\n }\n}", + "project": "Governance", + "id": "60f58a3e-ce39-4669-8c85-9fbed91ee97a", + "savedPayload": { + "position": { + "x": 37229.19189848183, + "y": 19312.393935203494 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Persona", + "name": "Social Persona #1", + "id": "ed15b68f-c9e0-447a-9ef7-660db229244c" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New Social Personas", + "Social Personas" + ], + [ + "Social Persona #1", + "Social Persona" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "Social Persona #2", + "config": "{\n \"codeName\": \"Social-Persona-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xf7e6fde3e7bc19db547a3446c43aaf4e1af8327c72e782a4a68fef2869679cd7\",\n \"s\": \"0x337f8310b83332ea0d50f891dd9f98632854665717888fb39e266173769ad92b\",\n \"signature\": \"0xf7e6fde3e7bc19db547a3446c43aaf4e1af8327c72e782a4a68fef2869679cd7337f8310b83332ea0d50f891dd9f98632854665717888fb39e266173769ad92b1c\"\n }\n}", + "project": "Governance", + "id": "91e8a4a8-e18b-4a8b-8269-1a464b18715d", + "savedPayload": { + "position": { + "x": 37179.22646004462, + "y": 19252.08799660915 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Persona", + "name": "Social Persona #2", + "id": "01c33294-124f-4d68-8619-8e1d1cca7e0a" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New Social Personas", + "Social Personas" + ], + [ + "Social Persona #2", + "Social Persona" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "P2P Network Node #1", + "config": "{\n \"codeName\": \"P2P-Network-Node-1\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xfec6d4f26fcbcf624bd218f781fea8a8e78e5501fe167e082288a6bed8b10a9b\",\n \"s\": \"0x0c05a17a4eb6636e2895ac164680e89d1618bd7b42a77b2db61b8e942ee6fc3a\",\n \"signature\": \"0xfec6d4f26fcbcf624bd218f781fea8a8e78e5501fe167e082288a6bed8b10a9b0c05a17a4eb6636e2895ac164680e89d1618bd7b42a77b2db61b8e942ee6fc3a1c\"\n }\n}", + "project": "Governance", + "id": "c7ffb93c-a17f-4f62-9c32-600f679c6e98", + "savedPayload": { + "position": { + "x": 37146.571878077266, + "y": 19180.90492597782 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "P2P Network Node", + "name": "P2P Network Node #1", + "id": "56cc0c90-4a58-4e25-a63f-4f9a6921d0f3" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New P2P Network Nodes", + "P2P Network Nodes" + ], + [ + "P2P Network Node #1", + "P2P Network Node" + ] + ] + } + }, + { + "type": "Signing Account", + "name": "P2P Network Node #2", + "config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x48a8f063db1cca44822eed9f69cb55bf2252d6b2f75fc86b4829f2b657f52a98\",\n \"s\": \"0x7de0368fd6620541fa47ea699c2c06e3266bbe7fb0b8d5093dbf5337ec45541e\",\n \"signature\": \"0x48a8f063db1cca44822eed9f69cb55bf2252d6b2f75fc86b4829f2b657f52a987de0368fd6620541fa47ea699c2c06e3266bbe7fb0b8d5093dbf5337ec45541e1c\"\n }\n}", + "project": "Governance", + "id": "2fbcc3a0-26c1-4ebe-b6b5-2ddecf29175b", + "savedPayload": { + "position": { + "x": 37133.45350837659, + "y": 19103.695731937445 + }, + "targetPosition": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "P2P Network Node", + "name": "P2P Network Node #2", + "id": "352cd906-c36c-48c7-8f01-728ff78b78e9" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ], + [ + "New P2P Network Nodes", + "P2P Network Nodes" + ], + [ + "P2P Network Node #2", + "P2P Network Node" + ] + ] + } + } + ], + "id": "6a917b82-f14a-49cb-a233-152ac2053b88", + "savedPayload": { + "position": { + "x": 37433.24371981311, + "y": 19092.478373654547 + }, + "targetPosition": { + "x": 37500, + "y": 18800 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "userApps": { + "type": "User Apps", + "name": "New User Apps", + "config": "{}", + "project": "Governance", + "desktopApps": { + "type": "Desktop Apps", + "name": "New Desktop Apps", + "config": "{}", + "project": "Governance", + "socialTradingDesktopApps": [ + { "type": "Social Trading Desktop App", - "name": "Social Trading Desktop App # 1", + "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", - "id": "012c74dd-1a61-4784-bc8a-e18555b4974e", + "id": "33c4f8e9-f8a3-4dea-91f4-1539e3aed0d3", "savedPayload": { "position": { - "x": 32596.44477289305, - "y": 18664.939393355322 + "x": 37260.790742777994, + "y": 19483.620781198504 }, "targetPosition": { - "x": 32889.88905311319, - "y": 18602.565886109995 + "x": 37130.625621042724, + "y": 19213.330120827777 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -17037,54 +17641,114 @@ } } }, - "id": "3863ebb9-c69f-40b2-8bbd-eb8f2b60a49c", - "savedPayload": { - "position": { - "x": 32889.88905311319, - "y": 18602.565886109995 - }, - "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false + { + "type": "Social Trading Desktop App", + "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", + "id": "ad887d5f-998f-48c5-9db7-78e17c66f4e4", + "savedPayload": { + "position": { + "x": 37031.54190245617, + "y": 19496.495119920288 + }, + "targetPosition": { + "x": 37130.625621042724, + "y": 19213.330120827777 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } } } - }, - { - "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x4a48ecc069047c7e29af18652948ca7054c7e1bcf66b7bf657f82a7883631262\",\n \"s\": \"0x3cfef2f134a36a8879d64195e96fd2e22627c0363a05a1b4efb6101699b1a669\",\n \"signature\": \"0x4a48ecc069047c7e29af18652948ca7054c7e1bcf66b7bf657f82a78836312623cfef2f134a36a8879d64195e96fd2e22627c0363a05a1b4efb6101699b1a6691b\"\n }\n}", - "project": "Governance", - "signingAccountChild": { + ], + "algoTradesPlatform": [ + { + "type": "Algo Traders Platform", + "name": "Algo Traders Platform #1", + "config": "{\n \"codeName\": \"Algo-Traders-Platform-1\",\n \"host\": \"localhost\",\n \"webPort\": \"34248\",\n \"webSocketsPort\": \"18041\"\n}", + "project": "Governance", + "id": "0a06a54b-825b-4ff4-93cc-36465348ad26", + "savedPayload": { + "position": { + "x": 36860.334960672, + "y": 19343.495242563044 + }, + "targetPosition": { + "x": 37130.625621042724, + "y": 19213.330120827777 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "id": "abcc6b01-099e-42b4-84cc-24fb6daa7a15", + "savedPayload": { + "position": { + "x": 37130.625621042724, + "y": 19213.330120827777 + }, + "targetPosition": { + "x": 37229.70933962928, + "y": 18930.165121735266 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "mobileApps": { + "type": "Mobile Apps", + "name": "New Mobile Apps", + "config": "{}", + "project": "Governance", + "socialTradingMobileApps": [ + { "type": "Social Trading Mobile App", - "name": "Social Trading Mobile App # 1", + "name": "Social Trading Mobile App #1", "config": "{\n \"codeName\": \"Social-Trading-Mobile-App-1\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"15042\"\n}", "project": "Governance", - "id": "2d03d11f-b553-4b01-9291-9e13da15dd54", + "id": "42843263-b1f3-4e4e-885a-5d8b9d7b647a", "savedPayload": { "position": { - "x": 32586.62019611237, - "y": 18477.475300904072 + "x": 36689.12801888783, + "y": 19190.4953652058 }, "targetPosition": { - "x": 32884.97676472285, - "y": 18508.83383988437 + "x": 36959.41867925855, + "y": 19060.330243470533 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -17092,55 +17756,288 @@ "isRunning": false } } - }, - "id": "c84e9e64-7527-4dec-ac58-93696e19a756", - "savedPayload": { - "position": { - "x": 32884.97676472285, - "y": 18508.83383988437 - }, - "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } } - }, - { - "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0x3d3791843477eb85b7896ccbc55bfb41189c3fa67f5a098f40e2ddf9a2331ffa\",\n \"s\": \"0x09114da1c09e2d064fb07accf58310f2e13400ae564eb52e471d18d955ea9569\",\n \"signature\": \"0x3d3791843477eb85b7896ccbc55bfb41189c3fa67f5a098f40e2ddf9a2331ffa09114da1c09e2d064fb07accf58310f2e13400ae564eb52e471d18d955ea95691b\"\n }\n}", - "project": "Governance", - "signingAccountChild": { + ], + "id": "de1b0ac7-1bcf-4412-af43-4597443c0ec3", + "savedPayload": { + "position": { + "x": 36959.41867925855, + "y": 19060.330243470533 + }, + "targetPosition": { + "x": 37229.70933962928, + "y": 18930.165121735266 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "serverApps": { + "type": "Server Apps", + "name": "New Server Apps", + "config": "{}", + "project": "Governance", + "socialTradingServerApps": [ + { "type": "Social Trading Server App", - "name": "Social Trading Server App # 1", + "name": "Social Trading Server App #1", "config": "{\n \"codeName\": \"Social-Trading-Server-App-1\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"16042\"\n}", "project": "Governance", - "id": "c3d218ee-119f-4bd9-9349-8a194844ecd9", + "id": "0216b143-0e46-4da6-b2cb-e95556fc1bfd", "savedPayload": { "position": { - "x": 32635.20605874777, - "y": 18296.15039301919 + "x": 36663.37934144426, + "y": 18731.997684562168 }, "targetPosition": { - "x": 32909.26969604055, - "y": 18418.17138594193 + "x": 36946.54434053677, + "y": 18831.081403148717 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "id": "b0db0d19-5529-4b96-ab4f-ac7d54e1e6db", + "savedPayload": { + "position": { + "x": 36946.54434053677, + "y": 18831.081403148717 + }, + "targetPosition": { + "x": 37229.70933962928, + "y": 18930.165121735266 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "c57bd931-a0e1-4cf2-9270-b33f08839484", + "savedPayload": { + "position": { + "x": 37229.70933962928, + "y": 18930.165121735266 + }, + "targetPosition": { + "x": 37500, + "y": 18800 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "userBots": { + "type": "User Bots", + "name": "New User Bots", + "config": "{}", + "project": "Governance", + "socialTradingBots": { + "type": "Social Trading Bots", + "name": "New Social Trading Bots", + "config": "{}", + "project": "Governance", + "socialTradingBots": [ + { + "type": "Social Trading Bot", + "name": "Social Trading Bot #1", + "config": "{\n \"codeName\": \"Social-Trading-Bot-1\"\n}", + "project": "Governance", + "socialTradingBotsFollowing": { + "type": "Social Trading Bots Following", + "name": "New Social Trading Bots Following", + "config": "{}", + "project": "Governance", + "socialTradingBotsFollowed": [ + { + "type": "Social Trading Bot Followed", + "name": "", + "config": "{}", + "project": "Governance", + "id": "a9484759-a37e-4c5f-a11a-964bc88371ba", + "savedPayload": { + "position": { + "x": 36165.4101775664, + "y": 18811.89932962496 + }, + "targetPosition": { + "x": 36361.09640094984, + "y": 18584.507812681324 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Social Trading Bot Followed", + "name": "", + "config": "{}", + "project": "Governance", + "id": "a8bf7c62-5df7-475b-a43d-77c47cf1af5d", + "savedPayload": { + "position": { + "x": 36061.93526179549, + "y": 18606.926840757253 + }, + "targetPosition": { + "x": 36361.09640094984, + "y": 18584.507812681324 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "Social Trading Bot Followed", + "name": "Social Trading Bot #2", + "config": "{}", + "project": "Governance", + "id": "30d456e2-e263-4e12-a486-9f1aa5cc2bf1", + "savedPayload": { + "position": { + "x": 36133.704884006205, + "y": 18388.821589297888 + }, + "targetPosition": { + "x": 36361.09640094984, + "y": 18584.507812681324 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Trading Bot", + "name": "Social Trading Bot #2", + "id": "c27748af-db60-44fc-a095-530401057beb" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile", + "Governance", + "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + ], + [ + "New User Bots", + "User Bots", + "Governance", + "54ced611-b518-435f-a284-935666ef47db" + ], + [ + "New Social Trading Bots", + "Social Trading Bots", + "Governance", + "4809934c-d45d-4565-a686-5d96bd695b4f" + ], + [ + "Social Trading Bot #2", + "Social Trading Bot", + "Governance", + "c27748af-db60-44fc-a095-530401057beb" + ] + ] + } + } + ], + "id": "e42dfedc-6906-4833-8737-44d5f45ab82e", + "savedPayload": { + "position": { + "x": 36361.09640094984, + "y": 18584.507812681324 + }, + "targetPosition": { + "x": 36660.2575401042, + "y": 18562.088784605396 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "5167a23f-1e17-4cd5-85a7-3c7f2a3019ac", + "savedPayload": { + "position": { + "x": 36660.2575401042, + "y": 18562.088784605396 + }, + "targetPosition": { + "x": 36959.41867925855, + "y": 18539.669756529467 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -17149,15 +18046,237 @@ } } }, - "id": "75f17a55-bf33-4e69-b842-b424a6f517e8", + { + "type": "Social Trading Bot", + "name": "Social Trading Bot #2", + "config": "{\n \"codeName\": \"Social-Trading-Bot-2\"\n}", + "project": "Governance", + "id": "c27748af-db60-44fc-a095-530401057beb", + "savedPayload": { + "position": { + "x": 36790.42266183947, + "y": 18291.79812423467 + }, + "targetPosition": { + "x": 36959.41867925855, + "y": 18539.669756529467 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "id": "4809934c-d45d-4565-a686-5d96bd695b4f", + "savedPayload": { + "position": { + "x": 36959.41867925855, + "y": 18539.669756529467 + }, + "targetPosition": { + "x": 37229.70933962928, + "y": 18669.834878264734 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "54ced611-b518-435f-a284-935666ef47db", + "savedPayload": { + "position": { + "x": 37229.70933962928, + "y": 18669.834878264734 + }, + "targetPosition": { + "x": 37500, + "y": 18800 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "socialPersonas": { + "type": "Social Personas", + "name": "New Social Personas", + "config": "{}", + "project": "Governance", + "socialPersonas": [ + { + "type": "Social Persona", + "name": "Social Persona #1", + "config": "{\n \"codeName\": \"Social-Persona-1\"\n}", + "project": "Governance", + "socialPersonasFollowing": { + "type": "Social Personas Following", + "name": "New Social Personas Following", + "config": "{}", + "project": "Governance", + "socialPersonasFollowed": [ + { + "type": "Social Persona Followed", + "name": "Social Persona #2", + "config": "{}", + "project": "Governance", + "id": "45f1a092-8a89-45f8-b31c-c4c062a56a8a", + "savedPayload": { + "position": { + "x": 36738.468235414715, + "y": 17979.263950924287 + }, + "targetPosition": { + "x": 37025.14007715056, + "y": 18067.69050324756 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Persona", + "name": "Social Persona #2", + "id": "01c33294-124f-4d68-8619-8e1d1cca7e0a" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile", + "Governance", + "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + ], + [ + "New Social Personas", + "Social Personas", + "Governance", + "e453990c-57e2-4886-9dc1-060cd2750467" + ], + [ + "Social Persona #2", + "Social Persona", + "Governance", + "01c33294-124f-4d68-8619-8e1d1cca7e0a" + ] + ] + } + }, + { + "type": "Social Persona Followed", + "name": "Social Persona #2", + "config": "{}", + "project": "Governance", + "id": "2eb918aa-742f-49c8-bea2-4cdc2d9bd1c7", + "savedPayload": { + "position": { + "x": 36958.383796963666, + "y": 17775.212129593012 + }, + "targetPosition": { + "x": 37025.14007715056, + "y": 18067.69050324756 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Social Persona", + "name": "Social Persona #2", + "id": "01c33294-124f-4d68-8619-8e1d1cca7e0a" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile", + "Governance", + "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + ], + [ + "New Social Personas", + "Social Personas", + "Governance", + "e453990c-57e2-4886-9dc1-060cd2750467" + ], + [ + "Social Persona #2", + "Social Persona", + "Governance", + "01c33294-124f-4d68-8619-8e1d1cca7e0a" + ] + ] + } + } + ], + "id": "c0e85aee-8f7e-42bf-a2ea-5e3d9414c114", + "savedPayload": { + "position": { + "x": 37025.14007715056, + "y": 18067.69050324756 + }, + "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": { - "x": 32909.26969604055, - "y": 18418.17138594193 + "x": 37229.19189848183, + "y": 18287.606064796506 }, "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 + "x": 37433.24371981311, + "y": 18507.521626345453 }, "floatingObject": { "isPinned": false, @@ -17173,327 +18292,19 @@ } }, { - "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x0098b881f17a46a940d6dbb11121217c29330ea1a357ad72ed921448539ceeab\",\n \"s\": \"0x28c9f7cf445ab86caaa01f86d4456f4bdf0a81757dc0a0c80351d481b7df5ad3\",\n \"signature\": \"0x0098b881f17a46a940d6dbb11121217c29330ea1a357ad72ed921448539ceeab28c9f7cf445ab86caaa01f86d4456f4bdf0a81757dc0a0c80351d481b7df5ad31c\"\n }\n}", + "type": "Social Persona", + "name": "Social Persona #2", + "config": "{\n \"socialHandle\": \"\",\n \"bio\": \"\",\n \"codeName\": \"Social-Persona-2\"\n}", "project": "Governance", - "signingAccountChild": { - "type": "Algo Traders Platform", - "name": "Algo Traders Platform # 1", - "config": "{\n \"codeName\": \"Algo-Traders-Platform-1\"\n}", - "project": "Governance", - "id": "bcffb701-754d-4685-ad09-8bf3f09265d9", - "savedPayload": { - "position": { - "x": 32737.446438046896, - "y": 18138.71401504935 - }, - "targetPosition": { - "x": 32960.389885690114, - "y": 18339.45319695701 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "377ee3ed-49e4-415d-87b3-946024f0a1ef", + "id": "01c33294-124f-4d68-8619-8e1d1cca7e0a", "savedPayload": { "position": { - "x": 32960.389885690114, - "y": 18339.45319695701 + "x": 37521.670272136376, + "y": 18220.84978460961 }, "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - { - "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xfd5dfc5b7d84dac898c43880c6234c041142dccc5bf6b57e7eb671497e0cafcf\",\n \"s\": \"0x0bc0cc01159b307fa6d5fa46dbd3a1e71e4fbeca349969177014e1e9d204f9f3\",\n \"signature\": \"0xfd5dfc5b7d84dac898c43880c6234c041142dccc5bf6b57e7eb671497e0cafcf0bc0cc01159b307fa6d5fa46dbd3a1e71e4fbeca349969177014e1e9d204f9f31b\"\n }\n}", - "project": "Governance", - "signingAccountChild": { - "type": "P2P Network Node", - "name": "P2P Network Node # 1", - "config": "{\n \"codeName\": \"P2P-Network-Node-1\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"18042\",\n \"webPort\": \"31248\"\n}", - "project": "Governance", - "id": "bb0f0417-9dfb-47a3-941f-dcfa82fbaea1", - "savedPayload": { - "position": { - "x": 32883.333333333336, - "y": 18020.577136594 - }, - "targetPosition": { - "x": 33033.333333333336, - "y": 18280.384757729335 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "7c5f14f9-63c2-42fa-98ee-1d4a36590cf4", - "savedPayload": { - "position": { - "x": 33033.333333333336, - "y": 18280.384757729335 - }, - "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - { - "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0xa4b34d7c9e7644f4fddf7aa2d969eb7dac3b8dbcc36c559b99fa93bc5ea3c6d3\",\n \"s\": \"0x7a5087de3f5470cb173d73949c05c00438bc16138f43c7aebbe2b80d7d45122b\",\n \"signature\": \"0xa4b34d7c9e7644f4fddf7aa2d969eb7dac3b8dbcc36c559b99fa93bc5ea3c6d37a5087de3f5470cb173d73949c05c00438bc16138f43c7aebbe2b80d7d45122b1c\"\n }\n}", - "project": "Governance", - "signingAccountChild": { - "type": "P2P Network Node", - "name": "P2P Network Node # 2", - "config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"18043\",\n \"webPort\": \"31248\"\n}", - "project": "Governance", - "id": "76fa8a24-9ab4-4eaf-82f2-458ba557b204", - "savedPayload": { - "position": { - "x": 33058.58631884268, - "y": 17953.303818424385 - }, - "targetPosition": { - "x": 33120.95982608801, - "y": 18246.748098644526 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "48544424-5b62-417b-897d-9164b26fcd56", - "savedPayload": { - "position": { - "x": 33120.95982608801, - "y": 18246.748098644526 - }, - "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - { - "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x700e273467c374fda2062fbaf42fadfd74a0c3995498f75ffd1a66c7376e7c60\",\n \"s\": \"0x3531a0c135fcdd578b5069799b3fc246c9cf1cee325a258f6d2960d20f2a98e6\",\n \"signature\": \"0x700e273467c374fda2062fbaf42fadfd74a0c3995498f75ffd1a66c7376e7c603531a0c135fcdd578b5069799b3fc246c9cf1cee325a258f6d2960d20f2a98e61c\"\n }\n}", - "project": "Governance", - "signingAccountChild": { - "type": "P2P Network Node", - "name": "P2P Network Node # 3", - "config": "{\n \"codeName\": \"P2P-Network-Node-3\",\n \"host\": \"localhost\",\n \"webSocketsPort\": \"18044\",\n \"webPort\": \"31248\"\n}", - "project": "Governance", - "id": "297e57c2-3c1a-4170-b710-d2705804205b", - "savedPayload": { - "position": { - "x": 33246.05041129393, - "y": 17943.479241643705 - }, - "targetPosition": { - "x": 33214.69187231363, - "y": 18241.835810254186 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "b39e1c4d-4170-4134-ae85-fc9fa7f3eb47", - "savedPayload": { - "position": { - "x": 33214.69187231363, - "y": 18241.835810254186 - }, - "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - { - "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1b\",\n \"r\": \"0xa21640401c1e1ab44678fd6024654d6200025d75998a38d06a2dbb84d2b965b4\",\n \"s\": \"0x7c1308809675605bf120654214f7566a833158cc54471e8eefbee64e8031a5ce\",\n \"signature\": \"0xa21640401c1e1ab44678fd6024654d6200025d75998a38d06a2dbb84d2b965b47c1308809675605bf120654214f7566a833158cc54471e8eefbee64e8031a5ce1b\"\n }\n}", - "project": "Governance", - "signingAccountChild": { - "type": "Social Trading Desktop App", - "name": "Social Trading Desktop App # 2", - "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-2\",\n \"host\": \"localhost\",\n \"webPort\": \"33249\",\n \"webSocketsPort\": \"17043\"\n}", - "project": "Governance", - "id": "e6f2b6f6-5e40-42d2-92d8-fdd17680a1c7", - "savedPayload": { - "position": { - "x": 33427.37531917882, - "y": 17992.065104279107 - }, - "targetPosition": { - "x": 33305.35432625608, - "y": 18266.128741571887 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "530b3376-a820-4710-a7a0-bab877e4c4be", - "savedPayload": { - "position": { - "x": 33305.35432625608, - "y": 18266.128741571887 - }, - "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - { - "type": "Signing Account", - "name": "New Signing Account", - "config": "{\n \"signature\": {\n \"message\": \"Luis-Fernando-Molina\",\n \"messageHash\": \"0x443abf3389e332a62d21b84dd12e271cb428d334195d3aeb986ca85ee53cccb9\",\n \"v\": \"0x1c\",\n \"r\": \"0x4e4870f2f0061fa5a6e5fca672f1543420e140944a65a294ea25f1c2ef1c5dbe\",\n \"s\": \"0x58ba993a911c9092967b51da47be22ad85062d5ce49c6b2de4f6a593c67850c6\",\n \"signature\": \"0x4e4870f2f0061fa5a6e5fca672f1543420e140944a65a294ea25f1c2ef1c5dbe58ba993a911c9092967b51da47be22ad85062d5ce49c6b2de4f6a593c67850c61c\"\n }\n}", - "project": "Governance", - "signingAccountChild": { - "type": "Social Trading Desktop App", - "name": "Social Trading Desktop App # 3", - "config": "{\n \"codeName\": \"Social-Trading-Desktop-App-3\",\n \"host\": \"localhost\",\n \"webPort\": \"33250\",\n \"webSocketsPort\": \"17044\"\n}", - "project": "Governance", - "id": "00ca860e-bb19-42b4-8bce-b67f9a1f9af7", - "savedPayload": { - "position": { - "x": 33584.81169714865, - "y": 18094.30548357823 - }, - "targetPosition": { - "x": 33384.072515240994, - "y": 18317.24893122145 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 2, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - "id": "72de2a17-d6f1-491b-847b-4e110a122cf6", - "savedPayload": { - "position": { - "x": 33384.072515240994, - "y": 18317.24893122145 - }, - "targetPosition": { - "x": 33183.333333333336, - "y": 18540.192378864667 + "x": 37433.24371981311, + "y": 18507.521626345453 }, "floatingObject": { "isPinned": false, @@ -17509,14 +18320,100 @@ } } ], - "id": "ecf6aa0a-bf05-48e4-a7ee-7a714fbdbce2", + "id": "e453990c-57e2-4886-9dc1-060cd2750467", "savedPayload": { "position": { - "x": 33183.333333333336, - "y": 18540.192378864667 + "x": 37433.24371981311, + "y": 18507.521626345453 }, "targetPosition": { - "x": 33333.333333333336, + "x": 37500, + "y": 18800 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "p2pNetworkNodes": { + "type": "P2P Network Nodes", + "name": "New P2P Network Nodes", + "config": "{}", + "project": "Governance", + "p2pNetworkNodes": [ + { + "type": "P2P Network Node", + "name": "P2P Network Node #1", + "config": "{\n \"codeName\": \"P2P-Network-Node-1\",\n \"host\": \"localhost\",\n \"webPort\": \"31248\",\n \"webSocketsPort\": \"18042\"\n}", + "project": "Governance", + "id": "56cc0c90-4a58-4e25-a63f-4f9a6921d0f3", + "savedPayload": { + "position": { + "x": 37731.75962041048, + "y": 18268.801307392052 + }, + "targetPosition": { + "x": 37687.04694055762, + "y": 18565.45055525959 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "P2P Network Node", + "name": "P2P Network Node #2", + "config": "{\n \"codeName\": \"P2P-Network-Node-2\",\n \"host\": \"localhost\",\n \"webPort\": \"31248\",\n \"webSocketsPort\": \"18042\"\n}", + "project": "Governance", + "id": "352cd906-c36c-48c7-8f01-728ff78b78e9", + "savedPayload": { + "position": { + "x": 37966.30906515088, + "y": 18455.84824794967 + }, + "targetPosition": { + "x": 37687.04694055762, + "y": 18565.45055525959 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "id": "da779e56-cb36-4825-bcd5-06692175a982", + "savedPayload": { + "position": { + "x": 37687.04694055762, + "y": 18565.45055525959 + }, + "targetPosition": { + "x": 37500, "y": 18800 }, "floatingObject": { @@ -17535,11 +18432,11 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 33333.333333333336, + "x": 37500, "y": 18800 }, "targetPosition": { - "x": 33333.333333333336, + "x": 37500, "y": 18800 }, "floatingObject": { diff --git a/Projects/Governance/Schemas/App-Schema/algo-traders-platform.json b/Projects/Governance/Schemas/App-Schema/algo-traders-platform.json index a0879c983..c9e4a1834 100644 --- a/Projects/Governance/Schemas/App-Schema/algo-traders-platform.json +++ b/Projects/Governance/Schemas/App-Schema/algo-traders-platform.json @@ -25,13 +25,13 @@ "config": true }, "initialValues": { - "config": "{}" + "config": "{ \n\"codeName\": \"localhost\", \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}" }, "addLeftIcons": true, "level": 1, "attachingRules": { - "compatibleTypes": "->Signing Account->" + "compatibleTypes": "->Desktop Apps->" }, "childrenNodesProperties": [], - "propertyNameAtParent": "signingAccountChild" + "propertyNameAtParent": "algoTradesPlatform" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/desktop-apps.json b/Projects/Governance/Schemas/App-Schema/desktop-apps.json new file mode 100644 index 000000000..de3f09cc6 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/desktop-apps.json @@ -0,0 +1,64 @@ +{ + "type": "Desktop Apps", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Social Trading Desktop App", + "relatedUiObject": "Social Trading Desktop App", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Algo Traders Platform", + "relatedUiObject": "Algo Traders Platform", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Apps->" + }, + "propertyNameAtParent": "desktopApps", + "childrenNodesProperties": [ + { + "name": "socialTradingDesktopApps", + "type": "array", + "childType": "Social Trading Desktop App", + "autoAdd": false + }, + { + "name": "algoTradesPlatform", + "type": "array", + "childType": "Algo Traders Platform", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/mobile-apps.json b/Projects/Governance/Schemas/App-Schema/mobile-apps.json new file mode 100644 index 000000000..9ae21fbd1 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/mobile-apps.json @@ -0,0 +1,50 @@ +{ + "type": "Mobile Apps", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Social Trading Mobile App", + "relatedUiObject": "Social Trading Mobile App", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Apps->" + }, + "propertyNameAtParent": "mobileApps", + "childrenNodesProperties": [ + { + "name": "socialTradingMobileApps", + "type": "array", + "childType": "Social Trading Mobile App", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/p2p-network-node.json b/Projects/Governance/Schemas/App-Schema/p2p-network-node.json index 17f1a4838..71fee78ba 100644 --- a/Projects/Governance/Schemas/App-Schema/p2p-network-node.json +++ b/Projects/Governance/Schemas/App-Schema/p2p-network-node.json @@ -30,8 +30,8 @@ "addLeftIcons": true, "level": 1, "attachingRules": { - "compatibleTypes": "->Signing Account->" + "compatibleTypes": "->P2P Network Nodes->" }, "childrenNodesProperties": [], - "propertyNameAtParent": "signingAccountChild" + "propertyNameAtParent": "p2pNetworkNodes" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/p2p-network-nodes.json b/Projects/Governance/Schemas/App-Schema/p2p-network-nodes.json new file mode 100644 index 000000000..57e169abb --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/p2p-network-nodes.json @@ -0,0 +1,50 @@ +{ + "type": "P2P Network Nodes", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add P2P Network Node", + "relatedUiObject": "P2P Network Node", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Profile->" + }, + "propertyNameAtParent": "p2pNetworkNodes", + "childrenNodesProperties": [ + { + "name": "p2pNetworkNodes", + "type": "array", + "childType": "P2P Network Node", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/profile-constructor.json b/Projects/Governance/Schemas/App-Schema/profile-constructor.json index cf8471fe1..559541991 100644 --- a/Projects/Governance/Schemas/App-Schema/profile-constructor.json +++ b/Projects/Governance/Schemas/App-Schema/profile-constructor.json @@ -20,53 +20,9 @@ "relatedUiObjectProject": "Governance" }, { - "action": "Add Social Trading Desktop App", + "action": "Install Secrets", "actionProject": "Governance", - "label": "Add Social Trading Desktop App", - "askConfirmation": true, - "confirmationLabel": "Confirm to Proceed", - "workDoneLabel": "Done", - "relatedUiObject": "Profile Constructor", - "actionFunction": "payload.executeAction", - "relatedUiObjectProject": "Governance" - }, - { - "action": "Add Social Trading Server App", - "actionProject": "Governance", - "label": "Add Social Trading Server App", - "askConfirmation": true, - "confirmationLabel": "Confirm to Proceed", - "workDoneLabel": "Done", - "relatedUiObject": "Profile Constructor", - "actionFunction": "payload.executeAction", - "relatedUiObjectProject": "Governance" - }, - { - "action": "Add Social Trading Mobile App", - "actionProject": "Governance", - "label": "Add Social Trading Mobile App", - "askConfirmation": true, - "confirmationLabel": "Confirm to Proceed", - "workDoneLabel": "Done", - "relatedUiObject": "Profile Constructor", - "actionFunction": "payload.executeAction", - "relatedUiObjectProject": "Governance" - }, - { - "action": "Add Algo Traders Platform", - "actionProject": "Governance", - "label": "Add Algo Traders Platform", - "askConfirmation": true, - "confirmationLabel": "Confirm to Proceed", - "workDoneLabel": "Done", - "relatedUiObject": "Profile Constructor", - "actionFunction": "payload.executeAction", - "relatedUiObjectProject": "Governance" - }, - { - "action": "Add P2P Network Node", - "actionProject": "Governance", - "label": "Add P2P Network Node", + "label": "Install Secrets", "askConfirmation": true, "confirmationLabel": "Confirm to Proceed", "workDoneLabel": "Done", diff --git a/Projects/Governance/Schemas/App-Schema/server-apps.json b/Projects/Governance/Schemas/App-Schema/server-apps.json new file mode 100644 index 000000000..97890a68f --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/server-apps.json @@ -0,0 +1,50 @@ +{ + "type": "Server Apps", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Social Trading Server App", + "relatedUiObject": "Social Trading Server App", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Apps->" + }, + "propertyNameAtParent": "serverApps", + "childrenNodesProperties": [ + { + "name": "socialTradingServerApps", + "type": "array", + "childType": "Social Trading Server App", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/signing-account.json b/Projects/Governance/Schemas/App-Schema/signing-account.json index 60e9db323..07b8b0526 100644 --- a/Projects/Governance/Schemas/App-Schema/signing-account.json +++ b/Projects/Governance/Schemas/App-Schema/signing-account.json @@ -25,6 +25,9 @@ "attachingRules": { "compatibleTypes": "->Signing Accounts->" }, + "referencingRules": { + "compatibleTypes": "->P2P Network Node->Algo Traders Platform->Social Trading Mobile App->Social Trading Desktop App->Social Trading Server App->" + }, "editors": { "config": true }, @@ -32,36 +35,8 @@ "config": "{}" }, "propertyNameAtParent": "signingAccounts", - "childrenNodesProperties": [ - { - "name": "signingAccountChild", - "type": "node", - "childType": "P2P Network Node", - "autoAdd": false - }, - { - "name": "signingAccountChild", - "type": "node", - "childType": "Algo Traders Platform", - "autoAdd": false - }, - { - "name": "signingAccountChild", - "type": "node", - "childType": "Social Trading Mobile App", - "autoAdd": false - }, - { - "name": "signingAccountChild", - "type": "node", - "childType": "Social Trading Desktop App", - "autoAdd": false - }, - { - "name": "signingAccountChild", - "type": "node", - "childType": "Social Trading Server App", - "autoAdd": false - } + "childrenNodesProperties": [], + "title": [ + "Use Reference Parent" ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-persona-followed.json b/Projects/Governance/Schemas/App-Schema/social-persona-followed.json new file mode 100644 index 000000000..d6986fd09 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/social-persona-followed.json @@ -0,0 +1,42 @@ +{ + "type": "Social Persona Followed", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Social Personas Following->" + }, + "referencingRules": { + "compatibleTypes": "->Social Persona->" + }, + "propertyNameAtParent": "socialPersonasFollowed", + "childrenNodesProperties": [ + ], + "title": [ + "Use Reference Parent" + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-persona.json b/Projects/Governance/Schemas/App-Schema/social-persona.json new file mode 100644 index 000000000..4da7d7e81 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/social-persona.json @@ -0,0 +1,52 @@ +{ + "type": "Social Persona", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "tradingBotsFollowing", + "actionFunction": "payload.executeAction", + "label": "Add Social Personas Following", + "relatedUiObject": "Social Personas Following", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{\"socialHandle\": \"\",\"bio\": \"\"}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Social Personas->" + }, + "propertyNameAtParent": "socialPersonas", + "childrenNodesProperties": [ + { + "name": "socialPersonasFollowing", + "type": "node", + "childType": "Social Personas Following", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-personas-following.json b/Projects/Governance/Schemas/App-Schema/social-personas-following.json new file mode 100644 index 000000000..23f435b7a --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/social-personas-following.json @@ -0,0 +1,50 @@ +{ + "type": "Social Personas Following", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Social Persona Followed", + "relatedUiObject": "Social Persona Followed", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Social Persona->" + }, + "propertyNameAtParent": "socialPersonasFollowing", + "childrenNodesProperties": [ + { + "name": "socialPersonasFollowed", + "type": "array", + "childType": "Social Persona Followed", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-personas.json b/Projects/Governance/Schemas/App-Schema/social-personas.json new file mode 100644 index 000000000..31ac34d3f --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/social-personas.json @@ -0,0 +1,50 @@ +{ + "type": "Social Personas", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Social Persona", + "relatedUiObject": "Social Persona", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Profile->" + }, + "propertyNameAtParent": "userBots", + "childrenNodesProperties": [ + { + "name": "socialPersonas", + "type": "array", + "childType": "Social Persona", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-bot-followed.json b/Projects/Governance/Schemas/App-Schema/social-trading-bot-followed.json new file mode 100644 index 000000000..b0d56bc0a --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/social-trading-bot-followed.json @@ -0,0 +1,42 @@ +{ + "type": "Social Trading Bot Followed", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Social Trading Bots Following->" + }, + "referencingRules": { + "compatibleTypes": "->Social Trading Bot->" + }, + "propertyNameAtParent": "socialTradingBotsFollowed", + "childrenNodesProperties": [ + ], + "title": [ + "Use Reference Parent" + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-bot.json b/Projects/Governance/Schemas/App-Schema/social-trading-bot.json new file mode 100644 index 000000000..e2b8218c6 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/social-trading-bot.json @@ -0,0 +1,52 @@ +{ + "type": "Social Trading Bot", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "socialTradingBotsFollowing", + "actionFunction": "payload.executeAction", + "label": "Add Social Trading Bots Following", + "relatedUiObject": "Social Trading Bots Following", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Social Trading Bots->" + }, + "propertyNameAtParent": "socialTradingBots", + "childrenNodesProperties": [ + { + "name": "socialTradingBotsFollowing", + "type": "node", + "childType": "Social Trading Bots Following", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-bots-following.json b/Projects/Governance/Schemas/App-Schema/social-trading-bots-following.json new file mode 100644 index 000000000..a1ed3798e --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/social-trading-bots-following.json @@ -0,0 +1,50 @@ +{ + "type": "Social Trading Bots Following", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Social Trading Bot Followed", + "relatedUiObject": "Social Trading Bot Followed", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->Social Trading Bot->" + }, + "propertyNameAtParent": "socialTradingBotsFollowing", + "childrenNodesProperties": [ + { + "name": "socialTradingBotsFollowed", + "type": "array", + "childType": "Social Trading Bot Followed", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-bots.json b/Projects/Governance/Schemas/App-Schema/social-trading-bots.json new file mode 100644 index 000000000..ae7104918 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/social-trading-bots.json @@ -0,0 +1,50 @@ +{ + "type": "Social Trading Bots", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "actionFunction": "payload.executeAction", + "label": "Add Social Trading Bot", + "relatedUiObject": "Social Trading Bot", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Bots->" + }, + "propertyNameAtParent": "socialTradingBots", + "childrenNodesProperties": [ + { + "name": "socialTradingBots", + "type": "array", + "childType": "Social Trading Bot", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-desktop-app.json b/Projects/Governance/Schemas/App-Schema/social-trading-desktop-app.json index 32a0a255f..89f6174d3 100644 --- a/Projects/Governance/Schemas/App-Schema/social-trading-desktop-app.json +++ b/Projects/Governance/Schemas/App-Schema/social-trading-desktop-app.json @@ -25,13 +25,13 @@ "config": true }, "initialValues": { - "config": "{ \n\"codeName\": \"localhost\", \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"17042\"\n}" + "config": "{ \n\"codeName\": \"localhost\", \n\"host\": \"localhost\", \n\"webPort\": \"33248\", \n\"webSocketsPort\": \"17042\"\n}" }, "addLeftIcons": true, "level": 1, "attachingRules": { - "compatibleTypes": "->Signing Account->" + "compatibleTypes": "->Desktop Apps->" }, "childrenNodesProperties": [], - "propertyNameAtParent": "signingAccountChild" + "propertyNameAtParent": "socialTradingDesktopApps" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-mobile-app.json b/Projects/Governance/Schemas/App-Schema/social-trading-mobile-app.json index 97202f837..364395b79 100644 --- a/Projects/Governance/Schemas/App-Schema/social-trading-mobile-app.json +++ b/Projects/Governance/Schemas/App-Schema/social-trading-mobile-app.json @@ -30,8 +30,8 @@ "addLeftIcons": true, "level": 1, "attachingRules": { - "compatibleTypes": "->Signing Account->" + "compatibleTypes": "->Mobile Apps->" }, "childrenNodesProperties": [], - "propertyNameAtParent": "signingAccountChild" + "propertyNameAtParent": "socialTradingMobileApps" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/social-trading-server-app.json b/Projects/Governance/Schemas/App-Schema/social-trading-server-app.json index 45d284b28..35e5cd007 100644 --- a/Projects/Governance/Schemas/App-Schema/social-trading-server-app.json +++ b/Projects/Governance/Schemas/App-Schema/social-trading-server-app.json @@ -30,8 +30,8 @@ "addLeftIcons": true, "level": 1, "attachingRules": { - "compatibleTypes": "->Signing Account->" + "compatibleTypes": "->Server Apps->" }, "childrenNodesProperties": [], - "propertyNameAtParent": "signingAccountChild" + "propertyNameAtParent": "socialTradingServerApps" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/user-apps.json b/Projects/Governance/Schemas/App-Schema/user-apps.json new file mode 100644 index 000000000..3d2e45bd1 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/user-apps.json @@ -0,0 +1,84 @@ +{ + "type": "User Apps", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "desktopApps", + "actionFunction": "payload.executeAction", + "label": "Add Desktop Apps", + "relatedUiObject": "Desktop Apps", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "mobileApps", + "actionFunction": "payload.executeAction", + "label": "Add Mobile Apps", + "relatedUiObject": "Mobile Apps", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "serverApps", + "actionFunction": "payload.executeAction", + "label": "Add Server Apps", + "relatedUiObject": "Server Apps", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Profile->" + }, + "propertyNameAtParent": "userApps", + "childrenNodesProperties": [ + { + "name": "desktopApps", + "type": "node", + "childType": "Desktop Apps", + "autoAdd": false + }, + { + "name": "mobileApps", + "type": "node", + "childType": "Mobile Apps", + "autoAdd": false + }, + { + "name": "serverApps", + "type": "node", + "childType": "Server Apps", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/user-bots.json b/Projects/Governance/Schemas/App-Schema/user-bots.json new file mode 100644 index 000000000..cd691f676 --- /dev/null +++ b/Projects/Governance/Schemas/App-Schema/user-bots.json @@ -0,0 +1,52 @@ +{ + "type": "User Bots", + "menuItems": [ + { + "action": "Configure", + "actionFunction": "uiObject.configEditor.activate", + "label": "Configure", + "iconPathOn": "configuration", + "iconPathOff": "configuration" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "socialTradingBots", + "actionFunction": "payload.executeAction", + "label": "Add Social Trading Bots", + "relatedUiObject": "Social Trading Bots", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Delete UI Object", + "actionProject": "Visual-Scripting", + "askConfirmation": true, + "confirmationLabel": "Confirm to Delete", + "label": "Delete", + "iconPathOn": "delete-entity", + "iconPathOff": "delete-entity", + "actionFunction": "payload.executeAction" + } + ], + "editors": { + "config": true + }, + "initialValues": { + "config": "{\"socialHandle\": \"\",\"bio\": \"\"}" + }, + "addLeftIcons": true, + "level": 2, + "attachingRules": { + "compatibleTypes": "->User Profile->" + }, + "propertyNameAtParent": "userBots", + "childrenNodesProperties": [ + { + "name": "socialTradingBots", + "type": "node", + "childType": "Social Trading Bots", + "autoAdd": false + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/user-profile.json b/Projects/Governance/Schemas/App-Schema/user-profile.json index adec94dd9..e35ae4b87 100644 --- a/Projects/Governance/Schemas/App-Schema/user-profile.json +++ b/Projects/Governance/Schemas/App-Schema/user-profile.json @@ -28,6 +28,46 @@ "relatedUiObject": "Tokens Mined", "relatedUiObjectProject": "Governance" }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "userApps", + "actionFunction": "payload.executeAction", + "label": "Add User Apps", + "relatedUiObject": "User Apps", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "userBots", + "actionFunction": "payload.executeAction", + "label": "Add User Bots", + "relatedUiObject": "User Bots", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "socialPersonas", + "actionFunction": "payload.executeAction", + "label": "Add Social Personas", + "relatedUiObject": "Social Personas", + "relatedUiObjectProject": "Governance" + }, + { + "action": "Add UI Object", + "actionProject": "Visual-Scripting", + "disableIfPropertyIsDefined": true, + "propertyToCheckFor": "p2pNetworkNodes", + "actionFunction": "payload.executeAction", + "label": "Add P2P Network Nodes", + "relatedUiObject": "P2P Network Nodes", + "relatedUiObjectProject": "Governance" + }, { "action": "Install as Plugin", "actionProject": "Community-Plugins", @@ -77,6 +117,30 @@ "type": "node", "childType": "Signing Accounts", "autoAdd": false + }, + { + "name": "userApps", + "type": "node", + "childType": "User Apps", + "autoAdd": false + }, + { + "name": "userBots", + "type": "node", + "childType": "User Bots", + "autoAdd": false + }, + { + "name": "socialPersonas", + "type": "node", + "childType": "Social Personas", + "autoAdd": false + }, + { + "name": "p2pNetworkNodes", + "type": "node", + "childType": "P2P Network Nodes", + "autoAdd": false } ], "inMapMode": { diff --git a/Projects/Governance/UI/Function-Libraries/ActionSwitch.js b/Projects/Governance/UI/Function-Libraries/ActionSwitch.js index 50eabdc4d..5e62addc8 100644 --- a/Projects/Governance/UI/Function-Libraries/ActionSwitch.js +++ b/Projects/Governance/UI/Function-Libraries/ActionSwitch.js @@ -38,29 +38,9 @@ function newGovernanceActionSwitch() { UI.projects.governance.functionLibraries.profileConstructor.buildProfile(action.node, action.rootNodes) break } - case 'Add Social Trading Desktop App': + case 'Install Secrets': { - UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'Social Trading Desktop App') - break - } - case 'Add Social Trading Server App': - { - UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'Social Trading Server App') - break - } - case 'Add Social Trading Mobile App': - { - UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'Social Trading Mobile App') - break - } - case 'Add Algo Traders Platform': - { - UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'Algo Traders Platform') - break - } - case 'Add P2P Network Node': - { - UI.projects.governance.functionLibraries.profileConstructor.addSigningAccount(action.node, action.rootNodes, 'P2P Network Node') + UI.projects.governance.functionLibraries.profileConstructor.installSecrets(action.node, action.rootNodes) break } case 'Add Missing Plugin User Profiles': @@ -69,9 +49,9 @@ function newGovernanceActionSwitch() { } break case 'Add Specified User Profile': - { - UI.projects.governance.functionLibraries.pluginsFunctions.addSpecifiedUserProfile(action.node, action.rootNodes) - } + { + UI.projects.governance.functionLibraries.pluginsFunctions.addSpecifiedUserProfile(action.node, action.rootNodes) + } break case 'Add Missing Plugin Pools': { diff --git a/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js b/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js index f0bf9569b..14d43bf1a 100644 --- a/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js +++ b/Projects/Governance/UI/Function-Libraries/ProfileConstructor.js @@ -1,7 +1,7 @@ function newGovernanceFunctionLibraryProfileConstructor() { let thisObject = { buildProfile: buildProfile, - addSigningAccount: addSigningAccount + installSecrets: installSecrets } return thisObject @@ -213,6 +213,10 @@ function newGovernanceFunctionLibraryProfileConstructor() { */ userProfile.payload.uiObject.menu.internalClick('Install as Plugin') userProfile.payload.uiObject.menu.internalClick('Install as Plugin') + /* + Delete the mnemonic from the Profile Constructor config. + */ + node.config = "{}" /* TODO: Let's create a nice basic profile to start with liquidity and community */ @@ -236,25 +240,28 @@ function newGovernanceFunctionLibraryProfileConstructor() { } } - function addSigningAccount( + function installSecrets( node, - rootNodes, - targetNodeType + rootNodes ) { - let githubUsername = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(node.payload, 'githubUsername') - let mnemonic = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(node.payload, 'mnemonic') - let signingAccounts + let secretsFile = { + secrets: [] + } + let userProfile = node.payload.referenceParent + /* + Get Message to Sign. + */ + let userProfileHandle = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(userProfile.payload, 'codeName') - if (githubUsername === undefined || githubUsername === "") { + if (userProfileHandle === undefined || userProfileHandle === "") { node.payload.uiObject.setErrorMessage( - "githubUsername config property missing.", + "User Profile codeName config property missing.", UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR ) return } - /* - Some validations first... + Checking the reference to the User Profile... */ if (node.payload.referenceParent === undefined) { node.payload.uiObject.setErrorMessage( @@ -263,90 +270,59 @@ function newGovernanceFunctionLibraryProfileConstructor() { ) return } + /* + Delete Signing Accounts with all its children, it it exists. + */ + if (userProfile.signingAccounts !== undefined) { + let rootNodes = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes + UI.projects.visualScripting.functionLibraries.nodeDeleter.deleteUIObject(userProfile.signingAccounts, rootNodes) + } + /* + Create Signing Accounts. + */ + let signingAccounts = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject( + userProfile, + 'Signing Accounts', + UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes + ) - if (node.payload.referenceParent.signingAccounts === undefined) { - signingAccounts = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject( - node.payload.referenceParent, - 'Signing Accounts', - UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes - ) - } else { - signingAccounts = node.payload.referenceParent.signingAccounts + let algoTradersPlatform = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile.userApps, 'Algo Traders Platform') + let socialTradingDesktopApp = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile.userApps, 'Social Trading Desktop App') + let socialTradingMobileApp = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile.userApps, 'Social Trading Mobile App') + let socialTradingServerApp = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile.userApps, 'Social Trading Server App') + let socialTradingBots = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile.userBots, 'Social Trading Bot') + let socialPersonas = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile.socialPersonas, 'Social Persona') + let p2pNetworkNodes = UI.projects.visualScripting.utilities.branches.nodeBranchToArray(userProfile.p2pNetworkNodes, 'P2P Network Node') + + addSigningAccounts(algoTradersPlatform, 'Algo Traders Platform') + addSigningAccounts(socialTradingDesktopApp, 'Social Trading Desktop App') + addSigningAccounts(socialTradingMobileApp, 'Social Trading Mobile App') + addSigningAccounts(socialTradingServerApp, 'Social Trading Server App') + addSigningAccounts(socialTradingBots, 'Social Trading Bot') + addSigningAccounts(socialPersonas, 'Social Persona') + addSigningAccounts(p2pNetworkNodes, 'P2P Network Node') + + function addSigningAccounts(nodeArray, targetNodeType) { + for (let i = 0; i < nodeArray.length; i++) { + let currentNode = nodeArray[i] + addSigningAccount(currentNode, targetNodeType, i + 1) + } } - createWallet() - - function createWallet() { - let params - /* - If the user provides a mnemonic then we will get the private key and address from it, - otherwise, we will create a new private key and address. - */ - if (mnemonic === undefined || mnemonic === "") { - params = { - method: 'createWalletAccount', - entropy: node.id + (new Date()).valueOf() - } - } else { - params = { - method: 'mnemonicToPrivateKey', - mnemonic: mnemonic - } + function addSigningAccount( + targetNode, + targetNodeType, + targetNodeTypeCount + ) { + let params = { + method: 'createWalletAccount', + entropy: node.id + (new Date()).valueOf() } let url = 'WEB3' // We will access the default Client WEB3 endpoint. httpRequest(JSON.stringify(params), url, onResponse) - function onResponse(err, data) { - /* Lets check the result of the call through the http interface */ - if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { - node.payload.uiObject.setErrorMessage( - 'Call via HTTP Interface failed.', - UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) - return - } - - let response = JSON.parse(data) - - /* Lets check the result of the method call */ - if (response.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { - - if (mnemonic === undefined || mnemonic === "") { - node.payload.uiObject.setErrorMessage( - 'Call to WEB3 Server failed. ' + response.error, - UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) - console.log('Call to WEB3 Server failed. ' + response.error) - return - } else { - node.payload.uiObject.setErrorMessage( - 'Call to WEB3 Server failed. Most likely the Mnemonic provided is not correct or you need to run node setup because a dependency is missing. ' + response.error, - UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR - ) - console.log('Call to WEB3 Server failed. Most likely the Mnemonic provided is not correct or you need to run node setup because a dependency is missing. ' + response.error) - return - } - } - - signUserProfileData(response.address, response.privateKey) - } - } - - function signUserProfileData(address, privateKey) { - - let request = { - url: 'WEB3', - params: { - method: "signData", - privateKey: privateKey, - data: githubUsername - } - } - - httpRequest(JSON.stringify(request.params), request.url, onResponse) - function onResponse(err, data) { /* Lets check the result of the call through the http interface */ if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { @@ -368,73 +344,106 @@ function newGovernanceFunctionLibraryProfileConstructor() { console.log('Call to WEB3 Server failed. ' + response.error) return } - - createSigningAccount(response.signature) + signSigningAccountData(response.privateKey) } - function createSigningAccount(signature) { + function signSigningAccountData(privateKey) { - let signingAccount = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject( - signingAccounts, - 'Signing Account', - UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes - ) - - let signingAccountChild = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject( - signingAccount, - targetNodeType, - UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes - ) - /* - Let's get a cool name for this node. - */ - let targetNodeTypeCount = 0 - for (let i = 0; i < signingAccounts.signingAccounts.length; i++) { - let singningAccount = signingAccounts.signingAccounts[i] - if (singningAccount.signingAccountChild.type === targetNodeType) { - targetNodeTypeCount++ + let request = { + url: 'WEB3', + params: { + method: "signData", + privateKey: privateKey, + data: userProfileHandle } } - signingAccountChild.name = targetNodeType +" # " + targetNodeTypeCount - let codeName = targetNodeType.replaceAll(' ', '-') + "-" + targetNodeTypeCount - /* - We store at the User Profile the Signed githubUsername - */ - UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(signingAccountChild.payload, 'codeName', codeName) - UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'signature', signature) - let secrets = UI.projects.visualScripting.utilities.nodeConfig.loadConfigProperty(node.payload, 'secrets', signingAccount.name) - if (secrets === undefined) { - secrets = [] + httpRequest(JSON.stringify(request.params), request.url, onResponse) + + function onResponse(err, data) { + /* Lets check the result of the call through the http interface */ + if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { + node.payload.uiObject.setErrorMessage( + 'Call via HTTP Interface failed.', + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + return + } + + let response = JSON.parse(data) + + /* Lets check the result of the method call */ + if (response.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) { + node.payload.uiObject.setErrorMessage( + 'Call to WEB3 Server failed. ' + response.error, + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + console.log('Call to WEB3 Server failed. ' + response.error) + return + } + + createSigningAccount(response.signature) } - let secret = { - signingAccountChildId: signingAccountChild.id, - signingAccountChildName: signingAccountChild.name, - signingAccountChildType: targetNodeType, - signingAccountChildCodeName: codeName, - signingAccountNodeId: signingAccount.id, - privateKey: privateKey, - userProfileHandle: githubUsername, - userProfileId: node.payload.referenceParent.id - } + function createSigningAccount(signature) { - secrets.push(secret) - - UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'secrets', secrets) - /* - Show nice message. - */ - if (mnemonic === undefined || mnemonic === "") { - node.payload.uiObject.setInfoMessage( - "Signing Account has been successfully created.", - UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR - ) - } else { - node.payload.uiObject.setInfoMessage( - "Mnemonic successfully imported. Signing Account has been successfully created.", - UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR + let signingAccount = UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject( + signingAccounts, + 'Signing Account', + UI.projects.foundations.spaces.designSpace.workspace.workspaceNode.rootNodes ) + + signingAccount.payload.floatingObject.angleToParent = ANGLE_TO_PARENT.RANGE_180 + + UI.projects.visualScripting.functionLibraries.attachDetach.referenceAttachNode(signingAccount, targetNode) + /* + Let's get a cool name for this node. + */ + targetNode.name = targetNodeType + " #" + targetNodeTypeCount + let codeName = targetNodeType.replaceAll(' ', '-') + "-" + targetNodeTypeCount + /* + We store at the User Profile the Signed userProfileHandle + */ + UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(targetNode.payload, 'codeName', codeName) + UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'codeName', codeName) + UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(signingAccount.payload, 'signature', signature) + + let secrets = secretsFile.secrets + + let secret = { + nodeId: targetNode.id, + nodeName: targetNode.name, + nodeType: targetNodeType, + nodeCodeName: codeName, + signingAccountNodeId: signingAccount.id, + privateKey: privateKey, + userProfileHandle: userProfileHandle, + userProfileId: userProfile.id + } + + secrets.push(secret) + /* + Save Secrets File + */ + httpRequest(JSON.stringify(secretsFile, undefined, 4), 'Secrets/Save-Secrets-File', onResponse) + function onResponse(err, data) { + /* Lets check the result of the call through the http interface */ + data = JSON.parse(data) + if (err.result != GLOBAL.DEFAULT_OK_RESPONSE.result || data.result != GLOBAL.DEFAULT_OK_RESPONSE.result) { + node.payload.uiObject.setErrorMessage( + "Secrets file could not be created.", + UI.projects.governance.globals.designer.SET_ERROR_COUNTER_FACTOR + ) + } else { + /* + Show nice message. + */ + node.payload.uiObject.setInfoMessage( + "Secrets file have been sucessfully created.", + UI.projects.governance.globals.designer.SET_INFO_COUNTER_FACTOR + ) + } + } } } } diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEngine.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEngine.js index b82a4c8af..0d4d2c691 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEngine.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningEngine.js @@ -111,7 +111,7 @@ exports.newMachineLearningBotModulesLearningEngine = function (processIndex) { destinationNode.value = originNode.value /* Now we go down through all the children of the origin node, assuming the destination node has the same children structure*/ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(originNode.project + '-' + originNode.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(originNode.project + '-' + originNode.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { @@ -150,7 +150,7 @@ exports.newMachineLearningBotModulesLearningEngine = function (processIndex) { nodesMap.set(node.id, node) /* Now we go down through all this node children */ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(node.project + '-' + node.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { @@ -193,7 +193,7 @@ exports.newMachineLearningBotModulesLearningEngine = function (processIndex) { } /* Now we go down through all this node children */ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(node.project + '-' + node.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningOutput.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningOutput.js index a553ead09..ddae66359 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningOutput.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningOutput.js @@ -31,7 +31,7 @@ exports.newMachineLearningBotModulesLearningOutput = function (processIndex) { /* Preparing everything for the Simulation */ let learningSimulationModuleObject = TS.projects.machineLearning.botModules.learningSimulation.newMachineLearningBotModulesLearningSimulation(processIndex) - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') let outputDatasetsMap = new Map() await TS.projects.foundations.functionLibraries.outputManagementFunctions.readFiles( diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningRecords.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningRecords.js index c7fdbd726..f0d9eb1ed 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningRecords.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningRecords.js @@ -37,7 +37,7 @@ exports.newMachineLearningBotModulesLearningRecords = function (processIndex) { we have a pointer to the node that have the information we need to extract. Later, based on the product record definition we will extract each individual value. */ - let outputDatasets = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') + let outputDatasets = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processOutput, 'Output Dataset') for (let i = 0; i < outputDatasets.length; i++) { let outputDatasetNode = outputDatasets[i] diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSimulation.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSimulation.js index 4ae1809e7..a3e6b2cc6 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSimulation.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSimulation.js @@ -381,8 +381,8 @@ exports.newMachineLearningBotModulesLearningSimulation = function (processIndex) } function positionChart(chart) { - let dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') - dataDependencies = TS.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies) + let dataDependencies = SA.projects.visualScripting.utilities.nodeFunctions.nodeBranchToArray(TS.projects.foundations.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.processDependencies, 'Data Dependency') + dataDependencies = SA.projects.visualScripting.utilities.nodeFunctions.filterOutNodeWihtoutReferenceParentFromNodeArray(dataDependencies) /* Finding the Current Element on Market Files */ if (TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).TRADING_PROCESSING_DAILY_FILES) { diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js index 32c3539f6..d7c0a8939 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js @@ -292,7 +292,7 @@ exports.newMachineLearningBotModulesLearningSystem = function (processIndex) { } /* Now we go down through all this node children */ - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(node.project + '-' + node.type) if (schemaDocument === undefined) { return } if (schemaDocument.childrenNodesProperties !== undefined) { diff --git a/Projects/Network/SA/Modules/P2PNetwork.js b/Projects/Network/SA/Modules/P2PNetwork.js index 9c660c2e4..e24138935 100644 --- a/Projects/Network/SA/Modules/P2PNetwork.js +++ b/Projects/Network/SA/Modules/P2PNetwork.js @@ -31,7 +31,7 @@ exports.newNetworkModulesP2PNetwork = function newNetworkModulesP2PNetwork() { case 'Network Peer': { thisObject.p2pNodesToConnect = [] - let thisP2PNodeId = SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).signingAccountChildId + let thisP2PNodeId = SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).nodeId for (let i = 0; i < SA.projects.network.globals.memory.arrays.P2P_NETWORK_NODES.length; i++) { let p2pNetworkNode = SA.projects.network.globals.memory.arrays.P2P_NETWORK_NODES[i] if (thisP2PNodeId !== p2pNetworkNode.node.id) { diff --git a/Projects/Network/SA/Modules/UserProfiles.js b/Projects/Network/SA/Modules/UserProfiles.js index 09df3e54a..6a1a8aef3 100644 --- a/Projects/Network/SA/Modules/UserProfiles.js +++ b/Projects/Network/SA/Modules/UserProfiles.js @@ -18,88 +18,163 @@ exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles() } - async function initialize(signingAccountChildCodeName, p2pNetworkIdentity) { + async function initialize(nodeCodeName, p2pNetworkIdentity) { - let pluginFileNames = await SA.projects.communityPlugins.utilities.plugins.getPluginFileNames( - 'Governance', - 'User-Profiles' - ) + await loadAppSchemas() + await loadProfiles() - for (let i = 0; i < pluginFileNames.length; i++) { - let pluginFileName = pluginFileNames[i] + async function loadAppSchemas() { - let pluginFileContent = await SA.projects.communityPlugins.utilities.plugins.getPluginFileContent( - 'Governance', - 'User-Profiles', - pluginFileName - ) + let promise = new Promise((resolve, reject) => { - let userProfilePlugin = JSON.parse(pluginFileContent) - let config = JSON.parse(userProfilePlugin.config) - let signatureObject = config.signature - let web3 = new SA.nodeModules.web3() - let blockchainAccount = web3.eth.accounts.recover(signatureObject) - let ranking = 0 // TODO: read the blockchain balance and transactions from the Treasury Account to calculate the profile ranking. - let userProfileId = userProfilePlugin.id - let userHandle = config.signature.message + let project = 'Governance' + let filePath = global.env.PATH_TO_PROJECTS + '/' + project + '/Schemas/' + let folder = 'App-Schema' - let userProfile = SA.projects.socialTrading.modules.socialGraphUserProfile.newSocialTradingModulesSocialGraphUserProfile() - userProfile.initialize( - userProfileId, - userHandle, - blockchainAccount, - ranking - ) + SA.projects.foundations.utilities.filesAndDirectories.getAllFilesInDirectoryAndSubdirectories(filePath + folder, onFilesReady) - 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 be signed on behalf of the User Profile. - */ - if (userProfilePlugin.signingAccounts !== undefined) { - for (let j = 0; j < userProfilePlugin.signingAccounts.signingAccounts.length; j++) { - let signingAccount = userProfilePlugin.signingAccounts.signingAccounts[j] - let config = JSON.parse(signingAccount.config) - let signatureObject = config.signature - let web3 = new SA.nodeModules.web3() - let blockchainAccount = web3.eth.accounts.recover(signatureObject) - SA.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOKCHAIN_ACCOUNT.set(blockchainAccount, userProfile) - /* - 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.signingAccountChild.type === "P2P Network Node" && - signingAccount.signingAccountChild.config !== undefined - ) { - let config + function onFilesReady(files) { + + for (let k = 0; k < files.length; k++) { + let name = files[k] + let nameSplitted = name.split(folder) + let fileName = nameSplitted[1] + for (let i = 0; i < 10; i++) { + fileName = fileName.replace('\\', '/') + } + let fileToRead = filePath + folder + fileName + + let fileContent = SA.nodeModules.fs.readFileSync(fileToRead) + let schemaDocument try { - config = JSON.parse(signingAccount.signingAccountChild.config) + schemaDocument = JSON.parse(fileContent) + SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.set(project + '-' + schemaDocument.type, schemaDocument) } catch (err) { - console.log('P2P Network Node Config not in JSON format. userProfileHandle = ' + userHandle + ' NodeId = ' + signingAccount.signingAccountChild.id) - continue + console.log('[WARN] loadAppSchemas -> Error Parsing JSON File: ' + fileToRead + '. Error = ' + err.stack) + return } - if (config.host === undefined) { - continue - } - if (config.webSocketsPort === undefined) { - continue - } - - let p2pNetworkNode = SA.projects.network.modules.p2pNetworkNode.newNetworkModulesP2PNetworkNode() - p2pNetworkNode.initialize(signingAccount.signingAccountChild, 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.signingAccountChild.id === SA.secrets.map.get(signingAccountChildCodeName).signingAccountChildId - ) { - p2pNetworkIdentity.node = signingAccount.signingAccountChild - p2pNetworkIdentity.blockchainAccount = blockchainAccount - p2pNetworkIdentity.userProfile = userProfile + resolve() + } + } + ) + return promise + } + + async function loadProfiles() { + + let pluginFileNames = await SA.projects.communityPlugins.utilities.plugins.getPluginFileNames( + 'Governance', + 'User-Profiles' + ) + + for (let i = 0; i < pluginFileNames.length; i++) { + let pluginFileName = pluginFileNames[i] + + let pluginFileContent = await SA.projects.communityPlugins.utilities.plugins.getPluginFileContent( + 'Governance', + 'User-Profiles', + pluginFileName + ) + + let userProfilePlugin = JSON.parse(pluginFileContent) + let config = JSON.parse(userProfilePlugin.config) + let signatureObject = config.signature + let web3 = new SA.nodeModules.web3() + let blockchainAccount = web3.eth.accounts.recover(signatureObject) + let ranking = 0 // TODO: read the blockchain balance and transactions from the Treasury Account to calculate the profile ranking. + let userProfileId = userProfilePlugin.id + let userHandle = config.signature.message + + let userProfile = SA.projects.socialTrading.modules.socialGraphUserProfile.newSocialTradingModulesSocialGraphUserProfile() + userProfile.initialize( + userProfileId, + userHandle, + blockchainAccount, + ranking + ) + + 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 networkClientsMap = new Map() + + addToNetworkClientMap(algoTradersPlatform) + addToNetworkClientMap(socialTradingDesktopApp) + addToNetworkClientMap(socialTradingMobileApp) + addToNetworkClientMap(socialTradingServerApp) + addToNetworkClientMap(socialTradingBots) + addToNetworkClientMap(socialPersonas) + addToNetworkClientMap(p2pNetworkNodes) + + 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] + let config = JSON.parse(signingAccount.config) + let signatureObject = config.signature + let web3 = new SA.nodeModules.web3() + let blockchainAccount = web3.eth.accounts.recover(signatureObject) + SA.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOKCHAIN_ACCOUNT.set(blockchainAccount, userProfile) + /* + 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 + ) { + let config + try { + config = JSON.parse(signingAccount.referenceParent.config) + } catch (err) { + console.log('P2P Network Node Config not in JSON format. userProfileHandle = ' + userHandle + ' NodeId = ' + signingAccount.referenceParent.id) + continue + } + if (config.host === undefined) { + continue + } + if (config.webSocketsPort === undefined) { + continue + } + + let p2pNetworkNode = SA.projects.network.modules.p2pNetworkNode.newNetworkModulesP2PNetworkNode() + p2pNetworkNode.initialize(signingAccount.referenceParent, 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 + ) { + p2pNetworkIdentity.node = signingAccount.referenceParent + p2pNetworkIdentity.blockchainAccount = blockchainAccount + p2pNetworkIdentity.userProfile = userProfile + } } } } diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 95127a643..0d393a901 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -329,7 +329,7 @@ } ] }, - "TS": { + "SA": { "utilities": [ { "name": "Node Functions", @@ -795,6 +795,12 @@ "propertyName": "timeConstants", "functionName": "newFoundationsGlobalsTimeConstants", "fileName": "TimeConstants.js" + }, + { + "name": "Schemas", + "propertyName": "schemas", + "functionName": "newFoundationsGlobalsSchemas", + "fileName": "Schemas.js" } ], "utilities": [ diff --git a/Projects/Visual-Scripting/TS/Utilities/NodeFunctions.js b/Projects/Visual-Scripting/SA/Utilities/NodeFunctions.js similarity index 92% rename from Projects/Visual-Scripting/TS/Utilities/NodeFunctions.js rename to Projects/Visual-Scripting/SA/Utilities/NodeFunctions.js index 0d87560ab..ccd994763 100644 --- a/Projects/Visual-Scripting/TS/Utilities/NodeFunctions.js +++ b/Projects/Visual-Scripting/SA/Utilities/NodeFunctions.js @@ -12,11 +12,15 @@ exports.newVisualScriptingUtilitiesNodeFunctions = function () { function nodeBranchToArray(node, nodeType) { let resultArray = [] - scanNodeBranch(node, nodeType) + scanNodeBranch(node) return resultArray function scanNodeBranch(startingNode) { - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(startingNode.project + '-' + startingNode.type) + if (startingNode === undefined) { + return + } + + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(startingNode.project + '-' + startingNode.type) if (schemaDocument === undefined) { return } if (startingNode.type === nodeType) { @@ -53,14 +57,14 @@ exports.newVisualScriptingUtilitiesNodeFunctions = function () { returns the first instance found. */ let nodeFound - scanNodeMesh(node, nodeType) + scanNodeMesh(node) return nodeFound function scanNodeMesh(startingNode) { if (startingNode === undefined) { return } if (nodeFound !== undefined) { return } - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(startingNode.project + '-' + startingNode.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(startingNode.project + '-' + startingNode.type) if (schemaDocument === undefined) { return } if (startingNode.type === nodeType) { @@ -114,7 +118,7 @@ exports.newVisualScriptingUtilitiesNodeFunctions = function () { function scanNodeMesh(startingNode) { if (startingNode === undefined) { return } - let schemaDocument = TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.get(startingNode.project + '-' + startingNode.type) + let schemaDocument = SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.get(startingNode.project + '-' + startingNode.type) if (schemaDocument === undefined) { return } if (startingNode.id === nodeId) { diff --git a/TaskServer/TaskServer.js b/TaskServer/TaskServer.js index c9e327ed6..463058c99 100644 --- a/TaskServer/TaskServer.js +++ b/TaskServer/TaskServer.js @@ -76,7 +76,7 @@ exports.newTaskServer = function newTaskServer() { for (let j = 0; j < project.schema.length; j++) { let schemaDocument = project.schema[j] let key = project.name + '-' + schemaDocument.type - TS.projects.foundations.globals.taskConstants.APP_SCHEMA_MAP.set(key, schemaDocument) + SA.projects.foundations.globals.schemas.APP_SCHEMA_MAP.set(key, schemaDocument) } } } @@ -88,7 +88,7 @@ exports.newTaskServer = function newTaskServer() { setupTaskHeartbeats() function initializeProjectDefinitionNode() { - TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE = TS.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(TS.projects.foundations.globals.taskConstants.TASK_NODE, 'Project Definition') + TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE = SA.projects.visualScripting.utilities.nodeFunctions.findNodeInNodeMesh(TS.projects.foundations.globals.taskConstants.TASK_NODE, 'Project Definition') if (TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE === undefined) { console.log("[ERROR] Task Server -> Task -> bootingProcess -> Project Definition not found. ") TS.projects.foundations.globals.taskVariables.FATAL_ERROR_MESSAGE = 'Project Definition not found. Fatal Error, can not continue. Fix the problem and try again.'