From f82968a6239502ccaf2247ffb42d695f099f899f Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Fri, 27 Aug 2021 22:51:35 +0200 Subject: [PATCH 01/81] User Profile hierarchy WIP --- .../C/Community/Community/community.json | 7 ++++--- .../Superalgos-Network/superalgos-network.json | 4 ++-- .../Token-Power-Switch/token-power-switch.json | 9 +++++---- .../Tokens/Tokens-Awarded/tokens-awarded.json | 11 ++++------- .../T/Tokens/Tokens-Bonus/tokens-bonus.json | 18 ++++++++++++++++-- 5 files changed, 31 insertions(+), 18 deletions(-) diff --git a/Projects/Foundations/Schemas/Docs-Concepts/C/Community/Community/community.json b/Projects/Foundations/Schemas/Docs-Concepts/C/Community/Community/community.json index a0f2ed086..548923222 100644 --- a/Projects/Foundations/Schemas/Docs-Concepts/C/Community/Community/community.json +++ b/Projects/Foundations/Schemas/Docs-Concepts/C/Community/Community/community.json @@ -1,13 +1,14 @@ { "type": "Community", "definition": { - "text": "The Community, or the Superalgos Community, is the group of entities participating in the Superalgos project, either actively contributing to advancing the project or passively using the Superalgos software.", - "updated": 1618832930339, + "text": "The Community, or the Superalgos Community, is the group of entities participating in the Superalgos project, either actively contributing to advancing the project or passively using the Superalgos Network.", + "updated": 1630096402584, "translations": [ { "language": "ES", "text": "La Community, o la Superalgos Community, es el grupo de entidades que participan en el proyecto Superalgos, ya sea contribuyendo activamente al avance del proyecto o utilizando pasivamente el software Superalgos.", - "updated": 1628046272721 + "updated": 1628046272721, + "style": "Definition" } ] }, diff --git a/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Network/superalgos-network.json b/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Network/superalgos-network.json index 18932863c..c9e25d603 100644 --- a/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Network/superalgos-network.json +++ b/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Network/superalgos-network.json @@ -1,8 +1,8 @@ { "type": "Superalgos Network", "definition": { - "text": "The Superalgos Network is a future, to be launched network that will allow users to setup their Client to be part of. Once done Clients will connect to each other in a p2p way, enabling from there the exchange of data and services between users.", - "updated": 1621955485325 + "text": "The Superalgos Network is an open, peer-to-peer network, currently in the making. The network will enable users to set up their Clients to interact with other Clients. Such connectivity enables the exchange and dissemination of products and services from and to users.", + "updated": 1630096650321 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Token/Token-Power-Switch/token-power-switch.json b/Projects/Governance/Schemas/Docs-Nodes/T/Token/Token-Power-Switch/token-power-switch.json index 6b618ef9e..3070ba9fa 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Token/Token-Power-Switch/token-power-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Token/Token-Power-Switch/token-power-switch.json @@ -1,8 +1,8 @@ { "type": "Token Power Switch", "definition": { - "text": "The concept of a switch may be used throughout the different programs in the User Profile hierarchy. A switch is a device used to distribute the flow of Token Power to multiple offspring nodes. In the case of the Token Power Switch, it is the sole offspring node of the User Profile hierarchy used to distribute Token Power to the different programs.", - "updated": 1624726163960 + "text": "The concept of a switch may be used throughout the different programs in the User Profile hierarchy. A switch is a device used to distribute the flow of Token Power to offspring nodes. In the case of the Token Power Switch, it is the sole offspring node of the User Profile hierarchy used to distribute Token Power to the different programs.", + "updated": 1630094625909 }, "paragraphs": [ { @@ -11,8 +11,9 @@ "updated": 1624726181844 }, { - "style": "Text", - "text": "Other switches in the hierarchy adopt specific names describing what exactly is that they distribute among offspring nodes." + "style": "Note", + "text": "Most nodes in the hierarchy act as switches, even when their name does not include the word switch!", + "updated": 1630094810003 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json index 48b052419..748444a02 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json @@ -1,8 +1,8 @@ { "type": "Tokens Awarded", "definition": { - "text": "The Tokens Awarded node is present on each of the programs in the hierarchy. It exists to accumulate and display the number of Superalgos SA Tokens awarded to your profile through each of the existing programs.", - "updated": 1624726369909 + "text": "The Tokens Awarded node is present on each of the programs in the hierarchy. It exists to accumulate and display the number of Superalgos SA Tokens awarded to your profile through each the corresponding program.", + "updated": 1630095292390 }, "paragraphs": [ { @@ -12,11 +12,8 @@ }, { "style": "Text", - "text": "The information on how many tokens the particular program has awarded you is displayed as a notice below the node, along with the number of people that helped you get them." - }, - { - "style": "Callout", - "text": "The system calculates the token distribution dynamically with every change in the definitions, and computes all the hierarchies loaded in and referenced from the Current Workspace. This may or may not be accurate, depending on many things, including whether or not you are computing all relevant hierarchies." + "text": "The information on how many tokens the particular program has awarded you is displayed as a notice below the node, along with other relevant information that depends on the context, like the number of people that helped you get them, or the number of claims computed, etc.", + "updated": 1630095366072 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json index 0a78cde97..e86ee0746 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json @@ -1,14 +1,28 @@ { "type": "Tokens Bonus", "definition": { - "text": "A Token Bonus is a reward in tokens that you obtain for participating in a program that is incentivized. Taking part in these programs is desirable, as they foster Community bonds, develop healthy social relations, or encourage specific collaborative dynamics. It is for those reasons that participation is incentivized. Programs that feature a Token Bonus define a specific Pool to allocate tokens for the bonus. You participate in those rewards in a Direct Proportion to the Token Power that you let flow into the said program.", - "updated": 1624726819483 + "text": "A Tokens Bonus is a reward in tokens that you obtain for participating in a program that is incentivized. Taking part in these programs is desirable, as they foster Community bonds, develop healthy social relations, or encourage specific collaborative dynamics. It is for those reasons that participation is incentivized.", + "updated": 1630095845787 }, "paragraphs": [ { "style": "Block", "text": "Content", "updated": 1624726836479 + }, + { + "style": "Text", + "text": "Programs that feature a Tokens Bonus have an associated Pool under the Governance Programs section of the Superalgos Pools hierarchy. These pools are used specifically to allocate tokens for these incentives.", + "updated": 1630096702504 + }, + { + "style": "Text", + "text": "You participate in the pool of the Tokens Bonus for any given program in a Direct Proportion to the Token Power that you drive into the said program. That is, the more Token Power you drive into an incentivized program, the more tokens you get from the corresponding pool.", + "updated": 1630096882680 + }, + { + "style": "Text", + "text": "asdf" } ] } \ No newline at end of file From 26063d4a86742aa999897f0780245522ee0adc7b Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sat, 28 Aug 2021 15:44:57 +0200 Subject: [PATCH 02/81] User Profile docs WIP --- .../Direct-Proportion/direct-proportion.json | 13 ++++++ .../reusable-governance-snippets.json | 9 ++-- .../R/Rule/Rule-of-Three/rule-of-three.json | 13 ++++++ .../T/Tokens/Tokens-Bonus/tokens-bonus.json | 23 +++++++--- .../T/Tokens/Tokens-Mined/tokens-mined.json | 8 +++- ...er-profile-002-user-profile-hierarchy.json | 45 ++++++++++++++++--- 6 files changed, 95 insertions(+), 16 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Concepts/D/Direct/Direct-Proportion/direct-proportion.json create mode 100644 Projects/Governance/Schemas/Docs-Concepts/R/Rule/Rule-of-Three/rule-of-three.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/D/Direct/Direct-Proportion/direct-proportion.json b/Projects/Governance/Schemas/Docs-Concepts/D/Direct/Direct-Proportion/direct-proportion.json new file mode 100644 index 000000000..86763b8f5 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/D/Direct/Direct-Proportion/direct-proportion.json @@ -0,0 +1,13 @@ +{ + "type": "Direct Proportion", + "definition": { + "text": "When the relationship between two quantities is such that if we increase one, the other will also increase, and if we decrease one the other quantity will also decrease, then the two quantities are said to be in a direct proportion", + "updated": 1630140935167 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json index d9346fbd3..351cb611b 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json @@ -5,14 +5,17 @@ "updated": 1630091213561 }, "paragraphs": [ + { + "style": "Title", + "text": "Computational Limitations" + }, { "style": "Block", - "text": "Computational Limitations", - "updated": 1630091226791 + "text": "Computational Limitations" }, { "style": "Title", - "text": "Computational Limitations" + "text": "" }, { "style": "Note", diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Rule/Rule-of-Three/rule-of-three.json b/Projects/Governance/Schemas/Docs-Concepts/R/Rule/Rule-of-Three/rule-of-three.json new file mode 100644 index 000000000..445541fd1 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Rule/Rule-of-Three/rule-of-three.json @@ -0,0 +1,13 @@ +{ + "type": "Rule of Three", + "definition": { + "text": "In math, the rule of three is a form that allows the resolution of problems of proportionality between three known values and an unknown. In other words, it is an operation that allows you to find the fourth term with respect to a given proportion.", + "updated": 1630142150472 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json index e86ee0746..657e752c7 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json @@ -1,8 +1,8 @@ { "type": "Tokens Bonus", "definition": { - "text": "A Tokens Bonus is a reward in tokens that you obtain for participating in a program that is incentivized. Taking part in these programs is desirable, as they foster Community bonds, develop healthy social relations, or encourage specific collaborative dynamics. It is for those reasons that participation is incentivized.", - "updated": 1630095845787 + "text": "A Tokens Bonus is a reward that you obtain for participating in a program that is incentivized. Taking part in these programs is desirable, as they foster Community bonds, develop healthy social relations, or encourage specific collaborative dynamics. It is for those reasons that participation is incentivized.", + "updated": 1630141035393 }, "paragraphs": [ { @@ -16,13 +16,24 @@ "updated": 1630096702504 }, { - "style": "Text", - "text": "You participate in the pool of the Tokens Bonus for any given program in a Direct Proportion to the Token Power that you drive into the said program. That is, the more Token Power you drive into an incentivized program, the more tokens you get from the corresponding pool.", - "updated": 1630096882680 + "style": "Callout", + "text": "The Tokens Bonus you may get on any given program is in a Direct Proportion to the Token Power that you drive into the said program. That is, the more Token Power you drive into an incentivized program, the more tokens you get from the corresponding pool.", + "updated": 1630141193081 + }, + { + "style": "Subtitle", + "text": "Calculation", + "updated": 1630141623710 }, { "style": "Text", - "text": "asdf" + "text": "The calculation of the Tokens Bonus is a direct Rule of Three:", + "updated": 1630142120510 + }, + { + "style": "Json", + "text": "Total Token Power [*] -> 100% of the pool\n Your Token Power [**] -> X% of the pool\n\nX = Your Token Power * 100% / Total Token Power\n\n[*] The power driven to the given program by all User Profiles combined.\n[**] The power you drive to the given program.", + "updated": 1630157176789 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Mined/tokens-mined.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Mined/tokens-mined.json index aaf0a2a25..109202fec 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Mined/tokens-mined.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Mined/tokens-mined.json @@ -5,10 +5,14 @@ "updated": 1630090191493 }, "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630157979224 + }, { "style": "Include", - "text": "Governance->Concept->Reusable Governance Snippets->Computational Limitations", - "updated": 1630091305104 + "text": "Governance->Concept->Reusable Governance Snippets->Computational Limitations" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-002-user-profile-hierarchy.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-002-user-profile-hierarchy.json index d6a6a51c8..41d68424f 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-002-user-profile-hierarchy.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-002-user-profile-hierarchy.json @@ -30,18 +30,53 @@ }, { "style": "Title", - "text": "Tokens Awarded", - "updated": 1624732384407 + "text": "Tokens Mined", + "updated": 1630157369136 }, { "style": "Include", - "text": "Governance->Node->Tokens Awarded->Definition", - "updated": 1624732391024 + "text": "Governance->Node->Tokens Mined->Definition", + "updated": 1630157540123 + }, + { + "style": "Include", + "text": "Governance->Node->Tokens Mined->Content", + "updated": 1630157564129 + }, + { + "style": "Title", + "text": "" + }, + { + "style": "Title", + "text": "Tokens Awarded" + }, + { + "style": "Include", + "text": "Governance->Node->Tokens Awarded->Definition" }, { "style": "Include", "text": "Governance->Node->Tokens Awarded->Content", - "updated": 1624732395456 + "updated": 1630157469517 + }, + { + "style": "Title", + "text": "" + }, + { + "style": "Title", + "text": "Tokens Bonus" + }, + { + "style": "Include", + "text": "Governance->Node->Tokens Bonus->Definition", + "updated": 1630157687352 + }, + { + "style": "Include", + "text": "Governance->Node->Tokens Bonus->Content", + "updated": 1630157696368 } ] } \ No newline at end of file From 7c0a0b44d5625525b002ce4b50035b8c78fac250 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sat, 28 Aug 2021 16:58:18 +0200 Subject: [PATCH 03/81] README includes Getting Started Guide --- INSTALL.md | 361 ----------------------------------------------------- README.md | 360 +++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 312 insertions(+), 409 deletions(-) delete mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index c657e5bf1..000000000 --- a/INSTALL.md +++ /dev/null @@ -1,361 +0,0 @@ -# Getting Started Guide - -All procedures are the same for Windows, Linux, or Mac OS. Raspberry Pi terminal commands have been included for ease of use. - -> **IMPORTANT:** Remote installations and minimalist hardware —both virtual and physical— are better suited for production deployments, where the use of the GUI is minimal. We highly recommend learning Superalgos in a local installation. Mastering the system takes time, and the use of the GUI to go through in-app tutorials is crucial during the learning process. Your experience will be orders of magnitude better if you follow this advice: leave remote installations and minimalist hardware for when you are ready to start trading live. - - - -# Pre-Requisites - -## 1. Node JS Installation - -If you don't have it yet, download and install Node.js. - -Node JS is an open-source server environment required to run Superalgos. - -**A.** Go to the Node JS [download page](https://nodejs.org/en/download/). - -**B.** Download your system's installer. Select *LTS Recommended for Most Users* and click the big Windows or macOS Installer button. If you are on Linux, the installer is listed further down the page. - -**C.** Run the installer with the default configuration — just click Next until Node.JS is fully installed. That's it! You can continue with step 2 (Git Installation). - -
- -**NODE JS INSTALLATION FOR RASPBERRY PI USERS** - -You may install Node.JS just like you would on any other machine as per the above instructions. As an alternative, you may also try the following from the SSH Terminal. - -**NOTE:** It is best to use the most current and updated version of the FULL PiOS image. - -``` -curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - -``` -Followed by: -``` -sudo apt-get install -y nodejs -``` -It is also required to install the Node Package Manager for dependancy management. -``` -sudo apt install npm -``` -You may also type the following to verify Node.js and NPM installation and version. -``` -node -v -``` -``` -npm -v -``` - -
- -## 2. Git Installation - -Download and install Git. - -Git is an open-source distributed version control system required to download and stay up to date with Superalgos. - -**A.** Go to the Git [download page](https://git-scm.com/downloads). - -**B.** Download the version for your Operating System. - -**C.** Run the installer with the default configuration — just click Next until Git is fully installed. - -**IMPORTANT:** The latest version of Git is required to handle the authentication with GitHub.com. - -**NOTE FOR MAC USERS:** Depending on your setup, installing Git may be optional. The native XCode Command Line Developer Tools seems to work well. If you do install Git, we have tested Tim Harper's binary installer successfully. - -
- -**GIT INSTALLATION FOR RASPBERRY PI USERS** - -Just like with Node.JS, you may follow the above instructions to install Git, or use the SSH Terminal command. The most recent version of PiOS has Git already installed, so this may give you an error. The error will not affect your installation. -``` -sudo apt-get install git -``` - -
- -## 3. Google Chrome or Safari - -Use Chrome, or Safari on Mac. These are the only tested browsers. - -**A.** Go to the Chrome [download page](https://www.google.com/chrome/). - -**B.** Run the installer. - -Before you begin, it is recommended that you set up Chrome/Safari as your default browser. - -**IMPORTANT:** Use Chrome/Safari so that you have a similar environment as the dev team in case you need help. We are not testing on any other browsers, and it is a well-known fact that browsers behave differently. - -# Superalgos Client Installation - -## 1. Fork the Superalgos Repository - -**A.** Scroll the page all the way to the top. Find and click the **Fork** button to create your fork/copy of this repository. To fork Superalgos you need a Github account. If you don't have one, go ahead and create it. - -**NOTE:** A Fork is required for your contributions to the project. The reason why Superalgos is free and open-source is that the project has set up a Collective Business in which all users may participate. The way to participate is to contribute to make Superalgos better. The project's token is distributed among contributors. - -## 2. Clone Your Fork - -**A.** Once the fork is created, you will land on the page of your fork. Copy the URL from your browser's address bar. - -**B.** In your computer/laptop/server, open a command prompt or terminal. Make sure you are in a directory where you have write permissions (on most systems the terminal will open in your user's home directory, so you're good). Clone the git repository using the command: - -``` -git clone -``` - -For example, if your Github username is John, the command will look like this: - -``` -git clone https://github.com/John/Superalgos -``` - -This creates the `Superalgos` folder in the current directory, which contains the whole installation. - -## 3. Install Node Dependencies - -After the Superalgos directory has been installed, the final step of installation is to set up the necessary node dependencies. In the same command prompt or terminal you just used, type the following: - -``` -cd Superalgos -``` - -That should take you inside the Superalgos folder created by the `git clone` command earlier. Now, run the following command: - -``` -node setup -``` - -Then wait until you are able to type within the terminal again. - -This command will install and configure all additional dependencies needed by Superalgos. It will also install desktop and start menu shortcuts. - -**NOTE FOR USERS INSTALLING MULTIPLE INSTANCES OF SUPERALGOS ON THE SAME MACHINE:** In order to avoid name conflicts between shortcuts, make sure to rename each Superalgos directory before running `node setup`. - -Congratulations your installation is complete! - -> **The Usage section below explains how to run the app.** - -
- -**DEPENDENCY INSTALLATION FOR RASPBERRY PI USERS** - -As noted above, running `node setup` installs GUI shortcuts by default. To suppress this behavior in headless installations, add the `noShortcuts` flag as follows: - -``` -node setup noShortcuts -``` - -
- -**Troubleshooting Dependency Installation** - -If you are having difficulty running the node setup command here are a few common issues that may be getting in the way. - -**1.** Check the version of node and npm you have installed. Make sure that you are running an updated version of node greater than version 12 and npm greater than version 5. You can check which version you have by typing `node -v` and `npm -v` into a command prompt or terminal. If your version numbers are below these, you can update your installation by following the instructions outlined in the "Node JS Installation" step above. - - -**2.** If you are installing Superalgos in an administratively protected directory you will need to do one of the following: - -- For Windows start your command prompt as an administrator. - -- For Linux and Mac Systems make sure to add the sudo command to node setup. This will look like `sudo node setup`. - - -**3.** For Windows it is important that you have C:\Windows\System32 added to your global PATH. For instructions on how to do this google "add to the path on Windows 10." - -
- -## 4. Installation Notes - -**A.** You need to make a fork so that you may contribute work. Superalgos is a Community project and you are expected to contribute, like everyone else. You don't need to be a technical person to contribute. Fixing a typo in the docs or translating a paragraph into your native language are valuable contributions too. Superalgos has built-in features that make contributing easy. Help make Superalgos better and Superalgos will better serve you! [Free-riding is not cool](https://en.wikipedia.org/wiki/Free-rider_problem), particularly on free, open-source, Community-driven projects. - -**B.** The software includes an in-app self-update command / feature. It will help you stay up-to-date with the latest version of the software. Updates are on-demand, so don't worry about undesired updates. The project moves very fast and new features become available regularly, particularly if you choose to run the software in the ```develop``` branch (you may switch branches from within the app). - -**C.** It is a good idea to perodically run the `node setup` command to keep the underlying dependencies for your Superalgos installation up to date. - -**D.** Before installing the client on a remote computer in an attempt to access the UI from a different machine, we highly recommend you do a standard installation on your PC / laptop first. Leave your Raspberry Pi or VPS for later, once you have done all available tutorials. This single tip will save you a lot of time: you don't need to add complexity before you learn how to handle the app, and the GUI performs best in a local installation. - -# Usage - -## 1. Run the Client and GUI - -**A.** To run Superalgos, go to the Superalgos directory/folder and run this command: - -``` -node run -``` - -The Client will run on your terminal and the GUI will launch on your default browser. If Chrome/Safari is not your default browser, copy the URL, close the browser, open Chrome/Safari, and paste the URL. Be patient... it takes a few seconds to fully load the GUI. - -A Welcome Tutorial pops-up automatically. You must do this Tutorial to finish the setup and to learn the basics. It's the ultimate onboarding experience, superior to all other resources available, including videos and the Docs. - -![run-the-system-01](https://user-images.githubusercontent.com/13994516/107037804-e5fc6200-67bb-11eb-82f2-d0f40247fa14.gif) - -If you are running a headless Raspberry Pi (one without a screen) you may need to change directories first and run Superalgos with the `minMemo` and `noBrowser` options. -``` -cd Superalgos -``` -then -``` -node run minMemo noBrowser -``` - -In addition, you may use any of the automatically installed desktop and start menu shortcuts to launch Superalgos. - -**NOTE:** Shortcuts are not currently supported on Mac. Collaborators are needed to finish this feature. - -**B.** Enable Desktop Shortcut on Ubuntu - -The majority of shortcuts that are automatically installed will work out of the box. Desktop shortcuts on Ubuntu, however, require a few additional steps to set up. - -First, desktop icons need to be enabled within the Tweaks app. -* Check if Tweaks is installed. -* If not go to Ubuntu Software. -* Install Tweaks. -* Open Tweaks. -* Under extensions turn on Desktop Icons - -![enable-ubuntu-shortcut](https://user-images.githubusercontent.com/55707292/117553927-f0780300-b019-11eb-9e36-46b509653283.gif) - -**TIP:** If you do not see the desktop shortcut appear right away you may need to restart your computer. - -Finally, you will need to enable the desktop shortcut. -* Right click Superalgos.desktop and select Allow Launching. - -![allow-launching](https://user-images.githubusercontent.com/55707292/117553933-fcfc5b80-b019-11eb-872c-4fad81b184d2.gif) - -Now both launcher and desktop shortcuts will launch Superalgos like any other program on your computer. - -## 3. Usage Notes - -We are testing the UI on Google Chrome and Safari on macOS only. It may work on other browsers as well — or not. If you are running on a different browser and ever need support, make sure you mention that fact upfront, or even better, try on Chrome/Safari first. - - **TIP:** If your computer has 8 GB of RAM or less, use ```node run minMemo``` to run the system with minimal RAM requirements. - -# Running Superalgos on a Headless Linux Server as a Daemon - -If you're running Superalgos on a headless linux server like a Raspberry Pi, you might want to run it as a daemon so it isn't attached to your current login session. The easiest, most standard way to go about this is probably using `systemd`. Most linux distributions use it as default init system/service manager. - -## Using `systemd` - -Create a `superalgos.service` file looking like this (change `` to your user name and `/path/to/Superalgos` to your Superalgos folder, for instance `/home/John/Superalgos`): -``` -[Unit] -Description=Superalgos client - -[Service] -Type=simple -User= -WorkingDirectory=/path/to/Superalgos -ExecStart=/usr/bin/node run minMemo noBrowser - -[Install] -WantedBy=multi-user.target - -``` -There is no need to run Superalgos as root so we're running it as a user. The `minMemo` option assumes you're running on a small machine like a Raspberry Pi, while `noBrowser` makes sense for running daemonized. - -Now, as root (or using `sudo`), put the file `superalgos.service` you just created in `/etc/systemd/system/` and issue the command -``` -systemctl enable superalgos -``` -This will install the service so that Superalgos is started on boot. To start it manually, do (again as root or with `sudo`) -``` -systemctl start superalgos -``` - -To see the output of Superalgos, use -``` -journalctl -u superalgos -``` -or to follow the output, -``` -journalctl -u superalgos -f -``` - -# Uninstall - -Superalgos writes nothing outside of the ```Superalgos``` folder other than shortcut files. To uninstall the software, follow these steps: - -Open a terminal or command prompt and navigate to your main Superalgos directory and type the following command: -``` -node uninstall -``` -This will remove any shortcut files that have been installed. - -Then simply delete the `Superalgos` folder. There will be nothing left on your computor. - -# Welcome Tutorial - -Once the app finishes loading, an interactive tutorial takes you by the hand and walks you all around the system while you learn the basic skills required to use the interface, mine data, backtest strategies, and even run a live trading session. It is highly recommended you follow the tutorial until the end, as it is carefully crafted to make your onboarding as easy as possible. Tutorials are the absolute best way to tackle the learning curve. You should do all tutorials before you start exploring other avenues on your own. - -![welcome-tutorial-00](https://user-images.githubusercontent.com/13994516/107038771-4a6bf100-67bd-11eb-92e0-353525a972a9.gif) - - **NOTE:** The tutorial uses Binance or Binance US as the exchange of choice. If you don't have an account with Binance or Binance US, you will still be able to follow 100% of the tutorial. When you get to the live trading section, keep going even if you don't intend to run the session. You may learn how to work with other exchanges later on. - -# Docker Deployments - -Docker container images can be found at https://github.com/users/Superalgos/packages/container/package/superalgos - -If you wish to run Superalgos over docker platform, follow these steps. - -**Note:** This has not been extensively tested yet. If you run into troubles, please contact us at the [Superalgos Support Group](https://t.me/superalgossupport). - -## 1. Install Docker - -Follow the link to [install docker](https://docs.docker.com/engine/install/). - -## 2. Run - - -### Option A. Using pre-built container - -You will need to create local storage directories beforehand, by example with `mkdir Data-Storage Log-Files My-Workspaces` - -``` -docker run \ - -d \ - --rm \ - --name superalgos \ - -p 18041:18041 \ - -p 34248:34248 \ - -v $(pwd)/Data-Storage:/app/Data-Storage \ - -v $(pwd)/Log-Files:/app/Log-Files \ - -v $(pwd)/My-Workspaces:/app/My-Workspaces \ - ghcr.io/superalgos/superalgos:latest -``` - -Now you can access the Superalgos UI at http://127.0.0.1:34248 - -To see console logs you can use `docker logs superalgos -f` - -When you're done just exec `docker kill superalgos` - -### Option B. Build container locally using docker-compose - -Follow the link to [install docker-compose](https://docs.docker.com/compose/install/) - -Run `docker-compose -f Docker/docker-compose.yml up`. - -## Configure the Container Environment - -### Available image tags - -To avoid breaking changes, the `shasum hash` and the `release` tags are the best to use. These will generally ensure you are always running the same code. The other tags will change which code they are pointing to more frequently and without notice. - -- `latest` : the absolute latest build -- `master` : the latest master branch build -- `develop` : the latest develop branch build -- `` : a specific git commit hash -- `` : corresponds with a Github Release (git tag), i.e. `beta-10` - -### Environment variables - -`PUID` and `GUID` environment variables can be used to help avoid permissions issues in the mounted volumes between the container environment and the local OS environment. The default `PUID` and `GUID` is `1000`. You can view the current user's PUID and GUID with the `id` command. - -## Troubleshooting - -Some users have reported the Docker installation was not working, and the root cause was that the ad blocker was blocking the scripts to run. \ No newline at end of file diff --git a/README.md b/README.md index d4bad72e0..8de488239 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # Superalgos Beta 11 - ![contributors](https://img.shields.io/github/contributors-anon/Superalgos/Superalgos?label=Contributors) ![pull-activity](https://img.shields.io/github/issues-pr-closed-raw/Superalgos/Superalgos?color=blueviolet) ![last-commit](https://img.shields.io/github/last-commit/Superalgos/Superalgos/develop?label=last%20commit%20to%20develop) ![bot-friendliness](https://img.shields.io/badge/Bot%20Friendliness%20Level-119%25-yellow) -Superalgos is not just another open-source project. We are an open and welcoming community devised, nurtured, and incentivized with the project's native Superalgos (SA) token to grow into a massive trading collaboration. You will notice the difference as soon as you join the [Telegram Community Group](https://t.me/superalgoscommunity) or the new [Discord Server](https://discord.gg/CGeKC6WQQb). +Superalgos is not just another open-source project. We are an open and welcoming community devised, nurtured, and incentivized with the project's native Superalgos (SA) Token to build an open trading intelligence network. + +You will notice the difference as soon as you join the [Telegram Community Group](https://t.me/superalgoscommunity) or the new [Discord Server](https://discord.gg/CGeKC6WQQb)! > Can't wait to contribute? No need to wait! You may start by giving a star to this repository in the top-right corner of this page! @@ -14,97 +15,360 @@ Superalgos is not just another open-source project. We are an open and welcoming # Getting Started Guide -Follow the link to [INSTALL.md](https://github.com/Superalgos/Superalgos/blob/develop/INSTALL.md). +All procedures are the same for Windows, Linux, or Mac OS. Raspberry Pi terminal commands have been included for ease of use. -# The Superalgos Project +> **IMPORTANT:** Remote installations and minimalist hardware — both virtual and physical — are better suited for production deployments, where the use of the GUI is minimal. We highly recommend learning Superalgos in a local installation. Mastering the system takes time, and the use of the GUI to go through in-app tutorials is crucial during the learning process. Your experience will be orders of magnitude better if you follow this advice: leave remote installations and minimalist hardware for when you are ready to start trading live. -## Superalgos is a token-incentivized open-source project +# Pre-Requisites -The protocol incentivizes users to improve Superalgos. To do that, users contribute to the codebase, add to the library of trading intelligence, and help with project development in general, earning Superalgos (SA) tokens for their contributions. Protocol-incentivized contributions allow the project to distribute free of charge, high-quality trading intelligence over the Superalgos peer-to-peer network, currently in the making. +## 1. Node JS Installation -## Superalgos is an open-network project built on top of other open networks: Internet + Bitcoin + Lightning +If you don't have it yet, download and install Node.js. -Because it's an open network, our target audience is, theoretically, 8 billion people. While all products and services provided by the project are free of charge, third-party products and services distributed through the Superalgos Network will be payable in bitcoin over the Lighting Network. +Node JS is an open-source server environment required to run Superalgos. -## The Superalgos Network is an open trading intelligence network distributing trading signals +**A.** Go to the Node JS [download page](https://nodejs.org/en/download/). -Anyone may plug in to provide or consume trading signals in a permissionless manner. Signals are cryptographically signed by trading intelligence providers with a reputation reflected in their token holdings. The Superalgos p2p Network prioritizes signals distribution according to the token holdings of consumers. +**B.** Download your system's installer. Select *LTS Recommended for Most Users* and click the big Windows or macOS Installer button. If you are on Linux, the installer is listed further down the page. -## Superalgos has a scalable and defensible business model +**C.** Run the installer with the default configuration — just click Next until Node.JS is fully installed. That's it! You can continue with step 2 (Git Installation). -* Everything is open-source and free of charge for all users: trading automation tools to produce trading intelligence, and mobile apps to consume it. +
-* Algo traders compete to mine SA tokens, producing high-quality, ever-evolving trading intelligence paid for by the protocol. +**NODE JS INSTALLATION FOR RASPBERRY PI USERS** -* Trading Intelligence is distributed via a p2p network with zero network fees. +You may install Node.JS just like you would on any other machine as per the above instructions. As an alternative, you may also try the following from the SSH Terminal. -* The long-term viability is guaranteed since the business model is undisruptable. +**NOTE:** It is best to use the most current and updated version of the FULL PiOS image. -## With all friction removed, mass adoption is inevitable +``` +curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - +``` +Followed by: +``` +sudo apt-get install -y nodejs +``` +It is also required to install the Node Package Manager for dependancy management. +``` +sudo apt install npm +``` +You may also type the following to verify Node.js and NPM installation and version. +``` +node -v +``` +``` +npm -v +``` +
-* Users do not pay for the mobile app. +## 2. Git Installation -* Users do not pay for trading intelligence. +Download and install Git. -* Algo traders do not pay for the tools to produce trading intelligence. +Git is an open-source distributed version control system required to download and stay up to date with Superalgos. -* Trading Intelligence does not need to be bought or sold. The project pays for trading intelligence by minting new tokens and distributes intelligence to all users, free of charge. +**A.** Go to the Git [download page](https://git-scm.com/downloads). -* The Superalgos (SA) token use case does not require spending, avoiding blockchain fees. Only wallet balance is relevant to determining the reputation and skin in the game of intelligence providers. The same is true for consumers. It is their wallet balance that defines the order of distribution of signals. +**B.** Download the version for your Operating System. -## Holding the SA Token is the business model for all participants +**C.** Run the installer with the default configuration — just click Next until Git is fully installed. -* Buying pressure will come from users competing to be among the first to receive trading signals. +**IMPORTANT:** The latest version of Git is required to handle the authentication with GitHub.com. -* Algo traders build up their holdings by producing top trading intelligence and compete for the reputation entailed in their holdings. +**NOTE FOR MAC USERS:** Depending on your setup, installing Git may be optional. The native XCode Command Line Developer Tools seems to work well. If you do install Git, we have tested Tim Harper's binary installer successfully. -* Project developers earn tokens for their contributions. +
-## Superalgos will become a powerful consumer brand because it is user-centric: +**GIT INSTALLATION FOR RASPBERRY PI USERS** -* We are building a brand 100% in line with consumer interests. +Just like with Node.JS, you may follow the above instructions to install Git, or use the SSH Terminal command. The most recent version of PiOS has Git already installed, so this may give you an error. The error will not affect your installation. +``` +sudo apt-get install git +``` -* We cherish the values of a decentralized, token-incentivized, open-source project. +
-* The project acts as a union, acquiring benefits for users, like better exchange fees for all. +## 3. Google Chrome or Safari -* We do not collect or sell user data. +Use Chrome, or Safari on Mac. These are the only tested browsers. -* We do not sell ads. +**A.** Go to the Chrome [download page](https://www.google.com/chrome/). -* We do not collect or sell user trading information. +**B.** Run the installer. -* We know how we are going to make money: token appreciation. +Before you begin, it is recommended that you set up Chrome/Safari as your default browser. -* Founders and team are just token holders, like every other contributor. +**IMPORTANT:** Use Chrome/Safari so that you have a similar environment as the dev team in case you need help. We are not testing on any other browsers, and it is a well-known fact that browsers behave differently. -## Superalgos Mobile Apps will feature a seamless user experience +# Superalgos Client Installation -* The app will consume top-quality trading intelligence and autonomously execute trades. +## 1. Fork the Superalgos Repository -* Users will select an exchange, provide an exchange access token, define their base asset, initial capital, and trading intelligence providers. +**A.** Scroll the page all the way to the top. Find and click the **Fork** button to create your fork/copy of this repository. To fork Superalgos you need a Github account. If you don't have one, go ahead and create it. -* A mobile phone will become a 24/7 trading bot plugged into the Superalgos Network, receiving trading signals and firing orders on any exchange. +**NOTE:** A Fork is required for your contributions to the project. The reason why Superalgos is free and open-source is that the project has set up a collective business in which all users may participate. The way to participate is to contribute to make Superalgos better. The project's token is distributed among contributors. -* Similar to a bitcoin wallet, anyone will be able to develop Superalgos Mobile Apps to consume trading signals. This open competition will be a race to the best UX possible. +## 2. Clone Your Fork -* Crypto wallets and trading apps will plug into the Superalgos Network and consume real-time trading intelligence for free. +**A.** Once the fork is created, you will land on the page of your fork. Copy the URL from your browser's address bar. -## The Superalgos Project does not sell tokens +**B.** In your computer/laptop/server, open a command prompt or terminal. Make sure you are in a directory where you have write permissions (on most systems the terminal will open in your user's home directory, so you're good). Clone the git repository using the command: -The protocol distributes Superalgos (SA) Tokens after each software release, among contributors of that release. If you wish to mine tokens, you may start contributing anytime. You may also hire/sponsor someone (usually a developer or trader) to do it on your behalf. +``` +git clone +``` -# Software Architecture +For example, if your Github username is John, the command will look like this: -Superalgos features three main components: +``` +git clone https://github.com/John/Superalgos +``` -1. **Superalgos Platform:** A set of tools designed for algo-traders to design, build, test, and deploy trading bots and produce trading signals. The platform has been trading live since mid-2020 and is virtually ready to go out of beta. +This creates the `Superalgos` folder in the current directory, which contains the whole installation. -2. **Superalgos Mobile:** An under-development mobile app reference implementation that consumes existing trading intelligence to automate trading. +## 3. Install Node Dependencies -3. **Superalgos Network:** An under-development open p2p network for distributing trading intelligence from providers (algo-traders) to consumers (the project's user base). +After the Superalgos directory has been installed, the final step of installation is to set up the necessary node dependencies. In the same command prompt or terminal you just used, type the following: -All of the above is or will be hosted in this repository. +``` +cd Superalgos +``` + +That should take you inside the Superalgos folder created by the `git clone` command earlier. Now, run the following command: + +``` +node setup +``` + +Then wait until you are able to type within the terminal again. + +This command will install and configure all additional dependencies needed by Superalgos. It will also install desktop and start menu shortcuts. + +**NOTE FOR USERS INSTALLING MULTIPLE INSTANCES OF SUPERALGOS ON THE SAME MACHINE:** In order to avoid name conflicts between shortcuts, make sure to rename each Superalgos directory before running `node setup`. + +Congratulations your installation is complete! + +> **The Usage section below explains how to run the app.** + +
+ +**DEPENDENCY INSTALLATION FOR RASPBERRY PI USERS** + +As noted above, running `node setup` installs GUI shortcuts by default. To suppress this behavior in headless installations, add the `noShortcuts` flag as follows: + +``` +node setup noShortcuts +``` + +
+ +**Troubleshooting Dependency Installation** + +If you are having difficulty running the node setup command here are a few common issues that may be getting in the way. + +**1.** Check the version of node and npm you have installed. Make sure that you are running an updated version of node greater than version 12 and npm greater than version 5. You can check which version you have by typing `node -v` and `npm -v` into a command prompt or terminal. If your version numbers are below these, you can update your installation by following the instructions outlined in the "Node JS Installation" step above. + + +**2.** If you are installing Superalgos in an administratively protected directory you will need to do one of the following: + +- For Windows start your command prompt as an administrator. + +- For Linux and Mac Systems make sure to add the sudo command to node setup. This will look like `sudo node setup`. + + +**3.** For Windows it is important that you have C:\Windows\System32 added to your global PATH. For instructions on how to do this google "add to the path on Windows 10." + +## 4. Installation Notes + +**A.** You need to make a fork so that you may contribute work. Superalgos is a Community project and you are expected to contribute, like everyone else. You don't need to be a technical person to contribute. Fixing a typo in the docs or translating a paragraph into your native language are valuable contributions too. Superalgos has built-in features that make contributing easy. Help make Superalgos better and Superalgos will better serve you! Free-riding is not cool, particularly on free, open-source, Community-driven projects. + +**B.** The software includes an in-app self-update command / feature. It will help you stay up-to-date with the latest version of the software. Updates are on-demand, so don't worry about undesired updates. The project moves very fast and new features become available regularly, particularly if you choose to run the software in the ```develop``` branch (you may switch branches from within the app). + +**C.** It is a good idea to perodically run the `node setup` command to keep the underlying dependencies for your Superalgos installation up to date. + +**D.** Before installing the client on a remote computer in an attempt to access the UI from a different machine, we highly recommend you do a standard installation on your PC / laptop first. Leave your Raspberry Pi or VPS for later, once you have done all available tutorials. This single tip will save you a lot of time: you don't need to add complexity before you learn how to handle the app, and the GUI performs best in a local installation. + +# Usage + +## 1. Run the Client and GUI + +**A.** To run Superalgos, go to the Superalgos directory/folder and run this command: + +``` +node run +``` + +The Client will run on your terminal and the GUI will launch on your default browser. If Chrome/Safari is not your default browser, copy the URL, close the browser, open Chrome/Safari, and paste the URL. Be patient... it takes a few seconds to fully load the GUI. + +A Welcome Tutorial pops-up automatically. You must do this Tutorial to finish the setup and to learn the basics. It's the ultimate onboarding experience, superior to all other resources available, including videos and the Docs. + +![run-the-system-01](https://user-images.githubusercontent.com/13994516/107037804-e5fc6200-67bb-11eb-82f2-d0f40247fa14.gif) + +If you are running a headless Raspberry Pi (one without a screen) you may need to change directories first and run Superalgos with the `minMemo` and `noBrowser` options. +``` +cd Superalgos +``` +then +``` +node run minMemo noBrowser +``` + +In addition, you may use any of the automatically installed desktop and start menu shortcuts to launch Superalgos. + +**NOTE:** Shortcuts are not currently supported on Mac. Collaborators are needed to finish this feature. + +**B.** Enable Desktop Shortcut on Ubuntu + +The majority of shortcuts that are automatically installed will work out of the box. Desktop shortcuts on Ubuntu, however, require a few additional steps to set up. + +First, desktop icons need to be enabled within the Tweaks app. +* Check if Tweaks is installed. +* If not go to Ubuntu Software. +* Install Tweaks. +* Open Tweaks. +* Under extensions turn on Desktop Icons + +![enable-ubuntu-shortcut](https://user-images.githubusercontent.com/55707292/117553927-f0780300-b019-11eb-9e36-46b509653283.gif) + +**TIP:** If you do not see the desktop shortcut appear right away you may need to restart your computer. + +Finally, you will need to enable the desktop shortcut. +* Right click Superalgos.desktop and select Allow Launching. + +![allow-launching](https://user-images.githubusercontent.com/55707292/117553933-fcfc5b80-b019-11eb-872c-4fad81b184d2.gif) + +Now both launcher and desktop shortcuts will launch Superalgos like any other program on your computer. + +## 3. Usage Notes + +We are testing the UI on Google Chrome and Safari on macOS only. It may work on other browsers as well — or not. If you are running on a different browser and ever need support, make sure you mention that fact upfront, or even better, try on Chrome/Safari first. + + **TIP:** If your computer has 8 GB of RAM or less, use ```node run minMemo``` to run the system with minimal RAM requirements. + +# Running Superalgos on a Headless Linux Server as a Daemon + +If you're running Superalgos on a headless linux server like a Raspberry Pi, you might want to run it as a daemon so it isn't attached to your current login session. The easiest, most standard way to go about this is probably using `systemd`. Most linux distributions use it as default init system/service manager. + +## Using `systemd` + +Create a `superalgos.service` file looking like this (change `` to your user name and `/path/to/Superalgos` to your Superalgos folder, for instance `/home/John/Superalgos`): +``` +[Unit] +Description=Superalgos client + +[Service] +Type=simple +User= +WorkingDirectory=/path/to/Superalgos +ExecStart=/usr/bin/node run minMemo noBrowser + +[Install] +WantedBy=multi-user.target + +``` +There is no need to run Superalgos as root so we're running it as a user. The `minMemo` option assumes you're running on a small machine like a Raspberry Pi, while `noBrowser` makes sense for running daemonized. + +Now, as root (or using `sudo`), put the file `superalgos.service` you just created in `/etc/systemd/system/` and issue the command +``` +systemctl enable superalgos +``` +This will install the service so that Superalgos is started on boot. To start it manually, do (again as root or with `sudo`) +``` +systemctl start superalgos +``` + +To see the output of Superalgos, use +``` +journalctl -u superalgos +``` +or to follow the output, +``` +journalctl -u superalgos -f +``` + +# Uninstall + +Superalgos writes nothing outside of the ```Superalgos``` folder other than shortcut files. To uninstall the software, follow these steps: + +Open a terminal or command prompt and navigate to your main Superalgos directory and type the following command: +``` +node uninstall +``` +This will remove any shortcut files that have been installed. + +Then simply delete the `Superalgos` folder. There will be nothing left on your computor. + +# Welcome Tutorial + +Once the app finishes loading, an interactive tutorial takes you by the hand and walks you all around the system while you learn the basic skills required to use the interface, mine data, backtest strategies, and even run a live trading session. It is highly recommended you follow the tutorial until the end, as it is carefully crafted to make your onboarding as easy as possible. Tutorials are the absolute best way to tackle the learning curve. You should do all tutorials before you start exploring other avenues on your own. + +![welcome-tutorial-00](https://user-images.githubusercontent.com/13994516/107038771-4a6bf100-67bd-11eb-92e0-353525a972a9.gif) + + **NOTE:** The tutorial uses Binance or Binance US as the exchange of choice. If you don't have an account with Binance or Binance US, you will still be able to follow 100% of the tutorial. When you get to the live trading section, keep going even if you don't intend to run the session. You may learn how to work with other exchanges later on. + +# Docker Deployments + +Docker container images can be found at https://github.com/users/Superalgos/packages/container/package/superalgos + +If you wish to run Superalgos over docker platform, follow these steps. + +**Note:** This has not been extensively tested yet. If you run into troubles, please contact us at the [Superalgos Support Group](https://t.me/superalgossupport). + +## 1. Install Docker + +Follow the link to [install docker](https://docs.docker.com/engine/install/). + +## 2. Run + + +### Option A. Using pre-built container + +You will need to create local storage directories beforehand, by example with `mkdir Data-Storage Log-Files My-Workspaces` + +``` +docker run \ + -d \ + --rm \ + --name superalgos \ + -p 18041:18041 \ + -p 34248:34248 \ + -v $(pwd)/Data-Storage:/app/Data-Storage \ + -v $(pwd)/Log-Files:/app/Log-Files \ + -v $(pwd)/My-Workspaces:/app/My-Workspaces \ + ghcr.io/superalgos/superalgos:latest +``` + +Now you can access the Superalgos UI at http://127.0.0.1:34248 + +To see console logs you can use `docker logs superalgos -f` + +When you're done just exec `docker kill superalgos` + +### Option B. Build container locally using docker-compose + +Follow the link to [install docker-compose](https://docs.docker.com/compose/install/) + +Run `docker-compose -f Docker/docker-compose.yml up`. + +## Configure the Container Environment + +### Available image tags + +To avoid breaking changes, the `shasum hash` and the `release` tags are the best to use. These will generally ensure you are always running the same code. The other tags will change which code they are pointing to more frequently and without notice. + +- `latest` : the absolute latest build +- `master` : the latest master branch build +- `develop` : the latest develop branch build +- `` : a specific git commit hash +- `` : corresponds with a Github Release (git tag), i.e. `beta-10` + +### Environment variables + +`PUID` and `GUID` environment variables can be used to help avoid permissions issues in the mounted volumes between the container environment and the local OS environment. The default `PUID` and `GUID` is `1000`. You can view the current user's PUID and GUID with the `id` command. + +## Troubleshooting + +Some users have reported the Docker installation was not working, and the root cause was that the ad blocker was blocking the scripts to run. # Superalgos is User-centric From cfd8aba0ea8f2c6d26720f3964d09f2d7aa5db8e Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sat, 28 Aug 2021 17:11:31 +0200 Subject: [PATCH 04/81] README format --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8de488239..7a019740f 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ ![last-commit](https://img.shields.io/github/last-commit/Superalgos/Superalgos/develop?label=last%20commit%20to%20develop) ![bot-friendliness](https://img.shields.io/badge/Bot%20Friendliness%20Level-119%25-yellow) -Superalgos is not just another open-source project. We are an open and welcoming community devised, nurtured, and incentivized with the project's native Superalgos (SA) Token to build an open trading intelligence network. +Superalgos is not just another open-source project. We are an open and welcoming community devised, nurtured, and incentivized with the project's native Superalgos (SA) Token to build an open trading intelligence network. You will notice the difference as soon as you join the [Telegram Community Group](https://t.me/superalgoscommunity) or the new [Discord Server](https://discord.gg/CGeKC6WQQb)! -> Can't wait to contribute? No need to wait! You may start by giving a star to this repository in the top-right corner of this page! +> Can't wait to contribute? Sstart by giving a star to this repository in the top-right corner of this page! ![superalgos-readme](https://user-images.githubusercontent.com/13994516/106380124-844d8980-63b0-11eb-9bd9-4f977b6c183b.gif) @@ -34,6 +34,7 @@ Node JS is an open-source server environment required to run Superalgos. **C.** Run the installer with the default configuration — just click Next until Node.JS is fully installed. That's it! You can continue with step 2 (Git Installation).
+
**NODE JS INSTALLATION FOR RASPBERRY PI USERS** @@ -59,6 +60,8 @@ node -v ``` npm -v ``` + +

## 2. Git Installation @@ -78,6 +81,7 @@ Git is an open-source distributed version control system required to download an **NOTE FOR MAC USERS:** Depending on your setup, installing Git may be optional. The native XCode Command Line Developer Tools seems to work well. If you do install Git, we have tested Tim Harper's binary installer successfully.
+
**GIT INSTALLATION FOR RASPBERRY PI USERS** @@ -85,7 +89,7 @@ Just like with Node.JS, you may follow the above instructions to install Git, or ``` sudo apt-get install git ``` - +

## 3. Google Chrome or Safari @@ -151,6 +155,7 @@ Congratulations your installation is complete! > **The Usage section below explains how to run the app.**
+
**DEPENDENCY INSTALLATION FOR RASPBERRY PI USERS** @@ -159,7 +164,7 @@ As noted above, running `node setup` installs GUI shortcuts by default. To suppr ``` node setup noShortcuts ``` - +

**Troubleshooting Dependency Installation** From a6bc5b34e86629fc4788e829886b1fa8f8c53fe1 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sat, 28 Aug 2021 17:13:58 +0200 Subject: [PATCH 05/81] README removing format --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7a019740f..38b4a167a 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ Node JS is an open-source server environment required to run Superalgos. **C.** Run the installer with the default configuration — just click Next until Node.JS is fully installed. That's it! You can continue with step 2 (Git Installation).
-
**NODE JS INSTALLATION FOR RASPBERRY PI USERS** @@ -61,7 +60,6 @@ node -v npm -v ``` -

## 2. Git Installation @@ -81,7 +79,6 @@ Git is an open-source distributed version control system required to download an **NOTE FOR MAC USERS:** Depending on your setup, installing Git may be optional. The native XCode Command Line Developer Tools seems to work well. If you do install Git, we have tested Tim Harper's binary installer successfully.
-
**GIT INSTALLATION FOR RASPBERRY PI USERS** @@ -89,7 +86,7 @@ Just like with Node.JS, you may follow the above instructions to install Git, or ``` sudo apt-get install git ``` -
+
## 3. Google Chrome or Safari @@ -155,7 +152,6 @@ Congratulations your installation is complete! > **The Usage section below explains how to run the app.**
-
**DEPENDENCY INSTALLATION FOR RASPBERRY PI USERS** @@ -164,7 +160,7 @@ As noted above, running `node setup` installs GUI shortcuts by default. To suppr ``` node setup noShortcuts ``` -
+
**Troubleshooting Dependency Installation** From 649bc4e0a9f86635cfadae0c6c68bfdf35e6c88d Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sat, 28 Aug 2021 18:25:52 +0200 Subject: [PATCH 06/81] Community Building Programs WIP --- .../community-building-programs.json | 41 +++++++++++++++++-- .../Tokens/Tokens-Awarded/tokens-awarded.json | 32 ++++++++++++++- 2 files changed, 68 insertions(+), 5 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json b/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json index 2f1067b45..a29a9e05d 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json @@ -1,13 +1,48 @@ { "type": "Community Building Programs", "definition": { - "text": "Superalgos thrives through contributions and collaboration. We designed the Community Building Programs to foster a community in which members are always ready to help and give back!", - "updated": 1629994549969 + "text": "Superalgos thrives through contributions and collaboration. We designed the Community Building Programs to foster a community in which members are always ready to help and give back! The node may spawn the Referral Program, Support Program, and Mentorship Program nodes.", + "updated": 1630167175719 }, "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630165468473 + }, { "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "text": "In general terms, the Referral Program, Support Program, and Mentorship Program all have the following common rules:", + "updated": 1630167199898 + }, + { + "style": "List", + "text": "When your profile is referenced by others through their User Referrer, User Supporter, or User Mentor nodes, they pass on 10% of the Referral Power, Support Power, or Mentorship Power available in the node to you. This is your Incoming Power in the corresponding program.", + "updated": 1630166954607 + }, + { + "style": "List", + "text": "Your Incoming Power is added to your Own Power in the corresponding program, so that you may pass on more power to other User Profiles. Like in the reverse case, when you reference other User Profiles, you pass on 10% of the power that reaches the node establishing the reference.", + "updated": 1630166856996 + }, + { + "style": "Callout", + "text": "This passing of 10% of the power from one user to the next has the effect of rewarding collaboration chains. For instance, Alice tells her friend Bob about Superalgos. When Bob eventually sets up his User Profile, he declares Alice as his referrer. This means that Alice gets 10% of the Referral Power that Bob drives to his User Referrer node. Then, Bob brings his friend Charly to Superalgos. Charly sets up his profile and declares Bob as his referrer. So now Bob gets 10% of the Referral Power that Charly drives to his User Referrer node. Can you see what happens with Alice's Incoming Referral Power? That's it! She gets 10% of Bob's power, which includes 10% of Charly's power!", + "updated": 1630167091644 + }, + { + "style": "Note", + "text": "Pretty much the same happens with the Support Program and the Mentorship Program." + }, + { + "style": "Text", + "text": "The Incoming Power you get from other users is in a Direct Proportion to the number of tokens you get from the corresponding program rewards pool. The calculation is based on a Rule of Three, and the result is displayed under the Tokens Bonus node of the corresponding program.", + "updated": 1630167868785 + }, + { + "style": "Json", + "text": "Total Incoming Power [*] -> 100% of the pool\n Your Incoming Power [**] -> X% of the pool\n\nX = Your Incoming Power * 100% / Total Incoming Power\n\n[*] The sum of all Incoming Power in all User Profiles combined for the given program.\n[**] Your Incoming Power in the given program.", + "updated": 1630167666938 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json index 748444a02..7451d2346 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json @@ -1,8 +1,8 @@ { "type": "Tokens Awarded", "definition": { - "text": "The Tokens Awarded node is present on each of the programs in the hierarchy. It exists to accumulate and display the number of Superalgos SA Tokens awarded to your profile through each the corresponding program.", - "updated": 1630095292390 + "text": "The Tokens Awarded node is present on each of the programs in the hierarchy. It exists to accumulate and display the number of Superalgos SA Tokens awarded to your profile through each program.", + "updated": 1630164138055 }, "paragraphs": [ { @@ -15,6 +15,34 @@ "text": "The information on how many tokens the particular program has awarded you is displayed as a notice below the node, along with other relevant information that depends on the context, like the number of people that helped you get them, or the number of claims computed, etc.", "updated": 1630095366072 }, + { + "style": "Subtitle", + "text": "Community Building Programs Calculations", + "updated": 1630165409867 + }, + { + "style": "Text", + "text": "In general terms, the Referral Program, Support Program, and Mentorship Program have the following common rules:", + "updated": 1630164392230 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "List", + "text": "When your profile is referenced by others (through their User Referrer, User Supporter, or User Mentor nodes), they pass on 10% of the Token Power available in the node to you. This is your Incoming Power.", + "updated": 1630164987701 + }, + { + "style": "List", + "text": "The Incoming Power is added to your Own Power in the corresponding program, so that you may pass on more power to other User Profiles. Like in the reverse case, when you reference other User Profiles, you pass on 10% of power that reaches the node establishing the reference.", + "updated": 1630165213925 + }, + { + "style": "Text", + "text": "" + }, { "style": "Block", "text": "Configuration" From 72bf5129a89c511d23f55927600b4e40904daf62 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 28 Aug 2021 19:04:09 +0200 Subject: [PATCH 07/81] User Profiles auto ordered. --- .../Spaces/User-Profile-Space/UserProfile.js | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 18b2be814..cc7abf935 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -41,6 +41,30 @@ function newGovernanceUserProfileSpace() { /* We are going to collapse all User Profiles to save processing resources at the UI */ + for (let i = 0; i < userProfiles.length; i++) { + let userProfile = userProfiles[i] + if (userProfile.payload.floatingObject.isCollapsed !== true) { + userProfile.payload.floatingObject.collapseToggle() + } + } + /* + Here we will change the Y position of all profiles so that they are all at the same level. + */ + let spaceWitdh = UI.projects.foundations.spaces.floatingSpace.container.frame.width + const X_STEP = spaceWitdh / (userProfiles.length + 1) + const Y_LEVEL = userProfiles[0].payload.floatingObject.container.frame.position.y + let xOffset = X_STEP + let yOffset = 2000 + + for (let i = 0; i < userProfiles.length; i++) { + userProfiles[i].payload.floatingObject.container.frame.position.x = xOffset + xOffset = xOffset + X_STEP + } + for (let i = 1; i < userProfiles.length; i++) { + userProfiles[i].payload.floatingObject.container.frame.position.y = Y_LEVEL + yOffset + yOffset = -yOffset + } + for (let i = 0; i < userProfiles.length; i++) { let userProfile = userProfiles[i] if (userProfile.payload.floatingObject.isCollapsed !== true) { From 31a8a5c473ca469453ae9a0812bb32fd310c4be9 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 28 Aug 2021 19:12:06 +0200 Subject: [PATCH 08/81] Goverannce System auto positioning of Profiles --- .../Spaces/User-Profile-Space/UserProfile.js | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index cc7abf935..871916170 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -52,17 +52,36 @@ function newGovernanceUserProfileSpace() { */ let spaceWitdh = UI.projects.foundations.spaces.floatingSpace.container.frame.width const X_STEP = spaceWitdh / (userProfiles.length + 1) + const Y_STEP = 3000 + const Y_LEVEL = userProfiles[0].payload.floatingObject.container.frame.position.y let xOffset = X_STEP - let yOffset = 2000 - + let yOffset = 0 + for (let i = 0; i < userProfiles.length; i++) { - userProfiles[i].payload.floatingObject.container.frame.position.x = xOffset + userProfiles[i].payload.floatingObject.container.frame.position.x = xOffset xOffset = xOffset + X_STEP } for (let i = 1; i < userProfiles.length; i++) { + switch (true) { + case (yOffset === 0): { + yOffset = Y_STEP + break + } + case (yOffset === Y_STEP): { + yOffset = 1 + break + } + case (yOffset === 1): { + yOffset = -Y_STEP + break + } + case (yOffset === -Y_STEP): { + yOffset = 0 + break + } + } userProfiles[i].payload.floatingObject.container.frame.position.y = Y_LEVEL + yOffset - yOffset = -yOffset } for (let i = 0; i < userProfiles.length; i++) { From 2c83973b92a2e3ab596e105ea29f66396c8d524f Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sat, 28 Aug 2021 19:21:21 +0200 Subject: [PATCH 09/81] Many new concepts defined --- .../B/Bonus/Bonus-Pool/bonus-pool.json | 13 +++++++++ .../R/Rewards/Rewards-Pool/rewards-pool.json | 13 +++++++++ .../Superalgos-Pools/superalgos-pools.json | 27 +++++++++++++++++++ .../community-building-programs.json | 22 ++++++++++----- .../Docs-Nodes/P/Pools/Pools/pools.json | 14 +++++----- .../Tokens/Tokens-Awarded/tokens-awarded.json | 14 ++-------- .../T/Tokens/Tokens-Bonus/tokens-bonus.json | 8 +++--- 7 files changed, 81 insertions(+), 30 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Concepts/B/Bonus/Bonus-Pool/bonus-pool.json create mode 100644 Projects/Governance/Schemas/Docs-Concepts/R/Rewards/Rewards-Pool/rewards-pool.json create mode 100644 Projects/Governance/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Pools/superalgos-pools.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/B/Bonus/Bonus-Pool/bonus-pool.json b/Projects/Governance/Schemas/Docs-Concepts/B/Bonus/Bonus-Pool/bonus-pool.json new file mode 100644 index 000000000..a8b1b97da --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/B/Bonus/Bonus-Pool/bonus-pool.json @@ -0,0 +1,13 @@ +{ + "type": "Bonus Pool", + "definition": { + "text": "A Bonus Pool allocates the tokens to be distributed as bonuses for participating in certain Governance Programs. Each program that features a Token Bonus has its Bonus Pool defined under the Governance Programs section of the Superalgos Pools hierarchy. A bonus represents an incentive to participate in the given program and is displayed Tokens Bonus node.", + "updated": 1630169555986 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Rewards/Rewards-Pool/rewards-pool.json b/Projects/Governance/Schemas/Docs-Concepts/R/Rewards/Rewards-Pool/rewards-pool.json new file mode 100644 index 000000000..9faa1dac0 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Rewards/Rewards-Pool/rewards-pool.json @@ -0,0 +1,13 @@ +{ + "type": "Rewards Pool", + "definition": { + "text": "A Rewards Pool allocates the tokens to be distributed as rewards for contributions on several of the existing Governance Programs. Each program that distributes rewards has its Rewards Pool defined under the Governance Programs section of the Superalgos Pools hierarchy. Rewards represent the value of your contributions to each of the programs. Each program calculates rewards in a particular way and displays the result in its Tokens Rewards node.", + "updated": 1630169267228 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Pools/superalgos-pools.json b/Projects/Governance/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Pools/superalgos-pools.json new file mode 100644 index 000000000..9911f46d2 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Pools/superalgos-pools.json @@ -0,0 +1,27 @@ +{ + "type": "Superalgos Pools", + "definition": { + "text": "Superalgos Pools is the top-level hierarchy kickstarting the definition of the whole Superalgos Project. It features the definition of several Pool nodes describing the main areas of project development that the Community wishes to incentivize.", + "updated": 1630170275507 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630170343846 + }, + { + "style": "Text", + "text": "Because this is the highest level definition of how tokens will be distributed, the Superalgos Pools hierarchy is present in all governance Plugin Workspaces." + }, + { + "style": "Success", + "text": "Many of the Pool nodes defined in this hierarchy link to further definitions on other hierarchies, some of which may exist on other workspaces. To learn more about project definitions, read the Introduction to Governance Definitions page.", + "updated": 1630170330253 + }, + { + "style": "Note", + "text": "The configuration of the top-level node in the hierarchy determines how many tokens will be distributed in the release." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json b/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json index a29a9e05d..ec260f509 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json @@ -12,8 +12,18 @@ }, { "style": "Text", - "text": "In general terms, the Referral Program, Support Program, and Mentorship Program all have the following common rules:", - "updated": 1630167199898 + "text": "Each of the Community Building Programs has an associated Rewards Pool and a Bonus Pool under the Governance Programs > Community Building Programs section of the Superalgos Pools hierarchy.", + "updated": 1630168361008 + }, + { + "style": "Note", + "text": "The incentives entailed in a Bonus Pool are explained in the Tokens Bonus node.", + "updated": 1630170463942 + }, + { + "style": "Text", + "text": "Let's explore how Rewards Pools are distributed in the case of Community Building Programs. In general terms, the Referral Program, Support Program, and Mentorship Program all have the following common rules:", + "updated": 1630168572231 }, { "style": "List", @@ -36,13 +46,13 @@ }, { "style": "Text", - "text": "The Incoming Power you get from other users is in a Direct Proportion to the number of tokens you get from the corresponding program rewards pool. The calculation is based on a Rule of Three, and the result is displayed under the Tokens Bonus node of the corresponding program.", - "updated": 1630167868785 + "text": "The Incoming Power you get from other users is in a Direct Proportion to the number of tokens you get from the corresponding program Rewards Pool. The calculation is based on a Rule of Three, and the result is displayed under the Tokens Bonus node of the corresponding program.", + "updated": 1630170674503 }, { "style": "Json", - "text": "Total Incoming Power [*] -> 100% of the pool\n Your Incoming Power [**] -> X% of the pool\n\nX = Your Incoming Power * 100% / Total Incoming Power\n\n[*] The sum of all Incoming Power in all User Profiles combined for the given program.\n[**] Your Incoming Power in the given program.", - "updated": 1630167666938 + "text": "Total Incoming Power [*] -> 100% of the pool\n Your Incoming Power [**] -> X% of the pool -> Tokens Rewards\n\nTokens Rewards = Your Incoming Power * 100% / Total Incoming Power\n\n[*] The sum of all Incoming Power (in the given program) in all User Profiles combined.\n[**] Your Incoming Power (in the given program).", + "updated": 1630170860166 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Pools/Pools/pools.json b/Projects/Governance/Schemas/Docs-Nodes/P/Pools/Pools/pools.json index 74e7bdd1c..fface73a7 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Pools/Pools/pools.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Pools/Pools/pools.json @@ -56,16 +56,14 @@ "text": "Superalgos Pools" }, { - "style": "Text", - "text": "The Superalgos Pools hierarchy is where everything starts, meaning that it is the top-level hierarchy kickstarting the definition of the whole Project." + "style": "Include", + "text": "Governance->Concept->Superalgos Pools->Definition", + "updated": 1630171005510 }, { - "style": "Text", - "text": "Many of the Pool nodes defined in this hierarchy link to further definitions on other hierarchies. " - }, - { - "style": "Note", - "text": "The configuration of the top-level node in the hierarchy determines how many tokens will be distributed in the release." + "style": "Include", + "text": "Governance->Concept->Superalgos Pools->Content", + "updated": 1630171012564 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json index 7451d2346..03ead3cb0 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json @@ -22,23 +22,13 @@ }, { "style": "Text", - "text": "In general terms, the Referral Program, Support Program, and Mentorship Program have the following common rules:", - "updated": 1630164392230 + "text": "The Community Building Programs node page explains how Tokens Rewards are calculated for these particular program.", + "updated": 1630171164026 }, { "style": "Text", "text": "" }, - { - "style": "List", - "text": "When your profile is referenced by others (through their User Referrer, User Supporter, or User Mentor nodes), they pass on 10% of the Token Power available in the node to you. This is your Incoming Power.", - "updated": 1630164987701 - }, - { - "style": "List", - "text": "The Incoming Power is added to your Own Power in the corresponding program, so that you may pass on more power to other User Profiles. Like in the reverse case, when you reference other User Profiles, you pass on 10% of power that reaches the node establishing the reference.", - "updated": 1630165213925 - }, { "style": "Text", "text": "" diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json index 657e752c7..3b2c271f9 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Bonus/tokens-bonus.json @@ -12,8 +12,8 @@ }, { "style": "Text", - "text": "Programs that feature a Tokens Bonus have an associated Pool under the Governance Programs section of the Superalgos Pools hierarchy. These pools are used specifically to allocate tokens for these incentives.", - "updated": 1630096702504 + "text": "Programs that feature a Tokens Bonus have an associated Bonus Pool under the Governance Programs section of the Superalgos Pools hierarchy. These pools are used specifically to allocate tokens for these incentives.", + "updated": 1630168414638 }, { "style": "Callout", @@ -32,8 +32,8 @@ }, { "style": "Json", - "text": "Total Token Power [*] -> 100% of the pool\n Your Token Power [**] -> X% of the pool\n\nX = Your Token Power * 100% / Total Token Power\n\n[*] The power driven to the given program by all User Profiles combined.\n[**] The power you drive to the given program.", - "updated": 1630157176789 + "text": "Total Token Power [*] -> 100% of the pool\n Your Token Power [**] -> X% of the pool -> Tokens Bonus\n\nTokens Bonus = Your Token Power * 100% / Total Token Power\n\n[*] The power driven to the given program by all User Profiles combined.\n[**] The power you drive to the given program.", + "updated": 1630171226134 } ] } \ No newline at end of file From d866b898cd7e5a97b626cd38cab270037766689f Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 28 Aug 2021 19:38:57 +0200 Subject: [PATCH 10/81] Fix Auto Arrange User Profiles --- .../UI/Spaces/User-Profile-Space/UserProfile.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 871916170..9f9a34b04 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -50,11 +50,13 @@ function newGovernanceUserProfileSpace() { /* Here we will change the Y position of all profiles so that they are all at the same level. */ - let spaceWitdh = UI.projects.foundations.spaces.floatingSpace.container.frame.width - const X_STEP = spaceWitdh / (userProfiles.length + 1) + const SPACE_WIDTH = UI.projects.foundations.spaces.floatingSpace.container.frame.width + const SPACE_HEIGHT = UI.projects.foundations.spaces.floatingSpace.container.frame.height + + const X_STEP = SPACE_WIDTH / (userProfiles.length + 1) const Y_STEP = 3000 - const Y_LEVEL = userProfiles[0].payload.floatingObject.container.frame.position.y + const Y_LEVEL = SPACE_HEIGHT * 0.45 let xOffset = X_STEP let yOffset = 0 @@ -62,7 +64,7 @@ function newGovernanceUserProfileSpace() { userProfiles[i].payload.floatingObject.container.frame.position.x = xOffset xOffset = xOffset + X_STEP } - for (let i = 1; i < userProfiles.length; i++) { + for (let i = 0; i < userProfiles.length; i++) { switch (true) { case (yOffset === 0): { yOffset = Y_STEP From ce7ce89150a9825c18cf45ee4a60283a7818646b Mon Sep 17 00:00:00 2001 From: Brett Taylor Date: Sat, 28 Aug 2021 13:43:26 -0400 Subject: [PATCH 11/81] update ssplatt profile --- .../Plugins/User-Profiles/ssplatt.json | 715 ++++++++++++++++-- 1 file changed, 646 insertions(+), 69 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/ssplatt.json b/Projects/Governance/Plugins/User-Profiles/ssplatt.json index 3a207a2b1..08a6c0f9f 100644 --- a/Projects/Governance/Plugins/User-Profiles/ssplatt.json +++ b/Projects/Governance/Plugins/User-Profiles/ssplatt.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "ssplatt", - "config": "{\n \"signature\": {\n \"message\": \"ssplatt\",\n \"messageHash\": \"0xbef81935208a5ef082638306a20998b2102881c5e48c2e646b771d41eeae6105\",\n \"v\": \"0x1c\",\n \"r\": \"0x69300bf3278cb434dea26ede48097dbf5c7023e3d7918d5ca0cdef7432d1c6ee\",\n \"s\": \"0x15abc24988775e3ecef9cb4e013376e0232a8e2da134c9c6b1cb16b6e4ee759a\",\n \"signature\": \"0x69300bf3278cb434dea26ede48097dbf5c7023e3d7918d5ca0cdef7432d1c6ee15abc24988775e3ecef9cb4e013376e0232a8e2da134c9c6b1cb16b6e4ee759a1c\"\n },\n \"codeName\": \"ssplatt\"\n}", + "config": "{\"signature\":{\"message\":\"ssplatt\",\"messageHash\":\"0xbef81935208a5ef082638306a20998b2102881c5e48c2e646b771d41eeae6105\",\"v\":\"0x1c\",\"r\":\"0x69300bf3278cb434dea26ede48097dbf5c7023e3d7918d5ca0cdef7432d1c6ee\",\"s\":\"0x15abc24988775e3ecef9cb4e013376e0232a8e2da134c9c6b1cb16b6e4ee759a\",\"signature\":\"0x69300bf3278cb434dea26ede48097dbf5c7023e3d7918d5ca0cdef7432d1c6ee15abc24988775e3ecef9cb4e013376e0232a8e2da134c9c6b1cb16b6e4ee759a1c\"},\"codeName\":\"ssplatt\"}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", @@ -9,6 +9,541 @@ "config": "{}", "project": "Governance", "tokenPowerSwitch": [], + "onboardingPrograms": { + "type": "Onboarding Programs", + "name": "New Onboarding Programs", + "config": "{}", + "project": "Governance", + "airdropProgram": { + "type": "Airdrop Program", + "name": "New Airdrop Program", + "config": "{}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "e6bad077-b21f-4ad5-acf8-eeb293ef1c2e", + "savedPayload": { + "position": { + "x": 20144.708572938485, + "y": 19148.37783738477 + }, + "targetPosition": { + "x": 20222.354286469243, + "y": 19438.155585271492 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "21fc9fe9-020e-46e6-aeb2-764f1838fac9", + "savedPayload": { + "position": { + "x": 20222.354286469243, + "y": 19438.155585271492 + }, + "targetPosition": { + "x": 20300, + "y": 19727.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "githubProgram": { + "type": "Github Program", + "name": "New Github Program", + "config": "{}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "50079cf4-9746-420e-80c3-2e6b85298ac7", + "savedPayload": { + "position": { + "x": 20455.291427061515, + "y": 19148.37783738477 + }, + "targetPosition": { + "x": 20377.645713530757, + "y": 19438.155585271492 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "e1c18d16-d11d-4fbe-9e4d-7e1288221c6f", + "savedPayload": { + "position": { + "x": 20377.645713530757, + "y": 19438.155585271492 + }, + "targetPosition": { + "x": 20300, + "y": 19727.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "1bc0ffaa-83d2-44c7-8231-74fb6b747487", + "savedPayload": { + "position": { + "x": 20300, + "y": 19727.933333158213 + }, + "targetPosition": { + "x": 20300, + "y": 20027.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "communityBuildingPrograms": { + "type": "Community Building Programs", + "name": "New Community Building Programs", + "config": "{}", + "project": "Governance", + "referralProgram": { + "type": "Referral Program", + "name": "New Referral Program", + "config": "{}", + "project": "Governance", + "userReferrers": [ + { + "type": "User Referrer", + "name": "Luis-Fernando-Molina", + "config": "{}", + "project": "Governance", + "id": "18ca0727-c296-4059-aef0-a75c324e526e", + "savedPayload": { + "position": { + "x": 20937.45333466609, + "y": 19588.155585271492 + }, + "targetPosition": { + "x": 20859.807621135333, + "y": 19877.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "Luis-Fernando-Molina", + "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ] + ] + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "43b6c240-ff85-41cf-b423-963ad99a8e9c", + "savedPayload": { + "position": { + "x": 21119.615242270665, + "y": 19727.933333158213 + }, + "targetPosition": { + "x": 20859.807621135333, + "y": 19877.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "7afeae27-2cc1-4888-b8d2-9c5536c6e9ae", + "savedPayload": { + "position": { + "x": 21149.585369022054, + "y": 19955.57904668897 + }, + "targetPosition": { + "x": 20859.807621135333, + "y": 19877.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "68e7a305-2909-4741-9b12-624d7e556915", + "savedPayload": { + "position": { + "x": 20812.132034355964, + "y": 19815.80129880225 + }, + "targetPosition": { + "x": 20600, + "y": 20027.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "supportProgram": { + "type": "Support Program", + "name": "New Support Program", + "config": "{}", + "project": "Governance", + "userSupporters": [ + { + "type": "User Supporter", + "name": "Luis-Fernando-Molina", + "config": "{}", + "project": "Governance", + "id": "8ca39d43-eb8b-4ea8-b5e1-594230285470", + "savedPayload": { + "position": { + "x": 21149.585369022054, + "y": 20100.287619627456 + }, + "targetPosition": { + "x": 20859.807621135333, + "y": 20177.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "Luis-Fernando-Molina", + "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ] + ] + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "4a32dc2c-14e4-4678-a3e9-54acabfcd427", + "savedPayload": { + "position": { + "x": 21119.615242270665, + "y": 20327.933333158213 + }, + "targetPosition": { + "x": 20859.807621135333, + "y": 20177.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "e0a87fb2-2fff-42ba-a51a-2ca560b9bb70", + "savedPayload": { + "position": { + "x": 20937.45333466609, + "y": 20467.711081044934 + }, + "targetPosition": { + "x": 20859.807621135333, + "y": 20177.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "411a6083-99ae-4ece-9334-42801ee0fc8c", + "savedPayload": { + "position": { + "x": 20900, + "y": 20027.933333158213 + }, + "targetPosition": { + "x": 20600, + "y": 20027.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "mentorshipProgram": { + "type": "Mentorship Program", + "name": "New Mentorship Program", + "config": "{}", + "project": "Governance", + "userMentors": [ + { + "type": "User Mentor", + "name": "Luis-Fernando-Molina", + "config": "{}", + "project": "Governance", + "id": "84ce8ba3-c177-43ed-b9f3-c901d014db2c", + "savedPayload": { + "position": { + "x": 21112.132034355964, + "y": 20240.065367514177 + }, + "targetPosition": { + "x": 20812.132034355964, + "y": 20240.065367514177 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "Luis-Fernando-Molina", + "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile" + ] + ] + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "6028a9fa-2862-4e8e-8b20-15b1871502e9", + "savedPayload": { + "position": { + "x": 21024.264068711927, + "y": 20452.19740187014 + }, + "targetPosition": { + "x": 20812.132034355964, + "y": 20240.065367514177 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "e537f875-0429-46c7-9e22-9f363b49e440", + "savedPayload": { + "position": { + "x": 20812.132034355964, + "y": 20540.065367514177 + }, + "targetPosition": { + "x": 20812.132034355964, + "y": 20240.065367514177 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "ef87e43d-72f8-4ff4-915d-38d376a381ed", + "savedPayload": { + "position": { + "x": 20812.132034355964, + "y": 20240.065367514177 + }, + "targetPosition": { + "x": 20600, + "y": 20027.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "ad9c1239-f4dd-4e12-8998-ecead32065ab", + "savedPayload": { + "position": { + "x": 20600, + "y": 20027.933333158213 + }, + "targetPosition": { + "x": 20300, + "y": 20027.933333158213 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "votesAndClaimsPrograms": { "type": "Votes And Claims Programs", "name": "New Votes And Claims Programs", @@ -35,18 +570,18 @@ "id": "72e640dd-cbe8-40eb-82e3-d58714736714", "savedPayload": { "position": { - "x": 6621.192378864668, - "y": 25328 + "x": 20859.807621135333, + "y": 20477.933333158213 }, "targetPosition": { - "x": 6881, - "y": 25478 + "x": 20600, + "y": 20627.933333158213 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -61,23 +596,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos-Docker", - "Assets" + "Assets", + "Governance", + "f92d7a00-be08-4f44-b000-e0f8c4658f14" ], [ "Docker", - "Asset Class" + "Asset Class", + "Governance", + "a56c295d-b3ea-4c29-917d-a05654851232" ], [ "Superalgos", - "Asset Class" + "Asset Class", + "Governance", + "d1ec3e31-62ba-443c-b765-63cb7eaf2cc9" ], [ "Docker", - "Asset Class" + "Asset Class", + "Governance", + "f279ee42-d52b-46a4-8070-3354efe82dbf" ], [ "docker-compose.yml", - "Asset" + "Asset", + "Governance", + "8b11af37-04c0-4932-93a4-538c96e90393" ] ] } @@ -90,18 +635,18 @@ "id": "f8a0c977-7987-483e-9f01-6ea3ad544efe", "savedPayload": { "position": { - "x": 7140.807621135332, - "y": 25328 + "x": 20859.807621135333, + "y": 20777.933333158213 }, "targetPosition": { - "x": 6881, - "y": 25478 + "x": 20600, + "y": 20627.933333158213 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -116,23 +661,33 @@ "referenceParentCombinedNodePath": [ [ "Superalgos-Docker", - "Assets" + "Assets", + "Governance", + "f92d7a00-be08-4f44-b000-e0f8c4658f14" ], [ "Docker", - "Asset Class" + "Asset Class", + "Governance", + "a56c295d-b3ea-4c29-917d-a05654851232" ], [ "Superalgos", - "Asset Class" + "Asset Class", + "Governance", + "d1ec3e31-62ba-443c-b765-63cb7eaf2cc9" ], [ "Docker", - "Asset Class" + "Asset Class", + "Governance", + "f279ee42-d52b-46a4-8070-3354efe82dbf" ], [ "Dockerfile", - "Asset" + "Asset", + "Governance", + "c106ff98-190a-4209-b325-074f8f16d9dc" ] ] } @@ -141,12 +696,12 @@ "id": "bb3c760b-f5bc-4085-9b25-bce13f68d4b6", "savedPayload": { "position": { - "x": 6881, - "y": 25478 + "x": 20600, + "y": 20627.933333158213 }, "targetPosition": { - "x": 6881, - "y": 25778 + "x": 20300, + "y": 20627.933333158213 }, "floatingObject": { "isPinned": false, @@ -167,19 +722,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos-Docker", - "Assets" + "Assets", + "Governance", + "f92d7a00-be08-4f44-b000-e0f8c4658f14" ], [ "Docker", - "Asset Class" + "Asset Class", + "Governance", + "a56c295d-b3ea-4c29-917d-a05654851232" ], [ "Superalgos", - "Asset Class" + "Asset Class", + "Governance", + "d1ec3e31-62ba-443c-b765-63cb7eaf2cc9" ], [ "Docker", - "Asset Class" + "Asset Class", + "Governance", + "f279ee42-d52b-46a4-8070-3354efe82dbf" ] ] } @@ -202,12 +765,12 @@ "id": "bc3448ff-42b0-4ce0-8701-b06687e83baf", "savedPayload": { "position": { - "x": 7481, - "y": 25778 + "x": 20300, + "y": 21227.933333158213 }, "targetPosition": { - "x": 7181, - "y": 25778 + "x": 20300, + "y": 20927.933333158213 }, "floatingObject": { "isPinned": false, @@ -228,19 +791,27 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Positions" + "Positions", + "Governance", + "50c68665-5da2-48a8-b229-7a1563ae82d2" ], [ "Rewarded Positions", - "Position Class" + "Position Class", + "Governance", + "8b29fcb2-3b9a-444f-b3b0-05976da9a18f" ], [ "Community Management", - "Position Class" + "Position Class", + "Governance", + "35b790f0-c567-498c-83fd-ac0aacd8720b" ], [ "Moderator", - "Position" + "Position", + "Governance", + "6e141ab6-cc79-44b6-a58a-60b6480f706e" ] ] } @@ -249,12 +820,12 @@ "id": "13d0ff82-dc45-45cd-95cf-0834dce22a52", "savedPayload": { "position": { - "x": 7181, - "y": 25778 + "x": 20300, + "y": 20927.933333158213 }, "targetPosition": { - "x": 6881, - "y": 25778 + "x": 20300, + "y": 20627.933333158213 }, "floatingObject": { "isPinned": false, @@ -275,15 +846,21 @@ "referenceParentCombinedNodePath": [ [ "Superalgos", - "Positions" + "Positions", + "Governance", + "50c68665-5da2-48a8-b229-7a1563ae82d2" ], [ "Rewarded Positions", - "Position Class" + "Position Class", + "Governance", + "8b29fcb2-3b9a-444f-b3b0-05976da9a18f" ], [ "Community Management", - "Position Class" + "Position Class", + "Governance", + "35b790f0-c567-498c-83fd-ac0aacd8720b" ] ] } @@ -296,12 +873,12 @@ "id": "299232ef-1aa4-4ea1-9872-56d396957fc9", "savedPayload": { "position": { - "x": 6881, - "y": 26078 + "x": 20000, + "y": 20627.933333158213 }, "targetPosition": { - "x": 6881, - "y": 25778 + "x": 20300, + "y": 20627.933333158213 }, "floatingObject": { "isPinned": false, @@ -319,12 +896,12 @@ "id": "efb5c85c-0a81-4c64-9e00-4211fdbfd558", "savedPayload": { "position": { - "x": 6881, - "y": 25778 + "x": 20300, + "y": 20627.933333158213 }, "targetPosition": { - "x": 6581, - "y": 25778 + "x": 20300, + "y": 20327.933333158213 }, "floatingObject": { "isPinned": false, @@ -342,12 +919,12 @@ "id": "768ed0b3-bb30-49df-a068-11b3bff1ab93", "savedPayload": { "position": { - "x": 6581, - "y": 25778 + "x": 20300, + "y": 20327.933333158213 }, "targetPosition": { - "x": 6281, - "y": 25778 + "x": 20300, + "y": 20027.933333158213 }, "floatingObject": { "isPinned": false, @@ -365,12 +942,12 @@ "id": "e056163b-0413-488e-913a-8baa59d41a4f", "savedPayload": { "position": { - "x": 6281, - "y": 25778 + "x": 20300, + "y": 20027.933333158213 }, "targetPosition": { - "x": 5981, - "y": 25778 + "x": 20000, + "y": 20027.933333158213 }, "floatingObject": { "isPinned": false, @@ -392,12 +969,12 @@ "id": "ed7a0fad-e0cb-479d-b197-ae5301647fdb", "savedPayload": { "position": { - "x": 5681, - "y": 25778 + "x": 19700, + "y": 20027.933333158213 }, "targetPosition": { - "x": 5981, - "y": 25778 + "x": 20000, + "y": 20027.933333158213 }, "floatingObject": { "isPinned": false, @@ -415,17 +992,17 @@ "id": "56600855-7a91-49e8-8a58-2fa28d07efd1", "savedPayload": { "position": { - "x": 5981, - "y": 25778 + "x": 20000, + "y": 20027.933333158213 }, "targetPosition": { - "x": 5981, - "y": 25778 + "x": 20000, + "y": 20027.933333158213 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": true, + "isCollapsed": false, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 From 4a202b909aeed3bea40120825045a2864e452fa1 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 28 Aug 2021 20:30:40 +0200 Subject: [PATCH 12/81] Superalgos Network: Bot Profile Stats Implemented --- Network/NetwokNode.js | 3 +- Network/Queries/BotProfileStats.js | 52 +++++++++++++++++++ Network/Queries/Events.js | 14 ++--- .../{ProfileStats.js => UserProfileStats.js} | 6 +-- Network/Query.js | 24 ++++++--- Network/userProfile.js | 2 +- 6 files changed, 84 insertions(+), 17 deletions(-) create mode 100644 Network/Queries/BotProfileStats.js rename Network/Queries/{ProfileStats.js => UserProfileStats.js} (89%) diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index fa5c8f701..5db39e9a1 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -20,7 +20,8 @@ global.NT = { EVENT: require('./Event.js'), POST: require('./Post.js'), QUERY: require('./Query.js'), - QUERY_PROFILE_STATS: require('./Queries/ProfileStats.js'), + QUERY_USER_PROFILE_STATS: require('./Queries/UserProfileStats.js'), + QUERY_BOT_PROFILE_STATS: require('./Queries/BotProfileStats.js'), QUERY_PROFILE_POSTS: require('./Queries/ProfilePosts.js'), QUERY_POST_REPLIES: require('./Queries/ProfileReplies.js'), QUERY_EVENTS: require('./Queries/Events.js') diff --git a/Network/Queries/BotProfileStats.js b/Network/Queries/BotProfileStats.js new file mode 100644 index 000000000..de05fea1a --- /dev/null +++ b/Network/Queries/BotProfileStats.js @@ -0,0 +1,52 @@ +exports.newBotProfileStats = function newBotProfileStats() { + + let thisObject = { + profile: undefined, + execute: execute, + initialize: initialize, + finalize: finalize + } + + return thisObject + + function finalize() { + thisObject.profile = undefined + } + + function initialize(queryReceived) { + /* + Validate Bot Profile + */ + let userProfile + if (queryReceived.targetBotProfileId !== undefined) { + userProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + } else { + userProfile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileId) + } + + if (userProfile === undefined) { + throw ('Target User Profile Not Found.') + } + /* + Validate Bot Profile + */ + thisObject.profile = userProfile.bots.get(queryReceived.targetBotProfileId) + if (thisObject.profile === undefined) { + throw ('Target Bot Profile Not Found.') + } + } + + function execute() { + + return { + "botProfileId": thisObject.profile.botProfileId, + "botProfileHandle": thisObject.profile.botProfileHandle, + "ranking": thisObject.profile.ranking, + "followingCount": thisObject.profile.followingCount, + "followersCount": thisObject.profile.followersCount, + "emitterEventsCount": thisObject.profile.emitterEventsCount, + "targetEventsCount": thisObject.profile.targetEventsCount, + "postsCount": thisObject.profile.postsCount + } + } +} \ No newline at end of file diff --git a/Network/Queries/Events.js b/Network/Queries/Events.js index bb84a4de8..b234d316a 100644 --- a/Network/Queries/Events.js +++ b/Network/Queries/Events.js @@ -130,13 +130,13 @@ exports.newEvents = function newEvents() { Test #1 : The Emitter or Target profile must be the same as the Query Profile. */ if (emitterUserProfile !== undefined) { - if (emitterUserProfile.userProfieId === thisObject.profile.userProfieId) { + if (emitterUserProfile.userProfileId === thisObject.profile.userProfileId) { addToResponse(event) return } } if (targetUserProfile !== undefined) { - if (targetUserProfile.userProfieId === thisObject.profile.userProfieId) { + if (targetUserProfile.userProfileId === thisObject.profile.userProfileId) { addToResponse(event) return } @@ -145,13 +145,13 @@ exports.newEvents = function newEvents() { Test #2 : The Emitter or Traget profile must be at the Following map of the Query Profile. */ if (emitterUserProfile !== undefined) { - if (thisObject.profile.following.get(emitterUserProfile.userProfieId) !== undefined) { + if (thisObject.profile.following.get(emitterUserProfile.userProfileId) !== undefined) { addToResponse(event) return } } if (targetUserProfile !== undefined) { - if (thisObject.profile.following.get(targetUserProfile.userProfieId) !== undefined) { + if (thisObject.profile.following.get(targetUserProfile.userProfileId) !== undefined) { addToResponse(event) return } @@ -200,15 +200,17 @@ exports.newEvents = function newEvents() { } if (emitterUserProfile !== undefined) { - let query = NT.modules.QUERY_PROFILE_STATS.newProfileStats() + let query = NT.modules.QUERY_PROFILE_STATS.newUserProfileStats() query.initialize({ targetUserProfileId: event.emitterUserProfileId }) eventResponse.emitterUserProfile = query.execute() + query.finalize() } if (targetUserProfile !== undefined) { - let query = NT.modules.QUERY_PROFILE_STATS.newProfileStats() + let query = NT.modules.QUERY_PROFILE_STATS.newUserProfileStats() query.initialize({ targetUserProfileId: event.targetUserProfileId }) eventResponse.targetUserProfile = query.execute() + query.finalize() } if (emitterPost !== undefined) { diff --git a/Network/Queries/ProfileStats.js b/Network/Queries/UserProfileStats.js similarity index 89% rename from Network/Queries/ProfileStats.js rename to Network/Queries/UserProfileStats.js index 56de88255..383d39aab 100644 --- a/Network/Queries/ProfileStats.js +++ b/Network/Queries/UserProfileStats.js @@ -1,4 +1,4 @@ -exports.newProfileStats = function newProfileStats() { +exports.newUserProfileStats = function newUserProfileStats() { let thisObject = { profile: undefined, @@ -10,7 +10,7 @@ exports.newProfileStats = function newProfileStats() { return thisObject function finalize() { - + thisObject.profile = undefined } function initialize(queryReceived) { @@ -32,7 +32,7 @@ exports.newProfileStats = function newProfileStats() { function execute() { return { - "userProfieId": thisObject.profile.userProfieId, + "userProfileId": thisObject.profile.userProfileId, "userProfileHandle": thisObject.profile.userProfileHandle, "blockchainAccount": thisObject.profile.blockchainAccount, "ranking": thisObject.profile.ranking, diff --git a/Network/Query.js b/Network/Query.js index 3c5d24dfd..65166a513 100644 --- a/Network/Query.js +++ b/Network/Query.js @@ -10,10 +10,11 @@ exports.newQuery = function newQuery() { const QUERY_TYPES = { - PROFILE_STATS: 0, - PROFILE_POSTS: 1, - POST_REPLIES: 2, - EVENTS: 3 + USER_PROFILE_STATS: 0, + BOT_PROFILE_STATS: 1, + PROFILE_POSTS: 2, + POST_REPLIES: 3, + EVENTS: 4 } @@ -30,27 +31,38 @@ exports.newQuery = function newQuery() { switch (thisObject.queryType) { - case QUERY_TYPES.PROFILE_STATS: { - thisObject.query = NT.modules.QUERY_PROFILE_STATS.newProfileStats() + case QUERY_TYPES.USER_PROFILE_STATS: { + thisObject.query = NT.modules.QUERY_USER_PROFILE_STATS.newUserProfileStats() query.initialize(queryReceived) + query.finalize() + break + } + + case QUERY_TYPES.BOT_PROFILE_STATS: { + thisObject.query = NT.modules.QUERY_BOT_PROFILE_STATS.newBotProfileStats() + query.initialize(queryReceived) + query.finalize() break } case QUERY_TYPES.PROFILE_POSTS: { thisObject.query = NT.modules.QUERY_PROFILE_POSTS.newProfilePosts() query.initialize(queryReceived) + query.finalize() break } case QUERY_TYPES.POST_REPLIES: { thisObject.query = NT.modules.QUERY_POST_REPLIES.newPostReplies() query.initialize(queryReceived) + query.finalize() break } case QUERY_TYPES.maps.EVENTS: { thisObject.query = NT.modules.QUERY_EVENTS.newEvents() query.initialize(queryReceived) + query.finalize() break } default: throw('Query Type Not Supported.') diff --git a/Network/userProfile.js b/Network/userProfile.js index 50766821f..07516f643 100644 --- a/Network/userProfile.js +++ b/Network/userProfile.js @@ -1,7 +1,7 @@ exports.newUserProfile = function newUserProfile() { let thisObject = { - userProfieId: undefined, + userProfileId: undefined, userProfileHandle: undefined, blockchainAccount: undefined, ranking: undefined, From ba6a385d55c275fef0dcd7727373eb31b2e70a71 Mon Sep 17 00:00:00 2001 From: 9808us <9808us@pm.me> Date: Sat, 28 Aug 2021 21:11:14 +0200 Subject: [PATCH 13/81] This is my first submission of User Profile [9808us] --- .../Plugins/User-Profiles/9808us.json | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Projects/Governance/Plugins/User-Profiles/9808us.json diff --git a/Projects/Governance/Plugins/User-Profiles/9808us.json b/Projects/Governance/Plugins/User-Profiles/9808us.json new file mode 100644 index 000000000..2f919176b --- /dev/null +++ b/Projects/Governance/Plugins/User-Profiles/9808us.json @@ -0,0 +1,84 @@ +{ + "type": "User Profile", + "name": "9808us", + "config": "{\n \"signature\": {\n \"message\": \"9808us\",\n \"messageHash\": \"0x979b53056d1e29f7e1801d0784d3228c463b3173d55bb43faa4f95b29a5fced1\",\n \"v\": \"0x1b\",\n \"r\": \"0x156fe1757248fe5a6752fa24d83985f4ee59f4bf9b09f55429c85eb7521c4b87\",\n \"s\": \"0x2fe78103a631760ecd41913ba30ad67fc7e3116378d0cc574aaabb99b0e0be37\",\n \"signature\": \"0x156fe1757248fe5a6752fa24d83985f4ee59f4bf9b09f55429c85eb7521c4b872fe78103a631760ecd41913ba30ad67fc7e3116378d0cc574aaabb99b0e0be371b\"\n }\n}", + "project": "Governance", + "tokenPowerSwitch": { + "type": "Token Power Switch", + "name": "New Token Power Switch", + "config": "{}", + "project": "Governance", + "tokenPowerSwitch": [], + "id": "d7571db7-acfc-4d8c-aa91-582ff7f5dbb3", + "savedPayload": { + "position": { + "x": 30557.999999999996, + "y": 17406.75 + }, + "targetPosition": { + "x": 30486.999999999996, + "y": 17409.75 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensMined": { + "type": "Tokens Mined", + "name": "New Tokens Mined", + "project": "Governance", + "id": "a72ec234-c5dc-425e-9ace-95ffed7c0542", + "savedPayload": { + "position": { + "x": 30562.999999999996, + "y": 17499.75 + }, + "targetPosition": { + "x": 30486.999999999996, + "y": 17409.75 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "280f0baf-bc13-497c-b255-618c1a146442", + "savedPayload": { + "position": { + "x": 30486.999999999996, + "y": 17409.75 + }, + "targetPosition": { + "x": 30424.999999999996, + "y": 17357.75 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } +} \ No newline at end of file From ebe4e27890a48b5c47f1845c8e6b1f2115289d24 Mon Sep 17 00:00:00 2001 From: 9808us <9808us@pm.me> Date: Sat, 28 Aug 2021 21:43:49 +0200 Subject: [PATCH 14/81] This is my second submission of User Profile [9808us] --- .../Plugins/User-Profiles/9808us.json | 711 +++++++++++++++++- 1 file changed, 705 insertions(+), 6 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/9808us.json b/Projects/Governance/Plugins/User-Profiles/9808us.json index 2f919176b..802b7fdba 100644 --- a/Projects/Governance/Plugins/User-Profiles/9808us.json +++ b/Projects/Governance/Plugins/User-Profiles/9808us.json @@ -9,11 +9,710 @@ "config": "{}", "project": "Governance", "tokenPowerSwitch": [], + "onboardingPrograms": { + "type": "Onboarding Programs", + "name": "New Onboarding Programs", + "config": "{}", + "project": "Governance", + "airdropProgram": { + "type": "Airdrop Program", + "name": "New Airdrop Program", + "config": "{}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "85d3b184-0122-4cb3-a83c-b3c00d626767", + "savedPayload": { + "position": { + "x": 30248.408006401078, + "y": 16722.954681296138 + }, + "targetPosition": { + "x": 30471.351454044296, + "y": 16923.693863203796 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "9163e52d-f77c-40b7-b139-960681b28171", + "savedPayload": { + "position": { + "x": 30471.351454044296, + "y": 16923.693863203796 + }, + "targetPosition": { + "x": 30694.294901687514, + "y": 17124.433045111455 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "githubProgram": { + "type": "Github Program", + "name": "New Github Program", + "config": "{}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "5ebe2e87-295e-42cc-98f1-c70ee2efa4a3", + "savedPayload": { + "position": { + "x": 30819.04191617817, + "y": 16537.544484671173 + }, + "targetPosition": { + "x": 30756.66840893284, + "y": 16830.988764891314 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "d38054ef-3c0b-43fd-986d-27dd39f72f2c", + "savedPayload": { + "position": { + "x": 30756.66840893284, + "y": 16830.988764891314 + }, + "targetPosition": { + "x": 30694.294901687514, + "y": 17124.433045111455 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "975175a5-fbf2-4775-80c3-175af1bf27ae", + "savedPayload": { + "position": { + "x": 30694.294901687514, + "y": 17124.433045111455 + }, + "targetPosition": { + "x": 30786.999999999996, + "y": 17409.75 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "communityBuildingPrograms": { + "type": "Community Building Programs", + "name": "New Community Building Programs", + "config": "{}", + "project": "Governance", + "referralProgram": { + "type": "Referral Program", + "name": "New Referral Program", + "config": "{}", + "project": "Governance", + "userReferrers": [ + { + "type": "User Referrer", + "name": "", + "config": "{}", + "project": "Governance", + "id": "10938918-7341-47fd-84ea-ddc86904ec58", + "savedPayload": { + "position": { + "x": 31136.025304362334, + "y": 16659.761926593106 + }, + "targetPosition": { + "x": 31151.726091235218, + "y": 16959.350787019477 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "User Referrer", + "name": "", + "config": "{}", + "project": "Governance", + "id": "d004c04d-aa54-4805-9e92-c7783e0cab0a", + "savedPayload": { + "position": { + "x": 31229.371804765975, + "y": 16669.573039132756 + }, + "targetPosition": { + "x": 31151.726091235218, + "y": 16959.350787019477 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "1d484ca6-1fc2-4a6f-b6c1-f30ef07dc820", + "savedPayload": { + "position": { + "x": 31352.465273142876, + "y": 16736.40733937626 + }, + "targetPosition": { + "x": 31151.726091235218, + "y": 16959.350787019477 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "4849966e-c897-4222-9c46-b2e425f53810", + "savedPayload": { + "position": { + "x": 31384.869879672307, + "y": 16770.554669704525 + }, + "targetPosition": { + "x": 31151.726091235218, + "y": 16959.350787019477 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 3, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "e6e043a7-e486-4c7f-a686-8a031db4c7c5", + "savedPayload": { + "position": { + "x": 31151.726091235218, + "y": 16959.350787019477 + }, + "targetPosition": { + "x": 31029.70509831248, + "y": 17233.414424312257 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "supportProgram": { + "type": "Support Program", + "name": "New Support Program", + "config": "{}", + "project": "Governance", + "userSupporters": [ + { + "type": "User Supporter", + "name": "", + "config": "{}", + "project": "Governance", + "id": "554c93e4-0de9-4ce2-a6ff-e8ce272e71cc", + "savedPayload": { + "position": { + "x": 31516.857784237913, + "y": 16968.91209689487 + }, + "targetPosition": { + "x": 31328.06166692296, + "y": 17202.05588533196 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "37f0b912-de8f-4b79-98ad-b5aaf08f838b", + "savedPayload": { + "position": { + "x": 31626.41823553344, + "y": 17170.697346351662 + }, + "targetPosition": { + "x": 31328.06166692296, + "y": 17202.05588533196 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "f3fb13a2-b1f4-4b02-b925-c68f504fd2ac", + "savedPayload": { + "position": { + "x": 31561.20545536005, + "y": 17390.852002646912 + }, + "targetPosition": { + "x": 31328.06166692296, + "y": 17202.05588533196 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "65a48301-5bc1-4a5c-a50a-f429f44db4b8", + "savedPayload": { + "position": { + "x": 31328.06166692296, + "y": 17202.05588533196 + }, + "targetPosition": { + "x": 31029.70509831248, + "y": 17233.414424312257 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "410de3ee-3b6a-4e67-a6f0-130e29cd0a79", + "savedPayload": { + "position": { + "x": 31029.70509831248, + "y": 17233.414424312257 + }, + "targetPosition": { + "x": 30786.999999999996, + "y": 17409.75 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "votesAndClaimsPrograms": { + "type": "Votes And Claims Programs", + "name": "New Votes And Claims Programs", + "config": "{}", + "project": "Governance", + "votingProgram": { + "type": "Voting Program", + "name": "New Voting Program", + "config": "{}", + "project": "Governance", + "votesSwitch": [], + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "8b8039e0-c042-4dde-87ca-61ac8019a49e", + "savedPayload": { + "position": { + "x": 31626.41823553344, + "y": 17648.802653648338 + }, + "targetPosition": { + "x": 31328.06166692296, + "y": 17617.44411466804 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "1ca2a7f8-4dad-40a5-9a0b-70e4e6b0e037", + "savedPayload": { + "position": { + "x": 31328.06166692296, + "y": 17617.44411466804 + }, + "targetPosition": { + "x": 31029.70509831248, + "y": 17586.085575687743 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "claimsProgram": { + "type": "Claims Program", + "name": "New Claims Program", + "config": "{}", + "project": "Governance", + "assetClaimsFolders": [], + "featureClaimsFolders": [], + "positionClaimsFolders": [], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "b3a93cc0-0801-4f6e-9488-435a1d272bff", + "savedPayload": { + "position": { + "x": 31273.747084157956, + "y": 18134.212850273303 + }, + "targetPosition": { + "x": 31151.726091235218, + "y": 17860.149212980523 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "98125357-80c3-4d3b-9b91-059298515c11", + "savedPayload": { + "position": { + "x": 31151.726091235218, + "y": 17860.149212980523 + }, + "targetPosition": { + "x": 31029.70509831248, + "y": 17586.085575687743 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "a79ace48-ae15-4359-95c1-371df5e41291", + "savedPayload": { + "position": { + "x": 31029.70509831248, + "y": 17586.085575687743 + }, + "targetPosition": { + "x": 30786.999999999996, + "y": 17409.75 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "financialPrograms": { + "type": "Financial Programs", + "name": "New Financial Programs", + "config": "{}", + "project": "Governance", + "stakingProgram": { + "type": "Staking Program", + "name": "New Staking Program", + "config": "{}", + "project": "Governance", + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "77071bb6-dbda-4a2a-a8da-83ea6aa4155d", + "savedPayload": { + "position": { + "x": 30819.04191617817, + "y": 18281.955515328827 + }, + "targetPosition": { + "x": 30756.66840893284, + "y": 17988.511235108686 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "4087d58e-e684-4651-8849-4e194d5cc934", + "savedPayload": { + "position": { + "x": 30756.66840893284, + "y": 17988.511235108686 + }, + "targetPosition": { + "x": 30694.294901687514, + "y": 17695.066954888545 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "delegationProgram": { + "type": "Delegation Program", + "name": "New Delegation Program", + "config": "{}", + "project": "Governance", + "delegatePowerSwitch": [], + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "ef6f8b6c-6e85-4d6c-ad64-b1e6ddd1248f", + "savedPayload": { + "position": { + "x": 30248.408006401078, + "y": 18096.545318703862 + }, + "targetPosition": { + "x": 30471.351454044296, + "y": 17895.806136796204 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "ee380273-eced-4761-b91e-94b542beb5de", + "savedPayload": { + "position": { + "x": 30471.351454044296, + "y": 17895.806136796204 + }, + "targetPosition": { + "x": 30694.294901687514, + "y": 17695.066954888545 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "c09288a3-64fb-489d-8e7d-c8d72a56c535", + "savedPayload": { + "position": { + "x": 30694.294901687514, + "y": 17695.066954888545 + }, + "targetPosition": { + "x": 30786.999999999996, + "y": 17409.75 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, "id": "d7571db7-acfc-4d8c-aa91-582ff7f5dbb3", "savedPayload": { "position": { - "x": 30557.999999999996, - "y": 17406.75 + "x": 30786.999999999996, + "y": 17409.75 }, "targetPosition": { "x": 30486.999999999996, @@ -39,8 +738,8 @@ "id": "a72ec234-c5dc-425e-9ace-95ffed7c0542", "savedPayload": { "position": { - "x": 30562.999999999996, - "y": 17499.75 + "x": 30186.999999999996, + "y": 17409.75 }, "targetPosition": { "x": 30486.999999999996, @@ -66,8 +765,8 @@ "y": 17409.75 }, "targetPosition": { - "x": 30424.999999999996, - "y": 17357.75 + "x": 30486.999999999996, + "y": 17409.75 }, "floatingObject": { "isPinned": false, From 60839e5138dcd103e9ce86b0f593bff067fc22ea Mon Sep 17 00:00:00 2001 From: 9808us <9808us@pm.me> Date: Sun, 29 Aug 2021 08:49:51 +0200 Subject: [PATCH 15/81] User profile update 9808us --- .../Plugins/User-Profiles/9808us.json | 428 +++++++++++------- 1 file changed, 276 insertions(+), 152 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/9808us.json b/Projects/Governance/Plugins/User-Profiles/9808us.json index 802b7fdba..fd65057e3 100644 --- a/Projects/Governance/Plugins/User-Profiles/9808us.json +++ b/Projects/Governance/Plugins/User-Profiles/9808us.json @@ -1,18 +1,18 @@ { "type": "User Profile", "name": "9808us", - "config": "{\n \"signature\": {\n \"message\": \"9808us\",\n \"messageHash\": \"0x979b53056d1e29f7e1801d0784d3228c463b3173d55bb43faa4f95b29a5fced1\",\n \"v\": \"0x1b\",\n \"r\": \"0x156fe1757248fe5a6752fa24d83985f4ee59f4bf9b09f55429c85eb7521c4b87\",\n \"s\": \"0x2fe78103a631760ecd41913ba30ad67fc7e3116378d0cc574aaabb99b0e0be37\",\n \"signature\": \"0x156fe1757248fe5a6752fa24d83985f4ee59f4bf9b09f55429c85eb7521c4b872fe78103a631760ecd41913ba30ad67fc7e3116378d0cc574aaabb99b0e0be371b\"\n }\n}", + "config": "{\"signature\":{\"message\":\"9808us\",\"messageHash\":\"0x979b53056d1e29f7e1801d0784d3228c463b3173d55bb43faa4f95b29a5fced1\",\"v\":\"0x1b\",\"r\":\"0x156fe1757248fe5a6752fa24d83985f4ee59f4bf9b09f55429c85eb7521c4b87\",\"s\":\"0x2fe78103a631760ecd41913ba30ad67fc7e3116378d0cc574aaabb99b0e0be37\",\"signature\":\"0x156fe1757248fe5a6752fa24d83985f4ee59f4bf9b09f55429c85eb7521c4b872fe78103a631760ecd41913ba30ad67fc7e3116378d0cc574aaabb99b0e0be371b\"},\"codeName\":\"9808us\"}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", "name": "New Token Power Switch", - "config": "{}", + "config": "{\n \"percentage\": 90\n}", "project": "Governance", "tokenPowerSwitch": [], "onboardingPrograms": { "type": "Onboarding Programs", "name": "New Onboarding Programs", - "config": "{}", + "config": "{\n \"percentage\": 10\n}", "project": "Governance", "airdropProgram": { "type": "Airdrop Program", @@ -26,12 +26,12 @@ "id": "85d3b184-0122-4cb3-a83c-b3c00d626767", "savedPayload": { "position": { - "x": 30248.408006401078, - "y": 16722.954681296138 + "x": 24761.40800640108, + "y": 24813.204681296138 }, "targetPosition": { - "x": 30471.351454044296, - "y": 16923.693863203796 + "x": 24984.3514540443, + "y": 25013.943863203796 }, "floatingObject": { "isPinned": false, @@ -49,12 +49,12 @@ "id": "9163e52d-f77c-40b7-b139-960681b28171", "savedPayload": { "position": { - "x": 30471.351454044296, - "y": 16923.693863203796 + "x": 24984.3514540443, + "y": 25013.943863203796 }, "targetPosition": { - "x": 30694.294901687514, - "y": 17124.433045111455 + "x": 25207.294901687517, + "y": 25214.683045111455 }, "floatingObject": { "isPinned": false, @@ -81,12 +81,12 @@ "id": "5ebe2e87-295e-42cc-98f1-c70ee2efa4a3", "savedPayload": { "position": { - "x": 30819.04191617817, - "y": 16537.544484671173 + "x": 25332.041916178172, + "y": 24627.794484671173 }, "targetPosition": { - "x": 30756.66840893284, - "y": 16830.988764891314 + "x": 25269.668408932845, + "y": 24921.238764891314 }, "floatingObject": { "isPinned": false, @@ -104,12 +104,12 @@ "id": "d38054ef-3c0b-43fd-986d-27dd39f72f2c", "savedPayload": { "position": { - "x": 30756.66840893284, - "y": 16830.988764891314 + "x": 25269.668408932845, + "y": 24921.238764891314 }, "targetPosition": { - "x": 30694.294901687514, - "y": 17124.433045111455 + "x": 25207.294901687517, + "y": 25214.683045111455 }, "floatingObject": { "isPinned": false, @@ -127,12 +127,12 @@ "id": "975175a5-fbf2-4775-80c3-175af1bf27ae", "savedPayload": { "position": { - "x": 30694.294901687514, - "y": 17124.433045111455 + "x": 25207.294901687517, + "y": 25214.683045111455 }, "targetPosition": { - "x": 30786.999999999996, - "y": 17409.75 + "x": 25300, + "y": 25500 }, "floatingObject": { "isPinned": false, @@ -155,7 +155,7 @@ "referralProgram": { "type": "Referral Program", "name": "New Referral Program", - "config": "{}", + "config": "{\n \"percentage\": 30\n}", "project": "Governance", "userReferrers": [ { @@ -163,43 +163,15 @@ "name": "", "config": "{}", "project": "Governance", - "id": "10938918-7341-47fd-84ea-ddc86904ec58", + "id": "46674b25-ed29-4c00-90be-3dc849e2af9f", "savedPayload": { "position": { - "x": 31136.025304362334, - "y": 16659.761926593106 + "x": 25672.579175727584, + "y": 24749.70358952681 }, "targetPosition": { - "x": 31151.726091235218, - "y": 16959.350787019477 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 3, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - } - } - }, - { - "type": "User Referrer", - "name": "", - "config": "{}", - "project": "Governance", - "id": "d004c04d-aa54-4805-9e92-c7783e0cab0a", - "savedPayload": { - "position": { - "x": 31229.371804765975, - "y": 16669.573039132756 - }, - "targetPosition": { - "x": 31151.726091235218, - "y": 16959.350787019477 + "x": 25664.72609123522, + "y": 25049.600787019477 }, "floatingObject": { "isPinned": false, @@ -222,18 +194,18 @@ "id": "1d484ca6-1fc2-4a6f-b6c1-f30ef07dc820", "savedPayload": { "position": { - "x": 31352.465273142876, - "y": 16736.40733937626 + "x": 25786.74708415796, + "y": 24775.537149726697 }, "targetPosition": { - "x": 31151.726091235218, - "y": 16959.350787019477 + "x": 25664.72609123522, + "y": 25049.600787019477 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 2, + "angleToParent": 3, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -249,12 +221,12 @@ "id": "4849966e-c897-4222-9c46-b2e425f53810", "savedPayload": { "position": { - "x": 31384.869879672307, - "y": 16770.554669704525 + "x": 25882.338402538906, + "y": 24843.094414311352 }, "targetPosition": { - "x": 31151.726091235218, - "y": 16959.350787019477 + "x": 25664.72609123522, + "y": 25049.600787019477 }, "floatingObject": { "isPinned": false, @@ -272,12 +244,12 @@ "id": "e6e043a7-e486-4c7f-a686-8a031db4c7c5", "savedPayload": { "position": { - "x": 31151.726091235218, - "y": 16959.350787019477 + "x": 25664.72609123522, + "y": 25049.600787019477 }, "targetPosition": { - "x": 31029.70509831248, - "y": 17233.414424312257 + "x": 25542.705098312483, + "y": 25323.664424312257 }, "floatingObject": { "isPinned": false, @@ -306,12 +278,40 @@ "id": "554c93e4-0de9-4ce2-a6ff-e8ce272e71cc", "savedPayload": { "position": { - "x": 31516.857784237913, - "y": 16968.91209689487 + "x": 25991.061666922964, + "y": 25032.498264196627 }, "targetPosition": { - "x": 31328.06166692296, - "y": 17202.05588533196 + "x": 25841.061666922964, + "y": 25292.30588533196 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + { + "type": "User Supporter", + "name": "", + "config": "{}", + "project": "Governance", + "id": "0d18e74f-dae9-4672-b00a-c997909494ee", + "savedPayload": { + "position": { + "x": 26115.125304215744, + "y": 25170.28489240922 + }, + "targetPosition": { + "x": 25841.061666922964, + "y": 25292.30588533196 }, "floatingObject": { "isPinned": false, @@ -334,12 +334,12 @@ "id": "37f0b912-de8f-4b79-98ad-b5aaf08f838b", "savedPayload": { "position": { - "x": 31626.41823553344, - "y": 17170.697346351662 + "x": 26134.505947143105, + "y": 25354.679392577287 }, "targetPosition": { - "x": 31328.06166692296, - "y": 17202.05588533196 + "x": 25841.061666922964, + "y": 25292.30588533196 }, "floatingObject": { "isPinned": false, @@ -361,12 +361,12 @@ "id": "f3fb13a2-b1f4-4b02-b925-c68f504fd2ac", "savedPayload": { "position": { - "x": 31561.20545536005, - "y": 17390.852002646912 + "x": 26041.800848830622, + "y": 25515.249332975178 }, "targetPosition": { - "x": 31328.06166692296, - "y": 17202.05588533196 + "x": 25841.061666922964, + "y": 25292.30588533196 }, "floatingObject": { "isPinned": false, @@ -384,12 +384,12 @@ "id": "65a48301-5bc1-4a5c-a50a-f429f44db4b8", "savedPayload": { "position": { - "x": 31328.06166692296, - "y": 17202.05588533196 + "x": 25841.061666922964, + "y": 25292.30588533196 }, "targetPosition": { - "x": 31029.70509831248, - "y": 17233.414424312257 + "x": 25542.705098312483, + "y": 25323.664424312257 }, "floatingObject": { "isPinned": false, @@ -407,12 +407,12 @@ "id": "410de3ee-3b6a-4e67-a6f0-130e29cd0a79", "savedPayload": { "position": { - "x": 31029.70509831248, - "y": 17233.414424312257 + "x": 25542.705098312483, + "y": 25323.664424312257 }, "targetPosition": { - "x": 30786.999999999996, - "y": 17409.75 + "x": 25300, + "y": 25500 }, "floatingObject": { "isPinned": false, @@ -430,7 +430,7 @@ "votesAndClaimsPrograms": { "type": "Votes And Claims Programs", "name": "New Votes And Claims Programs", - "config": "{}", + "config": "{\n \"percentage\": 20\n}", "project": "Governance", "votingProgram": { "type": "Voting Program", @@ -445,12 +445,12 @@ "id": "8b8039e0-c042-4dde-87ca-61ac8019a49e", "savedPayload": { "position": { - "x": 31626.41823553344, - "y": 17648.802653648338 + "x": 26139.418235533445, + "y": 25739.052653648338 }, "targetPosition": { - "x": 31328.06166692296, - "y": 17617.44411466804 + "x": 25841.061666922964, + "y": 25707.69411466804 }, "floatingObject": { "isPinned": false, @@ -468,12 +468,12 @@ "id": "1ca2a7f8-4dad-40a5-9a0b-70e4e6b0e037", "savedPayload": { "position": { - "x": 31328.06166692296, - "y": 17617.44411466804 + "x": 25841.061666922964, + "y": 25707.69411466804 }, "targetPosition": { - "x": 31029.70509831248, - "y": 17586.085575687743 + "x": 25542.705098312483, + "y": 25676.335575687743 }, "floatingObject": { "isPinned": false, @@ -493,9 +493,102 @@ "name": "New Claims Program", "config": "{}", "project": "Governance", - "assetClaimsFolders": [], - "featureClaimsFolders": [], - "positionClaimsFolders": [], + "assetClaimsFolders": [ + { + "type": "Asset Claims Folder", + "name": "New Asset Claims Folder", + "config": "{}", + "project": "Governance", + "assetClaimsFolders": [], + "assetContributionClaims": [], + "id": "c0bb67cf-ed97-445f-b3b6-8ef181c386c0", + "savedPayload": { + "position": { + "x": 31844.903008026802, + "y": 18200.741292494906 + }, + "targetPosition": { + "x": 31404.73658769659, + "y": 18107.181031626915 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "featureClaimsFolders": [ + { + "type": "Feature Claims Folder", + "name": "New Feature Claims Folder", + "config": "{}", + "project": "Governance", + "featureClaimsFolders": [], + "featureContributionClaims": [], + "id": "81dc6357-893d-4361-9692-ef5d5e32a31e", + "savedPayload": { + "position": { + "x": 31705.845360558076, + "y": 18441.596203091744 + }, + "targetPosition": { + "x": 31404.73658769659, + "y": 18107.181031626915 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "positionClaimsFolders": [ + { + "type": "Position Claims Folder", + "name": "New Position Claims Folder", + "config": "{}", + "project": "Governance", + "positionClaimsFolders": [], + "positionContributionClaims": [], + "id": "32dec8a2-71c0-45f0-b1c3-8ea6f3b99b6d", + "savedPayload": { + "position": { + "x": 31451.77439616703, + "y": 18554.71588454264 + }, + "targetPosition": { + "x": 31404.73658769659, + "y": 18107.181031626915 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], "tokensAwarded": { "type": "Tokens Awarded", "name": "New Tokens Awarded", @@ -503,18 +596,18 @@ "id": "b3a93cc0-0801-4f6e-9488-435a1d272bff", "savedPayload": { "position": { - "x": 31273.747084157956, - "y": 18134.212850273303 + "x": 31179.73658769659, + "y": 18496.892463329914 }, "targetPosition": { - "x": 31151.726091235218, - "y": 17860.149212980523 + "x": 31404.73658769659, + "y": 18107.181031626915 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -526,19 +619,19 @@ "id": "98125357-80c3-4d3b-9b91-059298515c11", "savedPayload": { "position": { - "x": 31151.726091235218, - "y": 17860.149212980523 + "x": 31404.73658769659, + "y": 18107.181031626915 }, "targetPosition": { - "x": 31029.70509831248, - "y": 17586.085575687743 + "x": 25542.705098312483, + "y": 25676.335575687743 }, "floatingObject": { - "isPinned": false, + "isPinned": true, "isFrozen": false, "isCollapsed": false, "angleToParent": 2, - "distanceToParent": 3, + "distanceToParent": 4, "arrangementStyle": 0 }, "uiObject": { @@ -549,12 +642,12 @@ "id": "a79ace48-ae15-4359-95c1-371df5e41291", "savedPayload": { "position": { - "x": 31029.70509831248, - "y": 17586.085575687743 + "x": 25542.705098312483, + "y": 25676.335575687743 }, "targetPosition": { - "x": 30786.999999999996, - "y": 17409.75 + "x": 25300, + "y": 25500 }, "floatingObject": { "isPinned": false, @@ -572,7 +665,7 @@ "financialPrograms": { "type": "Financial Programs", "name": "New Financial Programs", - "config": "{}", + "config": "{\n \"percentage\": 20\n}", "project": "Governance", "stakingProgram": { "type": "Staking Program", @@ -586,12 +679,12 @@ "id": "77071bb6-dbda-4a2a-a8da-83ea6aa4155d", "savedPayload": { "position": { - "x": 30819.04191617817, - "y": 18281.955515328827 + "x": 25332.041916178172, + "y": 26372.205515328827 }, "targetPosition": { - "x": 30756.66840893284, - "y": 17988.511235108686 + "x": 25269.668408932845, + "y": 26078.761235108686 }, "floatingObject": { "isPinned": false, @@ -609,12 +702,12 @@ "id": "4087d58e-e684-4651-8849-4e194d5cc934", "savedPayload": { "position": { - "x": 30756.66840893284, - "y": 17988.511235108686 + "x": 25269.668408932845, + "y": 26078.761235108686 }, "targetPosition": { - "x": 30694.294901687514, - "y": 17695.066954888545 + "x": 25207.294901687517, + "y": 25785.316954888545 }, "floatingObject": { "isPinned": false, @@ -634,7 +727,38 @@ "name": "New Delegation Program", "config": "{}", "project": "Governance", - "delegatePowerSwitch": [], + "delegatePowerSwitch": [ + { + "type": "Delegate Power Switch", + "name": "New Delegate Power Switch", + "config": "{}", + "project": "Governance", + "delegatePowerSwitch": [], + "userDelegates": [], + "id": "41e5e919-43b5-43d1-b0c1-7b388b4cd1bf", + "savedPayload": { + "position": { + "x": 24891.646355731817, + "y": 26271.37309168475 + }, + "targetPosition": { + "x": 24984.3514540443, + "y": 25986.056136796204 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], "tokensBonus": { "type": "Tokens Bonus", "name": "New Tokens Bonus", @@ -642,18 +766,18 @@ "id": "ef6f8b6c-6e85-4d6c-ad64-b1e6ddd1248f", "savedPayload": { "position": { - "x": 30248.408006401078, - "y": 18096.545318703862 + "x": 24690.90717382416, + "y": 26048.42964404153 }, "targetPosition": { - "x": 30471.351454044296, - "y": 17895.806136796204 + "x": 24984.3514540443, + "y": 25986.056136796204 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -665,12 +789,12 @@ "id": "ee380273-eced-4761-b91e-94b542beb5de", "savedPayload": { "position": { - "x": 30471.351454044296, - "y": 17895.806136796204 + "x": 24984.3514540443, + "y": 25986.056136796204 }, "targetPosition": { - "x": 30694.294901687514, - "y": 17695.066954888545 + "x": 25207.294901687517, + "y": 25785.316954888545 }, "floatingObject": { "isPinned": false, @@ -688,12 +812,12 @@ "id": "c09288a3-64fb-489d-8e7d-c8d72a56c535", "savedPayload": { "position": { - "x": 30694.294901687514, - "y": 17695.066954888545 + "x": 25207.294901687517, + "y": 25785.316954888545 }, "targetPosition": { - "x": 30786.999999999996, - "y": 17409.75 + "x": 25300, + "y": 25500 }, "floatingObject": { "isPinned": false, @@ -711,12 +835,12 @@ "id": "d7571db7-acfc-4d8c-aa91-582ff7f5dbb3", "savedPayload": { "position": { - "x": 30786.999999999996, - "y": 17409.75 + "x": 25300, + "y": 25500 }, "targetPosition": { - "x": 30486.999999999996, - "y": 17409.75 + "x": 25000, + "y": 25500 }, "floatingObject": { "isPinned": false, @@ -738,12 +862,12 @@ "id": "a72ec234-c5dc-425e-9ace-95ffed7c0542", "savedPayload": { "position": { - "x": 30186.999999999996, - "y": 17409.75 + "x": 24700, + "y": 25500 }, "targetPosition": { - "x": 30486.999999999996, - "y": 17409.75 + "x": 25000, + "y": 25500 }, "floatingObject": { "isPinned": false, @@ -761,12 +885,12 @@ "id": "280f0baf-bc13-497c-b255-618c1a146442", "savedPayload": { "position": { - "x": 30486.999999999996, - "y": 17409.75 + "x": 25000, + "y": 25500 }, "targetPosition": { - "x": 30486.999999999996, - "y": 17409.75 + "x": 25000, + "y": 25500 }, "floatingObject": { "isPinned": false, From 1cd04a056b2ab9715cec8fe1ea4ce43355e6bd54 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 09:16:30 +0200 Subject: [PATCH 16/81] User Profile re-written --- Network/NetwokNode.js | 14 +- Network/Queries/BotProfileStats.js | 1 - Network/Queries/ProfileFollowers.js | 142 ++++++++++++++++ Network/Queries/ProfilePosts.js | 21 ++- Network/Query.js | 20 ++- Network/botProfile.js | 44 ++++- Network/event.js | 18 +- Network/userProfile.js | 154 ++++++++---------- .../User-Profiles/Luis-Fernando-Molina.json | 10 +- .../Spaces/User-Profile-Space/UserProfile.js | 2 +- 10 files changed, 308 insertions(+), 118 deletions(-) create mode 100644 Network/Queries/ProfileFollowers.js diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index 5db39e9a1..794844275 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -23,7 +23,17 @@ global.NT = { QUERY_USER_PROFILE_STATS: require('./Queries/UserProfileStats.js'), QUERY_BOT_PROFILE_STATS: require('./Queries/BotProfileStats.js'), QUERY_PROFILE_POSTS: require('./Queries/ProfilePosts.js'), - QUERY_POST_REPLIES: require('./Queries/ProfileReplies.js'), + QUERY_PROFILE_FOLLOWERS: require('./Queries/ProfileFollowers.js'), + //QUERY_PROFILE_FOLLOWING: require('./Queries/ProfileFollowing.js'), + //QUERY_POST_REPLIES: require('./Queries/ProfileReplies.js'), QUERY_EVENTS: require('./Queries/Events.js') } -} \ No newline at end of file +} + +const map = new Map([[1, { a: 2 }], [2, { a: 4 }], [4, { a: 8 }]]) +map.set(3, { a: 6 }) +map.delete(2) +map.set(2, { a: 12 }) +let array = Array.from(map) + +console.log(JSON.stringify(array)) \ No newline at end of file diff --git a/Network/Queries/BotProfileStats.js b/Network/Queries/BotProfileStats.js index de05fea1a..137072fb9 100644 --- a/Network/Queries/BotProfileStats.js +++ b/Network/Queries/BotProfileStats.js @@ -41,7 +41,6 @@ exports.newBotProfileStats = function newBotProfileStats() { return { "botProfileId": thisObject.profile.botProfileId, "botProfileHandle": thisObject.profile.botProfileHandle, - "ranking": thisObject.profile.ranking, "followingCount": thisObject.profile.followingCount, "followersCount": thisObject.profile.followersCount, "emitterEventsCount": thisObject.profile.emitterEventsCount, diff --git a/Network/Queries/ProfileFollowers.js b/Network/Queries/ProfileFollowers.js new file mode 100644 index 000000000..bf3e14b98 --- /dev/null +++ b/Network/Queries/ProfileFollowers.js @@ -0,0 +1,142 @@ +exports.newProfileFollowers = function newProfileFollowers() { + + let thisObject = { + profile: undefined, + initialIndex: undefined, + amountRequested: undefined, + direction: undefined, + execute: execute, + initialize: initialize, + finalize: finalize + } + + const INITIAL_POST_INDEX_FIRST = 'First' + const INITIAL_POST_INDEX_LAST = 'Last' + const MIN_AMOUNT_REQUESTED = 1 + const MAX_AMOUNT_REQUESTED = 100 + const DIRECTION_FUTURE = 'Future' + const DIRECTION_PAST = 'Past' + + return thisObject + + function finalize() { + thisObject.profile = undefined + } + + function initialize(queryReceived) { + /* + Validate User Profile + */ + if (queryReceived.targetUserProfileId !== undefined) { + thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + } else { + thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + } + + if (thisObject.profile === undefined) { + throw ('Target User Profile Not Found.') + } + /* + Validate Bot Profile + */ + if (queryReceived.targetBotProfileId !== undefined) { + thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileId) + if (thisObject.profile === undefined) { + throw ('Target Bot Profile Not Found.') + } + } + /* + Validate Initial Index + */ + if (queryReceived.initialIndex === undefined) { + throw ('Initial Index Undefined.') + } + + if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) { + queryReceived.initialIndex = thisObject.profile.posts.length - 1 + } + + if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) { + queryReceived.initialIndex = 0 + } + + if (isNaN(queryReceived.initialIndex) === true) { + throw ('Initial Post Is Not a Number.') + } + + thisObject.initialIndex = queryReceived.initialIndex + /* + Validate Amount Requested + */ + if (queryReceived.amountRequested === undefined) { + throw ('Amount Requested Undefined.') + } + + if (isNaN(queryReceived.amountRequested) === true) { + throw ('Amount Requested Is Not a Number.') + } + + if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { + throw ('Amount Requested Below Min.') + } + + if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { + throw ('Amount Requested Above Max.') + } + /* + Validate Direction + */ + if (queryReceived.direction === undefined) { + throw ('Direction Undefined.') + } + + if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { + throw ('Direction Not Supported.') + } + + thisObject.direction = queryReceived.direction + + } + + function execute() { + let response = [] + switch (thisObject.direction) { + case DIRECTION_FUTURE: { + for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { + let arrayItem = thisObject.profile.arrays.followers[i] + if (arrayItem === undefined) { break } + addToResponse(arrayItem) + } + break + } + case DIRECTION_PAST: { + for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { + let arrayItem = thisObject.profile.arrays.followers[i] + if (arrayItem === undefined) { break } + addToResponse(arrayItem) + } + break + } + } + return response + + function addToResponse(post) { + let postResponse = { + emitterUserProfileId: post.emitterUserProfileId, + targetUserProfileId: post.targetUserProfileId, + emitterPostHash: post.emitterPostHash, + targetPostHash: post.targetPostHash, + postType: post.postType, + timestamp: post.timestamp, + repliesCount: post.replies.length, + reactionsCount: [] + } + + for (let i = 0; i < post.reactionTypesCount; i++) { + postResponse.reactionsCount.push(post.reactionsCount.get(i)) + } + + response.push(postResponse) + } + } +} \ No newline at end of file diff --git a/Network/Queries/ProfilePosts.js b/Network/Queries/ProfilePosts.js index fab001ff7..3854d476e 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Network/Queries/ProfilePosts.js @@ -36,6 +36,15 @@ exports.newProfilePosts = function newProfilePosts() { if (thisObject.profile === undefined) { throw ('Target User Profile Not Found.') } + /* + Validate Bot Profile + */ + if (queryReceived.targetBotProfileId !== undefined) { + thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileId) + if (thisObject.profile === undefined) { + throw ('Target Bot Profile Not Found.') + } + } /* Validate Initial Index */ @@ -94,17 +103,17 @@ exports.newProfilePosts = function newProfilePosts() { switch (thisObject.direction) { case DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { - let post = thisObject.profile.posts[i] - if (post === undefined) { break } - addToResponse(post) + let arrayItem = thisObject.profile.arrays.posts[i] + if (arrayItem === undefined) { break } + addToResponse(arrayItem) } break } case DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { - let post = thisObject.profile.posts[i] - if (post === undefined) { break } - addToResponse(post) + let arrayItem = thisObject.profile.arrays.posts[i] + if (arrayItem === undefined) { break } + addToResponse(arrayItem) } break } diff --git a/Network/Query.js b/Network/Query.js index 65166a513..6842871ee 100644 --- a/Network/Query.js +++ b/Network/Query.js @@ -13,8 +13,10 @@ exports.newQuery = function newQuery() { USER_PROFILE_STATS: 0, BOT_PROFILE_STATS: 1, PROFILE_POSTS: 2, - POST_REPLIES: 3, - EVENTS: 4 + PROFILE_FOLLOWERS: 3, + PROFILE_FOLLOWING: 4, + POST_REPLIES: 5, + EVENTS: 6 } @@ -59,6 +61,20 @@ exports.newQuery = function newQuery() { break } + case QUERY_TYPES.PROFILE_FOLLOWERS: { + thisObject.query = NT.modules.QUERY_PROFILE_FOLLOWERS.newProfileFollowers() + query.initialize(queryReceived) + query.finalize() + break + } + + case QUERY_TYPES.PROFILE_FOLLOWING: { + thisObject.query = NT.modules.QUERY_PROFILE_FOLLOWING.newProfileFollowing() + query.initialize(queryReceived) + query.finalize() + break + } + case QUERY_TYPES.maps.EVENTS: { thisObject.query = NT.modules.QUERY_EVENTS.newEvents() query.initialize(queryReceived) diff --git a/Network/botProfile.js b/Network/botProfile.js index baa427101..121829218 100644 --- a/Network/botProfile.js +++ b/Network/botProfile.js @@ -6,14 +6,23 @@ exports.newUserProfile = function newUserProfile() { botAsset: undefined, botExchange: undefined, enabled: undefined, - following: undefined, - followers: undefined, + arrays: { + following: undefined, + followers: undefined, + posts: undefined, + bots: undefined + }, + maps: { + following: undefined, + followers: undefined, + posts: undefined, + bots: undefined + }, followingCount: undefined, followersCount: undefined, emitterEventsCount: undefined, targetEventsCount: undefined, postsCount: undefined, - posts: undefined, addPost: addPost, removePost: removePost, addFollowing: addFollowing, @@ -27,16 +36,35 @@ exports.newUserProfile = function newUserProfile() { return thisObject function finalize() { - thisObject.following = undefined - thisObject.followers = undefined - thisObject.posts = undefined + thisObject.arrays = { + following: undefined, + followers: undefined, + posts: undefined, + bots: undefined + } + + thisObject.maps = { + following: undefined, + followers: undefined, + posts: undefined, + bots: undefined + } } function initialize() { - thisObject.following = new Map() - thisObject.followers = new Map() + thisObject.arrays = { + following: [], + followers: [], + posts: [] + } + + thisObject.maps = { + following: new Map(), + followers: new Map(), + posts: new Map() + } thisObject.followingCount = 0 thisObject.followersCount = 0 diff --git a/Network/event.js b/Network/event.js index ba63b45bc..736ea183f 100644 --- a/Network/event.js +++ b/Network/event.js @@ -107,7 +107,7 @@ exports.newEvent = function newEvent() { if (emitterBotProfileId !== undefined) { let botProfile = emitterUserProfile.bots.get(emitterBotProfileId) if ( - emitterBotProfile === undefined + botProfile === undefined ) { throw ('Emitter BOt Profile Not Found.') } @@ -202,37 +202,37 @@ exports.newEvent = function newEvent() { switch (thisObject.eventType) { case EVENT_TYPES.FOLLOW_USER_PROFILE: { emitterUserProfile.addFollowing( - targetUserProfile + targetUserProfileId ) targetUserProfile.addFollower( - emitterUserProfile + emitterUserProfileId ) break } case EVENT_TYPES.UNFOLLOW_USER_PROFILE: { emitterUserProfile.removeFollowing( - targetUserProfile + targetUserProfileId ) targetUserProfile.removeFollower( - emitterUserProfile + emitterUserProfileId ) break } case EVENT_TYPES.FOLLOW_BOT_PROFILE: { emitterUserProfile.addTradePostsFollowing( - targetUserProfile + targetBotProfileId ) targetUserProfile.addTradePostsFollower( - emitterUserProfile + emitterUserProfileId ) break } case EVENT_TYPES.UNFOLLOW_BOT_PROFILE: { emitterUserProfile.removeTradePostsFollowing( - targetUserProfile + targetBotProfileId ) targetUserProfile.removeTradePostsFollower( - emitterUserProfile + emitterBotProfileId ) break } diff --git a/Network/userProfile.js b/Network/userProfile.js index 07516f643..b245a02d4 100644 --- a/Network/userProfile.js +++ b/Network/userProfile.js @@ -1,30 +1,33 @@ exports.newUserProfile = function newUserProfile() { let thisObject = { + userProfileId: undefined, userProfileHandle: undefined, blockchainAccount: undefined, ranking: undefined, + following: undefined, followers: undefined, - followingCount: undefined, - followersCount: undefined, + posts: undefined, + bots: undefined, + emitterEventsCount: undefined, targetEventsCount: undefined, - postsCount: undefined, - botsCount: undefined, - bots: undefined, - posts: undefined, + addPost: addPost, removePost: removePost, + addFollowing: addFollowing, removeFollowing: removeFollowing, addFollower: addFollower, removeFollower: removeFollower, + addBot: addBot, removeBot: removeBot, enableBot: enableBot, disableBot: disableBot, + initialize: initialize, finalize: finalize } @@ -32,28 +35,24 @@ exports.newUserProfile = function newUserProfile() { return thisObject function finalize() { + thisObject.following = undefined thisObject.followers = undefined - thisObject.posts = undefined thisObject.bots = undefined + } function initialize() { thisObject.following = new Map() thisObject.followers = new Map() - - thisObject.followingCount = 0 - thisObject.followersCount = 0 + thisObject.posts = new Map() + thisObject.bots = new Map() thisObject.emitterEventsCount = 0 thisObject.targetEventsCount = 0 - thisObject.postsCount = 0 - thisObject.botsCount = 0 - thisObject.posts = [] - thisObject.bots = [] } function addPost( @@ -64,140 +63,127 @@ exports.newUserProfile = function newUserProfile() { postType, timestamp ) { - if (NT.memory.maps.POSTS.get(emitterPostHash) !== undefined) { + if (thisObject.posts.get(emitterPostHash) !== undefined) { throw ('Post Already Exists.') + } else { + let post = NT.modules.POST.newPost() + post.initialize( + emitterUserProfileId, + targetUserProfileId, + undefined, + undefined, + emitterPostHash, + targetPostHash, + postType, + timestamp + ) + + thisObject.posts.set(emitterPostHash, post) } - - let post = NT.modules.POST.newPost() - post.initialize( - emitterUserProfileId, - targetUserProfileId, - undefined, - undefined, - emitterPostHash, - targetPostHash, - postType, - timestamp - ) - - thisObject.posts.push(post) - NT.memory.maps.POSTS.set(emitterPostHash, post) - thisObject.postsCount++ } function removePost( emitterPostHash ) { - if (NT.memory.maps.POSTS.get(emitterPostHash) === undefined) { + if (thisObject.posts.get(emitterPostHash) === undefined) { throw ('Post Does Not Exist.') + } else { + let post = thisObject.posts.get(emitterPostHash) + post.finalize() + thisObject.posts.delete(emitterPostHash) } - - let post = thisObject.posts.get(emitterPostHash) - post.finalize() - - for (let i = thisObject.posts.length - 1; i >= 0; i--) { - if (thisObject.posts[i].emitterPostHash === emitterPostHash) { - thisObject.posts.splice(i, 1) - break - } - } - NT.memory.maps.POSTS.delete(emitterPostHash) - thisObject.postsCount-- } function addFollowing( - userProfile + targetUserProfileId ) { - if (thisObject.following.get(userProfile.id) === undefined) { - thisObject.following.set(userProfile.id, userProfile) - thisObject.followingCount++ + if (thisObject.following.get(targetUserProfileId) === undefined) { + thisObject.following.set(targetUserProfileId, targetUserProfileId) + } else { + throw ('Already Following.') } } function removeFollowing( - userProfile + targetUserProfileId ) { - if (thisObject.following.get(userProfile.id) !== undefined) { - thisObject.following.delete(userProfile.id) - thisObject.followingCount-- + if (thisObject.following.get(targetUserProfileId) !== undefined) { + thisObject.following.delete(targetUserProfileId) + } else { + throw ('Not Following.') } } function addFollower( - userProfile + emitterUserProfileId ) { - if (thisObject.followers.get(userProfile.id) === undefined) { - thisObject.followers.set(userProfile.id, userProfile) - thisObject.followersCount++ + if (thisObject.followers.get(emitterUserProfileId) === undefined) { + thisObject.followers.set(emitterUserProfileId, emitterUserProfileId) } } function removeFollower( - userProfile + emitterUserProfileId ) { - if (thisObject.followers.get(userProfile.id) !== undefined) { - thisObject.followers.delete(userProfile.id) - thisObject.followersCount-- + if (thisObject.followers.get(emitterUserProfileId) !== undefined) { + thisObject.followers.delete(emitterUserProfileId) } } function addBot( - botId, + botProfileId, botAsset, botExchange ) { - if (thisObject.bots.get(botId) !== undefined) { + let bot = thisObject.bots.get(botProfileId) + if (bot !== undefined) { throw ('Bot Already Exists.') + } else { + let bot = NT.modules.BOTS.newBot() + bot.initialize( + botProfileId, + botAsset, + botExchange + ) + thisObject.bots.set(botProfileId, bot) } - - let bot = NT.modules.BOTS.newBot() - bot.initialize( - botId, - botAsset, - botExchange - ) - thisObject.bots.set(botId, bot) - thisObject.botsCount++ } function removeBot( - botId + botProfileId ) { - if (thisObject.bots.get(botId) === undefined) { + let bot = thisObject.bots.get(botProfileId) + if (bot === undefined) { throw ('Bot Does Not Exist.') + } else { + thisObject.bots.get(botProfileId).finalize() + thisObject.bots.delete(botProfileId) } - thisObject.bots.get(botId).finalize() - thisObject.bots.delete(botId) - thisObject.botsCount-- } function enableBot( - botId + botProfileId ) { - let bot = thisObject.bots.get(botId) + let bot = thisObject.bots.get(botProfileId) if (bot === undefined) { throw ('Bot Does Not Exist.') } - if (bot.enabled === true) { throw ('Bot Already Enabled.') } - bot.enabled = true } function disableBot( - botId + botProfileId ) { - let bot = thisObject.bots.get(botId) + let bot = thisObject.bots.get(botProfileId) if (bot === undefined) { throw ('Bot Does Not Exist.') } - if (bot.enabled === false) { throw ('Bot Already Disabled.') } - bot.enabled = false } } \ No newline at end of file diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 4a78876b0..6c3f2ea63 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -13154,17 +13154,17 @@ "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "savedPayload": { "position": { - "x": 30356, - "y": 23119 + "x": 3571.4285714285716, + "y": 25500 }, "targetPosition": { - "x": 30356, - "y": 23119 + "x": 3571.4285714285716, + "y": 25500 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 9f9a34b04..991feae51 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -56,7 +56,7 @@ function newGovernanceUserProfileSpace() { const X_STEP = SPACE_WIDTH / (userProfiles.length + 1) const Y_STEP = 3000 - const Y_LEVEL = SPACE_HEIGHT * 0.45 + const Y_LEVEL = SPACE_HEIGHT * 0.425 let xOffset = X_STEP let yOffset = 0 From b0fdd80c74f273eb217a40224e3344d7951b5acb Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sun, 29 Aug 2021 09:24:55 +0200 Subject: [PATCH 17/81] Onboarding Programs --- .../Token-Power-Flows/token-power-flows.json | 74 +++++++++++++++++++ .../Airdrop-Program/airdrop-program.json | 36 +++++++++ .../community-building-programs.json | 20 ++++- .../Github/Github-Program/github-program.json | 40 ++++++++++ .../onboarding-programs.json | 20 ++++- .../Tokens/Tokens-Awarded/tokens-awarded.json | 4 +- .../U/User/User-Profile/user-profile.json | 71 ++---------------- 7 files changed, 194 insertions(+), 71 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Concepts/T/Token/Token-Power-Flows/token-power-flows.json create mode 100644 Projects/Governance/Schemas/Docs-Nodes/A/Airdrop/Airdrop-Program/airdrop-program.json create mode 100644 Projects/Governance/Schemas/Docs-Nodes/G/Github/Github-Program/github-program.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/T/Token/Token-Power-Flows/token-power-flows.json b/Projects/Governance/Schemas/Docs-Concepts/T/Token/Token-Power-Flows/token-power-flows.json new file mode 100644 index 000000000..0a93c0f3a --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/T/Token/Token-Power-Flows/token-power-flows.json @@ -0,0 +1,74 @@ +{ + "type": "Token Power Flows", + "definition": { + "text": "Token Power flows cascading down from the User Profile node to the Token Power Switch node, to its offspring, and so on, following the structure of the hierarchy.", + "updated": 1630215880089 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630216073912 + }, + { + "style": "Text", + "text": "How Token Power flows depends on the following:" + }, + { + "style": "List", + "text": "By default, Token Power flows in equal proportion to each direct offspring node." + }, + { + "style": "List", + "text": "You may override the defaults by explicitly defining the percentage of the Token Power you wish to allocate to each offspring. If you define less than a total of 100%, then the remaining Token Power is distributed evenly across the offspring for which there is no definition." + }, + { + "style": "Text", + "text": "This is the format of the configuration you may use on each of the programs:" + }, + { + "style": "Json", + "text": "{\n\"percentage\": 50\n}", + "updated": 1630215956488 + }, + { + "style": "Text", + "text": "For example, let's say you have 1,000 Token Power flowing into your Token Power Switch node. Let's say you spawn the Onboarding Programs, Community Building Programs, Votes and Claims Programs, and Financial Programs nodes." + }, + { + "style": "Callout", + "text": "As soon as you deploy these four offspring of the Token Power Switch node, you will see that each of these nodes gets 25% of the Token Power by default." + }, + { + "style": "Text", + "text": "But you wish to limit the Token Power flowing into the Onboarding Programs to zero, as those programs do not require Token Power. To do that, you set up the following in the Onboarding Programs node configuration:" + }, + { + "style": "Json", + "text": "{\n\"percentage\": 0\n}", + "updated": 1630215994714 + }, + { + "style": "Callout", + "text": "Once the configuration is in place, you will notice that the Onboarding Programs node shows 0% and 0 Token Power flowing into the node. You will also notice that the rest of the nodes are getting 33.33% of the Token Power each." + }, + { + "style": "Text", + "text": "Now let's say you wish to use only 10% of your Token Power in the Onboarding Programs. So you set up the following config:" + }, + { + "style": "Json", + "text": "{\n\"percentage\": 10\n}", + "updated": 1630216035853 + }, + { + "style": "Callout", + "text": "As a result, 10% of the Token Power flows into the Onboarding Programs, while the remaining nodes get 45% of the Token Power each." + }, + { + "style": "Success", + "text": "The same logic applies to the flow of Token Power throughout the hierarchy!", + "updated": 1630216063140 + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Airdrop/Airdrop-Program/airdrop-program.json b/Projects/Governance/Schemas/Docs-Nodes/A/Airdrop/Airdrop-Program/airdrop-program.json new file mode 100644 index 000000000..aa6a91376 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Airdrop/Airdrop-Program/airdrop-program.json @@ -0,0 +1,36 @@ +{ + "type": "Airdrop Program", + "definition": { + "text": "We don't like meaningless airdrops. But what if airdrops bring users a step closer to participating in governance? The Airdrops program incentivizes users to take the first step to participate in governance: creating and submitting a User Profile.", + "updated": 1630221752804 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630218642448 + }, + { + "style": "Text", + "text": "The Airdrop program distributes the Rewards Pool defined under the Governance Programs > Onboarding Programs section of the Superalgos Pools hierarchy.", + "updated": 1630221764293 + }, + { + "style": "Success", + "text": "Spawning the Airdrop Program and submitting your User Profile is the sole technical requirement to receive the airdropped tokens and is — at the same time — the first step to participate in governance and contribute to the project.", + "updated": 1630218746987 + }, + { + "style": "Callout", + "text": "The program distributes the Rewards Pool evenly to all existing profiles, with a cap of SA 1,000 per profile, on each release!" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json b/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json index ec260f509..b6b48cdad 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json @@ -10,10 +10,14 @@ "text": "Content", "updated": 1630165468473 }, + { + "style": "Success", + "text": "Learn more about how Token Power Flows into these programs!", + "updated": 1630218909731 + }, { "style": "Text", - "text": "Each of the Community Building Programs has an associated Rewards Pool and a Bonus Pool under the Governance Programs > Community Building Programs section of the Superalgos Pools hierarchy.", - "updated": 1630168361008 + "text": "Each of the Community Building Programs has an associated Rewards Pool and a Bonus Pool under the Governance Programs > Community Building Programs section of the Superalgos Pools hierarchy." }, { "style": "Note", @@ -52,7 +56,17 @@ { "style": "Json", "text": "Total Incoming Power [*] -> 100% of the pool\n Your Incoming Power [**] -> X% of the pool -> Tokens Rewards\n\nTokens Rewards = Your Incoming Power * 100% / Total Incoming Power\n\n[*] The sum of all Incoming Power (in the given program) in all User Profiles combined.\n[**] Your Incoming Power (in the given program).", - "updated": 1630170860166 + "updated": 1630215178623 + }, + { + "style": "Block", + "text": "Configuration", + "updated": 1630215228441 + }, + { + "style": "Title", + "text": "Configuration", + "updated": 1630215233190 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/G/Github/Github-Program/github-program.json b/Projects/Governance/Schemas/Docs-Nodes/G/Github/Github-Program/github-program.json new file mode 100644 index 000000000..422743b22 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Nodes/G/Github/Github-Program/github-program.json @@ -0,0 +1,40 @@ +{ + "type": "Github Program", + "definition": { + "text": "This program incentivizes users to fork the Superalgos repository, a necessary step to contribute. It also incentivizes users to give a star and watch the repository, which helps developers find the project when searching on Github.com.", + "updated": 1630221291041 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630221318391 + }, + { + "style": "Text", + "text": "The Github Program distributes the Rewards Pool defined under the Governance Programs > Onboarding Programs section of the Superalgos Pools hierarchy.", + "updated": 1630221340561 + }, + { + "style": "Success", + "text": "Spawning the Github Program and submitting your User Profile is all you need to do to participate in the program. To maximize your Tokens Awarded, make sure you have a fork, a star, and are watching the repository! The system does automatic checks on Github.com and verifies their existence in real-time." + }, + { + "style": "Callout", + "text": "There is a cap of SA 1,000 for each of these incentives. This means that you may get up to SA 3,000 in Tokens Awarded if you maximize your participation. In case there aren't enough tokens in the Rewards Pool to cover each incentive up to the defined cap for all User Profiles, then each profile gets an equal proportion for each of the applicable incentives.", + "updated": 1630221717446 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/O/Onboarding/Onboarding-Programs/onboarding-programs.json b/Projects/Governance/Schemas/Docs-Nodes/O/Onboarding/Onboarding-Programs/onboarding-programs.json index f03ee4b59..d8557d81c 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/O/Onboarding/Onboarding-Programs/onboarding-programs.json +++ b/Projects/Governance/Schemas/Docs-Nodes/O/Onboarding/Onboarding-Programs/onboarding-programs.json @@ -1,13 +1,27 @@ { "type": "Onboarding Programs", "definition": { - "text": "These programs incentivize Superalgos users to take the first couple of steps to participate in governance and start giving back to the project. They make earning the first few tokens a breeze and allow every user to become invested!", - "updated": 1630056526452 + "text": "These programs incentivize Superalgos users to take the first couple of steps to participate in governance and start giving back to the project. They make earning the first few tokens a breeze and allow everyone to become invested in the Superalgos SA Token! We are talking about the Airdrop Program and the Github Program.", + "updated": 1630216446725 }, "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630216357301 + }, { "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "text": "What these two programs have in common is that they don't require Token Power to function. That is, even if you have zero Superalgos SA Tokens and zero Delegated Power, you may still participate to earn your first few tokens!", + "updated": 1630218079736 + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json index 03ead3cb0..95b3efd69 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json @@ -22,8 +22,8 @@ }, { "style": "Text", - "text": "The Community Building Programs node page explains how Tokens Rewards are calculated for these particular program.", - "updated": 1630171164026 + "text": "The Community Building Programs node page explains how Tokens Awarded is calculated for these particular programs.", + "updated": 1630219835777 }, { "style": "Text", diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile/user-profile.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile/user-profile.json index c1453693b..c58116d8c 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile/user-profile.json +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile/user-profile.json @@ -22,73 +22,18 @@ }, { "style": "Title", - "text": "Token Power Flow" + "text": "Token Power Flows", + "updated": 1630216274356 }, { - "style": "Text", - "text": "How Token Power flows depends on the following:" + "style": "Include", + "text": "Governance->Concept->Token Power Flows->Definition", + "updated": 1630216248820 }, { - "style": "List", - "text": "By default, Token Power flows in equal proportion to each direct offspring node.", - "updated": 1630093090611 - }, - { - "style": "List", - "text": "You may override the defaults by explicitly defining the percentage of the Token Power you wish to allocate to each offspring. If you define less than a total of 100%, then the remaining Token Power is distributed evenly across the offspring for which there is no definition.", - "updated": 1630093129825 - }, - { - "style": "Text", - "text": "This is the format of the configuration you may use on each of the programs:" - }, - { - "style": "Json", - "text": "{\n \"percentage\": 50\n}", - "updated": 1624726090541 - }, - { - "style": "Text", - "text": "For example, let's say you have 1,000 Token Power flowing into your Token Power Switch node. Let's say you spawn the Onboarding Programs, Community Building Programs, Votes and Claims Programs, and Financial Programs nodes.", - "updated": 1630094336717 - }, - { - "style": "Callout", - "text": "As soon as you deploy these four offspring of the Token Power Switch node, you will see that each of these nodes gets 25% of the Token Power by default.", - "updated": 1630094063741 - }, - { - "style": "Text", - "text": "But you wish to limit the Token Power flowing into the Onboarding Programs to zero, as those programs do not require Token Power. To do that, you set up the following in the Onboarding Programs node configuration:", - "updated": 1630093868178 - }, - { - "style": "Json", - "text": "{\n \"percentage\": 0\n}", - "updated": 1630093495369 - }, - { - "style": "Callout", - "text": "Once the configuration is in place, you will notice that the Onboarding Programs node shows 0% and 0 Token Power flowing into the node. You will also notice that the rest of the nodes are getting 33.33% of the Token Power each.", - "updated": 1630093693182 - }, - { - "style": "Text", - "text": "Now let's say you wish to use only 10% of your Token Power in the Onboarding Programs. So you set up the following config:" - }, - { - "style": "Json", - "text": "{\n \"percentage\": 10\n}", - "updated": 1630093961107 - }, - { - "style": "Callout", - "text": "As a result, 10% of the Token Power flows into the Onboarding Programs, while the remaining nodes get 45% of the Token Power each.", - "updated": 1630094141031 - }, - { - "style": "Success", - "text": "The same logic applies to the flow of Token Power throughout the hierarchy!" + "style": "Include", + "text": "Governance->Concept->Token Power Flows->Content", + "updated": 1630216256004 }, { "style": "Block", From af332691d50c1be7f4d96d2826eda335b020f1ab Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 09:32:44 +0200 Subject: [PATCH 18/81] Bot Profile Re Implemented --- Network/botProfile.js | 145 ++++++++++++++++------------------------- Network/userProfile.js | 16 +++-- 2 files changed, 64 insertions(+), 97 deletions(-) diff --git a/Network/botProfile.js b/Network/botProfile.js index 121829218..1761781f7 100644 --- a/Network/botProfile.js +++ b/Network/botProfile.js @@ -1,34 +1,30 @@ -exports.newUserProfile = function newUserProfile() { +exports.newBotProfile = function newBotProfile() { let thisObject = { + /* Unique Keys */ botProfileId: undefined, botProfileHandle: undefined, + /* Bot Unitque Properties */ botAsset: undefined, botExchange: undefined, enabled: undefined, - arrays: { - following: undefined, - followers: undefined, - posts: undefined, - bots: undefined - }, - maps: { - following: undefined, - followers: undefined, - posts: undefined, - bots: undefined - }, - followingCount: undefined, - followersCount: undefined, + /* Maps */ + following: undefined, + followers: undefined, + posts: undefined, + bots: undefined, + /* Stats */ emitterEventsCount: undefined, targetEventsCount: undefined, - postsCount: undefined, + /* Post Functions */ addPost: addPost, removePost: removePost, + /* Follow - Unfollow Functions */ addFollowing: addFollowing, removeFollowing: removeFollowing, addFollower: addFollower, removeFollower: removeFollower, + /* Framework Functions */ initialize: initialize, finalize: finalize } @@ -37,43 +33,21 @@ exports.newUserProfile = function newUserProfile() { function finalize() { - thisObject.arrays = { - following: undefined, - followers: undefined, - posts: undefined, - bots: undefined - } + thisObject.following = undefined + thisObject.followers = undefined + thisObject.posts = undefined - thisObject.maps = { - following: undefined, - followers: undefined, - posts: undefined, - bots: undefined - } } function initialize() { - thisObject.arrays = { - following: [], - followers: [], - posts: [] - } - - thisObject.maps = { - following: new Map(), - followers: new Map(), - posts: new Map() - } - - thisObject.followingCount = 0 - thisObject.followersCount = 0 + thisObject.following = new Map() + thisObject.followers = new Map() + thisObject.posts = new Map() thisObject.emitterEventsCount = 0 thisObject.targetEventsCount = 0 - thisObject.postsCount = 0 - thisObject.posts = [] } function addPost( @@ -86,80 +60,71 @@ exports.newUserProfile = function newUserProfile() { postType, timestamp ) { - if (NT.memory.maps.POSTS.get(emitterPostHash) !== undefined) { + if (thisObject.posts.get(emitterPostHash) !== undefined) { throw ('Post Already Exists.') + } else { + let post = NT.modules.POST.newPost() + post.initialize( + emitterUserProfileId, + targetUserProfileId, + emitterBotProfileId, + targetBotProfileId, + emitterPostHash, + targetPostHash, + postType, + timestamp + ) + + thisObject.posts.set(emitterPostHash, post) } - - let post = NT.modules.POST.newPost() - post.initialize( - emitterUserProfileId, - targetUserProfileId, - emitterBotProfileId, - targetBotProfileId, - emitterPostHash, - targetPostHash, - postType, - timestamp - ) - - thisObject.posts.push(post) - NT.memory.maps.POSTS.set(emitterPostHash, post) - thisObject.postsCount++ } function removePost( emitterPostHash ) { - if (NT.memory.maps.POSTS.get(emitterPostHash) === undefined) { + if (thisObject.posts.get(emitterPostHash) === undefined) { throw ('Post Does Not Exist.') + } else { + let post = thisObject.posts.get(emitterPostHash) + post.finalize() + thisObject.posts.delete(emitterPostHash) } - - let post = thisObject.posts.get(emitterPostHash) - post.finalize() - - for (let i = thisObject.posts.length - 1; i >= 0; i--) { - if (thisObject.posts[i].emitterPostHash === emitterPostHash) { - thisObject.posts.splice(i, 1) - break - } - } - NT.memory.maps.POSTS.delete(emitterPostHash) - thisObject.postsCount-- } function addFollowing( - botProfile + targetUserProfileId ) { - if (thisObject.following.get(botProfile.id) === undefined) { - thisObject.following.set(botProfile.id, botProfile) - thisObject.followingCount++ + if (thisObject.following.get(targetUserProfileId) === undefined) { + thisObject.following.set(targetUserProfileId, targetUserProfileId) + } else { + throw ('Already Following.') } } function removeFollowing( - botProfile + targetUserProfileId ) { - if (thisObject.following.get(botProfile.id) !== undefined) { - thisObject.following.delete(botProfile.id) - thisObject.followingCount-- + if (thisObject.following.get(targetUserProfileId) !== undefined) { + thisObject.following.delete(targetUserProfileId) + } else { + throw ('Not Following.') } } function addFollower( - botProfile + emitterUserProfileId ) { - if (thisObject.followers.get(botProfile.id) === undefined) { - thisObject.followers.set(botProfile.id, botProfile) - thisObject.followersCount++ + if (thisObject.followers.get(emitterUserProfileId) === undefined) { + thisObject.followers.set(emitterUserProfileId, emitterUserProfileId) } } function removeFollower( - botProfile + emitterUserProfileId ) { - if (thisObject.followers.get(botProfile.id) !== undefined) { - thisObject.followers.delete(botProfile.id) - thisObject.followersCount-- + if (thisObject.followers.get(emitterUserProfileId) !== undefined) { + thisObject.followers.delete(emitterUserProfileId) } } } + diff --git a/Network/userProfile.js b/Network/userProfile.js index b245a02d4..f1a2158f5 100644 --- a/Network/userProfile.js +++ b/Network/userProfile.js @@ -1,33 +1,35 @@ exports.newUserProfile = function newUserProfile() { let thisObject = { - + /* Unique Keys */ userProfileId: undefined, userProfileHandle: undefined, + /* User Unitque Properties */ blockchainAccount: undefined, + /* SA Reputation + SA Token Balance */ ranking: undefined, - + /* Maps */ following: undefined, followers: undefined, posts: undefined, bots: undefined, - + /* Stats */ emitterEventsCount: undefined, targetEventsCount: undefined, - + /* Post Functions */ addPost: addPost, removePost: removePost, - + /* Follow - Unfollow Functions */ addFollowing: addFollowing, removeFollowing: removeFollowing, addFollower: addFollower, removeFollower: removeFollower, - + /* Bot Functions */ addBot: addBot, removeBot: removeBot, enableBot: enableBot, disableBot: disableBot, - + /* Framework Functions */ initialize: initialize, finalize: finalize } From 4aa11efddfa31ad357cf51604ae92468b3e2d74b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 10:35:41 +0200 Subject: [PATCH 19/81] Post Re Implemented --- Network/Queries/Events.js | 7 +--- Network/Queries/PostReplies.js | 7 +--- Network/Queries/ProfileFollowers.js | 7 +--- Network/Queries/ProfilePosts.js | 7 +--- Network/botProfile.js | 13 +++++- Network/clientsInterface.js | 1 + Network/event.js | 5 ++- Network/post.js | 62 +++++++++++++++-------------- Network/userProfile.js | 14 ++++--- 9 files changed, 60 insertions(+), 63 deletions(-) diff --git a/Network/Queries/Events.js b/Network/Queries/Events.js index b234d316a..ee80312c7 100644 --- a/Network/Queries/Events.js +++ b/Network/Queries/Events.js @@ -232,13 +232,8 @@ exports.newEvents = function newEvents() { postType: post.postType, timestamp: post.timestamp, repliesCount: post.replies.length, - reactionsCount: [] + reactions: Array.from(post.reactions) } - - for (let i = 0; i < post.reactionTypesCount; i++) { - postResponse.reactionsCount.push(post.reactionsCount.get(i)) - } - return postResponse } } diff --git a/Network/Queries/PostReplies.js b/Network/Queries/PostReplies.js index 788af16b4..4661d692e 100644 --- a/Network/Queries/PostReplies.js +++ b/Network/Queries/PostReplies.js @@ -116,13 +116,8 @@ exports.newPostReplies = function newPostReplies() { postType: post.postType, timestamp: post.timestamp, repliesCount: post.replies.length, - reactionsCount: [] + reactions: Array.from(post.reactions) } - - for (let i = 0; i < post.reactionTypesCount; i++) { - postResponse.reactionsCount.push(post.reactionsCount.get(i)) - } - response.push(postResponse) } } diff --git a/Network/Queries/ProfileFollowers.js b/Network/Queries/ProfileFollowers.js index bf3e14b98..829a5f212 100644 --- a/Network/Queries/ProfileFollowers.js +++ b/Network/Queries/ProfileFollowers.js @@ -129,13 +129,8 @@ exports.newProfileFollowers = function newProfileFollowers() { postType: post.postType, timestamp: post.timestamp, repliesCount: post.replies.length, - reactionsCount: [] + reactions: Array.from(post.reactions) } - - for (let i = 0; i < post.reactionTypesCount; i++) { - postResponse.reactionsCount.push(post.reactionsCount.get(i)) - } - response.push(postResponse) } } diff --git a/Network/Queries/ProfilePosts.js b/Network/Queries/ProfilePosts.js index 3854d476e..b24381946 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Network/Queries/ProfilePosts.js @@ -129,13 +129,8 @@ exports.newProfilePosts = function newProfilePosts() { postType: post.postType, timestamp: post.timestamp, repliesCount: post.replies.length, - reactionsCount: [] + reactions: Array.from(post.reactions) } - - for (let i = 0; i < post.reactionTypesCount; i++) { - postResponse.reactionsCount.push(post.reactionsCount.get(i)) - } - response.push(postResponse) } } diff --git a/Network/botProfile.js b/Network/botProfile.js index 1761781f7..dd28512a4 100644 --- a/Network/botProfile.js +++ b/Network/botProfile.js @@ -7,7 +7,7 @@ exports.newBotProfile = function newBotProfile() { /* Bot Unitque Properties */ botAsset: undefined, botExchange: undefined, - enabled: undefined, + botEnabled: undefined, /* Maps */ following: undefined, followers: undefined, @@ -39,7 +39,16 @@ exports.newBotProfile = function newBotProfile() { } - function initialize() { + function initialize( + botProfileId, + botAsset, + botExchange, + botEnabled + ) { + thisObject.botProfileId = botProfileId + thisObject.botAsset = botAsset + thisObject.botExchange = botExchange + thisObject.botEnabled = botEnabled thisObject.following = new Map() thisObject.followers = new Map() diff --git a/Network/clientsInterface.js b/Network/clientsInterface.js index b7c34d125..66b4c0650 100644 --- a/Network/clientsInterface.js +++ b/Network/clientsInterface.js @@ -62,6 +62,7 @@ exports.newClientInterface = function newClientInterface() { "botId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "botAsset": "BTC", "botExchange": "Binance", + "botEnabled": true, "initialIndex": 35, "amountRequested": 50, "direction": "Past" diff --git a/Network/event.js b/Network/event.js index 736ea183f..8b2869311 100644 --- a/Network/event.js +++ b/Network/event.js @@ -12,6 +12,7 @@ exports.newEvent = function newEvent() { botId: undefined, botAsset: undefined, botExchange: undefined, + botEnabled: undefined, initialize: initialize, finalize: finalize } @@ -78,6 +79,7 @@ exports.newEvent = function newEvent() { thisObject.botId = eventReceived.botId thisObject.botAsset = eventReceived.botAsset thisObject.botExchange = eventReceived.botExchange + thisObject.botEnabled = eventReceived.botEnabled /* Validate Emitter User Profile. */ @@ -292,7 +294,8 @@ exports.newEvent = function newEvent() { emitterUserProfile.addBot( thisObject.botId, thisObject.botAsset, - thisObject.botExchange + thisObject.botExchange, + thisObject.botEnabled ) break } diff --git a/Network/post.js b/Network/post.js index 9b35c95cb..133ef9da3 100644 --- a/Network/post.js +++ b/Network/post.js @@ -1,19 +1,24 @@ exports.newPost = function newPost() { let thisObject = { + /* Parents Ids */ emitterUserProfileId: undefined, targetUserProfileId: undefined, emitterBotProfileId: undefined, targetBotProfileId: undefined, + /* Unique Keys */ emitterPostHash: undefined, targetPostHash: undefined, + /* Post Unitque Properties */ postType: undefined, timestamp: undefined, + /* Maps */ replies: undefined, - reactionsCount: undefined, - reactionTypesCount: undefined, + reactions: undefined, + /* Reaction Functions */ addReaction: addReaction, removeReactions: removeReaction, + /* Framework Functions */ initialize: initialize, finalize: finalize } @@ -35,29 +40,20 @@ exports.newPost = function newPost() { REACTION_HUG: 6 } - thisObject.reactionTypesCount = 7 - - thisObject.reactionsCount = new Map() - thisObject.reactionsCount.set(REACTION_TYPES.REACTION_LIKE, 0) - thisObject.reactionsCount.set(REACTION_TYPES.REACTION_LOVE, 0) - thisObject.reactionsCount.set(REACTION_TYPES.REACTION_HAHA, 0) - thisObject.reactionsCount.set(REACTION_TYPES.REACTION_WOW, 0) - thisObject.reactionsCount.set(REACTION_TYPES.REACTION_SAD, 0) - thisObject.reactionsCount.set(REACTION_TYPES.REACTION_ANGRY, 0) - thisObject.reactionsCount.set(REACTION_TYPES.REACTION_HUG, 0) + thisObject.reactions = new Map() + thisObject.reactions.set(REACTION_TYPES.REACTION_LIKE, 0) + thisObject.reactions.set(REACTION_TYPES.REACTION_LOVE, 0) + thisObject.reactions.set(REACTION_TYPES.REACTION_HAHA, 0) + thisObject.reactions.set(REACTION_TYPES.REACTION_WOW, 0) + thisObject.reactions.set(REACTION_TYPES.REACTION_SAD, 0) + thisObject.reactions.set(REACTION_TYPES.REACTION_ANGRY, 0) + thisObject.reactions.set(REACTION_TYPES.REACTION_HUG, 0) return thisObject function finalize() { - thisObject.emitterUserProfileId = undefined - thisObject.targetUserProfileId = undefined - thisObject.emitterBotProfileId = undefined - thisObject.targetBotProfileId = undefined - thisObject.emitterPostHash = undefined - thisObject.targetPostHash = undefined - thisObject.postType = undefined - thisObject.timestamp = undefined thisObject.replies = undefined + thisObject.reactions = undefined } function initialize( @@ -79,8 +75,6 @@ exports.newPost = function newPost() { thisObject.targetPostHash = targetPostHash thisObject.postType = postType thisObject.timestamp = timestamp - - thisObject.replies = [] /* Let's find the Target Post */ @@ -89,9 +83,17 @@ exports.newPost = function newPost() { if ( thisObject.postType === POST_TYPES.REPLY_TO_POST || thisObject.postType === POST_TYPES.REPOST_ || - thisObject.postType === POST_TYPES.QUOTE_REPOST_ + thisObject.postType === POST_TYPES.QUOTE_REPOST_ ) { - targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash) + /* + Validate Target User Profile. + */ + let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + if (targetUserProfile === undefined) { + throw ('Target User Profile Not Found.') + } + + targetPost = targetUserProfile.posts.get(thisObject.targetPostHash) if (targetPost === undefined) { throw ('Target Post Not Found.') @@ -101,29 +103,29 @@ exports.newPost = function newPost() { Let's add this post to the replies of the Target Post */ if ( - thisObject.postType === POST_TYPES.REPLY_TO_POST + thisObject.postType === POST_TYPES.REPLY_TO_POST ) { - targetPost.replies.push(thisObject) + targetPost.replies.set(thisObject.targetPostHash, thisObject.targetPostHash) } } function addReaction(reactionType) { - let reactionCount = thisObject.reactionsCount.get(reactionType) + let reactionCount = thisObject.reactions.get(reactionType) if (reactionCount === undefined) { throw ('Reaction Type Not Supported.') } - thisObject.reactionsCount.set(reactionType, reactionsCount + 1) + thisObject.reactions.set(reactionType, reactionCount + 1) } function removeReaction(reactionType) { - let reactionCount = thisObject.reactionsCount.get(reactionType) + let reactionCount = thisObject.reactions.get(reactionType) if (reactionCount === undefined) { throw ('Reaction Type Not Supported.') } - thisObject.reactionsCount.set(reactionType, reactionsCount - 1) + thisObject.reactions.set(reactionType, reactionCount - 1) } } \ No newline at end of file diff --git a/Network/userProfile.js b/Network/userProfile.js index f1a2158f5..82f19bc0c 100644 --- a/Network/userProfile.js +++ b/Network/userProfile.js @@ -135,7 +135,8 @@ exports.newUserProfile = function newUserProfile() { function addBot( botProfileId, botAsset, - botExchange + botExchange, + botEnabled ) { let bot = thisObject.bots.get(botProfileId) if (bot !== undefined) { @@ -145,7 +146,8 @@ exports.newUserProfile = function newUserProfile() { bot.initialize( botProfileId, botAsset, - botExchange + botExchange, + botEnabled ) thisObject.bots.set(botProfileId, bot) } @@ -170,10 +172,10 @@ exports.newUserProfile = function newUserProfile() { if (bot === undefined) { throw ('Bot Does Not Exist.') } - if (bot.enabled === true) { + if (bot.botEnabled === true) { throw ('Bot Already Enabled.') } - bot.enabled = true + bot.botEnabled = true } function disableBot( @@ -183,9 +185,9 @@ exports.newUserProfile = function newUserProfile() { if (bot === undefined) { throw ('Bot Does Not Exist.') } - if (bot.enabled === false) { + if (bot.botEnabled === false) { throw ('Bot Already Disabled.') } - bot.enabled = false + bot.botEnabled = false } } \ No newline at end of file From 648f699b56f228aea674f7a044371ca4a41ff513 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 11:45:30 +0200 Subject: [PATCH 20/81] Re Writting Event Processing --- ...NetwokNode.js => SocialGraphNetwokNode.js} | 0 Network/event.js | 456 ++++++++++-------- Network/post.js | 26 +- 3 files changed, 267 insertions(+), 215 deletions(-) rename Network/{NetwokNode.js => SocialGraphNetwokNode.js} (100%) diff --git a/Network/NetwokNode.js b/Network/SocialGraphNetwokNode.js similarity index 100% rename from Network/NetwokNode.js rename to Network/SocialGraphNetwokNode.js diff --git a/Network/event.js b/Network/event.js index 8b2869311..bfdd5aec5 100644 --- a/Network/event.js +++ b/Network/event.js @@ -1,24 +1,37 @@ exports.newEvent = function newEvent() { + /* + An Event is anything that happens system wide that + needs to be delivered to relevant entities via + the Superalgos Network. + An Event (in contrast to a Query) produces a change + on the state of the social graph. + */ let thisObject = { + /* Unique Key */ eventId: undefined, + /* Referenced Entities Unique Keys */ emitterUserProfileId: undefined, targetUserProfileId: undefined, emitterBotProfileId: undefined, targetBotProfileId: undefined, emitterPostHash: undefined, targetPostHash: undefined, + /* Event Unitque Properties */ + eventType: undefined, timestamp: undefined, - botId: undefined, + /* Bot Related Properties */ + botProfileId: undefined, botAsset: undefined, botExchange: undefined, botEnabled: undefined, + /* Framework Functions */ initialize: initialize, finalize: finalize } const EVENT_TYPES = { - + /* Users Posts and Following Events */ NEW_USER_POST: 10, REPLY_TO_USER_POST: 11, REPOST_USER_POST: 12, @@ -26,7 +39,7 @@ exports.newEvent = function newEvent() { REMOVE_USER_POST: 14, FOLLOW_USER_PROFILE: 15, UNFOLLOW_USER_PROFILE: 16, - + /* Bots Posts and Following Events */ NEW_BOT_POST: 20, REPLY_TO_BOT_POST: 21, REPOST_BOT_POST: 22, @@ -34,34 +47,33 @@ exports.newEvent = function newEvent() { REMOVE_BOT_POST: 24, FOLLOW_BOT_PROFILE: 25, UNFOLLOW_BOT_PROFILE: 26, - + /* Bots Management Events */ ADD_BOT: 50, REMOVE_BOT: 51, ENABLE_BOT: 52, DISABLE_BOT: 53, - + /* Add Reaction to Posts Events */ ADD_REACTION_LIKE: 100, ADD_REACTION_LOVE: 101, ADD_REACTION_HAHA: 102, ADD_REACTION_WOW: 103, ADD_REACTION_SAD: 104, ADD_REACTION_ANGRY: 105, - ADD_REACTION_HUG: 106, - + ADD_REACTION_CARE: 106, + /* Remove Reaction to Posts Events */ REMOVE_REACTION_LIKE: 200, REMOVE_REACTION_LOVE: 201, REMOVE_REACTION_HAHA: 202, REMOVE_REACTION_WOW: 203, REMOVE_REACTION_SAD: 204, REMOVE_REACTION_ANGRY: 205, - REMOVE_REACTION_HUG: 206 + REMOVE_REACTION_CARE: 206 } return thisObject function finalize() { - emitterUserProfile = undefined - targetUserProfile = undefined + } function initialize(eventReceived) { @@ -75,250 +87,292 @@ exports.newEvent = function newEvent() { thisObject.targetBotProfileId = eventReceived.targetBotProfileId thisObject.emitterPostHash = eventReceived.emitterPostHash thisObject.targetPostHash = eventReceived.targetPostHash + thisObject.eventType = eventReceived.eventType thisObject.timestamp = eventReceived.timestamp - thisObject.botId = eventReceived.botId + thisObject.botProfileId = eventReceived.botProfileId thisObject.botAsset = eventReceived.botAsset thisObject.botExchange = eventReceived.botExchange thisObject.botEnabled = eventReceived.botEnabled /* + Local Variables + */ + let emitterUserProfile + let targetUserProfile + /* Validate Emitter User Profile. */ - let emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) + if (emitterUserProfileId === undefined) { + throw ('Emitter User Profile Id Not Provided.') + } + emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) if (emitterUserProfile === undefined) { throw ('Emitter User Profile Not Found.') } - emitterUserProfile.emitterEventsCount++ /* Validate Target User Profile. */ - let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) - if (targetUserProfile === undefined) { - /* We thow an exception when it does not have a target user profile and is required*/ - if ( - thisObject.eventType !== EVENT_TYPES.NEW_USER_POST && - thisObject.eventType !== EVENT_TYPES.NEW_BOT_POST - ) { + if (thisObject.targetUserProfileId !== undefined) { + targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } - } else { - targetUserProfile.targetEventsCount++ } /* Validate Emitter Bot Profile. */ if (emitterBotProfileId !== undefined) { let botProfile = emitterUserProfile.bots.get(emitterBotProfileId) - if ( - botProfile === undefined - ) { - throw ('Emitter BOt Profile Not Found.') + if (botProfile === undefined) { + throw ('Emitter Bot Profile Not Found.') } } - /* - Is is related to Posting? - */ - if ( - thisObject.eventType === EVENT_TYPES.NEW_USER_POST || - thisObject.eventType === EVENT_TYPES.REPLY_TO_USER_POST || - thisObject.eventType === EVENT_TYPES.REPOST_USER_POST || - thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_USER_POST || - thisObject.eventType === EVENT_TYPES.NEW_BOT_POST || - thisObject.eventType === EVENT_TYPES.REPLY_TO_BOT_POST || - thisObject.eventType === EVENT_TYPES.REPOST_BOT_POST || - thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_BOT_POST - ) { + + postingEvents() + followingEvents() + reactionEvents() + botEvents() + eventCounters() + + function postingEvents() { /* - New User Post + Is is related to Posting? */ if ( thisObject.eventType === EVENT_TYPES.NEW_USER_POST || thisObject.eventType === EVENT_TYPES.REPLY_TO_USER_POST || thisObject.eventType === EVENT_TYPES.REPOST_USER_POST || - thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_USER_POST - ) { - emitterUserProfile.addPost( - thisObject.emitterUserProfileId, - thisObject.targetUserProfileId, - thisObject.emitterBotProfileId, - thisObject.targetBotProfileId, - thisObject.emitterPostHash, - thisObject.targetPostHash, - thisObject.eventType - 10, - thisObject.timestamp - ) - return - } - /* - New Bot Post - */ - if ( + thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_USER_POST || thisObject.eventType === EVENT_TYPES.NEW_BOT_POST || thisObject.eventType === EVENT_TYPES.REPLY_TO_BOT_POST || thisObject.eventType === EVENT_TYPES.REPOST_BOT_POST || thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_BOT_POST ) { - emitterBotProfile.addPost( - thisObject.emitterUserProfileId, - thisObject.targetUserProfileId, - thisObject.emitterBotProfileId, - thisObject.targetBotProfileId, - thisObject.emitterPostHash, - thisObject.targetPostHash, - thisObject.eventType - 20, - thisObject.timestamp - ) - return + /* + New User Post + */ + if ( + thisObject.eventType === EVENT_TYPES.NEW_USER_POST || + thisObject.eventType === EVENT_TYPES.REPLY_TO_USER_POST || + thisObject.eventType === EVENT_TYPES.REPOST_USER_POST || + thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_USER_POST + ) { + emitterUserProfile.addPost( + thisObject.emitterUserProfileId, + thisObject.targetUserProfileId, + thisObject.emitterBotProfileId, + thisObject.targetBotProfileId, + thisObject.emitterPostHash, + thisObject.targetPostHash, + thisObject.eventType - 10, + thisObject.timestamp + ) + return + } + /* + New Bot Post + */ + if ( + thisObject.eventType === EVENT_TYPES.NEW_BOT_POST || + thisObject.eventType === EVENT_TYPES.REPLY_TO_BOT_POST || + thisObject.eventType === EVENT_TYPES.REPOST_BOT_POST || + thisObject.eventType === EVENT_TYPES.QUOTE_REPOST_BOT_POST + ) { + if (emitterBotProfile === undefined) { + throw ('Emitter Bot Profile Id Not Provided.') + } + + emitterBotProfile.addPost( + thisObject.emitterUserProfileId, + thisObject.targetUserProfileId, + thisObject.emitterBotProfileId, + thisObject.targetBotProfileId, + thisObject.emitterPostHash, + thisObject.targetPostHash, + thisObject.eventType - 20, + thisObject.timestamp + ) + return + } + /* + Remove User Post + */ + if ( + thisObject.eventType === EVENT_TYPES.REMOVE_USER_POST + ) { + emitterUserProfile.removePost( + thisObject.emitterPostHash + ) + return + } + /* + Remove Bot Post + */ + if ( + thisObject.eventType === EVENT_TYPES.REMOVE_BOT_POST + ) { + if (emitterBotProfile === undefined) { + throw ('Emitter Bot Profile Id Not Provided.') + } + + emitterBotProfile.removePost( + thisObject.emitterPostHash + ) + return + } } + } + + function followingEvents() { /* - Remove User Post + Is is a following? */ if ( - thisObject.eventType === EVENT_TYPES.REMOVE_USER_POST + thisObject.eventType === EVENT_TYPES.FOLLOW_USER_PROFILE || + thisObject.eventType === EVENT_TYPES.UNFOLLOW_USER_PROFILE || + thisObject.eventType === EVENT_TYPES.FOLLOW_BOT_PROFILE || + thisObject.eventType === EVENT_TYPES.UNFOLLOW_BOT_PROFILE ) { - emitterUserProfile.removePost( - thisObject.emitterPostHash - ) + switch (thisObject.eventType) { + case EVENT_TYPES.FOLLOW_USER_PROFILE: { + + if (thisObject.emitterUserProfileId === undefined) { + throw ('Emitter User Profile Id Not Provided.') + } + + if (thisObject.targetUserProfileId === undefined) { + throw ('Target User Profile Id Not Provided.') + } + + emitterUserProfile.addFollowing( + targetUserProfileId + ) + targetUserProfile.addFollower( + emitterUserProfileId + ) + break + } + case EVENT_TYPES.UNFOLLOW_USER_PROFILE: { + emitterUserProfile.removeFollowing( + targetUserProfileId + ) + targetUserProfile.removeFollower( + emitterUserProfileId + ) + break + } + case EVENT_TYPES.FOLLOW_BOT_PROFILE: { + emitterUserProfile.addTradePostsFollowing( + targetBotProfileId + ) + targetUserProfile.addTradePostsFollower( + emitterUserProfileId + ) + break + } + case EVENT_TYPES.UNFOLLOW_BOT_PROFILE: { + emitterUserProfile.removeTradePostsFollowing( + targetBotProfileId + ) + targetUserProfile.removeTradePostsFollower( + emitterBotProfileId + ) + break + } + } return } + } + + function reactionEvents() { /* - Remove Bot Post + Is is a Reaction? */ if ( - thisObject.eventType === EVENT_TYPES.REMOVE_USER_POST + thisObject.eventType === EVENT_TYPES.ADD_REACTION_LIKE || + thisObject.eventType === EVENT_TYPES.ADD_REACTION_LOVE || + thisObject.eventType === EVENT_TYPES.ADD_REACTION_HAHA || + thisObject.eventType === EVENT_TYPES.ADD_REACTION_WOW || + thisObject.eventType === EVENT_TYPES.ADD_REACTION_SAD || + thisObject.eventType === EVENT_TYPES.ADD_REACTION_ANGRY || + thisObject.eventType === EVENT_TYPES.ADD_REACTION_CARE ) { - emitterBotProfile.removePost( - thisObject.emitterPostHash - ) + let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash) + + if (targetPost === undefined) { + throw ('Target Post Not Found') + } + + targetPost.addReaction(thisObject.eventType - 100) + return + } + if ( + thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_LIKE || + thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_LOVE || + thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_HAHA || + thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_WOW || + thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_SAD || + thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_ANGRY || + thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_CARE + ) { + let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash) + + if (targetPost === undefined) { + throw ('Target Post Not Found') + } + + targetPost.removeReaction(thisObject.eventType - 200) return } } - /* - Is is a following? - */ - if ( - thisObject.eventType === EVENT_TYPES.FOLLOW_USER_PROFILE || - thisObject.eventType === EVENT_TYPES.UNFOLLOW_USER_PROFILE || - thisObject.eventType === EVENT_TYPES.FOLLOW_BOT_PROFILE || - thisObject.eventType === EVENT_TYPES.UNFOLLOW_BOT_PROFILE - ) { - switch (thisObject.eventType) { - case EVENT_TYPES.FOLLOW_USER_PROFILE: { - emitterUserProfile.addFollowing( - targetUserProfileId - ) - targetUserProfile.addFollower( - emitterUserProfileId - ) - break - } - case EVENT_TYPES.UNFOLLOW_USER_PROFILE: { - emitterUserProfile.removeFollowing( - targetUserProfileId - ) - targetUserProfile.removeFollower( - emitterUserProfileId - ) - break - } - case EVENT_TYPES.FOLLOW_BOT_PROFILE: { - emitterUserProfile.addTradePostsFollowing( - targetBotProfileId - ) - targetUserProfile.addTradePostsFollower( - emitterUserProfileId - ) - break - } - case EVENT_TYPES.UNFOLLOW_BOT_PROFILE: { - emitterUserProfile.removeTradePostsFollowing( - targetBotProfileId - ) - targetUserProfile.removeTradePostsFollower( - emitterBotProfileId - ) - break + + function botEvents() { + /* + Is is a Bot? + */ + if ( + thisObject.eventType === EVENT_TYPES.ADD_BOT || + thisObject.eventType === EVENT_TYPES.REMOVE_BOT || + thisObject.eventType === EVENT_TYPES.ENABLE_BOT || + thisObject.eventType === EVENT_TYPES.DISABLE_BOT + ) { + switch (thisObject.eventType) { + case EVENT_TYPES.ADD_BOT: { + emitterUserProfile.addBot( + thisObject.botProfileId, + thisObject.botAsset, + thisObject.botExchange, + thisObject.botEnabled + ) + break + } + case EVENT_TYPES.REMOVE_BOT: { + emitterUserProfile.removeBot( + thisObject.botProfileId + ) + break + } + case EVENT_TYPES.ENABLE_BOT: { + emitterUserProfile.enableBot( + thisObject.botProfileId + ) + break + } + case EVENT_TYPES.DISABLE_BOT: { + emitterUserProfile.disableBot( + thisObject.botProfileId + ) + break + } } + return } - return } - /* - Is is a Reaction? - */ - if ( - thisObject.eventType === EVENT_TYPES.ADD_REACTION_LIKE || - thisObject.eventType === EVENT_TYPES.ADD_REACTION_LOVE || - thisObject.eventType === EVENT_TYPES.ADD_REACTION_HAHA || - thisObject.eventType === EVENT_TYPES.ADD_REACTION_WOW || - thisObject.eventType === EVENT_TYPES.ADD_REACTION_SAD || - thisObject.eventType === EVENT_TYPES.ADD_REACTION_ANGRY || - thisObject.eventType === EVENT_TYPES.ADD_REACTION_HUG - ) { - let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash) - if (targetPost === undefined) { - throw ('Target Post Not Found') + function eventCounters() { + emitterUserProfile.emitterEventsCount++ + if (targetUserProfile !== undefined) { + targetUserProfile.targetEventsCount++ } - - targetPost.addReaction(thisObject.eventType - 100) - return - } - if ( - thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_LIKE || - thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_LOVE || - thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_HAHA || - thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_WOW || - thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_SAD || - thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_ANGRY || - thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_HUG - ) { - let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash) - - if (targetPost === undefined) { - throw ('Target Post Not Found') - } - - targetPost.removeReaction(thisObject.eventType - 200) - return - } - /* - Is is a Bot? - */ - if ( - thisObject.eventType === EVENT_TYPES.ADD_BOT || - thisObject.eventType === EVENT_TYPES.REMOVE_BOT || - thisObject.eventType === EVENT_TYPES.ENABLE_BOT || - thisObject.eventType === EVENT_TYPES.DISABLE_BOT - ) { - switch (thisObject.eventType) { - case EVENT_TYPES.ADD_BOT: { - emitterUserProfile.addBot( - thisObject.botId, - thisObject.botAsset, - thisObject.botExchange, - thisObject.botEnabled - ) - break - } - case EVENT_TYPES.REMOVE_BOT: { - emitterUserProfile.removeBot( - thisObject.botId - ) - break - } - case EVENT_TYPES.ENABLE_BOT: { - emitterUserProfile.enableBot( - thisObject.botId - ) - break - } - case EVENT_TYPES.DISABLE_BOT: { - emitterUserProfile.disableBot( - thisObject.botId - ) - break - } - } - return } } } \ No newline at end of file diff --git a/Network/post.js b/Network/post.js index 133ef9da3..c95a65ef9 100644 --- a/Network/post.js +++ b/Network/post.js @@ -37,7 +37,7 @@ exports.newPost = function newPost() { REACTION_WOW: 3, REACTION_SAD: 4, REACTION_ANGRY: 5, - REACTION_HUG: 6 + REACTION_CARE: 6 } thisObject.reactions = new Map() @@ -47,7 +47,7 @@ exports.newPost = function newPost() { thisObject.reactions.set(REACTION_TYPES.REACTION_WOW, 0) thisObject.reactions.set(REACTION_TYPES.REACTION_SAD, 0) thisObject.reactions.set(REACTION_TYPES.REACTION_ANGRY, 0) - thisObject.reactions.set(REACTION_TYPES.REACTION_HUG, 0) + thisObject.reactions.set(REACTION_TYPES.REACTION_CARE, 0) return thisObject @@ -78,8 +78,6 @@ exports.newPost = function newPost() { /* Let's find the Target Post */ - let targetPost - if ( thisObject.postType === POST_TYPES.REPLY_TO_POST || thisObject.postType === POST_TYPES.REPOST_ || @@ -91,21 +89,21 @@ exports.newPost = function newPost() { let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') - } + } - targetPost = targetUserProfile.posts.get(thisObject.targetPostHash) + let targetPost = targetUserProfile.posts.get(thisObject.targetPostHash) if (targetPost === undefined) { throw ('Target Post Not Found.') } - } - /* - Let's add this post to the replies of the Target Post - */ - if ( - thisObject.postType === POST_TYPES.REPLY_TO_POST - ) { - targetPost.replies.set(thisObject.targetPostHash, thisObject.targetPostHash) + /* + Let's add this post to the replies of the Target Post + */ + if ( + thisObject.postType === POST_TYPES.REPLY_TO_POST + ) { + targetPost.replies.set(thisObject.targetPostHash, thisObject.targetPostHash) + } } } From 6b483d72be3766f2b288d17b4791e5d5d415a3bf Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sun, 29 Aug 2021 12:29:53 +0200 Subject: [PATCH 21/81] Finished Community Building Programs --- .../reusable-governance-snippets.json | 37 +++++++++++++++++++ .../Airdrop-Program/airdrop-program.json | 8 ++-- .../Github/Github-Program/github-program.json | 12 ++++-- .../mentorship-program.json | 28 ++++++++++---- .../onboarding-programs.json | 13 ++++++- .../Referral-Program/referral-program.json | 24 +++++++----- .../Support-Program/support-program.json | 34 ++++++++++++++--- .../U/User/User-Mentor/user-mentor.json | 13 +++---- .../U/User/User-Referrer/user-referrer.json | 17 +++------ .../U/User/User-Supporter/user-supporter.json | 14 +++---- .../votes-and-claims-programs.json | 22 +++++++++-- 11 files changed, 158 insertions(+), 64 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json index 351cb611b..c4b3c35af 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json @@ -24,6 +24,43 @@ { "style": "Important", "text": "The above means that the calculations that you see from within any given Workspace is a partial calculation within the scope of the Current Workspace only. Definitions, claims, votes, and so on, existing on other workspaces or plugins are not computed." + }, + { + "style": "Block", + "text": "Dummy", + "updated": 1630230740442 + }, + { + "style": "Title", + "text": "Featuring Tokens Bonus" + }, + { + "style": "Block", + "text": "Featuring Tokens Bonus", + "updated": 1630230362519 + }, + { + "style": "Important", + "text": "Participation in this program is incentivized with a Tokens Bonus, meaning you earn tokens just by participating! Read about Tokens Bonus to learn more!", + "updated": 1630230393431 + }, + { + "style": "Block", + "text": "Dummy", + "updated": 1630230754699 + }, + { + "style": "Title", + "text": "Community Building Programs" + }, + { + "style": "Block", + "text": "Community Building Programs" + }, + { + "style": "Success", + "text": "Read about the Community Building Programs to learn how this program calculates Tokens Awarded.", + "updated": 1630232362107 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Airdrop/Airdrop-Program/airdrop-program.json b/Projects/Governance/Schemas/Docs-Nodes/A/Airdrop/Airdrop-Program/airdrop-program.json index aa6a91376..1beb86056 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Airdrop/Airdrop-Program/airdrop-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Airdrop/Airdrop-Program/airdrop-program.json @@ -16,12 +16,12 @@ "updated": 1630221764293 }, { - "style": "Success", - "text": "Spawning the Airdrop Program and submitting your User Profile is the sole technical requirement to receive the airdropped tokens and is — at the same time — the first step to participate in governance and contribute to the project.", - "updated": 1630218746987 + "style": "Callout", + "text": "Spawning the Airdrop Program and submitting your User Profile is the sole requirement to receive the airdropped tokens and is — at the same time — the first step to participate in governance and contribute to the project.", + "updated": 1630228015309 }, { - "style": "Callout", + "style": "Text", "text": "The program distributes the Rewards Pool evenly to all existing profiles, with a cap of SA 1,000 per profile, on each release!" }, { diff --git a/Projects/Governance/Schemas/Docs-Nodes/G/Github/Github-Program/github-program.json b/Projects/Governance/Schemas/Docs-Nodes/G/Github/Github-Program/github-program.json index 422743b22..f2c89f130 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/G/Github/Github-Program/github-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/G/Github/Github-Program/github-program.json @@ -16,13 +16,17 @@ "updated": 1630221340561 }, { - "style": "Success", + "style": "Callout", "text": "Spawning the Github Program and submitting your User Profile is all you need to do to participate in the program. To maximize your Tokens Awarded, make sure you have a fork, a star, and are watching the repository! The system does automatic checks on Github.com and verifies their existence in real-time." }, { - "style": "Callout", - "text": "There is a cap of SA 1,000 for each of these incentives. This means that you may get up to SA 3,000 in Tokens Awarded if you maximize your participation. In case there aren't enough tokens in the Rewards Pool to cover each incentive up to the defined cap for all User Profiles, then each profile gets an equal proportion for each of the applicable incentives.", - "updated": 1630221717446 + "style": "Text", + "text": "There is a cap of SA 1,000 for each of these incentives. This means that you may get up to SA 3,000 in Tokens Awarded if you maximize your participation. ", + "updated": 1630228105213 + }, + { + "style": "Text", + "text": "In case there aren't enough tokens in the Rewards Pool to cover each incentive up to the defined cap for all User Profiles, then each profile gets an equal proportion for each of the applicable incentives." }, { "style": "Text", diff --git a/Projects/Governance/Schemas/Docs-Nodes/M/Mentorship/Mentorship-Program/mentorship-program.json b/Projects/Governance/Schemas/Docs-Nodes/M/Mentorship/Mentorship-Program/mentorship-program.json index 1b017d2d0..4889ea903 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/M/Mentorship/Mentorship-Program/mentorship-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/M/Mentorship/Mentorship-Program/mentorship-program.json @@ -1,8 +1,8 @@ { "type": "Mentorship Program", "definition": { - "text": "The mentorship program is designed to incentivize deep collaboration and the recruitment of Contributors. You may earn tokens for each user you mentor, but also for each user they mentor as well, and the chain goes on infinitely!", - "updated": 1624727325986 + "text": "Becoming proficient enough with Superalgos to the point in which you may produce valuable contributions may be a lengthy process. The mentorship program incentivizes deep collaboration, apprenticeship, and the formation of Contributors.", + "updated": 1630232204309 }, "paragraphs": [ { @@ -10,17 +10,31 @@ "text": "Content", "updated": 1624727362222 }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Featuring Tokens Bonus", + "updated": 1630232231414 + }, { "style": "Text", - "text": "The principles governing this program are very similar to the Referral Program:" + "text": "With this program, you may earn Superalgos SA Tokens for every user you mentor, and also for the users they mentor!" }, { - "style": "List", - "text": "By default, Mentorship Power flows in equal proportions to the existing User Mentor nodes, but you may use the configuration to alter the default behavior." + "style": "Callout", + "text": "To participate, you must spawn the Mentorship Program and declare your mentors. To do that, add a User Mentor node and use it to establish a reference to the User Profile of the person that mentored you. If you have more than one mentor, add more User Mentor nodes!", + "updated": 1630232305651 }, { - "style": "List", - "text": "Mentees confer their mentors 10% of the Mentorship Power allocated to the User Mentor node." + "style": "Text", + "text": "Superalgos is meant to grow into a massive global collaboration. To do that, the project needs an ever-growing group of Contributors!" + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Community Building Programs" + }, + { + "style": "Text", + "text": "" }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/O/Onboarding/Onboarding-Programs/onboarding-programs.json b/Projects/Governance/Schemas/Docs-Nodes/O/Onboarding/Onboarding-Programs/onboarding-programs.json index d8557d81c..e1b3a9d30 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/O/Onboarding/Onboarding-Programs/onboarding-programs.json +++ b/Projects/Governance/Schemas/Docs-Nodes/O/Onboarding/Onboarding-Programs/onboarding-programs.json @@ -10,10 +10,19 @@ "text": "Content", "updated": 1630216357301 }, + { + "style": "Success", + "text": "Learn more about how Token Power Flows into these programs!", + "updated": 1630228322651 + }, { "style": "Text", - "text": "What these two programs have in common is that they don't require Token Power to function. That is, even if you have zero Superalgos SA Tokens and zero Delegated Power, you may still participate to earn your first few tokens!", - "updated": 1630218079736 + "text": "What these two programs have in common is that they don't require Token Power to function. That is, even if you have zero Superalgos SA Tokens and zero Delegated Power, you may still participate to earn your first few tokens!" + }, + { + "style": "Callout", + "text": "All you need to do to participate is spawn each of the program nodes and submit your User Profile!", + "updated": 1630228214813 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/R/Referral/Referral-Program/referral-program.json b/Projects/Governance/Schemas/Docs-Nodes/R/Referral/Referral-Program/referral-program.json index a751f165e..a8af0e6ff 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/R/Referral/Referral-Program/referral-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/R/Referral/Referral-Program/referral-program.json @@ -1,8 +1,8 @@ { "type": "Referral Program", "definition": { - "text": "The referral program is designed to incentivize both word-of-mouth and influencer referrals. You may earn tokens for each user you refer, but also for each user they refer as well, and the chain goes on infinitely!", - "updated": 1624726453093 + "text": "The referral program incentivizes the promotion of the project, either by word-of-mouth or “en masse” through articles, social media posts, videos, and other forms of influencer marketing.", + "updated": 1630227795694 }, "paragraphs": [ { @@ -11,24 +11,30 @@ "updated": 1624726477501 }, { - "style": "Text", - "text": "When you declare one or more referrers, you confer them 10% of your Referral Power, but without losing any of your power! That is, you are not giving your power away… you’re empowering someone else through your power!" + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Featuring Tokens Bonus", + "updated": 1630230465415 }, { "style": "Text", - "text": "The power you confer to your referrer is added to his or her own power. Now, guess what happens when your referrer declares his or her referrer? That's right! 10% of the total Referral Power is conferred to his or her referrer too! And the chain continues on and on." + "text": "With this program, you may earn Superalgos SA Tokens for every user you refer to the project, and also for the users they refer!" }, { "style": "Callout", - "text": "Now, let’s look at this the other way round. The people you refer confer 10% of their Referral Power to you. When they get to refer people, they get 10% of their Referral Power. This means that you get 10% of the Referral Power from the first generation of people you refer, but you also get 1% of the power of the second generation, and 0.1% of the third generation, and so on!" + "text": "To participate, you must spawn the Referral Program and declare your referrer. To do that, add a User Referrer node and use it to establish a reference to the User Profile of the person that referred you to Superalgos. If you have more than one referrer, simply add more User Referrer nodes." }, { "style": "Text", - "text": "At the time of each Distribution Event, your total Referral Power determines the Direct Proportion of tokens you get from the Referral Reward Pool." + "text": "Maybe you learned about Superalgos from an article, a video, a comment on Reddit, a tweet, the official website, or someone who told you about us!" }, { - "style": "Success", - "text": "As you can see, there is a very good incentive for spreading the word about Superalgos. It’s good for you, for your friends, for their friends, and for the project!" + "style": "Text", + "text": "Declaring your referrers is the best way to thank the people that may have written that article or tweet, produced that video, maintained the website, or told you about Superalgos! Without them, you probably wouldn’t be here yet!" + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Community Building Programs", + "updated": 1630230671246 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/S/Support/Support-Program/support-program.json b/Projects/Governance/Schemas/Docs-Nodes/S/Support/Support-Program/support-program.json index 7f2ee398c..8a5c11524 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/S/Support/Support-Program/support-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/S/Support/Support-Program/support-program.json @@ -1,8 +1,8 @@ { "type": "Support Program", "definition": { - "text": "The Support Program is designed to incentivize the involvement of the Community in helping new users overcome the learning curve and the rough edges they may find in the current version of the software. You may earn tokens by sharing your knowledge with other users!", - "updated": 1624726923232 + "text": "At Superalgos, we take pride in the level of support we offer to newcomers and the Community in general. It is a crucial aspect of our culture, based above all on collaboration. The Support Program enables the Community to compensate Community Mods contributing to the project’s support efforts.", + "updated": 1630231393370 }, "paragraphs": [ { @@ -11,12 +11,36 @@ "updated": 1624726970556 }, { - "style": "Text", - "text": "The Token Power assigned to the Support Program becomes your Support Power. The core idea of this program is that you may show your gratitude to the people that help you out when you have doubts or run into trouble!" + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Featuring Tokens Bonus", + "updated": 1630231411117 }, { "style": "Text", - "text": "The group of Community Mods is growing, and it should! Not all mods are active all the time. When you select your favorite mods, you help the project identify which mods have been actively helping users, so that they may be rewarded accordingly." + "text": "Superalgos is a vast system and the learning curve is still quite steep. Many users need help, particularly during the early stages." + }, + { + "style": "Text", + "text": "While the Community is always ready to help with typical questions, we’ve noticed that it takes a certain level of experience and knowledge to provide effective support. This is why select Community Mods are in charge of the Support Group." + }, + { + "style": "Note", + "text": "If you ever wish to join the team of Community Mods, start participating in the various Telegram groups and Discord channels, helping users and answering questions. We’ll soon spot you and draft you into the Community Mods team!", + "updated": 1630231465692 + }, + { + "style": "Callout", + "text": "To participate, you must spawn the Support Program and declare your favorite supporters. To do that, add a User Supporter node and use it to establish a reference to the User Profile of the person that has helped you the most! If you have more than one favorite supporter, add more User Supporter nodes!", + "updated": 1630231527435 + }, + { + "style": "Text", + "text": "If you seldom use the Support Group, that may be thanks to the effort put in crafting tutorials and documentation. If that is your case, then feel free to select the individuals or teams doing this work as your preferred supporters!", + "updated": 1630231554533 + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Community Building Programs" }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Mentor/user-mentor.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Mentor/user-mentor.json index 24a041c8c..de7068ea7 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Mentor/user-mentor.json +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Mentor/user-mentor.json @@ -1,8 +1,8 @@ { "type": "User Mentor", "definition": { - "text": "Spawn User Mentor nodes to reference your mentors!", - "updated": 1624727395307 + "text": "A User Mentor node must establish a reference with the User Profile of your mentor. If you have more than one mentor, add more nodes! This is how you establish who your mentors are.", + "updated": 1630232933516 }, "paragraphs": [ { @@ -11,12 +11,9 @@ "updated": 1624727421712 }, { - "style": "Text", - "text": "The Superalgos Community is always willing to help. You will find your mentors in the various Community Groups." - }, - { - "style": "Success", - "text": "The Mentorship Program is the best way to thank the people that help you get to the power user level. The Superalgos Project advances thanks to Contributors, thus helping new users go through the learning curve up to the point in which they can contribute to the project is highly valuable for the Community as a whole!" + "style": "Warning", + "text": "Declaring at least one User Mentor is a requirement to participate in the program. If you fail to declare at least one, you don't qualify for Tokens Bonus incentives.", + "updated": 1630232958240 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Referrer/user-referrer.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Referrer/user-referrer.json index 57813010e..861d8918e 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Referrer/user-referrer.json +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Referrer/user-referrer.json @@ -1,8 +1,8 @@ { "type": "User Referrer", "definition": { - "text": "The User Referrer node must establish a reference with the User Profile of your referrer. This is how you establish who your referrer is.", - "updated": 1624726602398 + "text": "A User Referrer node must establish a reference with the User Profile of your referrer. If you have more than one referrer, add more nodes! This is how you establish who your referrers are.", + "updated": 1630232566550 }, "paragraphs": [ { @@ -11,16 +11,9 @@ "updated": 1624726623564 }, { - "style": "Text", - "text": "In case more than one person referred you to Superalgos or in case you can’t remember who was first, you may add new User Referrer nodes and declare more than one referrer." - }, - { - "style": "Callout", - "text": "You may have been referred to Superalgos by an article in a publication, a YouTube video, a social media post, a comment on Reddit, a tweet, or directly by a friend. Please be fair to those that go the extra mile spreading the word about the project! Find out who authored that video, tweet, or article, and make sure you give credit where credit is due!" - }, - { - "style": "Text", - "text": "The User Referrer node displays a notice detailing how your total Referral Power is composed, as a sum of your own power and the power you get from people in your referred offspring." + "style": "Warning", + "text": "Declaring at least one User Referrer is a requirement to participate in the program. If you fail to declare at least one, you don't qualify for Tokens Bonus incentives.", + "updated": 1630232662165 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Supporter/user-supporter.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Supporter/user-supporter.json index 2e1a24317..6c56886f2 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Supporter/user-supporter.json +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Supporter/user-supporter.json @@ -1,8 +1,8 @@ { "type": "User Supporter", "definition": { - "text": "Spawn as many User Supporter nodes as you wish and establish references to the User Profile nodes of your favorite supporters.", - "updated": 1624727060271 + "text": "A User Supporter node must establish a reference with the User Profile of your supporter. If you have more than one supporter, add more nodes! This is how you establish who your supporters are.", + "updated": 1630232791200 }, "paragraphs": [ { @@ -11,13 +11,9 @@ "updated": 1624727081804 }, { - "style": "Text", - "text": "If you declare more than one supporter, you may use the configuration in the User Supporter node to determine how much Supporter Power you wish to send each. If you don’t use the configuration, the default applies." - }, - { - "style": "Json", - "text": "{\n \"percentage\": 50\n}", - "updated": 1624727099934 + "style": "Warning", + "text": "Declaring at least one User Supporter is a requirement to participate in the program. If you fail to declare at least one, you don't qualify for Tokens Bonus incentives.", + "updated": 1630232813838 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/V/Votes/Votes-And-Claims-Programs/votes-and-claims-programs.json b/Projects/Governance/Schemas/Docs-Nodes/V/Votes/Votes-And-Claims-Programs/votes-and-claims-programs.json index c2538f60b..69a61f1b6 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/V/Votes/Votes-And-Claims-Programs/votes-and-claims-programs.json +++ b/Projects/Governance/Schemas/Docs-Nodes/V/Votes/Votes-And-Claims-Programs/votes-and-claims-programs.json @@ -1,13 +1,27 @@ { "type": "Votes And Claims Programs", "definition": { - "text": "Use this node to spawn the Claims Program and the Voting Program.", - "updated": 1630056577950 + "text": "Votes and claims are instruments the Community uses to determine what is incentivized and how contributions are compensated. Use this node to spawn the Claims Program and the Voting Program.", + "updated": 1630226336941 }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630226386348 + }, + { + "style": "Success", + "text": "Learn more about how Token Power Flows into these programs!", + "updated": 1630226462874 + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file From 9bb7d70eb680c209376c590f4efc730da9563fce Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 12:35:27 +0200 Subject: [PATCH 22/81] Event, User Profile, Bot Profile, Post re-implementation finished --- Network/botProfile.js | 7 +++- Network/event.js | 92 ++++++++++++++++++++++++++++++------------ Network/post.js | 13 +++++- Network/userProfile.js | 20 ++++++++- 4 files changed, 103 insertions(+), 29 deletions(-) diff --git a/Network/botProfile.js b/Network/botProfile.js index dd28512a4..a85bcfa57 100644 --- a/Network/botProfile.js +++ b/Network/botProfile.js @@ -1,5 +1,10 @@ exports.newBotProfile = function newBotProfile() { - + /* + Users can have a Profile that can: + * follow other bots profiles. + * be followed by other bots profiles. + * have posts linked to the profile. + */ let thisObject = { /* Unique Keys */ botProfileId: undefined, diff --git a/Network/event.js b/Network/event.js index bfdd5aec5..b3329a046 100644 --- a/Network/event.js +++ b/Network/event.js @@ -21,7 +21,6 @@ exports.newEvent = function newEvent() { eventType: undefined, timestamp: undefined, /* Bot Related Properties */ - botProfileId: undefined, botAsset: undefined, botExchange: undefined, botEnabled: undefined, @@ -89,7 +88,6 @@ exports.newEvent = function newEvent() { thisObject.targetPostHash = eventReceived.targetPostHash thisObject.eventType = eventReceived.eventType thisObject.timestamp = eventReceived.timestamp - thisObject.botProfileId = eventReceived.botProfileId thisObject.botAsset = eventReceived.botAsset thisObject.botExchange = eventReceived.botExchange thisObject.botEnabled = eventReceived.botEnabled @@ -98,6 +96,8 @@ exports.newEvent = function newEvent() { */ let emitterUserProfile let targetUserProfile + let emitterBotProfile + let targetBotProfile /* Validate Emitter User Profile. */ @@ -121,11 +121,20 @@ exports.newEvent = function newEvent() { Validate Emitter Bot Profile. */ if (emitterBotProfileId !== undefined) { - let botProfile = emitterUserProfile.bots.get(emitterBotProfileId) - if (botProfile === undefined) { + emitterBotProfile = emitterUserProfile.bots.get(emitterBotProfileId) + if (emitterBotProfile === undefined) { throw ('Emitter Bot Profile Not Found.') } } + /* + Validate Target Bot Profile. + */ + if (targetBotProfileId !== undefined) { + targetBotProfile = emitterUserProfile.bots.get(targetBotProfileId) + if (targetBotProfile === undefined) { + throw ('Target Bot Profile Not Found.') + } + } postingEvents() followingEvents() @@ -252,6 +261,15 @@ exports.newEvent = function newEvent() { break } case EVENT_TYPES.UNFOLLOW_USER_PROFILE: { + + if (thisObject.emitterUserProfileId === undefined) { + throw ('Emitter User Profile Id Not Provided.') + } + + if (thisObject.targetUserProfileId === undefined) { + throw ('Target User Profile Id Not Provided.') + } + emitterUserProfile.removeFollowing( targetUserProfileId ) @@ -261,19 +279,37 @@ exports.newEvent = function newEvent() { break } case EVENT_TYPES.FOLLOW_BOT_PROFILE: { - emitterUserProfile.addTradePostsFollowing( + + if (thisObject.emitterBotProfileId === undefined) { + throw ('Emitter Bot Profile Id Not Provided.') + } + + if (thisObject.targetBotProfileId === undefined) { + throw ('Target Bot Profile Id Not Provided.') + } + + emitterBotProfile.addFollowing( targetBotProfileId ) - targetUserProfile.addTradePostsFollower( - emitterUserProfileId + targetBotProfile.addFollower( + emitterBotProfileId ) break } case EVENT_TYPES.UNFOLLOW_BOT_PROFILE: { - emitterUserProfile.removeTradePostsFollowing( + + if (thisObject.emitterBotProfileId === undefined) { + throw ('Emitter Bot Profile Id Not Provided.') + } + + if (thisObject.targetBotProfileId === undefined) { + throw ('Target Bot Profile Id Not Provided.') + } + + emitterBotProfile.removeFollowing( targetBotProfileId ) - targetUserProfile.removeTradePostsFollower( + targetBotProfile.removeFollower( emitterBotProfileId ) break @@ -287,6 +323,18 @@ exports.newEvent = function newEvent() { /* Is is a Reaction? */ + let targetPost + + if (targetBotProfile !== undefined) { + targetPost = targetBotProfile.posts.get(thisObject.targetPostHash) + } else { + targetPost = targetUserProfile.posts.get(thisObject.targetPostHash) + } + + if (targetPost === undefined) { + throw ('Target Post Not Found') + } + if ( thisObject.eventType === EVENT_TYPES.ADD_REACTION_LIKE || thisObject.eventType === EVENT_TYPES.ADD_REACTION_LOVE || @@ -296,12 +344,6 @@ exports.newEvent = function newEvent() { thisObject.eventType === EVENT_TYPES.ADD_REACTION_ANGRY || thisObject.eventType === EVENT_TYPES.ADD_REACTION_CARE ) { - let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash) - - if (targetPost === undefined) { - throw ('Target Post Not Found') - } - targetPost.addReaction(thisObject.eventType - 100) return } @@ -314,12 +356,6 @@ exports.newEvent = function newEvent() { thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_ANGRY || thisObject.eventType === EVENT_TYPES.REMOVE_REACTION_CARE ) { - let targetPost = NT.memory.maps.POSTS.get(thisObject.targetPostHash) - - if (targetPost === undefined) { - throw ('Target Post Not Found') - } - targetPost.removeReaction(thisObject.eventType - 200) return } @@ -338,7 +374,7 @@ exports.newEvent = function newEvent() { switch (thisObject.eventType) { case EVENT_TYPES.ADD_BOT: { emitterUserProfile.addBot( - thisObject.botProfileId, + thisObject.emitterBotProfileId, thisObject.botAsset, thisObject.botExchange, thisObject.botEnabled @@ -347,19 +383,19 @@ exports.newEvent = function newEvent() { } case EVENT_TYPES.REMOVE_BOT: { emitterUserProfile.removeBot( - thisObject.botProfileId + thisObject.emitterBotProfileId ) break } case EVENT_TYPES.ENABLE_BOT: { emitterUserProfile.enableBot( - thisObject.botProfileId + thisObject.emitterBotProfileId ) break } case EVENT_TYPES.DISABLE_BOT: { emitterUserProfile.disableBot( - thisObject.botProfileId + thisObject.emitterBotProfileId ) break } @@ -373,6 +409,12 @@ exports.newEvent = function newEvent() { if (targetUserProfile !== undefined) { targetUserProfile.targetEventsCount++ } + if (emitterBotProfile !== undefined) { + emitterUserProfile.emitterEventsCount++ + } + if (targetBotProfile !== undefined) { + targetBotProfile.targetEventsCount++ + } } } } \ No newline at end of file diff --git a/Network/post.js b/Network/post.js index c95a65ef9..efe1f33f0 100644 --- a/Network/post.js +++ b/Network/post.js @@ -1,5 +1,16 @@ exports.newPost = function newPost() { - + /* + Posts represent a collection of multimedia content sotored somewhere else + and identified by that content hash. Posts might belong to: + * a User Profile. + * a Bot Profile. + + Posts might be linked to other posts when they are a reply or quote. + + Posts migth have: + * replies, when a user or bot replies to a post. + * reactions, when a user or bot reacts to a post. + */ let thisObject = { /* Parents Ids */ emitterUserProfileId: undefined, diff --git a/Network/userProfile.js b/Network/userProfile.js index 82f19bc0c..88a0d26f4 100644 --- a/Network/userProfile.js +++ b/Network/userProfile.js @@ -1,5 +1,11 @@ exports.newUserProfile = function newUserProfile() { - + /* + Users can have a Profile that can: + * follow other user profiles. + * be followed by other user profiles. + * have posts linked to the profile. + * have bots linked to the profile. + */ let thisObject = { /* Unique Keys */ userProfileId: undefined, @@ -45,7 +51,17 @@ exports.newUserProfile = function newUserProfile() { } - function initialize() { + function initialize( + userProfileId, + userProfileHandle, + blockchainAccount, + ranking + ) { + + thisObject.userProfileId = userProfileId + thisObject.userProfileHandle = userProfileHandle + thisObject.blockchainAccount = blockchainAccount + thisObject.ranking = ranking thisObject.following = new Map() thisObject.followers = new Map() From 44219d29391692b9126422e66d35aa164c3b6032 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 12:36:55 +0200 Subject: [PATCH 23/81] Update SocialGraphNetwokNode.js --- Network/SocialGraphNetwokNode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index 794844275..bfe37a806 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -16,7 +16,7 @@ global.NT = { }, modules: { USER_PROFILE: require('./UserProfile.js'), - BOT: require('./BotProfile.js'), + BOT_PROFILE: require('./BotProfile.js'), EVENT: require('./Event.js'), POST: require('./Post.js'), QUERY: require('./Query.js'), From d42f473a91d95af7397c26892d3272b3f116fa55 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 12:39:54 +0200 Subject: [PATCH 24/81] Superalgos Network: Reimplementing basic concepts --- Network/SocialGraphNetwokNode.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index bfe37a806..c1611edbe 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -9,15 +9,14 @@ global.NT = { EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once. }, arrays: { - EVENTS: [], // A time ordered list of events. NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking. NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking. } }, modules: { + EVENT: require('./Event.js'), USER_PROFILE: require('./UserProfile.js'), BOT_PROFILE: require('./BotProfile.js'), - EVENT: require('./Event.js'), POST: require('./Post.js'), QUERY: require('./Query.js'), QUERY_USER_PROFILE_STATS: require('./Queries/UserProfileStats.js'), From c7011e4183107b33c52451fe792d4039da67ec26 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 13:11:22 +0200 Subject: [PATCH 25/81] added userprofileId to Bot --- Network/botProfile.js | 3 +++ Network/event.js | 1 + Network/userProfile.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Network/botProfile.js b/Network/botProfile.js index a85bcfa57..2be6b4437 100644 --- a/Network/botProfile.js +++ b/Network/botProfile.js @@ -7,6 +7,7 @@ exports.newBotProfile = function newBotProfile() { */ let thisObject = { /* Unique Keys */ + userProfileId: undefined, botProfileId: undefined, botProfileHandle: undefined, /* Bot Unitque Properties */ @@ -45,11 +46,13 @@ exports.newBotProfile = function newBotProfile() { } function initialize( + userProfileId, botProfileId, botAsset, botExchange, botEnabled ) { + thisObject.userProfileId = userProfileId thisObject.botProfileId = botProfileId thisObject.botAsset = botAsset thisObject.botExchange = botExchange diff --git a/Network/event.js b/Network/event.js index b3329a046..2afa3effa 100644 --- a/Network/event.js +++ b/Network/event.js @@ -374,6 +374,7 @@ exports.newEvent = function newEvent() { switch (thisObject.eventType) { case EVENT_TYPES.ADD_BOT: { emitterUserProfile.addBot( + thisObject.emitterUserProfileId, thisObject.emitterBotProfileId, thisObject.botAsset, thisObject.botExchange, diff --git a/Network/userProfile.js b/Network/userProfile.js index 88a0d26f4..0144038cd 100644 --- a/Network/userProfile.js +++ b/Network/userProfile.js @@ -149,6 +149,7 @@ exports.newUserProfile = function newUserProfile() { } function addBot( + userProfileId, botProfileId, botAsset, botExchange, @@ -160,6 +161,7 @@ exports.newUserProfile = function newUserProfile() { } else { let bot = NT.modules.BOTS.newBot() bot.initialize( + userProfileId, botProfileId, botAsset, botExchange, From 825b17d24c160060c1120444dd61b898ee5b4136 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sun, 29 Aug 2021 13:14:15 +0200 Subject: [PATCH 26/81] More definitions and concepts --- .../superalgos-medium-blog.json | 14 ++++++++++ .../superalgos-project.json | 13 +++++++++ .../distribution-event.json | 27 +++++++++++++++++++ .../Incoming-Power/incoming-power.json | 13 +++++++++ 4 files changed, 67 insertions(+) create mode 100644 Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Medium-Blog/superalgos-medium-blog.json create mode 100644 Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Project/superalgos-project.json create mode 100644 Projects/Governance/Schemas/Docs-Concepts/D/Distribution/Distribution-Event/distribution-event.json create mode 100644 Projects/Governance/Schemas/Docs-Concepts/I/Incoming/Incoming-Power/incoming-power.json diff --git a/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Medium-Blog/superalgos-medium-blog.json b/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Medium-Blog/superalgos-medium-blog.json new file mode 100644 index 000000000..fbd319ece --- /dev/null +++ b/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Medium-Blog/superalgos-medium-blog.json @@ -0,0 +1,14 @@ +{ + "type": "Superalgos Medium Blog", + "definition": { + "text": "The Superalgos Medium Blog is a Medium Publication where the Superalgos Project makes official announcements and publishes project-related content.", + "updated": 1630235403524 + }, + "paragraphs": [ + { + "style": "Link", + "text": "Go to the Superalgos Medium Blog->medium.com/superalgos", + "updated": 1630235431554 + } + ] +} \ No newline at end of file diff --git a/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Project/superalgos-project.json b/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Project/superalgos-project.json new file mode 100644 index 000000000..9589bfe4f --- /dev/null +++ b/Projects/Foundations/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Project/superalgos-project.json @@ -0,0 +1,13 @@ +{ + "type": "Superalgos Project", + "definition": { + "text": "The Superalgos Project is the open Community, together with it's body of work.", + "updated": 1630235520885 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/D/Distribution/Distribution-Event/distribution-event.json b/Projects/Governance/Schemas/Docs-Concepts/D/Distribution/Distribution-Event/distribution-event.json new file mode 100644 index 000000000..332e6c42e --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/D/Distribution/Distribution-Event/distribution-event.json @@ -0,0 +1,27 @@ +{ + "type": "Distribution Event", + "definition": { + "text": "The Superalgos Project distributes its native Superalgos SA Tokens after each release to compensate contributions and incentivize desirable behaviors. The Distribution Event represents the moment in time and the act of running the process that distributes tokens from the Treasury Account to the Governance Address associated with each User Profile that participates in governance.", + "updated": 1630234849482 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630233421503 + }, + { + "style": "Text", + "text": "The Superalgos Project announces each release through all official channels, including the Telegram Announcements channel and the Superalgos Medium Blog.", + "updated": 1630235099973 + }, + { + "style": "Text", + "text": "At the moment of the announcement, a time window opens for the Community to participate in governance. At this point, the window is of an indeterminate span. Users may set up their User Profiles until the window closes. " + }, + { + "style": "Text", + "text": "Once the window closes, no further modifications are accepted on governance hierarchies until the Distribution Event takes place." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/I/Incoming/Incoming-Power/incoming-power.json b/Projects/Governance/Schemas/Docs-Concepts/I/Incoming/Incoming-Power/incoming-power.json new file mode 100644 index 000000000..c4fa8def8 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/I/Incoming/Incoming-Power/incoming-power.json @@ -0,0 +1,13 @@ +{ + "type": "Incoming Power", + "definition": { + "text": "Incoming Power is a form of Token Power coming into any given Governance Program originating at a third party User Profile. Certain programs use the notion of Incoming Power to determine the Tokens Rewards applicable for the program in question.", + "updated": 1630235289528 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file From dec45412108e90473ce93f4849753610daa812d3 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 13:18:57 +0200 Subject: [PATCH 27/81] Bug Fixed with Following and Followers of Bots --- Network/botProfile.js | 26 ++++++++++++++------------ Network/event.js | 2 ++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Network/botProfile.js b/Network/botProfile.js index 2be6b4437..e7ce60b41 100644 --- a/Network/botProfile.js +++ b/Network/botProfile.js @@ -109,38 +109,40 @@ exports.newBotProfile = function newBotProfile() { } function addFollowing( - targetUserProfileId + targetUserProfileId, + targetBotProfileId ) { - if (thisObject.following.get(targetUserProfileId) === undefined) { - thisObject.following.set(targetUserProfileId, targetUserProfileId) + if (thisObject.following.get(targetBotProfileId) === undefined) { + thisObject.following.set(targetBotProfileId, { targetUserProfileId: targetUserProfileId, targetBotProfileId: targetBotProfileId }) } else { throw ('Already Following.') } } function removeFollowing( - targetUserProfileId + targetBotProfileId ) { - if (thisObject.following.get(targetUserProfileId) !== undefined) { - thisObject.following.delete(targetUserProfileId) + if (thisObject.following.get(targetBotProfileId) !== undefined) { + thisObject.following.delete(targetBotProfileId) } else { throw ('Not Following.') } } function addFollower( - emitterUserProfileId + emitterUserProfileId, + emitterBotProfileId ) { - if (thisObject.followers.get(emitterUserProfileId) === undefined) { - thisObject.followers.set(emitterUserProfileId, emitterUserProfileId) + if (thisObject.followers.get(emitterBotProfileId) === undefined) { + thisObject.followers.set(emitterBotProfileId, { emitterUserProfileId: emitterUserProfileId, emitterBotProfileId: emitterBotProfileId }) } } function removeFollower( - emitterUserProfileId + emitterBotProfileId ) { - if (thisObject.followers.get(emitterUserProfileId) !== undefined) { - thisObject.followers.delete(emitterUserProfileId) + if (thisObject.followers.get(emitterBotProfileId) !== undefined) { + thisObject.followers.delete(emitterBotProfileId) } } } diff --git a/Network/event.js b/Network/event.js index 2afa3effa..b586d9077 100644 --- a/Network/event.js +++ b/Network/event.js @@ -289,9 +289,11 @@ exports.newEvent = function newEvent() { } emitterBotProfile.addFollowing( + targetUserProfileId, targetBotProfileId ) targetBotProfile.addFollower( + emitterUserProfileId, emitterBotProfileId ) break From 4c9701965a2d576809921b3a94b3bb08b41aafae Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 13:51:03 +0200 Subject: [PATCH 28/81] User Profile and Bot Profiles Statistics done --- Network/Queries/BotProfileStats.js | 15 ++++++++------- Network/Queries/UserProfileStats.js | 11 +++++------ Network/Query.js | 7 +++++++ Network/clientsInterface.js | 9 ++++++--- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/Network/Queries/BotProfileStats.js b/Network/Queries/BotProfileStats.js index 137072fb9..510f1ebb3 100644 --- a/Network/Queries/BotProfileStats.js +++ b/Network/Queries/BotProfileStats.js @@ -15,13 +15,13 @@ exports.newBotProfileStats = function newBotProfileStats() { function initialize(queryReceived) { /* - Validate Bot Profile + Validate User Profile */ let userProfile - if (queryReceived.targetBotProfileId !== undefined) { + if (queryReceived.targetUserProfileId !== undefined) { userProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - userProfile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileId) + userProfile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (userProfile === undefined) { @@ -39,13 +39,14 @@ exports.newBotProfileStats = function newBotProfileStats() { function execute() { return { + "userProfileId": thisObject.profile.userProfileId, "botProfileId": thisObject.profile.botProfileId, "botProfileHandle": thisObject.profile.botProfileHandle, - "followingCount": thisObject.profile.followingCount, - "followersCount": thisObject.profile.followersCount, + "followingCount": thisObject.profile.following.size, + "followersCount": thisObject.profile.followers.size, + "postsCount": thisObject.profile.posts.size, "emitterEventsCount": thisObject.profile.emitterEventsCount, - "targetEventsCount": thisObject.profile.targetEventsCount, - "postsCount": thisObject.profile.postsCount + "targetEventsCount": thisObject.profile.targetEventsCount } } } \ No newline at end of file diff --git a/Network/Queries/UserProfileStats.js b/Network/Queries/UserProfileStats.js index 383d39aab..a7fd8580b 100644 --- a/Network/Queries/UserProfileStats.js +++ b/Network/Queries/UserProfileStats.js @@ -26,7 +26,6 @@ exports.newUserProfileStats = function newUserProfileStats() { if (thisObject.profile === undefined) { throw ('Target User Profile Not Found.') } - } function execute() { @@ -36,12 +35,12 @@ exports.newUserProfileStats = function newUserProfileStats() { "userProfileHandle": thisObject.profile.userProfileHandle, "blockchainAccount": thisObject.profile.blockchainAccount, "ranking": thisObject.profile.ranking, - "followingCount": thisObject.profile.followingCount, - "followersCount": thisObject.profile.followersCount, + "followingCount": thisObject.profile.following.size, + "followersCount": thisObject.profile.followers.size, + "postsCount": thisObject.profile.posts.size, + "botsCount": thisObject.profile.bots.size, "emitterEventsCount": thisObject.profile.emitterEventsCount, - "targetEventsCount": thisObject.profile.targetEventsCount, - "postsCount": thisObject.profile.postsCount, - "botsCount": thisObject.profile.botsCount + "targetEventsCount": thisObject.profile.targetEventsCount } } } \ No newline at end of file diff --git a/Network/Query.js b/Network/Query.js index 6842871ee..f69f56841 100644 --- a/Network/Query.js +++ b/Network/Query.js @@ -1,5 +1,12 @@ exports.newQuery = function newQuery() { + /* + A Query is a call from a Network Client to + a Network Node with the purpose to get + relevant information from the Social Graph. + A Query does not produce changes + on the state of the Social Graph. + */ let thisObject = { query: undefined, queryType: undefined, diff --git a/Network/clientsInterface.js b/Network/clientsInterface.js index 66b4c0650..1cc17e4d6 100644 --- a/Network/clientsInterface.js +++ b/Network/clientsInterface.js @@ -26,12 +26,14 @@ exports.newClientInterface = function newClientInterface() { "eventType": 10, "emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "emitterBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "targetBBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "timestamp": 124234234234, - "botId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "botAsset": "BTC", - "botExchange": "Binance" + "botExchange": "Binance", + "botEnabled": true } */ @@ -56,10 +58,11 @@ exports.newClientInterface = function newClientInterface() { "targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "emitterUserProfileHandle": "Luis-Fernando-Molina", "targetUserProfileHandle": "Luis-Fernando-Molina", + "emitterBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "targetBBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "timestamp": 124234234234, - "botId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", "botAsset": "BTC", "botExchange": "Binance", "botEnabled": true, From 2812dc2ab107b61dd0dc7f3404ad545ad7062755 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 16:31:32 +0200 Subject: [PATCH 29/81] Update ProfilePosts.js --- Network/Queries/ProfilePosts.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Network/Queries/ProfilePosts.js b/Network/Queries/ProfilePosts.js index b24381946..e74d7e81b 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Network/Queries/ProfilePosts.js @@ -45,6 +45,13 @@ exports.newProfilePosts = function newProfilePosts() { throw ('Target Bot Profile Not Found.') } } + + if (queryReceived.targetBotProfileHandle !== undefined) { + thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileHandle) + if (thisObject.profile === undefined) { + throw ('Target Bot Profile Not Found.') + } + } /* Validate Initial Index */ @@ -102,16 +109,18 @@ exports.newProfilePosts = function newProfilePosts() { let response = [] switch (thisObject.direction) { case DIRECTION_FUTURE: { + let array = Array.from(thisObject.profile.posts) for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { - let arrayItem = thisObject.profile.arrays.posts[i] + let arrayItem = array[i] if (arrayItem === undefined) { break } addToResponse(arrayItem) } break } case DIRECTION_PAST: { + let array = Array.from(thisObject.profile.posts) for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { - let arrayItem = thisObject.profile.arrays.posts[i] + let arrayItem = array[i] if (arrayItem === undefined) { break } addToResponse(arrayItem) } @@ -124,11 +133,13 @@ exports.newProfilePosts = function newProfilePosts() { let postResponse = { emitterUserProfileId: post.emitterUserProfileId, targetUserProfileId: post.targetUserProfileId, + emitterBotProfileId: post.emitterBotProfileId, + targetBotProfileId: post.targetBotProfileId, emitterPostHash: post.emitterPostHash, targetPostHash: post.targetPostHash, postType: post.postType, timestamp: post.timestamp, - repliesCount: post.replies.length, + repliesCount: post.replies.size, reactions: Array.from(post.reactions) } response.push(postResponse) From 50e6643062f7bc20882200ec2d4ec5599b5bb6f7 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 16:53:34 +0200 Subject: [PATCH 30/81] Post Replies Query done --- Network/Queries/PostReplies.js | 43 +++++++++++++++++++++++++++------ Network/Queries/ProfilePosts.js | 22 +++++++---------- 2 files changed, 45 insertions(+), 20 deletions(-) diff --git a/Network/Queries/PostReplies.js b/Network/Queries/PostReplies.js index 4661d692e..6a27a1cc5 100644 --- a/Network/Queries/PostReplies.js +++ b/Network/Queries/PostReplies.js @@ -1,5 +1,9 @@ exports.newPostReplies = function newPostReplies() { - + /* + Each Post regardless if it is authored by a User or Bot Profile, + can have replies. This query is designed for Network Clients to + fetch the posts metadata that are replies to a certain post. + */ let thisObject = { post: undefined, initialIndex: undefined, @@ -24,10 +28,30 @@ exports.newPostReplies = function newPostReplies() { } function initialize(queryReceived) { + let profile + /* + Validate User Profile + */ + if (queryReceived.targetUserProfileId !== undefined) { + profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + } + + if (profile === undefined) { + throw ('Target User Profile Not Found.') + } + /* + Validate Bot Profile + */ + if (queryReceived.targetBotProfileId !== undefined) { + profile = profile.bots.get(queryReceived.targetBotProfileId) + if (profile === undefined) { + throw ('Target Bot Profile Not Found.') + } + } /* Validate Post */ - thisObject.post = NT.memory.maps.POSTS.get(queryReceived.targetPostHash) + thisObject.post = profile.posts.get(queryReceived.targetPostHash) if (thisObject.post === undefined) { throw ('Target Post Not Found.') @@ -86,21 +110,24 @@ exports.newPostReplies = function newPostReplies() { } function execute() { + let response = [] + let array = Array.from(thisObject.post.replies) + switch (thisObject.direction) { case DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { - let post = thisObject.post.replies[i] + let arrayItem = array[i] if (post === undefined) { break } - addToResponse(post) + addToResponse(arrayItem) } break } case DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { - let post = thisObject.post.replies[i] + let arrayItem = array[i] if (post === undefined) { break } - addToResponse(post) + addToResponse(arrayItem) } break } @@ -111,11 +138,13 @@ exports.newPostReplies = function newPostReplies() { let postResponse = { emitterUserProfileId: post.emitterUserProfileId, targetUserProfileId: post.targetUserProfileId, + emitterBotProfileId: post.emitterBotProfileId, + targetBotProfileId: post.targetBotProfileId, emitterPostHash: post.emitterPostHash, targetPostHash: post.targetPostHash, postType: post.postType, timestamp: post.timestamp, - repliesCount: post.replies.length, + repliesCount: post.replies.size, reactions: Array.from(post.reactions) } response.push(postResponse) diff --git a/Network/Queries/ProfilePosts.js b/Network/Queries/ProfilePosts.js index e74d7e81b..60e83d135 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Network/Queries/ProfilePosts.js @@ -1,5 +1,9 @@ exports.newProfilePosts = function newProfilePosts() { - + /* + Each User or Bot Profile can have posts. This query + is designed for Network Clients to fetch the posts + metadata they need from the Social Graph. + */ let thisObject = { profile: undefined, initialIndex: undefined, @@ -29,9 +33,7 @@ exports.newProfilePosts = function newProfilePosts() { */ if (queryReceived.targetUserProfileId !== undefined) { thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) - } else { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) - } + } if (thisObject.profile === undefined) { throw ('Target User Profile Not Found.') @@ -45,13 +47,6 @@ exports.newProfilePosts = function newProfilePosts() { throw ('Target Bot Profile Not Found.') } } - - if (queryReceived.targetBotProfileHandle !== undefined) { - thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileHandle) - if (thisObject.profile === undefined) { - throw ('Target Bot Profile Not Found.') - } - } /* Validate Initial Index */ @@ -106,10 +101,12 @@ exports.newProfilePosts = function newProfilePosts() { } function execute() { + let response = [] + let array = Array.from(thisObject.profile.posts) + switch (thisObject.direction) { case DIRECTION_FUTURE: { - let array = Array.from(thisObject.profile.posts) for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -118,7 +115,6 @@ exports.newProfilePosts = function newProfilePosts() { break } case DIRECTION_PAST: { - let array = Array.from(thisObject.profile.posts) for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } From 541370c6a8a7c7e696358daff099954a4f343ffa Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 17:11:14 +0200 Subject: [PATCH 31/81] Queries Following and Followers --- Network/Queries/ProfileFollowers.js | 21 ++--- Network/Queries/ProfileFollowing.js | 132 ++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 13 deletions(-) create mode 100644 Network/Queries/ProfileFollowing.js diff --git a/Network/Queries/ProfileFollowers.js b/Network/Queries/ProfileFollowers.js index 829a5f212..915f65c1a 100644 --- a/Network/Queries/ProfileFollowers.js +++ b/Network/Queries/ProfileFollowers.js @@ -29,8 +29,6 @@ exports.newProfileFollowers = function newProfileFollowers() { */ if (queryReceived.targetUserProfileId !== undefined) { thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) - } else { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (thisObject.profile === undefined) { @@ -99,11 +97,14 @@ exports.newProfileFollowers = function newProfileFollowers() { } function execute() { + let response = [] + let array = Array.from(thisObject.profile.followers) + switch (thisObject.direction) { case DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { - let arrayItem = thisObject.profile.arrays.followers[i] + let arrayItem = array[i] if (arrayItem === undefined) { break } addToResponse(arrayItem) } @@ -111,7 +112,7 @@ exports.newProfileFollowers = function newProfileFollowers() { } case DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { - let arrayItem = thisObject.profile.arrays.followers[i] + let arrayItem = array[i] if (arrayItem === undefined) { break } addToResponse(arrayItem) } @@ -120,16 +121,10 @@ exports.newProfileFollowers = function newProfileFollowers() { } return response - function addToResponse(post) { + function addToResponse(arrayItem) { let postResponse = { - emitterUserProfileId: post.emitterUserProfileId, - targetUserProfileId: post.targetUserProfileId, - emitterPostHash: post.emitterPostHash, - targetPostHash: post.targetPostHash, - postType: post.postType, - timestamp: post.timestamp, - repliesCount: post.replies.length, - reactions: Array.from(post.reactions) + emitterUserProfileId: arrayItem.emitterUserProfileId, + emitterBotProfileId: arrayItem.emitterBotProfileId } response.push(postResponse) } diff --git a/Network/Queries/ProfileFollowing.js b/Network/Queries/ProfileFollowing.js new file mode 100644 index 000000000..8c0336190 --- /dev/null +++ b/Network/Queries/ProfileFollowing.js @@ -0,0 +1,132 @@ +exports.newProfileFollowing = function newProfileFollowing() { + + let thisObject = { + profile: undefined, + initialIndex: undefined, + amountRequested: undefined, + direction: undefined, + execute: execute, + initialize: initialize, + finalize: finalize + } + + const INITIAL_POST_INDEX_FIRST = 'First' + const INITIAL_POST_INDEX_LAST = 'Last' + const MIN_AMOUNT_REQUESTED = 1 + const MAX_AMOUNT_REQUESTED = 100 + const DIRECTION_FUTURE = 'Future' + const DIRECTION_PAST = 'Past' + + return thisObject + + function finalize() { + thisObject.profile = undefined + } + + function initialize(queryReceived) { + /* + Validate User Profile + */ + if (queryReceived.targetUserProfileId !== undefined) { + thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + } + + if (thisObject.profile === undefined) { + throw ('Target User Profile Not Found.') + } + /* + Validate Bot Profile + */ + if (queryReceived.targetBotProfileId !== undefined) { + thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileId) + if (thisObject.profile === undefined) { + throw ('Target Bot Profile Not Found.') + } + } + /* + Validate Initial Index + */ + if (queryReceived.initialIndex === undefined) { + throw ('Initial Index Undefined.') + } + + if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) { + queryReceived.initialIndex = thisObject.profile.posts.length - 1 + } + + if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) { + queryReceived.initialIndex = 0 + } + + if (isNaN(queryReceived.initialIndex) === true) { + throw ('Initial Post Is Not a Number.') + } + + thisObject.initialIndex = queryReceived.initialIndex + /* + Validate Amount Requested + */ + if (queryReceived.amountRequested === undefined) { + throw ('Amount Requested Undefined.') + } + + if (isNaN(queryReceived.amountRequested) === true) { + throw ('Amount Requested Is Not a Number.') + } + + if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { + throw ('Amount Requested Below Min.') + } + + if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { + throw ('Amount Requested Above Max.') + } + /* + Validate Direction + */ + if (queryReceived.direction === undefined) { + throw ('Direction Undefined.') + } + + if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { + throw ('Direction Not Supported.') + } + + thisObject.direction = queryReceived.direction + + } + + function execute() { + + let response = [] + let array = Array.from(thisObject.profile.following) + + switch (thisObject.direction) { + case DIRECTION_FUTURE: { + for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { + let arrayItem = array[i] + if (arrayItem === undefined) { break } + addToResponse(arrayItem) + } + break + } + case DIRECTION_PAST: { + for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { + let arrayItem = array[i] + if (arrayItem === undefined) { break } + addToResponse(arrayItem) + } + break + } + } + return response + + function addToResponse(arrayItem) { + let postResponse = { + emitterUserProfileId: arrayItem.emitterUserProfileId, + emitterBotProfileId: arrayItem.emitterBotProfileId + } + response.push(postResponse) + } + } +} \ No newline at end of file From 79adad9893cbb07216bf2d544912b0125fccff61 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 17:34:54 +0200 Subject: [PATCH 32/81] Utilities for Queries --- Network/Queries/PostReplies.js | 86 ++------------------ Network/Queries/ProfileFollowers.js | 74 +---------------- Network/Queries/ProfileFollowing.js | 74 +---------------- Network/Queries/ProfilePosts.js | 75 +---------------- Network/SocialGraphNetwokNode.js | 3 + Network/Utilities/QueriesValidations.js | 104 ++++++++++++++++++++++++ 6 files changed, 118 insertions(+), 298 deletions(-) create mode 100644 Network/Utilities/QueriesValidations.js diff --git a/Network/Queries/PostReplies.js b/Network/Queries/PostReplies.js index 6a27a1cc5..6eb79e96c 100644 --- a/Network/Queries/PostReplies.js +++ b/Network/Queries/PostReplies.js @@ -5,6 +5,7 @@ exports.newPostReplies = function newPostReplies() { fetch the posts metadata that are replies to a certain post. */ let thisObject = { + profile: undefined, post: undefined, initialIndex: undefined, amountRequested: undefined, @@ -14,98 +15,21 @@ exports.newPostReplies = function newPostReplies() { finalize: finalize } - const INITIAL_REPLY_INDEX_FIRST = 'First' - const INITIAL_REPLY_INDEX_LAST = 'Last' - const MIN_AMOUNT_REQUESTED = 1 - const MAX_AMOUNT_REQUESTED = 100 const DIRECTION_FUTURE = 'Future' const DIRECTION_PAST = 'Past' return thisObject function finalize() { + thisObject.profile = undefined thisObject.post = undefined } function initialize(queryReceived) { - let profile - /* - Validate User Profile - */ - if (queryReceived.targetUserProfileId !== undefined) { - profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) - } - if (profile === undefined) { - throw ('Target User Profile Not Found.') - } - /* - Validate Bot Profile - */ - if (queryReceived.targetBotProfileId !== undefined) { - profile = profile.bots.get(queryReceived.targetBotProfileId) - if (profile === undefined) { - throw ('Target Bot Profile Not Found.') - } - } - /* - Validate Post - */ - thisObject.post = profile.posts.get(queryReceived.targetPostHash) - - if (thisObject.post === undefined) { - throw ('Target Post Not Found.') - } - /* - Validate Initial Index - */ - if (queryReceived.initialIndex === undefined) { - throw ('Initial Index Undefined.') - } - - if (queryReceived.initialIndex === INITIAL_REPLY_INDEX_LAST) { - queryReceived.initialIndex = thisObject.poat.replies.length - 1 - } - - if (queryReceived.initialIndex === INITIAL_REPLY_INDEX_FIRST) { - queryReceived.initialIndex = 0 - } - - if (isNaN(queryReceived.initialIndex) === true) { - throw ('Initial Reply Is Not a Number.') - } - - thisObject.initialIndex = queryReceived.initialIndex - /* - Validate Amount Requested - */ - if (queryReceived.amountRequested === undefined) { - throw ('Amount Requested Undefined.') - } - - if (isNaN(queryReceived.amountRequested) === true) { - throw ('Amount Requested Is Not a Number.') - } - - if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { - throw ('Amount Requested Below Min.') - } - - if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { - throw ('Amount Requested Above Max.') - } - /* - Validate Direction - */ - if (queryReceived.direction === undefined) { - throw ('Direction Undefined.') - } - - if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { - throw ('Direction Not Supported.') - } - - thisObject.direction = queryReceived.direction + NT.utilities.queriesValidations.profilesValidations(queryReceived, thisObject) + NT.utilities.queriesValidations.postValidations(queryReceived, thisObject) + NT.utilities.queriesValidations.arrayValidations(queryReceived, thisObject) } diff --git a/Network/Queries/ProfileFollowers.js b/Network/Queries/ProfileFollowers.js index 915f65c1a..371bfde95 100644 --- a/Network/Queries/ProfileFollowers.js +++ b/Network/Queries/ProfileFollowers.js @@ -10,10 +10,6 @@ exports.newProfileFollowers = function newProfileFollowers() { finalize: finalize } - const INITIAL_POST_INDEX_FIRST = 'First' - const INITIAL_POST_INDEX_LAST = 'Last' - const MIN_AMOUNT_REQUESTED = 1 - const MAX_AMOUNT_REQUESTED = 100 const DIRECTION_FUTURE = 'Future' const DIRECTION_PAST = 'Past' @@ -24,75 +20,9 @@ exports.newProfileFollowers = function newProfileFollowers() { } function initialize(queryReceived) { - /* - Validate User Profile - */ - if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) - } - if (thisObject.profile === undefined) { - throw ('Target User Profile Not Found.') - } - /* - Validate Bot Profile - */ - if (queryReceived.targetBotProfileId !== undefined) { - thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileId) - if (thisObject.profile === undefined) { - throw ('Target Bot Profile Not Found.') - } - } - /* - Validate Initial Index - */ - if (queryReceived.initialIndex === undefined) { - throw ('Initial Index Undefined.') - } - - if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) { - queryReceived.initialIndex = thisObject.profile.posts.length - 1 - } - - if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) { - queryReceived.initialIndex = 0 - } - - if (isNaN(queryReceived.initialIndex) === true) { - throw ('Initial Post Is Not a Number.') - } - - thisObject.initialIndex = queryReceived.initialIndex - /* - Validate Amount Requested - */ - if (queryReceived.amountRequested === undefined) { - throw ('Amount Requested Undefined.') - } - - if (isNaN(queryReceived.amountRequested) === true) { - throw ('Amount Requested Is Not a Number.') - } - - if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { - throw ('Amount Requested Below Min.') - } - - if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { - throw ('Amount Requested Above Max.') - } - /* - Validate Direction - */ - if (queryReceived.direction === undefined) { - throw ('Direction Undefined.') - } - - if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { - throw ('Direction Not Supported.') - } - - thisObject.direction = queryReceived.direction + NT.utilities.queriesValidations.profilesValidations(queryReceived, thisObject) + NT.utilities.queriesValidations.arrayValidations(queryReceived, thisObject) } diff --git a/Network/Queries/ProfileFollowing.js b/Network/Queries/ProfileFollowing.js index 8c0336190..09c6d29d7 100644 --- a/Network/Queries/ProfileFollowing.js +++ b/Network/Queries/ProfileFollowing.js @@ -10,10 +10,6 @@ exports.newProfileFollowing = function newProfileFollowing() { finalize: finalize } - const INITIAL_POST_INDEX_FIRST = 'First' - const INITIAL_POST_INDEX_LAST = 'Last' - const MIN_AMOUNT_REQUESTED = 1 - const MAX_AMOUNT_REQUESTED = 100 const DIRECTION_FUTURE = 'Future' const DIRECTION_PAST = 'Past' @@ -24,75 +20,9 @@ exports.newProfileFollowing = function newProfileFollowing() { } function initialize(queryReceived) { - /* - Validate User Profile - */ - if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) - } - if (thisObject.profile === undefined) { - throw ('Target User Profile Not Found.') - } - /* - Validate Bot Profile - */ - if (queryReceived.targetBotProfileId !== undefined) { - thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileId) - if (thisObject.profile === undefined) { - throw ('Target Bot Profile Not Found.') - } - } - /* - Validate Initial Index - */ - if (queryReceived.initialIndex === undefined) { - throw ('Initial Index Undefined.') - } - - if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) { - queryReceived.initialIndex = thisObject.profile.posts.length - 1 - } - - if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) { - queryReceived.initialIndex = 0 - } - - if (isNaN(queryReceived.initialIndex) === true) { - throw ('Initial Post Is Not a Number.') - } - - thisObject.initialIndex = queryReceived.initialIndex - /* - Validate Amount Requested - */ - if (queryReceived.amountRequested === undefined) { - throw ('Amount Requested Undefined.') - } - - if (isNaN(queryReceived.amountRequested) === true) { - throw ('Amount Requested Is Not a Number.') - } - - if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { - throw ('Amount Requested Below Min.') - } - - if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { - throw ('Amount Requested Above Max.') - } - /* - Validate Direction - */ - if (queryReceived.direction === undefined) { - throw ('Direction Undefined.') - } - - if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { - throw ('Direction Not Supported.') - } - - thisObject.direction = queryReceived.direction + NT.utilities.queriesValidations.profilesValidations(queryReceived, thisObject) + NT.utilities.queriesValidations.arrayValidations(queryReceived, thisObject) } diff --git a/Network/Queries/ProfilePosts.js b/Network/Queries/ProfilePosts.js index 60e83d135..02e8fcfe0 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Network/Queries/ProfilePosts.js @@ -14,10 +14,6 @@ exports.newProfilePosts = function newProfilePosts() { finalize: finalize } - const INITIAL_POST_INDEX_FIRST = 'First' - const INITIAL_POST_INDEX_LAST = 'Last' - const MIN_AMOUNT_REQUESTED = 1 - const MAX_AMOUNT_REQUESTED = 100 const DIRECTION_FUTURE = 'Future' const DIRECTION_PAST = 'Past' @@ -28,76 +24,9 @@ exports.newProfilePosts = function newProfilePosts() { } function initialize(queryReceived) { - /* - Validate User Profile - */ - if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) - } - - if (thisObject.profile === undefined) { - throw ('Target User Profile Not Found.') - } - /* - Validate Bot Profile - */ - if (queryReceived.targetBotProfileId !== undefined) { - thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileId) - if (thisObject.profile === undefined) { - throw ('Target Bot Profile Not Found.') - } - } - /* - Validate Initial Index - */ - if (queryReceived.initialIndex === undefined) { - throw ('Initial Index Undefined.') - } - - if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) { - queryReceived.initialIndex = thisObject.profile.posts.length - 1 - } - - if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) { - queryReceived.initialIndex = 0 - } - - if (isNaN(queryReceived.initialIndex) === true) { - throw ('Initial Post Is Not a Number.') - } - - thisObject.initialIndex = queryReceived.initialIndex - /* - Validate Amount Requested - */ - if (queryReceived.amountRequested === undefined) { - throw ('Amount Requested Undefined.') - } - - if (isNaN(queryReceived.amountRequested) === true) { - throw ('Amount Requested Is Not a Number.') - } - - if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { - throw ('Amount Requested Below Min.') - } - - if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { - throw ('Amount Requested Above Max.') - } - /* - Validate Direction - */ - if (queryReceived.direction === undefined) { - throw ('Direction Undefined.') - } - - if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { - throw ('Direction Not Supported.') - } - - thisObject.direction = queryReceived.direction + NT.utilities.queriesValidations.profilesValidations(queryReceived, thisObject) + NT.utilities.queriesValidations.arrayValidations(queryReceived, thisObject) } function execute() { diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index c1611edbe..7073ba1a9 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -26,6 +26,9 @@ global.NT = { //QUERY_PROFILE_FOLLOWING: require('./Queries/ProfileFollowing.js'), //QUERY_POST_REPLIES: require('./Queries/ProfileReplies.js'), QUERY_EVENTS: require('./Queries/Events.js') + }, + utilities: { + queriesValidations: require('./Utilities/QueriesValidations.js').newProfileQueries() } } diff --git a/Network/Utilities/QueriesValidations.js b/Network/Utilities/QueriesValidations.js new file mode 100644 index 000000000..ba0934ec9 --- /dev/null +++ b/Network/Utilities/QueriesValidations.js @@ -0,0 +1,104 @@ +exports.newProfileFollowers = function newProfileFollowers() { + + let thisObject = { + profilesValidations: profilesValidations, + postValidations: postValidations, + arrayValidations: arrayValidations + } + + const INITIAL_POST_INDEX_FIRST = 'First' + const INITIAL_POST_INDEX_LAST = 'Last' + const MIN_AMOUNT_REQUESTED = 1 + const MAX_AMOUNT_REQUESTED = 100 + const DIRECTION_FUTURE = 'Future' + const DIRECTION_PAST = 'Past' + + return thisObject + + function profilesValidations(queryReceived, thisObject) { + /* + Validate User Profile + */ + if (queryReceived.targetUserProfileId !== undefined) { + thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + } + + if (thisObject.profile === undefined) { + throw ('Target User Profile Not Found.') + } + /* + Validate Bot Profile + */ + if (queryReceived.targetBotProfileId !== undefined) { + thisObject.profile = thisObject.profile.bots.get(queryReceived.targetBotProfileId) + if (thisObject.profile === undefined) { + throw ('Target Bot Profile Not Found.') + } + } + } + + function postValidations(queryReceived, thisObject) { + /* + Validate Post + */ + thisObject.post = thisObject.profile.posts.get(queryReceived.targetPostHash) + + if (thisObject.post === undefined) { + throw ('Target Post Not Found.') + } + } + + function arrayValidations(queryReceived, thisObject) { + /* + Validate Initial Index + */ + if (queryReceived.initialIndex === undefined) { + throw ('Initial Index Undefined.') + } + + if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) { + queryReceived.initialIndex = thisObject.profile.posts.length - 1 + } + + if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) { + queryReceived.initialIndex = 0 + } + + if (isNaN(queryReceived.initialIndex) === true) { + throw ('Initial Post Is Not a Number.') + } + + thisObject.initialIndex = queryReceived.initialIndex + /* + Validate Amount Requested + */ + if (queryReceived.amountRequested === undefined) { + throw ('Amount Requested Undefined.') + } + + if (isNaN(queryReceived.amountRequested) === true) { + throw ('Amount Requested Is Not a Number.') + } + + if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { + throw ('Amount Requested Below Min.') + } + + if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { + throw ('Amount Requested Above Max.') + } + /* + Validate Direction + */ + if (queryReceived.direction === undefined) { + throw ('Direction Undefined.') + } + + if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { + throw ('Direction Not Supported.') + } + + thisObject.direction = queryReceived.direction + + } +} \ No newline at end of file From 390115d789b7ee37525d3ee2d38f20b343af8845 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 17:44:46 +0200 Subject: [PATCH 33/81] Global Contants Implemented --- Network/Queries/Events.js | 21 +++++++-------------- Network/Queries/PostReplies.js | 7 ++----- Network/Queries/ProfileFollowers.js | 7 ++----- Network/Queries/ProfileFollowing.js | 7 ++----- Network/Queries/ProfilePosts.js | 7 ++----- Network/SocialGraphNetwokNode.js | 14 +++++++++++++- Network/Utilities/QueriesValidations.js | 17 +++++------------ 7 files changed, 33 insertions(+), 47 deletions(-) diff --git a/Network/Queries/Events.js b/Network/Queries/Events.js index ee80312c7..87b85f484 100644 --- a/Network/Queries/Events.js +++ b/Network/Queries/Events.js @@ -10,13 +10,6 @@ exports.newEvents = function newEvents() { finalize: finalize } - const INITIAL_EVENT_INDEX_FIRST = 'First' - const INITIAL_EVENT_INDEX_LAST = 'Last' - const MIN_AMOUNT_REQUESTED = 1 - const MAX_AMOUNT_REQUESTED = 100 - const DIRECTION_FUTURE = 'Future' - const DIRECTION_PAST = 'Past' - return thisObject function finalize() { @@ -43,11 +36,11 @@ exports.newEvents = function newEvents() { throw ('Initial Index Undefined.') } - if (queryReceived.initialIndex === INITIAL_EVENT_INDEX_LAST) { + if (queryReceived.initialIndex === NT.globals.constants.queries.INITIAL_INDEX_LAST) { queryReceived.initialIndex = thisObject.profile.posts.length - 1 } - if (queryReceived.initialIndex === INITIAL_EVENT_INDEX_FIRST) { + if (queryReceived.initialIndex === NT.globals.constants.queries.INITIAL_INDEX_FIRST) { queryReceived.initialIndex = 0 } @@ -67,11 +60,11 @@ exports.newEvents = function newEvents() { throw ('Amount Requested Is Not a Number.') } - if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested < NT.globals.constants.queries.MIN_AMOUNT_REQUESTED) { throw ('Amount Requested Below Min.') } - if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested > NT.globals.constants.queries.MAX_AMOUNT_REQUESTED) { throw ('Amount Requested Above Max.') } /* @@ -81,7 +74,7 @@ exports.newEvents = function newEvents() { throw ('Direction Undefined.') } - if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { + if (queryReceived.direction !== NT.globals.constants.queries.DIRECTION_FUTURE && queryReceived.direction !== NT.globals.constants.queries.DIRECTION_PAST) { throw ('Direction Not Supported.') } @@ -92,7 +85,7 @@ exports.newEvents = function newEvents() { function execute() { let response = [] switch (thisObject.direction) { - case DIRECTION_FUTURE: { + case NT.globals.constants.queries.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let event = NT.memory.arrays.EVENTS[i] if (event === undefined) { break } @@ -100,7 +93,7 @@ exports.newEvents = function newEvents() { } break } - case DIRECTION_PAST: { + case NT.globals.constants.queries.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let event = NT.memory.arrays.EVENTS[i] if (event === undefined) { break } diff --git a/Network/Queries/PostReplies.js b/Network/Queries/PostReplies.js index 6eb79e96c..41a4f06a9 100644 --- a/Network/Queries/PostReplies.js +++ b/Network/Queries/PostReplies.js @@ -15,9 +15,6 @@ exports.newPostReplies = function newPostReplies() { finalize: finalize } - const DIRECTION_FUTURE = 'Future' - const DIRECTION_PAST = 'Past' - return thisObject function finalize() { @@ -39,7 +36,7 @@ exports.newPostReplies = function newPostReplies() { let array = Array.from(thisObject.post.replies) switch (thisObject.direction) { - case DIRECTION_FUTURE: { + case NT.globals.constants.queries.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (post === undefined) { break } @@ -47,7 +44,7 @@ exports.newPostReplies = function newPostReplies() { } break } - case DIRECTION_PAST: { + case NT.globals.constants.queries.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (post === undefined) { break } diff --git a/Network/Queries/ProfileFollowers.js b/Network/Queries/ProfileFollowers.js index 371bfde95..3fc0a3a9d 100644 --- a/Network/Queries/ProfileFollowers.js +++ b/Network/Queries/ProfileFollowers.js @@ -10,9 +10,6 @@ exports.newProfileFollowers = function newProfileFollowers() { finalize: finalize } - const DIRECTION_FUTURE = 'Future' - const DIRECTION_PAST = 'Past' - return thisObject function finalize() { @@ -32,7 +29,7 @@ exports.newProfileFollowers = function newProfileFollowers() { let array = Array.from(thisObject.profile.followers) switch (thisObject.direction) { - case DIRECTION_FUTURE: { + case NT.globals.constants.queries.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -40,7 +37,7 @@ exports.newProfileFollowers = function newProfileFollowers() { } break } - case DIRECTION_PAST: { + case NT.globals.constants.queries.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Network/Queries/ProfileFollowing.js b/Network/Queries/ProfileFollowing.js index 09c6d29d7..4fea1534d 100644 --- a/Network/Queries/ProfileFollowing.js +++ b/Network/Queries/ProfileFollowing.js @@ -10,9 +10,6 @@ exports.newProfileFollowing = function newProfileFollowing() { finalize: finalize } - const DIRECTION_FUTURE = 'Future' - const DIRECTION_PAST = 'Past' - return thisObject function finalize() { @@ -32,7 +29,7 @@ exports.newProfileFollowing = function newProfileFollowing() { let array = Array.from(thisObject.profile.following) switch (thisObject.direction) { - case DIRECTION_FUTURE: { + case NT.globals.constants.queries.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -40,7 +37,7 @@ exports.newProfileFollowing = function newProfileFollowing() { } break } - case DIRECTION_PAST: { + case NT.globals.constants.queries.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Network/Queries/ProfilePosts.js b/Network/Queries/ProfilePosts.js index 02e8fcfe0..bbeded5d4 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Network/Queries/ProfilePosts.js @@ -14,9 +14,6 @@ exports.newProfilePosts = function newProfilePosts() { finalize: finalize } - const DIRECTION_FUTURE = 'Future' - const DIRECTION_PAST = 'Past' - return thisObject function finalize() { @@ -35,7 +32,7 @@ exports.newProfilePosts = function newProfilePosts() { let array = Array.from(thisObject.profile.posts) switch (thisObject.direction) { - case DIRECTION_FUTURE: { + case NT.globals.constants.queries.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -43,7 +40,7 @@ exports.newProfilePosts = function newProfilePosts() { } break } - case DIRECTION_PAST: { + case NT.globals.constants.queries.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index 7073ba1a9..3b3de0575 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -28,7 +28,19 @@ global.NT = { QUERY_EVENTS: require('./Queries/Events.js') }, utilities: { - queriesValidations: require('./Utilities/QueriesValidations.js').newProfileQueries() + queriesValidations: require('./Utilities/QueriesValidations.js').newProfileQueries() + }, + globals: { + constants: { + queries: { + INITIAL_INDEX_FIRST: 'First', + INITIAL_INDEX_LAST: 'Last', + MIN_AMOUNT_REQUESTED: 1, + MAX_AMOUNT_REQUESTED: 100, + DIRECTION_FUTURE: 'Future', + DIRECTION_PAST: 'Past' + } + } } } diff --git a/Network/Utilities/QueriesValidations.js b/Network/Utilities/QueriesValidations.js index ba0934ec9..618c1759b 100644 --- a/Network/Utilities/QueriesValidations.js +++ b/Network/Utilities/QueriesValidations.js @@ -6,13 +6,6 @@ exports.newProfileFollowers = function newProfileFollowers() { arrayValidations: arrayValidations } - const INITIAL_POST_INDEX_FIRST = 'First' - const INITIAL_POST_INDEX_LAST = 'Last' - const MIN_AMOUNT_REQUESTED = 1 - const MAX_AMOUNT_REQUESTED = 100 - const DIRECTION_FUTURE = 'Future' - const DIRECTION_PAST = 'Past' - return thisObject function profilesValidations(queryReceived, thisObject) { @@ -56,11 +49,11 @@ exports.newProfileFollowers = function newProfileFollowers() { throw ('Initial Index Undefined.') } - if (queryReceived.initialIndex === INITIAL_POST_INDEX_LAST) { + if (queryReceived.initialIndex === NT.globals.constants.queries.INITIAL_INDEX_LAST) { queryReceived.initialIndex = thisObject.profile.posts.length - 1 } - if (queryReceived.initialIndex === INITIAL_POST_INDEX_FIRST) { + if (queryReceived.initialIndex === NT.globals.constants.queries.INITIAL_INDEX_FIRST) { queryReceived.initialIndex = 0 } @@ -80,11 +73,11 @@ exports.newProfileFollowers = function newProfileFollowers() { throw ('Amount Requested Is Not a Number.') } - if (queryReceived.amountRequested < MIN_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested < NT.globals.constants.queries.MIN_AMOUNT_REQUESTED) { throw ('Amount Requested Below Min.') } - if (queryReceived.amountRequested > MAX_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested > NT.globals.constants.queries.MAX_AMOUNT_REQUESTED) { throw ('Amount Requested Above Max.') } /* @@ -94,7 +87,7 @@ exports.newProfileFollowers = function newProfileFollowers() { throw ('Direction Undefined.') } - if (queryReceived.direction !== DIRECTION_FUTURE && queryReceived.direction !== DIRECTION_PAST) { + if (queryReceived.direction !== NT.globals.constants.queries.DIRECTION_FUTURE && queryReceived.direction !== NT.globals.constants.queries.DIRECTION_PAST) { throw ('Direction Not Supported.') } From 06b5b9956c44cbfe838ae94425d0c7061804f7a9 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 17:45:53 +0200 Subject: [PATCH 34/81] Cleaning --- Network/SocialGraphNetwokNode.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index 3b3de0575..db8ae95c4 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -5,7 +5,6 @@ global.NT = { maps: { USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id. USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle. - POSTS: new Map(), // This are all the posts we are keeping track of. EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once. }, arrays: { @@ -23,8 +22,8 @@ global.NT = { QUERY_BOT_PROFILE_STATS: require('./Queries/BotProfileStats.js'), QUERY_PROFILE_POSTS: require('./Queries/ProfilePosts.js'), QUERY_PROFILE_FOLLOWERS: require('./Queries/ProfileFollowers.js'), - //QUERY_PROFILE_FOLLOWING: require('./Queries/ProfileFollowing.js'), - //QUERY_POST_REPLIES: require('./Queries/ProfileReplies.js'), + QUERY_PROFILE_FOLLOWING: require('./Queries/ProfileFollowing.js'), + QUERY_POST_REPLIES: require('./Queries/PostReplies.js'), QUERY_EVENTS: require('./Queries/Events.js') }, utilities: { @@ -44,10 +43,3 @@ global.NT = { } } -const map = new Map([[1, { a: 2 }], [2, { a: 4 }], [4, { a: 8 }]]) -map.set(3, { a: 6 }) -map.delete(2) -map.set(2, { a: 12 }) -let array = Array.from(map) - -console.log(JSON.stringify(array)) \ No newline at end of file From c1f41e50dd5a291b95da05a8ec0abb16ded084a0 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sun, 29 Aug 2021 19:56:43 +0200 Subject: [PATCH 35/81] Claims Program WIP --- .../C/Claims/Claims-Folder/claims-folder.json | 68 +++++++++++ .../C/Claims/Claims-Power/claims-power.json | 3 +- .../project-definition-hierarchies.json | 13 ++ .../asset-claims-folder.json | 9 +- .../Claims/Claims-Program/claims-program.json | 112 +++++++++++++++++- ...nce-flow-003-how-claims-are-resolved.json} | 4 +- 6 files changed, 199 insertions(+), 10 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json create mode 100644 Projects/Governance/Schemas/Docs-Concepts/P/Project/Project-Definition-Hierarchies/project-definition-hierarchies.json rename Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/{governance-flow-003-token-rewards-claims-power-and-claim-votes.json => governance-flow-003-how-claims-are-resolved.json} (96%) diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json new file mode 100644 index 000000000..ba70529c9 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json @@ -0,0 +1,68 @@ +{ + "type": "Claims Folder", + "definition": { + "text": "The different types of Claims Folder nodes serve as organizational devices. They also allow mapping entire sections of project definition hierarchies to place multiple claims at once.", + "updated": 1630258380621 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630259158667 + }, + { + "style": "Text", + "text": "Project Definition Hierarchies have four types of Class nodes that serve as organizational devices:" + }, + { + "style": "List", + "text": "Asset Class", + "updated": 1630257910724 + }, + { + "style": "List", + "text": "Feature Class" + }, + { + "style": "List", + "text": "Position Class" + }, + { + "style": "List", + "text": "Pool Class" + }, + { + "style": "Text", + "text": "Similarly, the Claims Program features a matching set of organizational devices:", + "updated": 1630259570492 + }, + { + "style": "List", + "text": "Asset Claims Folder", + "updated": 1630258015447 + }, + { + "style": "List", + "text": "Feature Claims Folder" + }, + { + "style": "List", + "text": "Position Claims Folder" + }, + { + "style": "Important", + "text": "Notice that you can't place claims on an entire Pool. You may place claims on granular definitions only. That is why there are no pool claims folders or pool claims for that matter.", + "updated": 1630258341920 + }, + { + "style": "Text", + "text": "You may use these folder nodes to organize your claims in arbitrary arrangements, but you can also make a more sophisticated use of them!", + "updated": 1630259141082 + }, + { + "style": "Callout", + "text": "Use a Claims Folder node to establish a reference with the corresponding type of Class node. Then use the Install Missing Claims option on the menu of the Claims Folder to map the entire Class! The process creates a Claims Folder for each Class, and a claim for each Asset, Feature, or Position defined within each Class. If something changes on the side of the definitions, you may always go back a fire the Install Missing Claims again, and the process will remap the structure with the appropriate claims and folders.", + "updated": 1630258691549 + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claims-power.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claims-power.json index d0be1b6c2..44c1b75cf 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claims-power.json +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claims-power.json @@ -12,7 +12,8 @@ }, { "style": "Callout", - "text": "Claims Power is the Token Power that goes into the Claims Program, and determines the number of tokens you are claiming with any of the existing types of claims: Position Contribution Claim, Feature Contribution Claim, and Asset Contribution Claim." + "text": "Claims Power is the Token Power that goes into the Claims Program, and determines the number of tokens you are claiming with any of the existing types of claims: Position Contribution Claim, Feature Contribution Claim, and Asset Contribution Claim.", + "updated": 1630254492262 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/P/Project/Project-Definition-Hierarchies/project-definition-hierarchies.json b/Projects/Governance/Schemas/Docs-Concepts/P/Project/Project-Definition-Hierarchies/project-definition-hierarchies.json new file mode 100644 index 000000000..6bbd08805 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/P/Project/Project-Definition-Hierarchies/project-definition-hierarchies.json @@ -0,0 +1,13 @@ +{ + "type": "Project Definition Hierarchies", + "definition": { + "text": "These are the Pools, Assets, Features, and Positions hierarchies used to produce granular definitions of the Superalgos Project to be used for governance.", + "updated": 1630259293946 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json index 2f6bc3f24..29ef5e659 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json @@ -1,8 +1,8 @@ { "type": "Asset Claims Folder", "definition": { - "text": "The Asset Contribution Claims Folder node is an organizational device used to arrange Asset Contribution Claim nodes in suitable hierarchical structures.", - "updated": 1624728516601 + "text": "The Asset Claims Folder node is an organizational device used to arrange Asset Contribution Claim nodes in arbitrary arrangements or to map entire structures in the Assets hierarchy.", + "updated": 1630259461725 }, "paragraphs": [ { @@ -11,8 +11,9 @@ "updated": 1624728536229 }, { - "style": "Text", - "text": "You may use this node to reference an Asset Class node in the Assets hierarchy. Once the reference is established, you may use the Install Missing Claims option on the menu to map the data structure of the referenced node with claims for each Asset." + "style": "Include", + "text": "Governance->Concept->Claims Folder->Content", + "updated": 1630259502301 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json b/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json index c9ed88d9c..1e1dd531c 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json @@ -1,13 +1,119 @@ { "type": "Claims Program", "definition": { - "text": "This node helps define the section of the User Profile hierarchy used to define the claims users make for the contributions they have done. Other users may vote for this claims so that they are computed during the token distribution process.", - "updated": 1630056746833 + "text": "When you contribute to Superalgos, you must produce a claim for your contribution, and you must harness the support of people working close to you, who will vouch or vote for your claims.", + "updated": 1630256293740 }, "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630256308831 + }, + { + "style": "Important", + "text": "Governance is decentralized. There is no central authority controlling who contributes what or what rewards contributors get. Instead, the project delegates in the Community the capacity to establish the value of contributions and to determine who contributed what.", + "updated": 1630256982050 + }, { "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "text": "As such, governance is a social system. When you get involved with Superalgos, you interact with the Community and find ways to contribute. While doing so, you relate to or associate with community members that have similar interests or are focused on the same areas of the project you may be working in. It is these people that will vouch for your claims!" + }, + { + "style": "Text", + "text": "There are three different types of claims you may place: " + }, + { + "style": "List", + "text": "Asset Contribution Claim" + }, + { + "style": "List", + "text": "Feature Contribution Claim" + }, + { + "style": "List", + "text": "Position Contribution Claim", + "updated": 1630256348337 + }, + { + "style": "Text", + "text": "There are also three different folder types of nodes that act as organizational devices from which you may spawn the above claim nodes:" + }, + { + "style": "List", + "text": "Asset Claims Folder" + }, + { + "style": "List", + "text": "Feature Claims Folder", + "updated": 1630256365206 + }, + { + "style": "List", + "text": "Position Claims Folder", + "updated": 1630256373604 + }, + { + "style": "Text", + "text": "These three types of claims match the three types of definition hierarchies used to describe the project:" + }, + { + "style": "List", + "text": "Assets" + }, + { + "style": "List", + "text": "Features" + }, + { + "style": "List", + "text": "Positions" + }, + { + "style": "Callout", + "text": "To place a claim, use the appropriate type of contribution claim node to reference the matching type of definition. For example, use an Asset Contribution Claims node to reference an Asset node within an Assets hierarchy. When you do that, you are effectively placing a claim on that asset. ", + "updated": 1630257103981 + }, + { + "style": "Note", + "text": "This claim means that you declare that you have worked on that asset, either creating or improving it, and that you expect to be rewarded accordingly." + }, + { + "style": "Text", + "text": "How a claim is resolved depends on three interelated concepts:", + "updated": 1630256564789 + }, + { + "style": "List", + "text": "The Claims Power you drive into the node that places the claim.", + "updated": 1630256658386 + }, + { + "style": "List", + "text": "The Claim Votes your claim gets from other users, and the Voting Power they drive into those votes." + }, + { + "style": "List", + "text": "The Token Rewards available within the definition node you are claiming.", + "updated": 1630256728009 + }, + { + "style": "Success", + "text": "To learn all the details about claims resolution, read the How Claims are Resolved page in the Governance Flow topic of The Governance Project book.", + "updated": 1630257166423 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-token-rewards-claims-power-and-claim-votes.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json similarity index 96% rename from Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-token-rewards-claims-power-and-claim-votes.json rename to Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json index 073a79d8f..b23a14166 100644 --- a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-token-rewards-claims-power-and-claim-votes.json +++ b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json @@ -1,9 +1,9 @@ { "topic": "Governance Flow", "pageNumber": "3", - "type": "Token Rewards, Claims Power and Claim Votes", + "type": "How Claims are Resolved", "definition": { - "text": "These three concepts are intimately related and make up the logic of the token distribution.", + "text": "These three concepts, Claims Power, Claim Votes, and Token Rewards are intimately related and make up the logic of the token distribution.", "updated": 1624781724176 }, "paragraphs": [ From b94edd16f2f0fd97db8313f86c2b0f41739ee474 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Sun, 29 Aug 2021 20:04:22 +0200 Subject: [PATCH 36/81] Claims folders --- .../Asset-Claims-Folder/asset-claims-folder.json | 5 ----- .../feature-claims-folder.json | 14 +++++--------- .../position-claims-folder.json | 14 +++++--------- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json index 29ef5e659..1bcfae25d 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json @@ -5,11 +5,6 @@ "updated": 1630259461725 }, "paragraphs": [ - { - "style": "Block", - "text": "Content", - "updated": 1624728536229 - }, { "style": "Include", "text": "Governance->Concept->Claims Folder->Content", diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claims-Folder/feature-claims-folder.json b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claims-Folder/feature-claims-folder.json index e239901ef..b71da50a5 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claims-Folder/feature-claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claims-Folder/feature-claims-folder.json @@ -1,18 +1,14 @@ { "type": "Feature Claims Folder", "definition": { - "text": "The Feature Contribution Claims Folder node is an organizational device used to arrange Feature Contribution Claim nodes in suitable hierarchical structures.", - "updated": 1624728474759 + "text": "The Feature Claims Folder node is an organizational device used to arrange Feature Contribution Claim nodes in arbitrary arrangements or to map entire structures in the Features hierarchy.", + "updated": 1630260148773 }, "paragraphs": [ { - "style": "Block", - "text": "Content", - "updated": 1624728497197 - }, - { - "style": "Text", - "text": "You may use this node to reference a Feature Class node in the Features hierarchy. Once the reference is established, you may use the Install Missing Claims option on the menu to map the data structure of the referenced node with claims for each Feature." + "style": "Include", + "text": "Governance->Concept->Claims Folder->Content", + "updated": 1630260159250 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claims-Folder/position-claims-folder.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claims-Folder/position-claims-folder.json index 68fa0e59b..c18313a25 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claims-Folder/position-claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claims-Folder/position-claims-folder.json @@ -1,18 +1,14 @@ { "type": "Position Claims Folder", "definition": { - "text": "The Position Contribution Claims Folder node is an organizational device used to arrange Position Contribution Claim nodes in suitable hierarchical structures.", - "updated": 1624728437926 + "text": "The Position Claims Folder node is an organizational device used to arrange Position Contribution Claim nodes in arbitrary arrangements or to map entire structures in the Positions hierarchy.", + "updated": 1630260192942 }, "paragraphs": [ { - "style": "Block", - "text": "Content", - "updated": 1624728455607 - }, - { - "style": "Text", - "text": "You may use this node to reference a Position Class node in the Positions hierarchy. Once the reference is established, you may use the Install Missing Claims option on the menu to map the data structure of the referenced node with claims for each Position." + "style": "Include", + "text": "Governance->Concept->Claims Folder->Content", + "updated": 1630260202600 }, { "style": "Block", From bb4c62dd382bf1ca89272e8ae208b85a500f9768 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 21:17:21 +0200 Subject: [PATCH 37/81] Adding some comments --- Network/Queries/Events.js | 4 +++- Network/Queries/PostReplies.js | 3 +++ Network/Queries/ProfileFollowers.js | 5 ++++- Network/Queries/ProfileFollowing.js | 5 ++++- Network/Queries/ProfilePosts.js | 3 +++ Network/SocialGraphNetwokNode.js | 11 +++++++++++ Network/Utilities/QueriesValidations.js | 4 +++- Network/clientsInterface.js | 11 +++++++++-- 8 files changed, 40 insertions(+), 6 deletions(-) diff --git a/Network/Queries/Events.js b/Network/Queries/Events.js index 87b85f484..e4d10db87 100644 --- a/Network/Queries/Events.js +++ b/Network/Queries/Events.js @@ -1,5 +1,7 @@ exports.newEvents = function newEvents() { - + /* + This is the query executed to fill the timeline of a certain User or Bot Profile. + */ let thisObject = { profile: undefined, initialIndex: undefined, diff --git a/Network/Queries/PostReplies.js b/Network/Queries/PostReplies.js index 41a4f06a9..f5221fa2c 100644 --- a/Network/Queries/PostReplies.js +++ b/Network/Queries/PostReplies.js @@ -3,6 +3,9 @@ exports.newPostReplies = function newPostReplies() { Each Post regardless if it is authored by a User or Bot Profile, can have replies. This query is designed for Network Clients to fetch the posts metadata that are replies to a certain post. + + This is the query executed at the Network Client to fill the page + of a certain post, with all its replies. */ let thisObject = { profile: undefined, diff --git a/Network/Queries/ProfileFollowers.js b/Network/Queries/ProfileFollowers.js index 3fc0a3a9d..bf704f978 100644 --- a/Network/Queries/ProfileFollowers.js +++ b/Network/Queries/ProfileFollowers.js @@ -1,5 +1,8 @@ exports.newProfileFollowers = function newProfileFollowers() { - + /* + This module represents the query that allows a Network Client to know + all the User or Bot profiles that are following a certain User or Bot profile. + */ let thisObject = { profile: undefined, initialIndex: undefined, diff --git a/Network/Queries/ProfileFollowing.js b/Network/Queries/ProfileFollowing.js index 4fea1534d..845ee2c09 100644 --- a/Network/Queries/ProfileFollowing.js +++ b/Network/Queries/ProfileFollowing.js @@ -1,5 +1,8 @@ exports.newProfileFollowing = function newProfileFollowing() { - + /* + This module represents the query that allows a Network Client to know + all the User or Bot profiles that are being followed by a certain User or Bot profile. + */ let thisObject = { profile: undefined, initialIndex: undefined, diff --git a/Network/Queries/ProfilePosts.js b/Network/Queries/ProfilePosts.js index bbeded5d4..7f6255341 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Network/Queries/ProfilePosts.js @@ -3,6 +3,9 @@ exports.newProfilePosts = function newProfilePosts() { Each User or Bot Profile can have posts. This query is designed for Network Clients to fetch the posts metadata they need from the Social Graph. + + This is the query to be executed to fill a Profile page + with all of its posts. */ let thisObject = { profile: undefined, diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index db8ae95c4..044ce2a2c 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -1,4 +1,15 @@ +/* +The Superalgos Network will have 3 types of nodes: + * Social Graph Nodes + * Search Index Nodes + * Private Message Nodes + +This module is the starting point of the Social Graph Network Node. + +This type of node is responsible for mantaining the whole Social Graph +or relationships between User and Bot profiles and also between their posts. +*/ global.NT = { memory: { diff --git a/Network/Utilities/QueriesValidations.js b/Network/Utilities/QueriesValidations.js index 618c1759b..60a244a3d 100644 --- a/Network/Utilities/QueriesValidations.js +++ b/Network/Utilities/QueriesValidations.js @@ -1,5 +1,7 @@ exports.newProfileFollowers = function newProfileFollowers() { - + /* + This module have a few funcions that are often needed at Queries Modules. + */ let thisObject = { profilesValidations: profilesValidations, postValidations: postValidations, diff --git a/Network/clientsInterface.js b/Network/clientsInterface.js index 1cc17e4d6..2f48f80df 100644 --- a/Network/clientsInterface.js +++ b/Network/clientsInterface.js @@ -1,5 +1,12 @@ exports.newClientInterface = function newClientInterface() { + /* + This module represents the Interface the Network Node have + with Network Clients connected to it. There are two things + Network Clients can do with this Network Node: + * Send an Event that happened at the Network Client to the Network. + * Make a Query to the Network Node for info needed at the Network Client. + */ let thisObject = { eventReceived: eventReceived, queryReceived: queryReceived, @@ -19,7 +26,7 @@ exports.newClientInterface = function newClientInterface() { function eventReceived(eventMessage) { /* - We expect here a JSON string with the following properties: + We expect here a JSON string with some or all of the following properties: { "eventId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", @@ -49,7 +56,7 @@ exports.newClientInterface = function newClientInterface() { function queryReceived(queryMessage) { /* - We expect here a JSON string with the following properties: + We expect here a JSON string with some or all of the following properties: { "equeryId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", From 8c5542226bdd3b6708508d4ca77e5eced10c1262 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 29 Aug 2021 22:11:23 +0200 Subject: [PATCH 38/81] Superalgos Network: All queries reviewd and adapted for Bot Profiles. --- Network/Queries/Events.js | 264 ++++++++++++++++++++++---------------- 1 file changed, 151 insertions(+), 113 deletions(-) diff --git a/Network/Queries/Events.js b/Network/Queries/Events.js index e4d10db87..b55def0e0 100644 --- a/Network/Queries/Events.js +++ b/Network/Queries/Events.js @@ -1,6 +1,7 @@ exports.newEvents = function newEvents() { /* This is the query executed to fill the timeline of a certain User or Bot Profile. + */ let thisObject = { profile: undefined, @@ -19,68 +20,9 @@ exports.newEvents = function newEvents() { } function initialize(queryReceived) { - /* - Validate User Profile - */ - if (queryReceived.emitterUserProfileId !== undefined) { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.emitterUserProfileId) - } else { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.emitterUserProfileHandle) - } - if (thisObject.profile === undefined) { - throw ('Emitter User Profile Not Found.') - } - /* - Validate Initial Index - */ - if (queryReceived.initialIndex === undefined) { - throw ('Initial Index Undefined.') - } - - if (queryReceived.initialIndex === NT.globals.constants.queries.INITIAL_INDEX_LAST) { - queryReceived.initialIndex = thisObject.profile.posts.length - 1 - } - - if (queryReceived.initialIndex === NT.globals.constants.queries.INITIAL_INDEX_FIRST) { - queryReceived.initialIndex = 0 - } - - if (isNaN(queryReceived.initialIndex) === true) { - throw ('Initial Event Is Not a Number.') - } - - thisObject.initialIndex = queryReceived.initialIndex - /* - Validate Amount Requested - */ - if (queryReceived.amountRequested === undefined) { - throw ('Amount Requested Undefined.') - } - - if (isNaN(queryReceived.amountRequested) === true) { - throw ('Amount Requested Is Not a Number.') - } - - if (queryReceived.amountRequested < NT.globals.constants.queries.MIN_AMOUNT_REQUESTED) { - throw ('Amount Requested Below Min.') - } - - if (queryReceived.amountRequested > NT.globals.constants.queries.MAX_AMOUNT_REQUESTED) { - throw ('Amount Requested Above Max.') - } - /* - Validate Direction - */ - if (queryReceived.direction === undefined) { - throw ('Direction Undefined.') - } - - if (queryReceived.direction !== NT.globals.constants.queries.DIRECTION_FUTURE && queryReceived.direction !== NT.globals.constants.queries.DIRECTION_PAST) { - throw ('Direction Not Supported.') - } - - thisObject.direction = queryReceived.direction + NT.utilities.queriesValidations.profilesValidations(queryReceived, thisObject) + NT.utilities.queriesValidations.arrayValidations(queryReceived, thisObject) } @@ -111,71 +53,149 @@ exports.newEvents = function newEvents() { For an event to be returned at the response of this query, it needs to be related to the profile making the query. How it can be related? - 1. The Emitter or Target profile must be the same as the Query Profile. - 2. The Emitter or Traget profile must be at the Following map of the Query Profile. - 3. The Emmiter or Target post must be belong to any profile at the Following of the Query Profile. + 1. The Emitter or Target profile must be the same as the Context Profile. + 2. The Emitter or Traget profile must be at the Following map of the Context Profile. + 3. The Emmiter or Target post must be belong to any profile at the Following of the Context Profile. Any of the above happening, means that indeed it is related. */ let emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) - let emitterPost = NT.memory.maps.POSTS.get(eventReceived.emitterPostHash) - let targetPost = NT.memory.maps.POSTS.get(eventReceived.targetPostHash) + let emitterBotProfile = emitterUserProfile.bots.get(eventReceived.emitterBotProfileId) + let targetBotProfile = targetUserProfile.bots.get(eventReceived.targetBotProfileId) + let emitterPost = emitterUserProfile.posts.get(eventReceived.emitterPostHash) + let targetPost = targetUserProfile.posts.get(eventReceived.targetPostHash) /* - Test #1 : The Emitter or Target profile must be the same as the Query Profile. + Test #1 : The Emitter or Target profile must be the same as the Context Profile. */ - if (emitterUserProfile !== undefined) { - if (emitterUserProfile.userProfileId === thisObject.profile.userProfileId) { - addToResponse(event) - return + if (thisObject.profile.botProfileId === undefined) { + /* + The context is a User Profile + */ + if (emitterUserProfile !== undefined) { + if (emitterUserProfile.userProfileId === thisObject.profile.userProfileId) { + addToResponse(event) + return + } + } + if (targetUserProfile !== undefined) { + if (targetUserProfile.userProfileId === thisObject.profile.userProfileId) { + addToResponse(event) + return + } + } + } else { + /* + The context is a Bot Profile + */ + if (emitterBotProfile !== undefined) { + if (emitterBotProfile.botProfileId === thisObject.profile.botProfileId) { + addToResponse(event) + return + } + } + if (targetBotProfile !== undefined) { + if (targetBotProfile.botProfileId === thisObject.profile.botProfileId) { + addToResponse(event) + return + } } } - if (targetUserProfile !== undefined) { - if (targetUserProfile.userProfileId === thisObject.profile.userProfileId) { - addToResponse(event) - return + + /* + Test #2 : The Emitter or Traget profile must be at the Following map of the Context Profile. + */ + if (thisObject.profile.botProfileId === undefined) { + /* + The context is a User Profile + */ + if (emitterUserProfile !== undefined) { + if (thisObject.profile.following.get(emitterUserProfile.userProfileId) !== undefined) { + addToResponse(event) + return + } + } + if (targetUserProfile !== undefined) { + if (thisObject.profile.following.get(targetUserProfile.userProfileId) !== undefined) { + addToResponse(event) + return + } + } + } else { + /* + The context is a Bot Profile + */ + if (emitterBotProfile !== undefined) { + if (thisObject.profile.following.get(emitterBotProfile.botProfileId) !== undefined) { + addToResponse(event) + return + } + } + if (targetBotProfile !== undefined) { + if (thisObject.profile.following.get(targetBotProfile.botProfileId) !== undefined) { + addToResponse(event) + return + } } } /* - Test #2 : The Emitter or Traget profile must be at the Following map of the Query Profile. + Test #3 : The Emmiter or Target post must be belong to any profile at the Following of the Context Profile. */ - if (emitterUserProfile !== undefined) { - if (thisObject.profile.following.get(emitterUserProfile.userProfileId) !== undefined) { - addToResponse(event) - return + if (thisObject.profile.botProfileId === undefined) { + /* + The context is a User Profile + */ + if (emitterPost !== undefined) { + if (thisObject.profile.following.get(emitterPost.emitterUserProfileId) !== undefined) { + addToResponse(event) + return + } } - } - if (targetUserProfile !== undefined) { - if (thisObject.profile.following.get(targetUserProfile.userProfileId) !== undefined) { - addToResponse(event) - return + if (emitterPost !== undefined) { + if (thisObject.profile.following.get(emitterPost.targetUserProfileId) !== undefined) { + addToResponse(event) + return + } } - } - /* - Test #3 : The Emmiter or Target post must be belong to any profile at the Following of the Query Profile. - */ - if (emitterPost !== undefined) { - if (thisObject.profile.following.get(emitterPost.emitterUserProfileId) !== undefined) { - addToResponse(event) - return + if (targetPost !== undefined) { + if (thisObject.profile.following.get(targetPost.emitterUserProfileId) !== undefined) { + addToResponse(event) + return + } } - } - if (emitterPost !== undefined) { - if (thisObject.profile.following.get(emitterPost.targetUserProfileId) !== undefined) { - addToResponse(event) - return + if (targetPost !== undefined) { + if (thisObject.profile.following.get(targetPost.targetUserProfileId) !== undefined) { + addToResponse(event) + return + } } - } - if (targetPost !== undefined) { - if (thisObject.profile.following.get(targetPost.emitterUserProfileId) !== undefined) { - addToResponse(event) - return + } else { + /* + The context is a Bot Profile + */ + if (emitterPost !== undefined) { + if (thisObject.profile.following.get(emitterPost.emitterBotProfileId) !== undefined) { + addToResponse(event) + return + } } - } - if (targetPost !== undefined) { - if (thisObject.profile.following.get(targetPost.targetUserProfileId) !== undefined) { - addToResponse(event) - return + if (emitterPost !== undefined) { + if (thisObject.profile.following.get(emitterPost.targetBotProfileId) !== undefined) { + addToResponse(event) + return + } + } + if (targetPost !== undefined) { + if (thisObject.profile.following.get(targetPost.emitterBotProfileId) !== undefined) { + addToResponse(event) + return + } + } + if (targetPost !== undefined) { + if (thisObject.profile.following.get(targetPost.targetBotProfileId) !== undefined) { + addToResponse(event) + return + } } } @@ -186,28 +206,44 @@ exports.newEvents = function newEvents() { eventType: event.eventType, emitterUserProfileId: event.emitterUserProfileId, targetUserProfileId: event.targetUserProfileId, + emitterBotProfileId: event.emitterBotProfileId, + targetBotProfileId: event.targetBotProfileId, emitterPostHash: event.emitterPostHash, targetPostHash: event.targetPostHash, timestamp: event.timestamp, - botId: event.botId, botAsset: event.botAsset, - botExchange: event.botExchange + botExchange: event.botExchange, + botEnabled: event.botEnabled } if (emitterUserProfile !== undefined) { - let query = NT.modules.QUERY_PROFILE_STATS.newUserProfileStats() + let query = NT.modules.QUERY_USER_PROFILE_STATS.newUserProfileStats() query.initialize({ targetUserProfileId: event.emitterUserProfileId }) eventResponse.emitterUserProfile = query.execute() query.finalize() } if (targetUserProfile !== undefined) { - let query = NT.modules.QUERY_PROFILE_STATS.newUserProfileStats() + let query = NT.modules.QUERY_USER_PROFILE_STATS.newUserProfileStats() query.initialize({ targetUserProfileId: event.targetUserProfileId }) eventResponse.targetUserProfile = query.execute() query.finalize() } + if (emitterBotProfile !== undefined) { + let query = NT.modules.QUERY_BOT_PROFILE_STATS.newBotProfileStats() + query.initialize({ targetUserProfileId: event.emitterUserProfileId, targetBotProfileId: emitterBotProfileId }) + eventResponse.emitterBotProfile = query.execute() + query.finalize() + } + + if (targetBotProfile !== undefined) { + let query = NT.modules.QUERY_BOT_PROFILE_STATS.newBotProfileStats() + query.initialize({ targetUserProfileId: event.targetUserProfileId, targetBotProfileId: targetBotProfileId }) + eventResponse.targetBotProfile = query.execute() + query.finalize() + } + if (emitterPost !== undefined) { eventResponse.emitterPost = addPost(emitterPost) } @@ -222,11 +258,13 @@ exports.newEvents = function newEvents() { let postResponse = { emitterUserProfileId: post.emitterUserProfileId, targetUserProfileId: post.targetUserProfileId, + emitterBotProfileId: post.emitterBotProfileId, + targetBotProfileId: post.targetBotProfileId, emitterPostHash: post.emitterPostHash, targetPostHash: post.targetPostHash, postType: post.postType, timestamp: post.timestamp, - repliesCount: post.replies.length, + repliesCount: post.replies.size, reactions: Array.from(post.reactions) } return postResponse From 30759dc934d442e7bdf50b3a9555b2b03e65ea02 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 09:51:18 +0200 Subject: [PATCH 39/81] Bug fixed --- Network/SocialGraphNetwokNode.js | 4 ++-- Network/Utilities/QueriesValidations.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index 044ce2a2c..c0fdd7e10 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -1,5 +1,5 @@ /* -The Superalgos Network will have 3 types of nodes: +The Superalgos Network have 3 types of nodes: * Social Graph Nodes * Search Index Nodes @@ -38,7 +38,7 @@ global.NT = { QUERY_EVENTS: require('./Queries/Events.js') }, utilities: { - queriesValidations: require('./Utilities/QueriesValidations.js').newProfileQueries() + queriesValidations: require('./Utilities/QueriesValidations.js').newQueriesValidations() }, globals: { constants: { diff --git a/Network/Utilities/QueriesValidations.js b/Network/Utilities/QueriesValidations.js index 60a244a3d..6e13e6012 100644 --- a/Network/Utilities/QueriesValidations.js +++ b/Network/Utilities/QueriesValidations.js @@ -1,4 +1,4 @@ -exports.newProfileFollowers = function newProfileFollowers() { +exports.newQueriesValidations = function newQueriesValidations() { /* This module have a few funcions that are often needed at Queries Modules. */ From 6504f47b6f838c907311e840d8c4757db35f2ad4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 10:40:31 +0200 Subject: [PATCH 40/81] Introduction of SA as a namespace for modules shared between different system components --- Client/MultiProject.js | 37 +++++++++---------- Client/client.js | 13 ++++++- Client/githubServer.js | 8 ++-- Client/httpInterface.js | 4 +- Network/Bootstrap.js | 24 ++++++++++++ Network/SocialGraphNetwokNode.js | 4 +- .../{CL => SA}/Utilities/Plugins.js | 0 Projects/ProjectsSchema.json | 28 ++++++++------ 8 files changed, 77 insertions(+), 41 deletions(-) create mode 100644 Network/Bootstrap.js rename Projects/Foundations/{CL => SA}/Utilities/Plugins.js (100%) diff --git a/Client/MultiProject.js b/Client/MultiProject.js index ba4ce0182..954798729 100644 --- a/Client/MultiProject.js +++ b/Client/MultiProject.js @@ -6,7 +6,7 @@ exports.newMultiProject = function () { return thisObject; - function initialize() { + function initialize(rootObject, rootObjectName) { /* First thing is to load the project schema file. */ @@ -16,27 +16,24 @@ exports.newMultiProject = function () { Here we will setup the CL object, with all the projects and modules that will have inside. */ - CL.projects = {} + rootObject.projects = {} for (let i = 0; i < PROJECTS_SCHEMA.length; i++) { let projectDefinition = PROJECTS_SCHEMA[i] - global.CL.projects[projectDefinition.propertyName] = {} - let projectInstance = global.CL.projects[projectDefinition.propertyName] + global[rootObjectName].projects[projectDefinition.propertyName] = {} + let projectInstance = global[rootObjectName].projects[projectDefinition.propertyName] projectInstance.utilities = {} projectInstance.globals = {} projectInstance.functionLibraries = {} - projectInstance.taskModules = {} - projectInstance.processModules = {} - projectInstance.botModules = {} - if (projectDefinition.CL === undefined) { continue } + if (projectDefinition[rootObjectName] === undefined) { continue } /* Set up Utilities of this Project */ - if (projectDefinition.CL.utilities !== undefined) { - for (let j = 0; j < projectDefinition.CL.utilities.length; j++) { - let utilityDefinition = projectDefinition.CL.utilities[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'CL' + '/' + 'Utilities' + '/' + utilityDefinition.fileName + if (projectDefinition[rootObjectName].utilities !== undefined) { + for (let j = 0; j < projectDefinition[rootObjectName].utilities.length; j++) { + let utilityDefinition = projectDefinition[rootObjectName].utilities[j] + let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + rootObjectName + '/' + 'Utilities' + '/' + utilityDefinition.fileName let requiredObject = require(path) let requiredFunction = requiredObject[utilityDefinition.functionName] @@ -45,10 +42,10 @@ exports.newMultiProject = function () { } /* Set up Globals of this Project */ - if (projectDefinition.CL.globals !== undefined) { - for (let j = 0; j < projectDefinition.CL.globals.length; j++) { - let globalDefinition = projectDefinition.CL.globals[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'CL' + '/' + 'Globals' + '/' + globalDefinition.fileName + if (projectDefinition[rootObjectName].globals !== undefined) { + for (let j = 0; j < projectDefinition[rootObjectName].globals.length; j++) { + let globalDefinition = projectDefinition[rootObjectName].globals[j] + let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + rootObjectName + '/' + 'Globals' + '/' + globalDefinition.fileName let requiredObject = require(path) let requiredFunction = requiredObject[globalDefinition.functionName] @@ -57,10 +54,10 @@ exports.newMultiProject = function () { } /* Set up Function Libraries of this Project */ - if (projectDefinition.CL.functionLibraries !== undefined) { - for (let j = 0; j < projectDefinition.CL.functionLibraries.length; j++) { - let functionLibraryDefinition = projectDefinition.CL.functionLibraries[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'CL' + '/' + 'Function-Libraries' + '/' + functionLibraryDefinition.fileName + if (projectDefinition[rootObjectName].functionLibraries !== undefined) { + for (let j = 0; j < projectDefinition[rootObjectName].functionLibraries.length; j++) { + let functionLibraryDefinition = projectDefinition[rootObjectName].functionLibraries[j] + let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + rootObjectName + '/' + 'Function-Libraries' + '/' + functionLibraryDefinition.fileName let requiredObject = require(path) let requiredFunction = requiredObject[functionLibraryDefinition.functionName] diff --git a/Client/client.js b/Client/client.js index 46037d580..ddf179ff6 100644 --- a/Client/client.js +++ b/Client/client.js @@ -54,8 +54,16 @@ global.CUSTOM_FAIL_RESPONSE = { message: 'Custom Message' } -/* The CL object is accesible everywhere at the Superalgos Client */ +/* +The CL object is accesible everywhere at the Superalgos Client. +It provides access to all modules built for this Client. +*/ global.CL = {} +/* +The SA object is accesible everywhere at the Superalgos Client. +It provides access to all modules built Superalgos in general. +*/ +global.SA = {} /* Servers */ let WEB_SERVER = require('./webServer.js') @@ -79,7 +87,8 @@ try { */ let MULTI_PROJECT = require('./MultiProject.js'); let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() - MULTI_PROJECT_MODULE.initialize() + MULTI_PROJECT_MODULE.initialize(CL, 'CL') + MULTI_PROJECT_MODULE.initialize(SA, 'SA') /* Setting up external dependencies. */ diff --git a/Client/githubServer.js b/Client/githubServer.js index 2b2c68345..ea8569e6d 100644 --- a/Client/githubServer.js +++ b/Client/githubServer.js @@ -472,14 +472,14 @@ exports.newGithubServer = function newGithubServer() { unless the existing one belongs to the same Github username. */ let userProfileIdMap = new Map() - let pluginFileNames = await CL.projects.foundations.utilities.plugins.getPluginFileNames( + let pluginFileNames = await SA.projects.foundations.utilities.plugins.getPluginFileNames( 'Governance', 'User-Profiles' ) for (let i = 0; i < pluginFileNames.length; i++) { let pluginFileName = pluginFileNames[i] - let pluginFileContent = await CL.projects.foundations.utilities.plugins.getPluginFileContent( + let pluginFileContent = await SA.projects.foundations.utilities.plugins.getPluginFileContent( 'Governance', 'User-Profiles', pluginFileName @@ -522,13 +522,13 @@ exports.newGithubServer = function newGithubServer() { unless the existing one belongs to the same Github username. */ let userProfileIdMap = new Map() - let pluginFileNames = await CL.projects.foundations.utilities.plugins.getPluginFileNames( + let pluginFileNames = await SA.projects.foundations.utilities.plugins.getPluginFileNames( 'Governance', 'User-Profiles' ) for (let i = 0; i < pluginFileNames.length; i++) { let pluginFileName = pluginFileNames[i] - let pluginFileContent = await CL.projects.foundations.utilities.plugins.getPluginFileContent( + let pluginFileContent = await SA.projects.foundations.utilities.plugins.getPluginFileContent( 'Governance', 'User-Profiles', pluginFileName diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 7d89e508e..f18721f62 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1350,7 +1350,7 @@ exports.newHttpInterface = function newHttpInterface() { let project = unescape(requestParameters[2]) let folder = unescape(requestParameters[3]) - let response = await CL.projects.foundations.utilities.plugins.getPluginFileNames( + let response = await SA.projects.foundations.utilities.plugins.getPluginFileNames( project, folder ) @@ -1384,7 +1384,7 @@ exports.newHttpInterface = function newHttpInterface() { let folder = unescape(requestParameters[3]) let fileName = unescape(requestParameters[4]) - let response = await CL.projects.foundations.utilities.plugins.getPluginFileContent( + let response = await SA.projects.foundations.utilities.plugins.getPluginFileContent( project, folder, fileName diff --git a/Network/Bootstrap.js b/Network/Bootstrap.js new file mode 100644 index 000000000..14b195158 --- /dev/null +++ b/Network/Bootstrap.js @@ -0,0 +1,24 @@ +exports.newBootstrap = function newBootstrap() { + /* + This module helps the Network Node to bootstrap, by + loading all the services and data that needs to start + operating. + */ + let thisObject = { + /* Framework Functions */ + initialize: initialize, + finalize: finalize + } + + return thisObject + + function finalize() { + + } + + function initialize() { + + } + + +} \ No newline at end of file diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index c0fdd7e10..a886b34e9 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -10,7 +10,6 @@ This module is the starting point of the Social Graph Network Node. This type of node is responsible for mantaining the whole Social Graph or relationships between User and Bot profiles and also between their posts. */ - global.NT = { memory: { maps: { @@ -24,6 +23,7 @@ global.NT = { } }, modules: { + BOOTSTRAP: require('./Bootstrap.js'), EVENT: require('./Event.js'), USER_PROFILE: require('./UserProfile.js'), BOT_PROFILE: require('./BotProfile.js'), @@ -54,3 +54,5 @@ global.NT = { } } +let bootstrapProcess = NT.modules.BOOTSTRAP.newBootstrap() +bootstrapProcess.initialize() \ No newline at end of file diff --git a/Projects/Foundations/CL/Utilities/Plugins.js b/Projects/Foundations/SA/Utilities/Plugins.js similarity index 100% rename from Projects/Foundations/CL/Utilities/Plugins.js rename to Projects/Foundations/SA/Utilities/Plugins.js diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index ce4508dd5..41d97c731 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -884,7 +884,11 @@ "propertyName": "webAccess", "functionName": "newFoundationsUtilitiesWebAccess", "fileName": "WebAccess.js" - }, + } + ] + }, + "SA": { + "utilities": [ { "name": "Plugins", "propertyName": "plugins", @@ -984,18 +988,18 @@ "folderName": "Learning-Bot/Low-Frequency-Learning" }, { - "name": "TensorFlow Models Manager", - "propertyName": "tensorFlowModelsManager", - "functionName": "newTensorFlowModelsManager", - "fileName": "TensorFlowModelsManager.js", - "folderName": "Learning-Bot/Low-Frequency-Learning" + "name": "TensorFlow Models Manager", + "propertyName": "tensorFlowModelsManager", + "functionName": "newTensorFlowModelsManager", + "fileName": "TensorFlowModelsManager.js", + "folderName": "Learning-Bot/Low-Frequency-Learning" }, { - "name": "ML Data Manager", - "propertyName": "mlData", - "functionName": "newMLDataObj", - "fileName": "MLDataManager.js", - "folderName": "Learning-Bot/Low-Frequency-Learning" + "name": "ML Data Manager", + "propertyName": "mlData", + "functionName": "newMLDataObj", + "fileName": "MLDataManager.js", + "folderName": "Learning-Bot/Low-Frequency-Learning" } ] } @@ -1264,4 +1268,4 @@ "Positions" ] } -] +] \ No newline at end of file From 71514d580e847e2685fa33ea7f87d348c8d55a18 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 11:16:04 +0200 Subject: [PATCH 41/81] Multi-Project module reused between Client and Task Server --- Client/client.js | 27 +++-- Environment.js | 3 +- Client/MultiProject.js => MultiProject.js | 43 ++++++- .../Low-Frequency-Learning/LearningSystem.js | 4 +- .../TS/Function-Libraries/TaskFunctions.js | 4 +- TaskServer/MultiProject.js | 109 ------------------ TaskServer/ProcessInstance.js | 4 +- TaskServer/Task.js | 23 +++- 8 files changed, 80 insertions(+), 137 deletions(-) rename Client/MultiProject.js => MultiProject.js (57%) delete mode 100644 TaskServer/MultiProject.js diff --git a/Client/client.js b/Client/client.js index ddf179ff6..02d588d66 100644 --- a/Client/client.js +++ b/Client/client.js @@ -54,17 +54,6 @@ global.CUSTOM_FAIL_RESPONSE = { message: 'Custom Message' } -/* -The CL object is accesible everywhere at the Superalgos Client. -It provides access to all modules built for this Client. -*/ -global.CL = {} -/* -The SA object is accesible everywhere at the Superalgos Client. -It provides access to all modules built Superalgos in general. -*/ -global.SA = {} - /* Servers */ let WEB_SERVER = require('./webServer.js') let DATA_FILE_SERVER = require('./dataFileServer.js') @@ -82,10 +71,24 @@ let WEB_SOCKETS_INTERFACE = require('./webSocketsInterface.js') let HTTP_INTERFACE = require('./httpInterface.js') try { + /* + The CL object is accesible everywhere at the Superalgos Client. + It provides access to all modules built for this Client. + */ + global.CL = {} + /* + The SA object is accesible everywhere at the Superalgos Client. + It provides access to all modules built Superalgos in general. + */ + global.SA = {} + /* + First thing is to load the project schema file. + */ + global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA) /* Setting up the modules that will be available for the Servers Running inside this Client */ - let MULTI_PROJECT = require('./MultiProject.js'); + let MULTI_PROJECT = require('../MultiProject.js'); let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() MULTI_PROJECT_MODULE.initialize(CL, 'CL') MULTI_PROJECT_MODULE.initialize(SA, 'SA') diff --git a/Environment.js b/Environment.js index 8b1f83d85..aed0520ff 100644 --- a/Environment.js +++ b/Environment.js @@ -8,7 +8,8 @@ exports.newEnvironment = function () { PATH_TO_DATA_STORAGE: './Data-Storage', PATH_TO_PROJECTS: './Projects', PATH_TO_LOG_FILES: './Log-Files', - PATH_TO_PROJECTS_REQUIRED: '../Projects', + PATH_TO_PROJECTS_REQUIRED: './Projects', + PATH_TO_PROJECT_SCHEMA: '../Projects/ProjectsSchema.json', PATH_TO_UI: './UI', PATH_TO_DATA_FILES: './UI/Data-Files/src', PATH_TO_CLIENT: './Client/', diff --git a/Client/MultiProject.js b/MultiProject.js similarity index 57% rename from Client/MultiProject.js rename to MultiProject.js index 954798729..4ed6f29d2 100644 --- a/Client/MultiProject.js +++ b/MultiProject.js @@ -8,12 +8,7 @@ exports.newMultiProject = function () { function initialize(rootObject, rootObjectName) { /* - First thing is to load the project schema file. - */ - let PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECTS_REQUIRED + '/' + 'ProjectsSchema.json') - - /* - Here we will setup the CL object, with all the + Here we will setup the rootObject object, with all the projects and modules that will have inside. */ rootObject.projects = {} @@ -26,6 +21,9 @@ exports.newMultiProject = function () { projectInstance.utilities = {} projectInstance.globals = {} projectInstance.functionLibraries = {} + projectInstance.taskModules = {} + projectInstance.processModules = {} + projectInstance.botModules = {} if (projectDefinition[rootObjectName] === undefined) { continue } @@ -64,6 +62,39 @@ exports.newMultiProject = function () { projectInstance.functionLibraries[functionLibraryDefinition.propertyName] = requiredFunction.call() } } + + /* Set up Task Modules for this Project */ + if (projectDefinition[rootObjectName].taskModules !== undefined) { + for (let j = 0; j < projectDefinition[rootObjectName].taskModules.length; j++) { + let taskModuleDefinition = projectDefinition[rootObjectName].taskModules[j] + let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + rootObjectName + '/' + 'Task-Modules' + '/' + taskModuleDefinition.fileName + + let requiredObject = require(path) + projectInstance.taskModules[taskModuleDefinition.propertyName] = requiredObject + } + } + + /* Set up Process Modules for this Project */ + if (projectDefinition[rootObjectName].processModules !== undefined) { + for (let j = 0; j < projectDefinition[rootObjectName].processModules.length; j++) { + let processModuleDefinition = projectDefinition[rootObjectName].processModules[j] + let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + rootObjectName + '/' + 'Process-Modules' + '/' + processModuleDefinition.fileName + + let requiredObject = require(path) + projectInstance.processModules[processModuleDefinition.propertyName] = requiredObject + } + } + + /* Set up Bot Modules for this Project */ + if (projectDefinition[rootObjectName].botModules !== undefined) { + for (let j = 0; j < projectDefinition[rootObjectName].botModules.length; j++) { + let botModuleDefinition = projectDefinition[rootObjectName].botModules[j] + let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + rootObjectName + '/' + 'Bot-Modules' + '/' + botModuleDefinition.folderName + '/' + botModuleDefinition.fileName + + let requiredObject = require(path) + projectInstance.botModules[botModuleDefinition.propertyName] = requiredObject + } + } } } } \ No newline at end of file diff --git a/Projects/Foundations/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js b/Projects/Foundations/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js index 808c95d27..c1505f124 100644 --- a/Projects/Foundations/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js +++ b/Projects/Foundations/TS/Bot-Modules/Learning-Bot/Low-Frequency-Learning/LearningSystem.js @@ -115,8 +115,8 @@ exports.newFoundationsBotModulesLearningSystem = function (processIndex) { We will scan the project schema until we find the machine learning library defined by the user at the UI. */ - for (let i = 0; i < TS.projects.foundations.globals.taskConstants.PROJECTS_SCHEMA.length; i++) { - let projectSchemaProject = TS.projects.foundations.globals.taskConstants.PROJECTS_SCHEMA[i] + for (let i = 0; i < PROJECTS_SCHEMA.length; i++) { + let projectSchemaProject = PROJECTS_SCHEMA[i] if (projectSchemaProject.name !== machineLearningLibrary.project) { continue } for (let j = 0; j < projectSchemaProject.TS.botModules.length; j++) { diff --git a/Projects/Foundations/TS/Function-Libraries/TaskFunctions.js b/Projects/Foundations/TS/Function-Libraries/TaskFunctions.js index 97ffb77a7..536fe54bb 100644 --- a/Projects/Foundations/TS/Function-Libraries/TaskFunctions.js +++ b/Projects/Foundations/TS/Function-Libraries/TaskFunctions.js @@ -32,8 +32,8 @@ exports.newFoundationsFunctionLibrariesTaskFunctions = function () { We will scan the project schema until we find the module that will run the bot botModule with the name provided. */ - for (let i = 0; i < TS.projects.foundations.globals.taskConstants.PROJECTS_SCHEMA.length; i++) { - let project = TS.projects.foundations.globals.taskConstants.PROJECTS_SCHEMA[i] + for (let i = 0; i < PROJECTS_SCHEMA.length; i++) { + let project = PROJECTS_SCHEMA[i] if (project.name !== TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName) { continue } for (let j = 0; j < project.TS.botModules.length; j++) { botModuleDefinition = project.TS.botModules[j] diff --git a/TaskServer/MultiProject.js b/TaskServer/MultiProject.js deleted file mode 100644 index cb64d2d0b..000000000 --- a/TaskServer/MultiProject.js +++ /dev/null @@ -1,109 +0,0 @@ -exports.newMultiProject = function () { - - let thisObject = { - initialize: initialize - } - - return thisObject; - - function initialize() { - /* - First thing is to load the project schema file. - */ - let PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECTS_REQUIRED + '/' + 'ProjectsSchema.json') - - /* - Here we will setup the TS object, with all the - projects and modules that will have inside. - */ - global.TS = { - projects: {} - } - for (let i = 0; i < PROJECTS_SCHEMA.length; i++) { - let projectDefinition = PROJECTS_SCHEMA[i] - global.TS.projects[projectDefinition.propertyName] = {} - let projectInstance = global.TS.projects[projectDefinition.propertyName] - - projectInstance.utilities = {} - projectInstance.globals = {} - projectInstance.functionLibraries = {} - projectInstance.taskModules = {} - projectInstance.processModules = {} - projectInstance.botModules = {} - - if (projectDefinition.TS === undefined) { continue } - - /* Set up Utilities of this Project */ - if (projectDefinition.TS.utilities !== undefined) { - for (let j = 0; j < projectDefinition.TS.utilities.length; j++) { - let utilityDefinition = projectDefinition.TS.utilities[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'TS' + '/' + 'Utilities' + '/' + utilityDefinition.fileName - - let requiredObject = require(path) - let requiredFunction = requiredObject[utilityDefinition.functionName] - projectInstance.utilities[utilityDefinition.propertyName] = requiredFunction.call() - } - } - - /* Set up Globals of this Project */ - if (projectDefinition.TS.globals !== undefined) { - for (let j = 0; j < projectDefinition.TS.globals.length; j++) { - let globalDefinition = projectDefinition.TS.globals[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'TS' + '/' + 'Globals' + '/' + globalDefinition.fileName - - let requiredObject = require(path) - let requiredFunction = requiredObject[globalDefinition.functionName] - projectInstance.globals[globalDefinition.propertyName] = requiredFunction.call() - } - } - - /* Set up Function Libraries of this Project */ - if (projectDefinition.TS.functionLibraries !== undefined) { - for (let j = 0; j < projectDefinition.TS.functionLibraries.length; j++) { - let functionLibraryDefinition = projectDefinition.TS.functionLibraries[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'TS' + '/' + 'Function-Libraries' + '/' + functionLibraryDefinition.fileName - - let requiredObject = require(path) - let requiredFunction = requiredObject[functionLibraryDefinition.functionName] - projectInstance.functionLibraries[functionLibraryDefinition.propertyName] = requiredFunction.call() - } - } - - /* Set up Process Modules for this Project */ - if (projectDefinition.TS.taskModules !== undefined) { - for (let j = 0; j < projectDefinition.TS.taskModules.length; j++) { - let taskModuleDefinition = projectDefinition.TS.taskModules[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'TS' + '/' + 'Task-Modules' + '/' + taskModuleDefinition.fileName - - let requiredObject = require(path) - projectInstance.taskModules[taskModuleDefinition.propertyName] = requiredObject - } - } - - /* Set up Process Modules for this Project */ - if (projectDefinition.TS.processModules !== undefined) { - for (let j = 0; j < projectDefinition.TS.processModules.length; j++) { - let processModuleDefinition = projectDefinition.TS.processModules[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'TS' + '/' + 'Process-Modules' + '/' + processModuleDefinition.fileName - - let requiredObject = require(path) - projectInstance.processModules[processModuleDefinition.propertyName] = requiredObject - } - } - - /* Set up Bot Modules for this Project */ - if (projectDefinition.TS.botModules !== undefined) { - for (let j = 0; j < projectDefinition.TS.botModules.length; j++) { - let botModuleDefinition = projectDefinition.TS.botModules[j] - let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + 'TS' + '/' + 'Bot-Modules' + '/' + botModuleDefinition.folderName + '/' + botModuleDefinition.fileName - - let requiredObject = require(path) - projectInstance.botModules[botModuleDefinition.propertyName] = requiredObject - } - } - } - - TS.projects.foundations.globals.taskConstants.PROJECTS_SCHEMA = PROJECTS_SCHEMA - - } -} \ No newline at end of file diff --git a/TaskServer/ProcessInstance.js b/TaskServer/ProcessInstance.js index f0657efa9..baed01931 100644 --- a/TaskServer/ProcessInstance.js +++ b/TaskServer/ProcessInstance.js @@ -52,8 +52,8 @@ the bot type received via websockets events, at the PROJECTS SCHEMA a botModule must be defined with the same type at the property botType. */ - for (let i = 0; i < TS.projects.foundations.globals.taskConstants.PROJECTS_SCHEMA.length; i++) { - let project = TS.projects.foundations.globals.taskConstants.PROJECTS_SCHEMA[i] + for (let i = 0; i < PROJECTS_SCHEMA.length; i++) { + let project = PROJECTS_SCHEMA[i] if (project.name !== TS.projects.foundations.globals.taskConstants.PROJECT_DEFINITION_NODE.config.codeName) { continue } for (let j = 0; j < project.TS.botModules.length; j++) { botModuleDefinition = project.TS.botModules[j] diff --git a/TaskServer/Task.js b/TaskServer/Task.js index dd0f3acd3..87ff58724 100644 --- a/TaskServer/Task.js +++ b/TaskServer/Task.js @@ -8,10 +8,27 @@ let NODE_JS_PROCESS = require('./NodeJsProcess.js'); let NODE_JS_PROCESS_MODULE = NODE_JS_PROCESS.newNodeJsProcess() NODE_JS_PROCESS_MODULE.initialize() -/* Setting up the modules that will be available for the Task and it's processes */ -let MULTI_PROJECT = require('./MultiProject.js'); +/* +The TS object is accesible everywhere at the Superalgos Client. +It provides access to all modules built for the Task Server. +*/ +global.TS = {} +/* +The SA object is accesible everywhere at the Superalgos Client. +It provides access to all modules built Superalgos in general. +*/ +global.SA = {} +/* +First thing is to load the project schema file. +*/ +global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA) +/* +Setting up the modules that will be available for the Servers Running inside this Client +*/ +let MULTI_PROJECT = require('../MultiProject.js'); let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() -MULTI_PROJECT_MODULE.initialize() +MULTI_PROJECT_MODULE.initialize(TS, 'TS') +MULTI_PROJECT_MODULE.initialize(SA, 'SA') /* Setting up the global Event Handler */ TS.projects.foundations.globals.taskConstants.EVENT_SERVER_CLIENT_MODULE_OBJECT = TS.projects.foundations.taskModules.eventServerClient.newFoundationsTaskModulesEventServerClient() From fd2eb5eabe8a89afee1a033baac76e2b4a49250b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 11:57:30 +0200 Subject: [PATCH 42/81] Bug Fix Governance Docs Claims Program --- Client/client.js | 2 +- Network/SocialGraphNetwokNode.js | 48 ++++++++++++++----- .../contribution-claims.json | 13 ----- TaskServer/Task.js | 2 +- 4 files changed, 39 insertions(+), 26 deletions(-) delete mode 100644 Projects/Governance/Schemas/Docs-Nodes/C/Contribution/Contribution-Claims/contribution-claims.json diff --git a/Client/client.js b/Client/client.js index 02d588d66..f634a4dbc 100644 --- a/Client/client.js +++ b/Client/client.js @@ -78,7 +78,7 @@ try { global.CL = {} /* The SA object is accesible everywhere at the Superalgos Client. - It provides access to all modules built Superalgos in general. + It provides access to all modules built for Superalgos in general. */ global.SA = {} /* diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index a886b34e9..cf3bb416a 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -11,17 +11,6 @@ This type of node is responsible for mantaining the whole Social Graph or relationships between User and Bot profiles and also between their posts. */ global.NT = { - memory: { - maps: { - USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id. - USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle. - EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once. - }, - arrays: { - NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking. - NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking. - } - }, modules: { BOOTSTRAP: require('./Bootstrap.js'), EVENT: require('./Event.js'), @@ -53,6 +42,43 @@ global.NT = { } } } +/* +The NT object is accesible everywhere at the Superalgos Network. +It provides access to all modules built for this Network. +*/ +global.NT = {} +/* +The SA object is accesible everywhere at the Superalgos Network. +It provides access to all modules built for Superalgos in general. +*/ +global.SA = {} +/* +First thing is to load the project schema file. +*/ +global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA) +/* +Setting up the modules that will be available for the Servers Running inside this Client +*/ +let MULTI_PROJECT = require('../MultiProject.js'); +let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() +MULTI_PROJECT_MODULE.initialize(CL, 'CL') +MULTI_PROJECT_MODULE.initialize(SA, 'SA') +/* +Here is the Data we are going to keep in memory. +*/ +NT.memory = { + maps: { + USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id. + USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle. + EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once. + }, + arrays: { + NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking. + NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking. + } +} + + let bootstrapProcess = NT.modules.BOOTSTRAP.newBootstrap() bootstrapProcess.initialize() \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Contribution/Contribution-Claims/contribution-claims.json b/Projects/Governance/Schemas/Docs-Nodes/C/Contribution/Contribution-Claims/contribution-claims.json deleted file mode 100644 index 0f38bc9ea..000000000 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Contribution/Contribution-Claims/contribution-claims.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "Claims Program", - "definition": { - "text": "This node helps define the section of the User Profiel hierarchy that is going to be used to define the claims users make for the contributions they have done. These claims need later to be voted by other users in order to be considered during the token distribution process.", - "updated": 1622989461838 - }, - "paragraphs": [ - { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." - } - ] -} \ No newline at end of file diff --git a/TaskServer/Task.js b/TaskServer/Task.js index 87ff58724..ce3c19ce7 100644 --- a/TaskServer/Task.js +++ b/TaskServer/Task.js @@ -15,7 +15,7 @@ It provides access to all modules built for the Task Server. global.TS = {} /* The SA object is accesible everywhere at the Superalgos Client. -It provides access to all modules built Superalgos in general. +It provides access to all modules built for Superalgos in general. */ global.SA = {} /* From fc716b9d95e24d9cb624169261a43d9d8306053c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 12:08:00 +0200 Subject: [PATCH 43/81] Governance: Claims power refactoring --- Network/SocialGraphNetwokNode.js | 2 -- .../C/Claims/Claims-Power/claim-power.json | 19 +++++++++++++++++++ .../C/Claims/Claims-Power/claims-power.json | 19 ------------------- .../Claims/Claims-Program/claims-program.json | 2 +- ...ance-flow-003-how-claims-are-resolved.json | 16 ++++++++-------- ...nance-008-delegation-program-overview.json | 4 ++-- .../UI/Function-Libraries/ClaimsProgram.js | 2 +- .../UI/Spaces/Reports-Space/Claims.js | 2 +- 8 files changed, 32 insertions(+), 34 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claim-power.json delete mode 100644 Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claims-power.json diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index cf3bb416a..355a8fecc 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -78,7 +78,5 @@ NT.memory = { } } - - let bootstrapProcess = NT.modules.BOOTSTRAP.newBootstrap() bootstrapProcess.initialize() \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claim-power.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claim-power.json new file mode 100644 index 000000000..7db67f4d1 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claim-power.json @@ -0,0 +1,19 @@ +{ + "type": "Claim Power", + "definition": { + "text": "Claim Power is the Token Power that goes into the Claims Program, and determines the number of tokens you are claiming with any of the existing types of claims: Position Contribution Claim, Feature Contribution Claim, and Asset Contribution Claim.", + "updated": 1624781372494 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1624781499321 + }, + { + "style": "Callout", + "text": "Claim Power is the Token Power that goes into the Claims Program, and determines the number of tokens you are claiming with any of the existing types of claims: Position Contribution Claim, Feature Contribution Claim, and Asset Contribution Claim.", + "updated": 1630254492262 + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claims-power.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claims-power.json deleted file mode 100644 index 44c1b75cf..000000000 --- a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Power/claims-power.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "Claims Power", - "definition": { - "text": "Claims Power is the Token Power that goes into the Claims Program, and determines the number of tokens you are claiming with any of the existing types of claims: Position Contribution Claim, Feature Contribution Claim, and Asset Contribution Claim.", - "updated": 1624781372494 - }, - "paragraphs": [ - { - "style": "Block", - "text": "Content", - "updated": 1624781499321 - }, - { - "style": "Callout", - "text": "Claims Power is the Token Power that goes into the Claims Program, and determines the number of tokens you are claiming with any of the existing types of claims: Position Contribution Claim, Feature Contribution Claim, and Asset Contribution Claim.", - "updated": 1630254492262 - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json b/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json index 1e1dd531c..ee80b3e00 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json @@ -86,7 +86,7 @@ }, { "style": "List", - "text": "The Claims Power you drive into the node that places the claim.", + "text": "The Claim Power you drive into the node that places the claim.", "updated": 1630256658386 }, { diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json index b23a14166..fab257b1a 100644 --- a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json +++ b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json @@ -3,18 +3,18 @@ "pageNumber": "3", "type": "How Claims are Resolved", "definition": { - "text": "These three concepts, Claims Power, Claim Votes, and Token Rewards are intimately related and make up the logic of the token distribution.", + "text": "These three concepts, Claim Power, Claim Votes, and Token Rewards are intimately related and make up the logic of the token distribution.", "updated": 1624781724176 }, "paragraphs": [ { "style": "Include", - "text": "Governance->Concept->Claims Power->Content", + "text": "Governance->Concept->Claim Power->Content", "updated": 1624781714508 }, { "style": "Text", - "text": "You control the flow of your Claims Power so that the appropriate number reaches the node with which you wish to present a claim. That is, you present claims for a specific number of tokens, determined by the Claims Power that reaches the corresponding claim node.", + "text": "You control the flow of your Claim Power so that the appropriate number reaches the node with which you wish to present a claim. That is, you present claims for a specific number of tokens, determined by the Claim Power that reaches the corresponding claim node.", "updated": 1624781792664 }, { @@ -23,7 +23,7 @@ }, { "style": "Callout", - "text": "When you place a claim on a definition node, you are declaring that you wish the Community to reward you with the number of tokens in your claim (Claims Power) for the work done on the concept embodied by the corresponding definition node." + "text": "When you place a claim on a definition node, you are declaring that you wish the Community to reward you with the number of tokens in your claim (Claim Power) for the work done on the concept embodied by the corresponding definition node." }, { "style": "Text", @@ -43,7 +43,7 @@ }, { "style": "List", - "text": "The total Claims Power in all existing claims may be equal, smaller, or greater than the Token Rewards available in the node." + "text": "The total Claim Power in all existing claims may be equal, smaller, or greater than the Token Rewards available in the node." }, { "style": "Text", @@ -56,7 +56,7 @@ }, { "style": "Text", - "text": "The flow of Voting Power into Claim Votes follows the same principles as the rest of the flows in the Voting Program. This means that Claim Votes have a specific Voting Power, pretty much like claims have a specific Claims Power.", + "text": "The flow of Voting Power into Claim Votes follows the same principles as the rest of the flows in the Voting Program. This means that Claim Votes have a specific Voting Power, pretty much like claims have a specific Claim Power.", "updated": 1624781873207 }, { @@ -81,11 +81,11 @@ }, { "style": "List", - "text": "When the sum of Voting Power of all Claim Votes associated with a claim is lesser than the Claims Power of the claim, the claim is not paid in full. The Token Rewards is capped by the total Voting Power of all Claim Votes. In other words, claims are paid up to the amount the Community decides with their Claim Votes." + "text": "When the sum of Voting Power of all Claim Votes associated with a claim is lesser than the Claim Power of the claim, the claim is not paid in full. The Token Rewards is capped by the total Voting Power of all Claim Votes. In other words, claims are paid up to the amount the Community decides with their Claim Votes." }, { "style": "List", - "text": "When Token Rewards are enough to pay all claims, then each claim is paid in full, as expected. In more precise, albeit complex terms, when Token Rewards are greater than the sum of Voting Power for any given number of claims, or the sum of Claims Power for any given number of claims, whichever is lesser, each claim gets the Token Reward equal to its Claims Power or equal to the Voting Power of associated Claim Votes, whichever is lesser. " + "text": "When Token Rewards are enough to pay all claims, then each claim is paid in full, as expected. In more precise, albeit complex terms, when Token Rewards are greater than the sum of Voting Power for any given number of claims, or the sum of Claim Power for any given number of claims, whichever is lesser, each claim gets the Token Reward equal to its Claim Power or equal to the Voting Power of associated Claim Votes, whichever is lesser. " }, { "style": "List", diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-008-delegation-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-008-delegation-program-overview.json index 6140fca36..1c395e68e 100644 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-008-delegation-program-overview.json +++ b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-008-delegation-program-overview.json @@ -9,12 +9,12 @@ "paragraphs": [ { "style": "Text", - "text": "This is another feature with characteristics inspired in liquid democracy, and also plays an important societal function: new Contributors need Claims Power to place their first claims, but — given that they are new to Superalgos — they may hold no tokens.", + "text": "This is another feature with characteristics inspired in liquid democracy, and also plays an important societal function: new Contributors need Claim Power to place their first claims, but — given that they are new to Superalgos — they may hold no tokens.", "updated": 1630056075583 }, { "style": "Text", - "text": "In such cases, new Contributors may ask their mentors to borrow some Token Power that they may turn into Claims Power to place their first few claims." + "text": "In such cases, new Contributors may ask their mentors to borrow some Token Power that they may turn into Claim Power to place their first few claims." }, { "style": "Callout", diff --git a/Projects/Governance/UI/Function-Libraries/ClaimsProgram.js b/Projects/Governance/UI/Function-Libraries/ClaimsProgram.js index 7c2d61174..eb70f7fba 100644 --- a/Projects/Governance/UI/Function-Libraries/ClaimsProgram.js +++ b/Projects/Governance/UI/Function-Libraries/ClaimsProgram.js @@ -457,7 +457,7 @@ function newGovernanceFunctionLibraryClaimsProgram() { node.payload.uiObject.statusAngleOffset = 0 node.payload.uiObject.statusAtAngle = false - node.payload.uiObject.setStatus(ownPowerText + ' Claims Power') + node.payload.uiObject.setStatus(ownPowerText + ' Claim Power') } } diff --git a/Projects/Governance/UI/Spaces/Reports-Space/Claims.js b/Projects/Governance/UI/Spaces/Reports-Space/Claims.js index 4a693249a..2765bb2fd 100644 --- a/Projects/Governance/UI/Spaces/Reports-Space/Claims.js +++ b/Projects/Governance/UI/Spaces/Reports-Space/Claims.js @@ -46,7 +46,7 @@ function newGovernanceReportsClaims() { }, { "name": "ownPower", - "label": "Claims Power", + "label": "Claim Power", "type": "number", "order": "descending", "textAlign": "center", From 85cc9c2c3d3746d5161b1bd11b5f48cd2b0bb098 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 12:34:49 +0200 Subject: [PATCH 44/81] Fixes to allow a new Project to have globals without UI components --- Network/Queries/Events.js | 4 ++-- Network/Queries/PostReplies.js | 4 ++-- Network/Queries/ProfileFollowers.js | 4 ++-- Network/Queries/ProfileFollowing.js | 4 ++-- Network/Queries/ProfilePosts.js | 4 ++-- Network/SocialGraphNetwokNode.js | 12 ------------ Network/Utilities/QueriesValidations.js | 10 +++++----- .../UI/Spaces/Design-Space/Workspace.js | 14 +++++++++----- Projects/Network/NT/Globals/QueryConstants.js | 13 +++++++++++++ Projects/ProjectsSchema.json | 14 ++++++++++++++ UI/Canvas.js | 10 ++++++++++ 11 files changed, 61 insertions(+), 32 deletions(-) create mode 100644 Projects/Network/NT/Globals/QueryConstants.js diff --git a/Network/Queries/Events.js b/Network/Queries/Events.js index b55def0e0..d32f756d7 100644 --- a/Network/Queries/Events.js +++ b/Network/Queries/Events.js @@ -29,7 +29,7 @@ exports.newEvents = function newEvents() { function execute() { let response = [] switch (thisObject.direction) { - case NT.globals.constants.queries.DIRECTION_FUTURE: { + case NT.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let event = NT.memory.arrays.EVENTS[i] if (event === undefined) { break } @@ -37,7 +37,7 @@ exports.newEvents = function newEvents() { } break } - case NT.globals.constants.queries.DIRECTION_PAST: { + case NT.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let event = NT.memory.arrays.EVENTS[i] if (event === undefined) { break } diff --git a/Network/Queries/PostReplies.js b/Network/Queries/PostReplies.js index f5221fa2c..a3d0409ae 100644 --- a/Network/Queries/PostReplies.js +++ b/Network/Queries/PostReplies.js @@ -39,7 +39,7 @@ exports.newPostReplies = function newPostReplies() { let array = Array.from(thisObject.post.replies) switch (thisObject.direction) { - case NT.globals.constants.queries.DIRECTION_FUTURE: { + case NT.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (post === undefined) { break } @@ -47,7 +47,7 @@ exports.newPostReplies = function newPostReplies() { } break } - case NT.globals.constants.queries.DIRECTION_PAST: { + case NT.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (post === undefined) { break } diff --git a/Network/Queries/ProfileFollowers.js b/Network/Queries/ProfileFollowers.js index bf704f978..8acf26762 100644 --- a/Network/Queries/ProfileFollowers.js +++ b/Network/Queries/ProfileFollowers.js @@ -32,7 +32,7 @@ exports.newProfileFollowers = function newProfileFollowers() { let array = Array.from(thisObject.profile.followers) switch (thisObject.direction) { - case NT.globals.constants.queries.DIRECTION_FUTURE: { + case NT.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -40,7 +40,7 @@ exports.newProfileFollowers = function newProfileFollowers() { } break } - case NT.globals.constants.queries.DIRECTION_PAST: { + case NT.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Network/Queries/ProfileFollowing.js b/Network/Queries/ProfileFollowing.js index 845ee2c09..9f544b53f 100644 --- a/Network/Queries/ProfileFollowing.js +++ b/Network/Queries/ProfileFollowing.js @@ -32,7 +32,7 @@ exports.newProfileFollowing = function newProfileFollowing() { let array = Array.from(thisObject.profile.following) switch (thisObject.direction) { - case NT.globals.constants.queries.DIRECTION_FUTURE: { + case NT.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -40,7 +40,7 @@ exports.newProfileFollowing = function newProfileFollowing() { } break } - case NT.globals.constants.queries.DIRECTION_PAST: { + case NT.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Network/Queries/ProfilePosts.js b/Network/Queries/ProfilePosts.js index 7f6255341..853451bf8 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Network/Queries/ProfilePosts.js @@ -35,7 +35,7 @@ exports.newProfilePosts = function newProfilePosts() { let array = Array.from(thisObject.profile.posts) switch (thisObject.direction) { - case NT.globals.constants.queries.DIRECTION_FUTURE: { + case NT.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -43,7 +43,7 @@ exports.newProfilePosts = function newProfilePosts() { } break } - case NT.globals.constants.queries.DIRECTION_PAST: { + case NT.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index 355a8fecc..b3120696c 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -28,18 +28,6 @@ global.NT = { }, utilities: { queriesValidations: require('./Utilities/QueriesValidations.js').newQueriesValidations() - }, - globals: { - constants: { - queries: { - INITIAL_INDEX_FIRST: 'First', - INITIAL_INDEX_LAST: 'Last', - MIN_AMOUNT_REQUESTED: 1, - MAX_AMOUNT_REQUESTED: 100, - DIRECTION_FUTURE: 'Future', - DIRECTION_PAST: 'Past' - } - } } } /* diff --git a/Network/Utilities/QueriesValidations.js b/Network/Utilities/QueriesValidations.js index 6e13e6012..640665fcd 100644 --- a/Network/Utilities/QueriesValidations.js +++ b/Network/Utilities/QueriesValidations.js @@ -51,11 +51,11 @@ exports.newQueriesValidations = function newQueriesValidations() { throw ('Initial Index Undefined.') } - if (queryReceived.initialIndex === NT.globals.constants.queries.INITIAL_INDEX_LAST) { + if (queryReceived.initialIndex === NT.globals.queryConstants.INITIAL_INDEX_LAST) { queryReceived.initialIndex = thisObject.profile.posts.length - 1 } - if (queryReceived.initialIndex === NT.globals.constants.queries.INITIAL_INDEX_FIRST) { + if (queryReceived.initialIndex === NT.globals.queryConstants.INITIAL_INDEX_FIRST) { queryReceived.initialIndex = 0 } @@ -75,11 +75,11 @@ exports.newQueriesValidations = function newQueriesValidations() { throw ('Amount Requested Is Not a Number.') } - if (queryReceived.amountRequested < NT.globals.constants.queries.MIN_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested < NT.globals.queryConstants.MIN_AMOUNT_REQUESTED) { throw ('Amount Requested Below Min.') } - if (queryReceived.amountRequested > NT.globals.constants.queries.MAX_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested > NT.globals.queryConstants.MAX_AMOUNT_REQUESTED) { throw ('Amount Requested Above Max.') } /* @@ -89,7 +89,7 @@ exports.newQueriesValidations = function newQueriesValidations() { throw ('Direction Undefined.') } - if (queryReceived.direction !== NT.globals.constants.queries.DIRECTION_FUTURE && queryReceived.direction !== NT.globals.constants.queries.DIRECTION_PAST) { + if (queryReceived.direction !== NT.globals.queryConstants.DIRECTION_FUTURE && queryReceived.direction !== NT.globals.queryConstants.DIRECTION_PAST) { throw ('Direction Not Supported.') } diff --git a/Projects/Foundations/UI/Spaces/Design-Space/Workspace.js b/Projects/Foundations/UI/Spaces/Design-Space/Workspace.js index ff1e6b7e8..88b4f1ce9 100644 --- a/Projects/Foundations/UI/Spaces/Design-Space/Workspace.js +++ b/Projects/Foundations/UI/Spaces/Design-Space/Workspace.js @@ -16,7 +16,7 @@ function newWorkspace() { save: saveWorkspace, backup: backupWorkspace, share: shareWorkspace, - getNodesByTypeAndHierarchyHeadsType: getNodesByTypeAndHierarchyHeadsType, + getNodesByTypeAndHierarchyHeadsType: getNodesByTypeAndHierarchyHeadsType, getProjectsHeads: getProjectsHeads, getHierarchyHeads: getHierarchyHeads, getHierarchyHeadsById: getHierarchyHeadsById, @@ -70,8 +70,12 @@ function newWorkspace() { /* Set up the action switches map */ for (let i = 0; i < PROJECTS_SCHEMA.length; i++) { let project = PROJECTS_SCHEMA[i].name - let actionSwitch = eval('new' + project + 'ActionSwitch()') - actionSwitchesByProject.set(project, actionSwitch) + try { + let actionSwitch = eval('new' + project + 'ActionSwitch()') + actionSwitchesByProject.set(project, actionSwitch) + } catch (err) { + console.log('[WARN] Action Switch for project ' + project + ' not found.') + } } /* Check which was the last workspace. */ @@ -157,9 +161,9 @@ function newWorkspace() { let workspace = UI.projects.foundations.spaces.designSpace.workspace.workspaceNode /* Validation if it is too early to save. */ - if (thisObject.isInitialized === false) { + if (thisObject.isInitialized === false) { console.log('Workspace not saved because it has not been initialized. =') - return + return } /* Validation of 2 sessions opened at the same time. */ diff --git a/Projects/Network/NT/Globals/QueryConstants.js b/Projects/Network/NT/Globals/QueryConstants.js new file mode 100644 index 000000000..92737b6b4 --- /dev/null +++ b/Projects/Network/NT/Globals/QueryConstants.js @@ -0,0 +1,13 @@ +exports.newNetworkGlobalsQueryConstants = function () { + + let thisObject = { + INITIAL_INDEX_FIRST: 'First', + INITIAL_INDEX_LAST: 'Last', + MIN_AMOUNT_REQUESTED: 1, + MAX_AMOUNT_REQUESTED: 100, + DIRECTION_FUTURE: 'Future', + DIRECTION_PAST: 'Past' + } + + return thisObject +} \ No newline at end of file diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 41d97c731..800979e73 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1267,5 +1267,19 @@ "Features", "Positions" ] + }, + { + "name": "Network", + "propertyName": "network", + "NT": { + "globals": [ + { + "name": "Query Constants", + "propertyName": "queryConstants", + "functionName": "newNetworkGlobalsQueryConstants", + "fileName": "QueryConstants.js" + } + ] + } } ] \ No newline at end of file diff --git a/UI/Canvas.js b/UI/Canvas.js index 4c07da82b..103241ba4 100644 --- a/UI/Canvas.js +++ b/UI/Canvas.js @@ -121,6 +121,8 @@ function newCanvas() { let spaceAnimationDrawMap = new Map() let spaceDefinitionDrawMap = new Map() + if (projectDefinition.UI === undefined) { continue } + /* Set up Globals of this Project */ if (projectDefinition.UI.globals !== undefined) { for (let j = 0; j < projectDefinition.UI.globals.length; j++) { @@ -742,6 +744,8 @@ function newCanvas() { let projectInstance = UI.projects[projectDefinition.propertyName] if (projectInstance === undefined) { continue } + if (projectDefinition.UI === undefined) { continue } + if (projectDefinition.UI.spaces === undefined) { continue } for (let j = 0; j < projectDefinition.UI.spaces.length; j++) { let spaceInstance = projectInstance.events.onMouseDownMap.get(j) if (spaceInstance === undefined) { continue } @@ -850,6 +854,8 @@ function newCanvas() { let projectInstance = UI.projects[projectDefinition.propertyName] if (projectInstance === undefined) { continue } + if (projectDefinition.UI === undefined) { continue } + if (projectDefinition.UI.spaces === undefined) { continue } for (let j = 0; j < projectDefinition.UI.spaces.length; j++) { let spaceInstance = projectInstance.events.onMouseClickMap.get(j) if (spaceInstance === undefined) { continue } @@ -966,6 +972,8 @@ function newCanvas() { let projectInstance = UI.projects[projectDefinition.propertyName] if (projectInstance === undefined) { continue } + if (projectDefinition.UI === undefined) { continue } + if (projectDefinition.UI.spaces === undefined) { continue } for (let j = 0; j < projectDefinition.UI.spaces.length; j++) { let spaceInstance = projectInstance.events.onMouseOverMap.get(j) if (spaceInstance === undefined) { continue } @@ -1028,6 +1036,8 @@ function newCanvas() { let projectInstance = UI.projects[projectDefinition.propertyName] if (projectInstance === undefined) { continue } + if (projectDefinition.UI === undefined) { continue } + if (projectDefinition.UI.spaces === undefined) { continue } for (let j = 0; j < projectDefinition.UI.spaces.length; j++) { let spaceInstance = projectInstance.events.onMouseWheelMap.get(j) if (spaceInstance === undefined) { continue } From ecd0dcc76164a94da78a400bf1d000d4ef03ef2b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 13:13:37 +0200 Subject: [PATCH 45/81] Network Workspace --- MultiProject.js | 15 +++++++++++++++ .../.vscode/Superalgos Network.code-workspace | 11 +++++++++++ Network/Queries/BotProfileStats.js | 4 ++-- Network/Queries/Events.js | 4 ++-- Network/Queries/UserProfileStats.js | 4 ++-- Network/SocialGraphNetwokNode.js | 15 --------------- Network/Utilities/QueriesValidations.js | 2 +- Network/clientsInterface.js | 6 +++--- Network/post.js | 2 +- Projects/Network/NT/Globals/Memory.js | 18 ++++++++++++++++++ .../Network/NT/Modules/Event.js | 6 +++--- Projects/ProjectsSchema.json | 14 ++++++++++++++ 12 files changed, 72 insertions(+), 29 deletions(-) create mode 100644 Network/.vscode/Superalgos Network.code-workspace create mode 100644 Projects/Network/NT/Globals/Memory.js rename Network/event.js => Projects/Network/NT/Modules/Event.js (98%) diff --git a/MultiProject.js b/MultiProject.js index 4ed6f29d2..0bbe713cd 100644 --- a/MultiProject.js +++ b/MultiProject.js @@ -63,6 +63,21 @@ exports.newMultiProject = function () { } } + /* + From here we will require and get the modules, but without instantiation thisObject. + */ + + /* Set up Modules for this Project */ + if (projectDefinition[rootObjectName].modules !== undefined) { + for (let j = 0; j < projectDefinition[rootObjectName].modules.length; j++) { + let taskModuleDefinition = projectDefinition[rootObjectName].modules[j] + let path = global.env.PATH_TO_PROJECTS_REQUIRED + '/' + projectDefinition.name + '/' + rootObjectName + '/' + 'Modules' + '/' + taskModuleDefinition.fileName + + let requiredObject = require(path) + projectInstance.modules[taskModuleDefinition.propertyName] = requiredObject + } + } + /* Set up Task Modules for this Project */ if (projectDefinition[rootObjectName].taskModules !== undefined) { for (let j = 0; j < projectDefinition[rootObjectName].taskModules.length; j++) { diff --git a/Network/.vscode/Superalgos Network.code-workspace b/Network/.vscode/Superalgos Network.code-workspace new file mode 100644 index 000000000..757812e5e --- /dev/null +++ b/Network/.vscode/Superalgos Network.code-workspace @@ -0,0 +1,11 @@ +{ + "folders": [ + { + "path": "C:\\Superalgos\\Network" + }, + { + "path": "C:\\Superalgos\\Projects\\Network" + } + ], + "settings": {} +} \ No newline at end of file diff --git a/Network/Queries/BotProfileStats.js b/Network/Queries/BotProfileStats.js index 510f1ebb3..9e157202f 100644 --- a/Network/Queries/BotProfileStats.js +++ b/Network/Queries/BotProfileStats.js @@ -19,9 +19,9 @@ exports.newBotProfileStats = function newBotProfileStats() { */ let userProfile if (queryReceived.targetUserProfileId !== undefined) { - userProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + userProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - userProfile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + userProfile = NT.globals.memory.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (userProfile === undefined) { diff --git a/Network/Queries/Events.js b/Network/Queries/Events.js index d32f756d7..79fbb6bba 100644 --- a/Network/Queries/Events.js +++ b/Network/Queries/Events.js @@ -59,8 +59,8 @@ exports.newEvents = function newEvents() { Any of the above happening, means that indeed it is related. */ - let emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) - let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) + let emitterUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) + let targetUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) let emitterBotProfile = emitterUserProfile.bots.get(eventReceived.emitterBotProfileId) let targetBotProfile = targetUserProfile.bots.get(eventReceived.targetBotProfileId) let emitterPost = emitterUserProfile.posts.get(eventReceived.emitterPostHash) diff --git a/Network/Queries/UserProfileStats.js b/Network/Queries/UserProfileStats.js index a7fd8580b..b79deba1e 100644 --- a/Network/Queries/UserProfileStats.js +++ b/Network/Queries/UserProfileStats.js @@ -18,9 +18,9 @@ exports.newUserProfileStats = function newUserProfileStats() { Validate User Profile */ if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + thisObject.profile = NT.globals.memory.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + thisObject.profile = NT.globals.memory.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (thisObject.profile === undefined) { diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index b3120696c..d35c0d9bd 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -13,7 +13,6 @@ or relationships between User and Bot profiles and also between their posts. global.NT = { modules: { BOOTSTRAP: require('./Bootstrap.js'), - EVENT: require('./Event.js'), USER_PROFILE: require('./UserProfile.js'), BOT_PROFILE: require('./BotProfile.js'), POST: require('./Post.js'), @@ -51,20 +50,6 @@ let MULTI_PROJECT = require('../MultiProject.js'); let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() MULTI_PROJECT_MODULE.initialize(CL, 'CL') MULTI_PROJECT_MODULE.initialize(SA, 'SA') -/* -Here is the Data we are going to keep in memory. -*/ -NT.memory = { - maps: { - USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id. - USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle. - EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once. - }, - arrays: { - NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking. - NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking. - } -} let bootstrapProcess = NT.modules.BOOTSTRAP.newBootstrap() bootstrapProcess.initialize() \ No newline at end of file diff --git a/Network/Utilities/QueriesValidations.js b/Network/Utilities/QueriesValidations.js index 640665fcd..11ac407a7 100644 --- a/Network/Utilities/QueriesValidations.js +++ b/Network/Utilities/QueriesValidations.js @@ -15,7 +15,7 @@ exports.newQueriesValidations = function newQueriesValidations() { Validate User Profile */ if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + thisObject.profile = NT.globals.memory.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } if (thisObject.profile === undefined) { diff --git a/Network/clientsInterface.js b/Network/clientsInterface.js index 2f48f80df..482da953f 100644 --- a/Network/clientsInterface.js +++ b/Network/clientsInterface.js @@ -45,13 +45,13 @@ exports.newClientInterface = function newClientInterface() { */ let eventReceived = JSON.parse(eventMessage) - if (NT.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { + if (NT.globals.memory.EVENTS.get(eventReceived.eventId) !== undefined) { throw ('Event Already Exists.') } - let event = NT.modules.EVENT.newEvent() + let event = NT.modules.event.newNetworkModulesEvent() event.initialize(eventReceived) - NT.memory.maps.EVENTS.set(eventReceived.eventId, event) + NT.globals.memory.EVENTS.set(eventReceived.eventId, event) } function queryReceived(queryMessage) { diff --git a/Network/post.js b/Network/post.js index efe1f33f0..985bdd4a9 100644 --- a/Network/post.js +++ b/Network/post.js @@ -97,7 +97,7 @@ exports.newPost = function newPost() { /* Validate Target User Profile. */ - let targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + let targetUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } diff --git a/Projects/Network/NT/Globals/Memory.js b/Projects/Network/NT/Globals/Memory.js new file mode 100644 index 000000000..3248bd2ca --- /dev/null +++ b/Projects/Network/NT/Globals/Memory.js @@ -0,0 +1,18 @@ +exports.newNetworkGlobalsMemory = function () { + /* + Here is the Data we are going to keep in memory. + */ + let thisObject = { + maps: { + USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id. + USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle. + EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once. + }, + arrays: { + NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking. + NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking. + } + } + + return thisObject +} \ No newline at end of file diff --git a/Network/event.js b/Projects/Network/NT/Modules/Event.js similarity index 98% rename from Network/event.js rename to Projects/Network/NT/Modules/Event.js index b586d9077..a7feafb07 100644 --- a/Network/event.js +++ b/Projects/Network/NT/Modules/Event.js @@ -1,4 +1,4 @@ -exports.newEvent = function newEvent() { +exports.newNetworkModulesEvent = function newNetworkModulesEvent() { /* An Event is anything that happens system wide that needs to be delivered to relevant entities via @@ -104,7 +104,7 @@ exports.newEvent = function newEvent() { if (emitterUserProfileId === undefined) { throw ('Emitter User Profile Id Not Provided.') } - emitterUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) + emitterUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) if (emitterUserProfile === undefined) { throw ('Emitter User Profile Not Found.') } @@ -112,7 +112,7 @@ exports.newEvent = function newEvent() { Validate Target User Profile. */ if (thisObject.targetUserProfileId !== undefined) { - targetUserProfile = NT.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + targetUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 800979e73..b9a782d5f 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1278,6 +1278,20 @@ "propertyName": "queryConstants", "functionName": "newNetworkGlobalsQueryConstants", "fileName": "QueryConstants.js" + }, + { + "name": "Memory", + "propertyName": "memory", + "functionName": "newNetworkGlobalsMemory", + "fileName": "Memory.js" + } + ], + "modules": [ + { + "name": "Event", + "propertyName": "event", + "functionName": "newNetworkModulesEvent", + "fileName": "Event.js" } ] } From 73728a43562221c52235a9b798b56c6ac8e76012 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Mon, 30 Aug 2021 14:14:02 +0200 Subject: [PATCH 46/81] Finished Claims Program --- .../C/Claims/Claims-Folder/claims-folder.json | 4 +-- .../reusable-governance-snippets.json | 23 +++++++++++++++ .../asset-contribution-claim.json | 9 +++--- .../Claims/Claims-Program/claims-program.json | 4 +-- .../feature-contribution-claim.json | 9 +++--- .../position-contribution-claim.json | 9 +++--- .../Tokens/Tokens-Awarded/tokens-awarded.json | 29 +++++++++++++++---- 7 files changed, 66 insertions(+), 21 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json index ba70529c9..af5b64180 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json @@ -61,8 +61,8 @@ }, { "style": "Callout", - "text": "Use a Claims Folder node to establish a reference with the corresponding type of Class node. Then use the Install Missing Claims option on the menu of the Claims Folder to map the entire Class! The process creates a Claims Folder for each Class, and a claim for each Asset, Feature, or Position defined within each Class. If something changes on the side of the definitions, you may always go back a fire the Install Missing Claims again, and the process will remap the structure with the appropriate claims and folders.", - "updated": 1630258691549 + "text": "Use a Claims Folder node to establish a reference with the corresponding type of Class node. Then use the Install Missing Claims option on the menu of the Claims Folder to map the entire Class! The process creates a Claims Folder for each Class, and a claim for each Asset, Feature, or Position defined within each Class. If something changes on the side of the definitions, you may always go back a run the Install Missing Claims process again. The process will remap the structure with the appropriate claims and folders.", + "updated": 1630324164950 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json index c4b3c35af..e96164d23 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json @@ -61,6 +61,29 @@ "style": "Success", "text": "Read about the Community Building Programs to learn how this program calculates Tokens Awarded.", "updated": 1630232362107 + }, + { + "style": "Block", + "text": "Dummy", + "updated": 1630325147588 + }, + { + "style": "Title", + "text": "Claims Content", + "updated": 1630325166381 + }, + { + "style": "Block", + "text": "Claims Content" + }, + { + "style": "Success", + "text": "Make sure you're driving enough Claim Power to the node so that you may get the reward you deserve! And remember to ask the people who know your work to vouch for your claims with their Claim Votes. That is how your contribution gets validated and how you get the associated rewards.", + "updated": 1630325171869 + }, + { + "style": "Note", + "text": "Learn more about How Claims are Resolved!" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Contribution-Claim/asset-contribution-claim.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Contribution-Claim/asset-contribution-claim.json index 01a84252c..fd641d3f0 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Contribution-Claim/asset-contribution-claim.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Contribution-Claim/asset-contribution-claim.json @@ -1,8 +1,8 @@ { "type": "Asset Contribution Claim", "definition": { - "text": "Use this node to reference an Asset node in the Assets hierarchy to establish an Asset Contribution Claim.", - "updated": 1624728739277 + "text": "Use this node to reference an Asset node in one of the Assets hierarchy to establish an Asset Contribution Claim.", + "updated": 1630324852856 }, "paragraphs": [ { @@ -11,8 +11,9 @@ "updated": 1624728761840 }, { - "style": "Text", - "text": "Remember to ask the people who know about your work to vouch for your claim with their Claim Votes. This is how your contribution gets validated so that you may get the associated rewards." + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Claims Content", + "updated": 1630325363447 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json b/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json index ee80b3e00..77c87e08d 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Claims/Claims-Program/claims-program.json @@ -72,8 +72,8 @@ }, { "style": "Callout", - "text": "To place a claim, use the appropriate type of contribution claim node to reference the matching type of definition. For example, use an Asset Contribution Claims node to reference an Asset node within an Assets hierarchy. When you do that, you are effectively placing a claim on that asset. ", - "updated": 1630257103981 + "text": "To place a claim, use the appropriate type of contribution claim node to reference the matching type of definition. For example, use an Asset Contribution Claim node to reference an Asset node within an Assets hierarchy. When you do that, you are effectively placing a claim on that asset.", + "updated": 1630323960334 }, { "style": "Note", diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Contribution-Claim/feature-contribution-claim.json b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Contribution-Claim/feature-contribution-claim.json index be3d18245..dac483f88 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Contribution-Claim/feature-contribution-claim.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Contribution-Claim/feature-contribution-claim.json @@ -1,8 +1,8 @@ { "type": "Feature Contribution Claim", "definition": { - "text": "Use this node to reference a Feature node in the Features hierarchy to establish a Feature Contribution Claim.", - "updated": 1624728695500 + "text": "Use this node to reference a Feature node in one of the Features hierarchy to establish a Feature Contribution Claim.", + "updated": 1630325556674 }, "paragraphs": [ { @@ -11,8 +11,9 @@ "updated": 1624728714757 }, { - "style": "Text", - "text": "Remember to ask the people who know about your work to vouch for your claim with their Claim Votes. This is how your contribution gets validated so that you may get the associated rewards." + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Claims Content", + "updated": 1630325534128 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Contribution-Claim/position-contribution-claim.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Contribution-Claim/position-contribution-claim.json index ace83fe08..5e8193246 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Contribution-Claim/position-contribution-claim.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Contribution-Claim/position-contribution-claim.json @@ -1,8 +1,8 @@ { "type": "Position Contribution Claim", "definition": { - "text": "Use this node to reference a Position node in the Positions hierarchy to establish a Position Contribution Claim.", - "updated": 1624728585219 + "text": "Use this node to reference a Position node in one of the Positions hierarchy to establish a Position Contribution Claim.", + "updated": 1630325495738 }, "paragraphs": [ { @@ -11,8 +11,9 @@ "updated": 1624728656474 }, { - "style": "Text", - "text": "Remember to ask the people who know about your work to vouch for your claim with their Claim Votes. This is how your contribution gets validated so that you may get the associated rewards." + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Claims Content", + "updated": 1630325507398 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json index 95b3efd69..a0730dd10 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json @@ -17,13 +17,32 @@ }, { "style": "Subtitle", - "text": "Community Building Programs Calculations", - "updated": 1630165409867 + "text": "Calculations", + "updated": 1630324592451 }, { - "style": "Text", - "text": "The Community Building Programs node page explains how Tokens Awarded is calculated for these particular programs.", - "updated": 1630219835777 + "style": "Note", + "text": "Each program calculates Tokens Awarded in a particular way. Follow the links below to learn the details about each program.", + "updated": 1630324671871 + }, + { + "style": "List", + "text": "In the Airdrop Program.", + "updated": 1630324552707 + }, + { + "style": "List", + "text": "In the Github Program.", + "updated": 1630324714648 + }, + { + "style": "List", + "text": "The Community Building Programs node page explains how Tokens Awarded is calculated for the referral, support, and mentorship programs.", + "updated": 1630324749961 + }, + { + "style": "List", + "text": "The How Claims are Resolved page explains how tokens are awarded in the Claims Program." }, { "style": "Text", From b6d04746d64fb3927f911d4a4c6e4866a8f43088 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 14:42:13 +0200 Subject: [PATCH 47/81] All modules moved to Projects structure --- Network/SocialGraphNetwokNode.js | 20 +---- Network/clientsInterface.js | 2 +- .../Network/NT/Modules}/Bootstrap.js | 0 .../NT/Modules}/Queries/BotProfileStats.js | 2 +- .../Network/NT/Modules}/Queries/Events.js | 10 +-- .../NT/Modules}/Queries/PostReplies.js | 2 +- .../NT/Modules}/Queries/ProfileFollowers.js | 2 +- .../NT/Modules}/Queries/ProfileFollowing.js | 2 +- .../NT/Modules}/Queries/ProfilePosts.js | 2 +- .../NT/Modules}/Queries/UserProfileStats.js | 2 +- .../Network/NT/Modules}/Query.js | 16 ++-- .../NT/Modules/Social-Graph/BotProfile.js | 0 .../Network/NT/Modules/Social-Graph/Post.js | 0 .../NT/Modules/Social-Graph/UserProfile.js | 0 .../NT}/Utilities/QueriesValidations.js | 2 +- Projects/ProjectsSchema.json | 80 +++++++++++++++++++ 16 files changed, 102 insertions(+), 40 deletions(-) rename {Network => Projects/Network/NT/Modules}/Bootstrap.js (100%) rename {Network => Projects/Network/NT/Modules}/Queries/BotProfileStats.js (93%) rename {Network => Projects/Network/NT/Modules}/Queries/Events.js (95%) rename {Network => Projects/Network/NT/Modules}/Queries/PostReplies.js (96%) rename {Network => Projects/Network/NT/Modules}/Queries/ProfileFollowers.js (94%) rename {Network => Projects/Network/NT/Modules}/Queries/ProfileFollowing.js (94%) rename {Network => Projects/Network/NT/Modules}/Queries/ProfilePosts.js (95%) rename {Network => Projects/Network/NT/Modules}/Queries/UserProfileStats.js (93%) rename {Network => Projects/Network/NT/Modules}/Query.js (73%) rename Network/botProfile.js => Projects/Network/NT/Modules/Social-Graph/BotProfile.js (100%) rename Network/post.js => Projects/Network/NT/Modules/Social-Graph/Post.js (100%) rename Network/userProfile.js => Projects/Network/NT/Modules/Social-Graph/UserProfile.js (100%) rename {Network => Projects/Network/NT}/Utilities/QueriesValidations.js (96%) diff --git a/Network/SocialGraphNetwokNode.js b/Network/SocialGraphNetwokNode.js index d35c0d9bd..fc8c55ca1 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/SocialGraphNetwokNode.js @@ -10,25 +10,7 @@ This module is the starting point of the Social Graph Network Node. This type of node is responsible for mantaining the whole Social Graph or relationships between User and Bot profiles and also between their posts. */ -global.NT = { - modules: { - BOOTSTRAP: require('./Bootstrap.js'), - USER_PROFILE: require('./UserProfile.js'), - BOT_PROFILE: require('./BotProfile.js'), - POST: require('./Post.js'), - QUERY: require('./Query.js'), - QUERY_USER_PROFILE_STATS: require('./Queries/UserProfileStats.js'), - QUERY_BOT_PROFILE_STATS: require('./Queries/BotProfileStats.js'), - QUERY_PROFILE_POSTS: require('./Queries/ProfilePosts.js'), - QUERY_PROFILE_FOLLOWERS: require('./Queries/ProfileFollowers.js'), - QUERY_PROFILE_FOLLOWING: require('./Queries/ProfileFollowing.js'), - QUERY_POST_REPLIES: require('./Queries/PostReplies.js'), - QUERY_EVENTS: require('./Queries/Events.js') - }, - utilities: { - queriesValidations: require('./Utilities/QueriesValidations.js').newQueriesValidations() - } -} + /* The NT object is accesible everywhere at the Superalgos Network. It provides access to all modules built for this Network. diff --git a/Network/clientsInterface.js b/Network/clientsInterface.js index 482da953f..5fdbf56aa 100644 --- a/Network/clientsInterface.js +++ b/Network/clientsInterface.js @@ -80,7 +80,7 @@ exports.newClientInterface = function newClientInterface() { */ let queryReceived = JSON.parse(queryMessage) - let query = NT.modules.QUERY.newQuery() + let query = NT.modules.queriesQuery.newNetworkModulesQuery() query.initialize(queryReceived) return query.execute() } diff --git a/Network/Bootstrap.js b/Projects/Network/NT/Modules/Bootstrap.js similarity index 100% rename from Network/Bootstrap.js rename to Projects/Network/NT/Modules/Bootstrap.js diff --git a/Network/Queries/BotProfileStats.js b/Projects/Network/NT/Modules/Queries/BotProfileStats.js similarity index 93% rename from Network/Queries/BotProfileStats.js rename to Projects/Network/NT/Modules/Queries/BotProfileStats.js index 9e157202f..87b7b3708 100644 --- a/Network/Queries/BotProfileStats.js +++ b/Projects/Network/NT/Modules/Queries/BotProfileStats.js @@ -1,4 +1,4 @@ -exports.newBotProfileStats = function newBotProfileStats() { +exports.newNetworkModulesQueriesBotProfileStats = function newNetworkModulesQueriesBotProfileStats() { let thisObject = { profile: undefined, diff --git a/Network/Queries/Events.js b/Projects/Network/NT/Modules/Queries/Events.js similarity index 95% rename from Network/Queries/Events.js rename to Projects/Network/NT/Modules/Queries/Events.js index 79fbb6bba..f36a6d121 100644 --- a/Network/Queries/Events.js +++ b/Projects/Network/NT/Modules/Queries/Events.js @@ -1,4 +1,4 @@ -exports.newEvents = function newEvents() { +exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents() { /* This is the query executed to fill the timeline of a certain User or Bot Profile. @@ -217,28 +217,28 @@ exports.newEvents = function newEvents() { } if (emitterUserProfile !== undefined) { - let query = NT.modules.QUERY_USER_PROFILE_STATS.newUserProfileStats() + let query = NT.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() query.initialize({ targetUserProfileId: event.emitterUserProfileId }) eventResponse.emitterUserProfile = query.execute() query.finalize() } if (targetUserProfile !== undefined) { - let query = NT.modules.QUERY_USER_PROFILE_STATS.newUserProfileStats() + let query = NT.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() query.initialize({ targetUserProfileId: event.targetUserProfileId }) eventResponse.targetUserProfile = query.execute() query.finalize() } if (emitterBotProfile !== undefined) { - let query = NT.modules.QUERY_BOT_PROFILE_STATS.newBotProfileStats() + let query = NT.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() query.initialize({ targetUserProfileId: event.emitterUserProfileId, targetBotProfileId: emitterBotProfileId }) eventResponse.emitterBotProfile = query.execute() query.finalize() } if (targetBotProfile !== undefined) { - let query = NT.modules.QUERY_BOT_PROFILE_STATS.newBotProfileStats() + let query = NT.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() query.initialize({ targetUserProfileId: event.targetUserProfileId, targetBotProfileId: targetBotProfileId }) eventResponse.targetBotProfile = query.execute() query.finalize() diff --git a/Network/Queries/PostReplies.js b/Projects/Network/NT/Modules/Queries/PostReplies.js similarity index 96% rename from Network/Queries/PostReplies.js rename to Projects/Network/NT/Modules/Queries/PostReplies.js index a3d0409ae..cb0a36882 100644 --- a/Network/Queries/PostReplies.js +++ b/Projects/Network/NT/Modules/Queries/PostReplies.js @@ -1,4 +1,4 @@ -exports.newPostReplies = function newPostReplies() { +exports.newNetworkModulesQueriesPostReplies = function newNetworkModulesQueriesPostReplies() { /* Each Post regardless if it is authored by a User or Bot Profile, can have replies. This query is designed for Network Clients to diff --git a/Network/Queries/ProfileFollowers.js b/Projects/Network/NT/Modules/Queries/ProfileFollowers.js similarity index 94% rename from Network/Queries/ProfileFollowers.js rename to Projects/Network/NT/Modules/Queries/ProfileFollowers.js index 8acf26762..45c877e46 100644 --- a/Network/Queries/ProfileFollowers.js +++ b/Projects/Network/NT/Modules/Queries/ProfileFollowers.js @@ -1,4 +1,4 @@ -exports.newProfileFollowers = function newProfileFollowers() { +exports.newNetworkModulesQueriesProfileFollowers = function newNetworkModulesQueriesProfileFollowers() { /* This module represents the query that allows a Network Client to know all the User or Bot profiles that are following a certain User or Bot profile. diff --git a/Network/Queries/ProfileFollowing.js b/Projects/Network/NT/Modules/Queries/ProfileFollowing.js similarity index 94% rename from Network/Queries/ProfileFollowing.js rename to Projects/Network/NT/Modules/Queries/ProfileFollowing.js index 9f544b53f..ae0dd7e1c 100644 --- a/Network/Queries/ProfileFollowing.js +++ b/Projects/Network/NT/Modules/Queries/ProfileFollowing.js @@ -1,4 +1,4 @@ -exports.newProfileFollowing = function newProfileFollowing() { +exports.newNetworkModulesQueriesProfileFollowing = function newNetworkModulesQueriesProfileFollowing() { /* This module represents the query that allows a Network Client to know all the User or Bot profiles that are being followed by a certain User or Bot profile. diff --git a/Network/Queries/ProfilePosts.js b/Projects/Network/NT/Modules/Queries/ProfilePosts.js similarity index 95% rename from Network/Queries/ProfilePosts.js rename to Projects/Network/NT/Modules/Queries/ProfilePosts.js index 853451bf8..a20065330 100644 --- a/Network/Queries/ProfilePosts.js +++ b/Projects/Network/NT/Modules/Queries/ProfilePosts.js @@ -1,4 +1,4 @@ -exports.newProfilePosts = function newProfilePosts() { +exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQueriesUserProfileStats() { /* Each User or Bot Profile can have posts. This query is designed for Network Clients to fetch the posts diff --git a/Network/Queries/UserProfileStats.js b/Projects/Network/NT/Modules/Queries/UserProfileStats.js similarity index 93% rename from Network/Queries/UserProfileStats.js rename to Projects/Network/NT/Modules/Queries/UserProfileStats.js index b79deba1e..e093d03e2 100644 --- a/Network/Queries/UserProfileStats.js +++ b/Projects/Network/NT/Modules/Queries/UserProfileStats.js @@ -1,4 +1,4 @@ -exports.newUserProfileStats = function newUserProfileStats() { +exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQueriesUserProfileStats() { let thisObject = { profile: undefined, diff --git a/Network/Query.js b/Projects/Network/NT/Modules/Query.js similarity index 73% rename from Network/Query.js rename to Projects/Network/NT/Modules/Query.js index f69f56841..97fb101a0 100644 --- a/Network/Query.js +++ b/Projects/Network/NT/Modules/Query.js @@ -1,4 +1,4 @@ -exports.newQuery = function newQuery() { +exports.newNetworkModulesQuery = function newNetworkModulesQuery() { /* A Query is a call from a Network Client to a Network Node with the purpose to get @@ -41,49 +41,49 @@ exports.newQuery = function newQuery() { switch (thisObject.queryType) { case QUERY_TYPES.USER_PROFILE_STATS: { - thisObject.query = NT.modules.QUERY_USER_PROFILE_STATS.newUserProfileStats() + thisObject.query = NT.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.BOT_PROFILE_STATS: { - thisObject.query = NT.modules.QUERY_BOT_PROFILE_STATS.newBotProfileStats() + thisObject.query = NT.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_POSTS: { - thisObject.query = NT.modules.QUERY_PROFILE_POSTS.newProfilePosts() + thisObject.query = NT.modules.queriesProfilePosts.newNetworkModulesQueriesProfilePosts() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.POST_REPLIES: { - thisObject.query = NT.modules.QUERY_POST_REPLIES.newPostReplies() + thisObject.query = NT.modules.queriesPostReplies.newNetworkModulesQueriesPostReplies() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_FOLLOWERS: { - thisObject.query = NT.modules.QUERY_PROFILE_FOLLOWERS.newProfileFollowers() + thisObject.query = NT.modules.queriesProfileFollowers.newNetworkModulesQueriesProfileFollowers() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_FOLLOWING: { - thisObject.query = NT.modules.QUERY_PROFILE_FOLLOWING.newProfileFollowing() + thisObject.query = NT.modules.queriesProfileFollowing.newNetworkModulesQueriesProfileFollowing() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.maps.EVENTS: { - thisObject.query = NT.modules.QUERY_EVENTS.newEvents() + thisObject.query = NT.modules.queriesEvents.newNetworkModulesQueriesEvents() query.initialize(queryReceived) query.finalize() break diff --git a/Network/botProfile.js b/Projects/Network/NT/Modules/Social-Graph/BotProfile.js similarity index 100% rename from Network/botProfile.js rename to Projects/Network/NT/Modules/Social-Graph/BotProfile.js diff --git a/Network/post.js b/Projects/Network/NT/Modules/Social-Graph/Post.js similarity index 100% rename from Network/post.js rename to Projects/Network/NT/Modules/Social-Graph/Post.js diff --git a/Network/userProfile.js b/Projects/Network/NT/Modules/Social-Graph/UserProfile.js similarity index 100% rename from Network/userProfile.js rename to Projects/Network/NT/Modules/Social-Graph/UserProfile.js diff --git a/Network/Utilities/QueriesValidations.js b/Projects/Network/NT/Utilities/QueriesValidations.js similarity index 96% rename from Network/Utilities/QueriesValidations.js rename to Projects/Network/NT/Utilities/QueriesValidations.js index 11ac407a7..7441bfaf7 100644 --- a/Network/Utilities/QueriesValidations.js +++ b/Projects/Network/NT/Utilities/QueriesValidations.js @@ -1,4 +1,4 @@ -exports.newQueriesValidations = function newQueriesValidations() { +exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQueriesValidations() { /* This module have a few funcions that are often needed at Queries Modules. */ diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index b9a782d5f..27fe15415 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1287,12 +1287,92 @@ } ], "modules": [ + { + "name": "Bot Profile Stats", + "propertyName": "queriesBotProfileStats", + "functionName": "newNetworkModulesQueriesBotProfileStats", + "fileName": "Queries/BotProfileStats.js" + }, + { + "name": "User Profile Stats", + "propertyName": "queriesUserProfileStats", + "functionName": "newNetworkModulesQueriesUserProfileStats", + "fileName": "Queries/UserProfileStats.js" + }, + { + "name": "Profile Posts", + "propertyName": "queriesProfilePosts", + "functionName": "newNetworkModulesQueriesProfilePosts", + "fileName": "Queries/ProfilePosts.js" + }, + { + "name": "Profile Followers", + "propertyName": "queriesProfileFollowers", + "functionName": "newNetworkModulesQueriesProfileFollowers", + "fileName": "Queries/ProfileFollowers.js" + }, + { + "name": "Profile Following", + "propertyName": "queriesProfileFollowing", + "functionName": "newNetworkModulesQueriesProfileFollowing", + "fileName": "Queries/ProfileFollowing.js" + }, + { + "name": "Post Replies", + "propertyName": "queriesPostReplies", + "functionName": "newNetworkModulesQueriesPostReplies", + "fileName": "Queries/PostReplies.js" + }, + { + "name": "Events", + "propertyName": "queriesEvents", + "functionName": "newNetworkModulesQueriesEvents", + "fileName": "Queries/Events.js" + }, + { + "name": "User Profile", + "propertyName": "socialGraphUserProfile", + "functionName": "newNetworkModulesSocialGraphUserProfile", + "fileName": "Social-Graph/UserProfile.js" + }, + { + "name": "Bot Profile", + "propertyName": "socialGraphBotProfile", + "functionName": "newNetworkModulesSocialGraphBotProfile", + "fileName": "Social-Graph/BotProfile.js" + }, + { + "name": "Post", + "propertyName": "socialGraphPost", + "functionName": "newNetworkModulesSocialGraphPost", + "fileName": "Social-Graph/Post.js" + }, + { + "name": "Bootstrap", + "propertyName": "bootstrap", + "functionName": "newNetworkModulesBootstrap", + "fileName": "Bootstrap.js" + }, + { + "name": "Query", + "propertyName": "Query", + "functionName": "newNetworkModulesQuery", + "fileName": "Query.js" + }, { "name": "Event", "propertyName": "event", "functionName": "newNetworkModulesEvent", "fileName": "Event.js" } + ], + "utilities": [ + { + "name": "Queries Validations", + "propertyName": "queriesValidations", + "functionName": "newNetworkUtilitiesQueriesValidations", + "fileName": "QueriesValidations.js" + } ] } } From 15aab85030ad877a4b54dd54410e5a36a5da62b8 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 14:53:37 +0200 Subject: [PATCH 48/81] Reorganization Complete --- ...SocialGraphNetwokNode.js => NetwokNode.js} | 4 ++-- Projects/Network/NT/Modules/SocialGraph.js | 23 +++++++++++++++++++ Projects/ProjectsSchema.json | 6 +++++ 3 files changed, 31 insertions(+), 2 deletions(-) rename Network/{SocialGraphNetwokNode.js => NetwokNode.js} (91%) create mode 100644 Projects/Network/NT/Modules/SocialGraph.js diff --git a/Network/SocialGraphNetwokNode.js b/Network/NetwokNode.js similarity index 91% rename from Network/SocialGraphNetwokNode.js rename to Network/NetwokNode.js index fc8c55ca1..77127d144 100644 --- a/Network/SocialGraphNetwokNode.js +++ b/Network/NetwokNode.js @@ -33,5 +33,5 @@ let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() MULTI_PROJECT_MODULE.initialize(CL, 'CL') MULTI_PROJECT_MODULE.initialize(SA, 'SA') -let bootstrapProcess = NT.modules.BOOTSTRAP.newBootstrap() -bootstrapProcess.initialize() \ No newline at end of file +let socialGraphService = NT.modules.socialGraph.newSocialGraph() +socialGraphService.initialize() \ No newline at end of file diff --git a/Projects/Network/NT/Modules/SocialGraph.js b/Projects/Network/NT/Modules/SocialGraph.js new file mode 100644 index 000000000..d8d35f8eb --- /dev/null +++ b/Projects/Network/NT/Modules/SocialGraph.js @@ -0,0 +1,23 @@ +exports.newSocialGraph = function newSocialGraph() { + /* + This module represents the Social Graph that + whis node mantains. The Social Graph is one + of the services the Network Node provides. + */ + let thisObject = { + /* Framework Functions */ + initialize: initialize, + finalize: finalize + } + + return thisObject + + function finalize() { + + } + + function initialize() { + let bootstrapProcess = NT.modules.bootstrap.newBootstrap() + bootstrapProcess.initialize() + } +} \ No newline at end of file diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 27fe15415..aaf9a7d65 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1347,6 +1347,12 @@ "functionName": "newNetworkModulesSocialGraphPost", "fileName": "Social-Graph/Post.js" }, + { + "name": "Social Graph", + "propertyName": "socialGraph", + "functionName": "newNetworkModulesSocialGraph", + "fileName": "SocialGraph.js" + }, { "name": "Bootstrap", "propertyName": "bootstrap", From 62726d8faa0d2e7bbf64b7e774020cee34f374ce Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 15:01:06 +0200 Subject: [PATCH 49/81] Ready to Load Plugins --- Network/NetwokNode.js | 14 +++++++------- Projects/Network/NT/Modules/Bootstrap.js | 2 -- Projects/Network/NT/Modules/SocialGraph.js | 10 +++++++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index 77127d144..268078a19 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -1,14 +1,14 @@ /* -The Superalgos Network have 3 types of nodes: +The Superalgos Network offers 3 types of services: - * Social Graph Nodes - * Search Index Nodes - * Private Message Nodes + * Social Graph Service + * Search Index Service + * Private Message Service -This module is the starting point of the Social Graph Network Node. +Users can decide which services to run at their node. + +This module is the starting point of the Network Node. -This type of node is responsible for mantaining the whole Social Graph -or relationships between User and Bot profiles and also between their posts. */ /* diff --git a/Projects/Network/NT/Modules/Bootstrap.js b/Projects/Network/NT/Modules/Bootstrap.js index 14b195158..1bfc06d40 100644 --- a/Projects/Network/NT/Modules/Bootstrap.js +++ b/Projects/Network/NT/Modules/Bootstrap.js @@ -19,6 +19,4 @@ exports.newBootstrap = function newBootstrap() { function initialize() { } - - } \ No newline at end of file diff --git a/Projects/Network/NT/Modules/SocialGraph.js b/Projects/Network/NT/Modules/SocialGraph.js index d8d35f8eb..e9c4c03e5 100644 --- a/Projects/Network/NT/Modules/SocialGraph.js +++ b/Projects/Network/NT/Modules/SocialGraph.js @@ -1,8 +1,12 @@ exports.newSocialGraph = function newSocialGraph() { /* - This module represents the Social Graph that - whis node mantains. The Social Graph is one - of the services the Network Node provides. + This module represents the Social Graph Service that + this deals with the Social Graph this node mantains. + The Social Graph is one of the services the Network Node provides. + + This service is responsible for mantaining the whole Social Graph + or relationships between User and Bot profiles and also between + their posts. */ let thisObject = { /* Framework Functions */ From 1d676e4931552cbd2aef471a30749ac1c0482eda Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Mon, 30 Aug 2021 15:25:42 +0200 Subject: [PATCH 50/81] Voting Program WIP --- .../C/Claim/Claim-Votes/claim-votes.json | 7 +- .../Voting/Voting-Program/voting-program.json | 79 ++++++++++++------- 2 files changed, 54 insertions(+), 32 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Votes/claim-votes.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Votes/claim-votes.json index 0109da33c..c16f62e38 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Votes/claim-votes.json +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Votes/claim-votes.json @@ -1,8 +1,8 @@ { "type": "Claim Votes", "definition": { - "text": "Claim Votes is a generalization referring to either or all of the existing variations (Position Contribution Claim Vote, Feature Contribution Claim Vote, and Asset Contribution Claim Vote nodes) without making such a distinction for being irrelevant in the particular context.", - "updated": 1624781423463 + "text": "In general terms, Claim Votes allows you to support the claims of other users. The term Claim Votes is a generalization referring to either or all of the existing types: Position Claim Vote, Feature Claim Vote, and Asset Claim Vote nodes.", + "updated": 1630329885463 }, "paragraphs": [ { @@ -12,7 +12,8 @@ }, { "style": "Callout", - "text": "Claim Votes is a generalization referring to either or all of the existing variations (Position Contribution Claim Vote, Feature Contribution Claim Vote, and Asset Contribution Claim Vote nodes) without making such a distinction for being irrelevant in the particular context." + "text": "In general terms, Claim Votes allows you to support the claims of other users. The term Claim Votes is a generalization referring to either or all of the existing particular types: Position Claim Vote, Feature Claim Vote, and Asset Claim Vote nodes.", + "updated": 1630329908369 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json b/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json index a49476d14..b809c9610 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json @@ -1,8 +1,8 @@ { "type": "Voting Program", "definition": { - "text": "The Voting Program is the heart and soul of governance, as it is the section of the hierarchy Contributors use to cast various types of votes. The program is designed to incentivize participation. For that reason, voting earns you tokens too!", - "updated": 1624729344266 + "text": "The Voting Program is the heart and soul of governance, as it enables you to cast various types of votes. You may decide what to incentivize, weighing Pools, Assets, Features, and Positions. You may also evaluate contributions and transfer Voting Power to other users.", + "updated": 1630329477687 }, "paragraphs": [ { @@ -11,48 +11,69 @@ "updated": 1624729363885 }, { - "style": "Text", - "text": "At the time of each Distribution Event, your Voting Power — that is, the Token Power you assign to the Voting Program — determines the Direct Proportion of tokens you get from the Voting Program Pool." + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Featuring Tokens Bonus", + "updated": 1630329521827 }, { "style": "Text", - "text": "A top-level Votes Switch node allows spawning several other particular switches. A switch allows channeling Voting Power in a specific direction and a specific proportion." - }, - { - "style": "Text", - "text": "By default, the Votes Switch node passes on an equal amount of Voting Power to its offspring. However, you may override the percentage of Voting Power allocated to each switch below a Votes Switch by using the following parameter in the configuration of the particular switch:" - }, - { - "style": "Json", - "text": "{\n \"percentage\": 50\n}", - "updated": 1624729399791 - }, - { - "style": "Text", - "text": "If you define less than a total of 100% of the Voting Power flowing at any level of the hierarchy, then the remaining Voting Power is distributed evenly across the rest of the offspring at the same level.", - "updated": 1624729413463 - }, - { - "style": "Text", - "text": "There are three categories of votes, each with their corresponding switch that helps organize votes in hierarchical structures:" + "text": "The features in the Voting Program allow you to cast three different broad categories of votes:", + "updated": 1630329757543 }, { "style": "List", - "text": "Claim Votes Switch;" + "text": "Claim Votes include Asset Claim Vote, Feature Claim Vote, and Position Claim Vote nodes." }, { "style": "List", - "text": "Weight Votes Switch;" + "text": "Weight Votes include Pool Weight Vote, Asset Weight Vote, Feature Weight Vote, and Position Weight Vote nodes." }, { "style": "List", - "text": "User Profile Votes Switch", - "updated": 1624735526746 + "text": "User Profile Vote" + }, + { + "style": "Text", + "text": "There is a top-level Votes Switch node that allows spawning several other switches, each associated to the different types of votes described above:" + }, + { + "style": "List", + "text": "Claim Votes Switch", + "updated": 1630329624666 + }, + { + "style": "List", + "text": "Weight Votes Switch" + }, + { + "style": "List", + "text": "User Profile Votes Switch" + }, + { + "style": "Text", + "text": "All of the above switches feature three different functions:" + }, + { + "style": "List", + "text": "They work like organizational devices, so that you may create arbitrary arrangements of votes, spawning more switches and votes." + }, + { + "style": "List", + "text": "They may reference Class types of nodes in Project Definition Hierarchies and map entire structures of those hierarchies." + }, + { + "style": "List", + "text": "They also work like switches, allowing the control of the flow of Voting Power, pretty much like the Token Power Switch, but within the Voting Program. If you need a reminder, read about Token Power Flows." + }, + { + "style": "Text", + "text": "The different types of votes are explained in the page each type of switch node.", + "updated": 1630329669482 }, { "style": "Success", - "text": "Each switch may spawn specialized types of voting nodes, each with the capacity of casting votes towards specific types of nodes on other hierarchies. The Token Rewards and Voting Power Flow page in the Governance Flow topic covers important details of how Votes work. Make sure you read the whole topic!", - "updated": 1624735504965 + "text": "The Token Rewards and Voting Power Flow page in the Governance Flow topic covers important details of how votes work. Make sure you read the whole topic!", + "updated": 1630329713208 }, { "style": "Block", From a52e9aa0a98b42577480b7828a673bcf2fb9fb90 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 16:28:05 +0200 Subject: [PATCH 51/81] Ready for first debug --- Network/NetwokNode.js | 8 +++++ Network/clientsInterface.js | 4 +-- Projects/Network/NT/Modules/Bootstrap.js | 34 +++++++++++++++++++ Projects/Network/NT/Modules/Event.js | 4 +-- .../NT/Modules/Queries/BotProfileStats.js | 4 +-- Projects/Network/NT/Modules/Queries/Events.js | 4 +-- .../NT/Modules/Queries/UserProfileStats.js | 4 +-- .../NT/Modules/Social-Graph/BotProfile.js | 4 +-- .../Network/NT/Modules/Social-Graph/Post.js | 4 +-- .../NT/Modules/Social-Graph/UserProfile.js | 4 +-- .../NT/Utilities/QueriesValidations.js | 2 +- 11 files changed, 59 insertions(+), 17 deletions(-) diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index 268078a19..5f596b8d3 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -21,6 +21,10 @@ The SA object is accesible everywhere at the Superalgos Network. It provides access to all modules built for Superalgos in general. */ global.SA = {} +/* Load Environment Variables */ +let ENVIRONMENT = require('../Environment.js'); +let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment() +global.env = ENVIRONMENT_MODULE /* First thing is to load the project schema file. */ @@ -32,6 +36,10 @@ let MULTI_PROJECT = require('../MultiProject.js'); let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() MULTI_PROJECT_MODULE.initialize(CL, 'CL') MULTI_PROJECT_MODULE.initialize(SA, 'SA') +/* +Node Modules Dependencies +*/ +NT.nodeModules.web3 = require('web3') let socialGraphService = NT.modules.socialGraph.newSocialGraph() socialGraphService.initialize() \ No newline at end of file diff --git a/Network/clientsInterface.js b/Network/clientsInterface.js index 5fdbf56aa..186fb456b 100644 --- a/Network/clientsInterface.js +++ b/Network/clientsInterface.js @@ -45,13 +45,13 @@ exports.newClientInterface = function newClientInterface() { */ let eventReceived = JSON.parse(eventMessage) - if (NT.globals.memory.EVENTS.get(eventReceived.eventId) !== undefined) { + if (NT.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { throw ('Event Already Exists.') } let event = NT.modules.event.newNetworkModulesEvent() event.initialize(eventReceived) - NT.globals.memory.EVENTS.set(eventReceived.eventId, event) + NT.globals.memory.maps.EVENTS.set(eventReceived.eventId, event) } function queryReceived(queryMessage) { diff --git a/Projects/Network/NT/Modules/Bootstrap.js b/Projects/Network/NT/Modules/Bootstrap.js index 1bfc06d40..a0399fe33 100644 --- a/Projects/Network/NT/Modules/Bootstrap.js +++ b/Projects/Network/NT/Modules/Bootstrap.js @@ -17,6 +17,40 @@ exports.newBootstrap = function newBootstrap() { } function initialize() { + + let pluginFileNames = await SA.projects.foundations.utilities.plugins.getPluginFileNames( + 'Governance', + 'User-Profiles' + ) + for (let i = 0; i < pluginFileNames.length; i++) { + let pluginFileName = pluginFileNames[i] + let pluginFileContent = await SA.projects.foundations.utilities.plugins.getPluginFileContent( + 'Governance', + 'User-Profiles', + pluginFileName + ) + + let userProfilePlugin = JSON.parse(pluginFileContent) + let config = JSON.parse(userProfilePlugin.config) + let signatureObject = JSON.parse(config.signature) + let web3 = new NT.nodeModules.web3() + let bloackchainAddress = 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 = NT.modules.socialGraphUserProfile.newNetworkModulesSocialGraphUserProfile() + userProfile.initialize( + userProfileId, + userHandle, + bloackchainAddress, + ranking + ) + + NT.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile) + NT.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile) + + } } } \ No newline at end of file diff --git a/Projects/Network/NT/Modules/Event.js b/Projects/Network/NT/Modules/Event.js index a7feafb07..d4dfd4614 100644 --- a/Projects/Network/NT/Modules/Event.js +++ b/Projects/Network/NT/Modules/Event.js @@ -104,7 +104,7 @@ exports.newNetworkModulesEvent = function newNetworkModulesEvent() { if (emitterUserProfileId === undefined) { throw ('Emitter User Profile Id Not Provided.') } - emitterUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) + emitterUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) if (emitterUserProfile === undefined) { throw ('Emitter User Profile Not Found.') } @@ -112,7 +112,7 @@ exports.newNetworkModulesEvent = function newNetworkModulesEvent() { Validate Target User Profile. */ if (thisObject.targetUserProfileId !== undefined) { - targetUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + targetUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } diff --git a/Projects/Network/NT/Modules/Queries/BotProfileStats.js b/Projects/Network/NT/Modules/Queries/BotProfileStats.js index 87b7b3708..81c09c2f0 100644 --- a/Projects/Network/NT/Modules/Queries/BotProfileStats.js +++ b/Projects/Network/NT/Modules/Queries/BotProfileStats.js @@ -19,9 +19,9 @@ exports.newNetworkModulesQueriesBotProfileStats = function newNetworkModulesQuer */ let userProfile if (queryReceived.targetUserProfileId !== undefined) { - userProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + userProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - userProfile = NT.globals.memory.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + userProfile = NT.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (userProfile === undefined) { diff --git a/Projects/Network/NT/Modules/Queries/Events.js b/Projects/Network/NT/Modules/Queries/Events.js index f36a6d121..49abb1779 100644 --- a/Projects/Network/NT/Modules/Queries/Events.js +++ b/Projects/Network/NT/Modules/Queries/Events.js @@ -59,8 +59,8 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents Any of the above happening, means that indeed it is related. */ - let emitterUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) - let targetUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) + let emitterUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) + let targetUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) let emitterBotProfile = emitterUserProfile.bots.get(eventReceived.emitterBotProfileId) let targetBotProfile = targetUserProfile.bots.get(eventReceived.targetBotProfileId) let emitterPost = emitterUserProfile.posts.get(eventReceived.emitterPostHash) diff --git a/Projects/Network/NT/Modules/Queries/UserProfileStats.js b/Projects/Network/NT/Modules/Queries/UserProfileStats.js index e093d03e2..dbae46ca1 100644 --- a/Projects/Network/NT/Modules/Queries/UserProfileStats.js +++ b/Projects/Network/NT/Modules/Queries/UserProfileStats.js @@ -18,9 +18,9 @@ exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQue Validate User Profile */ if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.globals.memory.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + thisObject.profile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - thisObject.profile = NT.globals.memory.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + thisObject.profile = NT.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (thisObject.profile === undefined) { diff --git a/Projects/Network/NT/Modules/Social-Graph/BotProfile.js b/Projects/Network/NT/Modules/Social-Graph/BotProfile.js index e7ce60b41..7718c9942 100644 --- a/Projects/Network/NT/Modules/Social-Graph/BotProfile.js +++ b/Projects/Network/NT/Modules/Social-Graph/BotProfile.js @@ -1,4 +1,4 @@ -exports.newBotProfile = function newBotProfile() { +exports.newNetworkModulesSocialGraphBotProfile = function newNetworkModulesSocialGraphBotProfile() { /* Users can have a Profile that can: * follow other bots profiles. @@ -80,7 +80,7 @@ exports.newBotProfile = function newBotProfile() { if (thisObject.posts.get(emitterPostHash) !== undefined) { throw ('Post Already Exists.') } else { - let post = NT.modules.POST.newPost() + let post = NT.modules.socialGraphPost.newNetworkModulesSocialGraphPost() post.initialize( emitterUserProfileId, targetUserProfileId, diff --git a/Projects/Network/NT/Modules/Social-Graph/Post.js b/Projects/Network/NT/Modules/Social-Graph/Post.js index 985bdd4a9..c34f006b3 100644 --- a/Projects/Network/NT/Modules/Social-Graph/Post.js +++ b/Projects/Network/NT/Modules/Social-Graph/Post.js @@ -1,4 +1,4 @@ -exports.newPost = function newPost() { +exports.newNetworkModulesSocialGraphPost = function newNetworkModulesSocialGraphPost() { /* Posts represent a collection of multimedia content sotored somewhere else and identified by that content hash. Posts might belong to: @@ -97,7 +97,7 @@ exports.newPost = function newPost() { /* Validate Target User Profile. */ - let targetUserProfile = NT.globals.memory.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + let targetUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } diff --git a/Projects/Network/NT/Modules/Social-Graph/UserProfile.js b/Projects/Network/NT/Modules/Social-Graph/UserProfile.js index 0144038cd..a4f86dfc0 100644 --- a/Projects/Network/NT/Modules/Social-Graph/UserProfile.js +++ b/Projects/Network/NT/Modules/Social-Graph/UserProfile.js @@ -1,4 +1,4 @@ -exports.newUserProfile = function newUserProfile() { +exports.newNetworkModulesSocialGraphUserProfile = function newNetworkModulesSocialGraphUserProfile() { /* Users can have a Profile that can: * follow other user profiles. @@ -84,7 +84,7 @@ exports.newUserProfile = function newUserProfile() { if (thisObject.posts.get(emitterPostHash) !== undefined) { throw ('Post Already Exists.') } else { - let post = NT.modules.POST.newPost() + let post = NT.modules.socialGraphPost.newNetworkModulesSocialGraphPost() post.initialize( emitterUserProfileId, targetUserProfileId, diff --git a/Projects/Network/NT/Utilities/QueriesValidations.js b/Projects/Network/NT/Utilities/QueriesValidations.js index 7441bfaf7..c88d7e891 100644 --- a/Projects/Network/NT/Utilities/QueriesValidations.js +++ b/Projects/Network/NT/Utilities/QueriesValidations.js @@ -15,7 +15,7 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer Validate User Profile */ if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.globals.memory.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + thisObject.profile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } if (thisObject.profile === undefined) { From 0bed570595322f735ea6af907fb76e1456f25e69 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 17:13:48 +0200 Subject: [PATCH 52/81] Superalgos Network: Users Profiles loaded into Memory --- Client/client.js | 2 +- EnvironmentForDebug.js | 22 + MultiProject.js | 1 + Network/NetwokNode.js | 20 +- Network/clientsInterface.js | 8 +- .../Foundations/CL/Utilities/WebAccess.js | 2 +- Projects/Foundations/SA/Utilities/Plugins.js | 4 +- Projects/Network/NT/Modules/Bootstrap.js | 17 +- Projects/Network/NT/Modules/Event.js | 4 +- .../NT/Modules/Queries/BotProfileStats.js | 4 +- Projects/Network/NT/Modules/Queries/Events.js | 16 +- .../Network/NT/Modules/Queries/PostReplies.js | 4 +- .../NT/Modules/Queries/ProfileFollowers.js | 4 +- .../NT/Modules/Queries/ProfileFollowing.js | 4 +- .../NT/Modules/Queries/ProfilePosts.js | 4 +- .../NT/Modules/Queries/UserProfileStats.js | 4 +- Projects/Network/NT/Modules/Query.js | 14 +- .../NT/Modules/Social-Graph/BotProfile.js | 2 +- .../Network/NT/Modules/Social-Graph/Post.js | 2 +- .../NT/Modules/Social-Graph/UserProfile.js | 4 +- Projects/Network/NT/Modules/SocialGraph.js | 6 +- .../NT/Utilities/QueriesValidations.js | 12 +- package-lock.json | 3014 ++++++++++++++++- package.json | 7 +- 24 files changed, 3113 insertions(+), 68 deletions(-) create mode 100644 EnvironmentForDebug.js diff --git a/Client/client.js b/Client/client.js index f634a4dbc..d44a7aa2b 100644 --- a/Client/client.js +++ b/Client/client.js @@ -95,7 +95,7 @@ try { /* Setting up external dependencies. */ - CL.nodeModules = { + SA.nodeModules = { fs: require('fs'), nodeFetch: require('node-fetch') } diff --git a/EnvironmentForDebug.js b/EnvironmentForDebug.js new file mode 100644 index 000000000..3d1094e83 --- /dev/null +++ b/EnvironmentForDebug.js @@ -0,0 +1,22 @@ +exports.newEnvironment = function () { + + let thisObject = { + WEB_SERVER_URL: 'localhost', + WEB_SOCKETS_INTERFACE_PORT: 18041, + HTTP_INTERFACE_PORT: 34248, + PATH_TO_TASK_SERVER: '../TaskServer', + PATH_TO_DATA_STORAGE: '../Data-Storage', + PATH_TO_PROJECTS: '../Projects', + PATH_TO_LOG_FILES: '../Log-Files', + PATH_TO_PROJECTS_REQUIRED: './Projects', + PATH_TO_PROJECT_SCHEMA: '../Projects/ProjectsSchema.json', + PATH_TO_UI: '../UI', + PATH_TO_DATA_FILES: '../UI/Data-Files/src', + PATH_TO_CLIENT: '../Client/', + PATH_TO_DEFAULT_WORKSPACE: '../Projects/Foundations/Plugins/Workspaces', + PATH_TO_MY_WORKSPACES: '../My-Workspaces', + PATH_TO_FONTS: '../Client/WebServer/Fonts' + } + + return thisObject +} \ No newline at end of file diff --git a/MultiProject.js b/MultiProject.js index 0bbe713cd..47506b2cc 100644 --- a/MultiProject.js +++ b/MultiProject.js @@ -21,6 +21,7 @@ exports.newMultiProject = function () { projectInstance.utilities = {} projectInstance.globals = {} projectInstance.functionLibraries = {} + projectInstance.modules = {} projectInstance.taskModules = {} projectInstance.processModules = {} projectInstance.botModules = {} diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index 5f596b8d3..73520d046 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -22,7 +22,7 @@ It provides access to all modules built for Superalgos in general. */ global.SA = {} /* Load Environment Variables */ -let ENVIRONMENT = require('../Environment.js'); +let ENVIRONMENT = require('../EnvironmentForDebug.js'); let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment() global.env = ENVIRONMENT_MODULE /* @@ -34,12 +34,20 @@ Setting up the modules that will be available for the Servers Running inside thi */ let MULTI_PROJECT = require('../MultiProject.js'); let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() -MULTI_PROJECT_MODULE.initialize(CL, 'CL') +MULTI_PROJECT_MODULE.initialize(NT, 'NT') MULTI_PROJECT_MODULE.initialize(SA, 'SA') /* -Node Modules Dependencies +Setting up external dependencies. */ -NT.nodeModules.web3 = require('web3') +SA.nodeModules = { + fs: require('fs'), + nodeFetch: require('node-fetch'), + web3: require('web3') +} -let socialGraphService = NT.modules.socialGraph.newSocialGraph() -socialGraphService.initialize() \ No newline at end of file +start() + +async function start() { + let socialGraphService = NT.projects.network.modules.socialGraph.newSocialGraph() + await socialGraphService.initialize() +} diff --git a/Network/clientsInterface.js b/Network/clientsInterface.js index 186fb456b..2e48e99a4 100644 --- a/Network/clientsInterface.js +++ b/Network/clientsInterface.js @@ -45,13 +45,13 @@ exports.newClientInterface = function newClientInterface() { */ let eventReceived = JSON.parse(eventMessage) - if (NT.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { + if (NT.projects.network.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { throw ('Event Already Exists.') } - let event = NT.modules.event.newNetworkModulesEvent() + let event = NT.projects.network.modules.event.newNetworkModulesEvent() event.initialize(eventReceived) - NT.globals.memory.maps.EVENTS.set(eventReceived.eventId, event) + NT.projects.network.globals.memory.maps.EVENTS.set(eventReceived.eventId, event) } function queryReceived(queryMessage) { @@ -80,7 +80,7 @@ exports.newClientInterface = function newClientInterface() { */ let queryReceived = JSON.parse(queryMessage) - let query = NT.modules.queriesQuery.newNetworkModulesQuery() + let query = NT.projects.network.modules.queriesQuery.newNetworkModulesQuery() query.initialize(queryReceived) return query.execute() } diff --git a/Projects/Foundations/CL/Utilities/WebAccess.js b/Projects/Foundations/CL/Utilities/WebAccess.js index 9e3879cc3..e4ae0091c 100644 --- a/Projects/Foundations/CL/Utilities/WebAccess.js +++ b/Projects/Foundations/CL/Utilities/WebAccess.js @@ -9,7 +9,7 @@ exports.newFoundationsUtilitiesWebAccess = function () { async function fetchAPIDataFile(url) { let promise = new Promise((resolve, reject) => { - const fetch = CL.nodeModules.nodeFetch + const fetch = SA.nodeModules.nodeFetch /* This is how we call the API. */ diff --git a/Projects/Foundations/SA/Utilities/Plugins.js b/Projects/Foundations/SA/Utilities/Plugins.js index bc149c038..7998febf6 100644 --- a/Projects/Foundations/SA/Utilities/Plugins.js +++ b/Projects/Foundations/SA/Utilities/Plugins.js @@ -12,7 +12,7 @@ exports.newFoundationsUtilitiesPlugins = function () { let path = global.env.PATH_TO_PROJECTS + '/' + project + '/Plugins/' + folder - CL.nodeModules.fs.readdir(path, (err, files) => { + SA.nodeModules.fs.readdir(path, (err, files) => { if (err) { reject() return @@ -33,7 +33,7 @@ exports.newFoundationsUtilitiesPlugins = function () { let path = global.env.PATH_TO_PROJECTS + '/' + project + '/Plugins/' + folder + '/' + fileName - CL.nodeModules.fs.readFile(path, onFileRead) + SA.nodeModules.fs.readFile(path, onFileRead) function onFileRead(err, file) { if (err) { diff --git a/Projects/Network/NT/Modules/Bootstrap.js b/Projects/Network/NT/Modules/Bootstrap.js index a0399fe33..b840e3575 100644 --- a/Projects/Network/NT/Modules/Bootstrap.js +++ b/Projects/Network/NT/Modules/Bootstrap.js @@ -16,12 +16,13 @@ exports.newBootstrap = function newBootstrap() { } - function initialize() { - - let pluginFileNames = await SA.projects.foundations.utilities.plugins.getPluginFileNames( + async function initialize() { + + let pluginFileNames = await SA.projects.foundations.utilities.plugins.getPluginFileNames( 'Governance', 'User-Profiles' ) + for (let i = 0; i < pluginFileNames.length; i++) { let pluginFileName = pluginFileNames[i] @@ -33,14 +34,14 @@ exports.newBootstrap = function newBootstrap() { let userProfilePlugin = JSON.parse(pluginFileContent) let config = JSON.parse(userProfilePlugin.config) - let signatureObject = JSON.parse(config.signature) - let web3 = new NT.nodeModules.web3() + let signatureObject = config.signature + let web3 = new SA.nodeModules.web3() let bloackchainAddress = 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 = NT.modules.socialGraphUserProfile.newNetworkModulesSocialGraphUserProfile() + let userProfile = NT.projects.network.modules.socialGraphUserProfile.newNetworkModulesSocialGraphUserProfile() userProfile.initialize( userProfileId, userHandle, @@ -48,8 +49,8 @@ exports.newBootstrap = function newBootstrap() { ranking ) - NT.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile) - NT.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile) + NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile) + NT.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile) } } diff --git a/Projects/Network/NT/Modules/Event.js b/Projects/Network/NT/Modules/Event.js index d4dfd4614..adbc87424 100644 --- a/Projects/Network/NT/Modules/Event.js +++ b/Projects/Network/NT/Modules/Event.js @@ -104,7 +104,7 @@ exports.newNetworkModulesEvent = function newNetworkModulesEvent() { if (emitterUserProfileId === undefined) { throw ('Emitter User Profile Id Not Provided.') } - emitterUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) + emitterUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) if (emitterUserProfile === undefined) { throw ('Emitter User Profile Not Found.') } @@ -112,7 +112,7 @@ exports.newNetworkModulesEvent = function newNetworkModulesEvent() { Validate Target User Profile. */ if (thisObject.targetUserProfileId !== undefined) { - targetUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + targetUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } diff --git a/Projects/Network/NT/Modules/Queries/BotProfileStats.js b/Projects/Network/NT/Modules/Queries/BotProfileStats.js index 81c09c2f0..9afa338e8 100644 --- a/Projects/Network/NT/Modules/Queries/BotProfileStats.js +++ b/Projects/Network/NT/Modules/Queries/BotProfileStats.js @@ -19,9 +19,9 @@ exports.newNetworkModulesQueriesBotProfileStats = function newNetworkModulesQuer */ let userProfile if (queryReceived.targetUserProfileId !== undefined) { - userProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + userProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - userProfile = NT.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + userProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (userProfile === undefined) { diff --git a/Projects/Network/NT/Modules/Queries/Events.js b/Projects/Network/NT/Modules/Queries/Events.js index 49abb1779..7e1b401c9 100644 --- a/Projects/Network/NT/Modules/Queries/Events.js +++ b/Projects/Network/NT/Modules/Queries/Events.js @@ -29,7 +29,7 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents function execute() { let response = [] switch (thisObject.direction) { - case NT.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let event = NT.memory.arrays.EVENTS[i] if (event === undefined) { break } @@ -37,7 +37,7 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents } break } - case NT.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let event = NT.memory.arrays.EVENTS[i] if (event === undefined) { break } @@ -59,8 +59,8 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents Any of the above happening, means that indeed it is related. */ - let emitterUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) - let targetUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) + let emitterUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) + let targetUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) let emitterBotProfile = emitterUserProfile.bots.get(eventReceived.emitterBotProfileId) let targetBotProfile = targetUserProfile.bots.get(eventReceived.targetBotProfileId) let emitterPost = emitterUserProfile.posts.get(eventReceived.emitterPostHash) @@ -217,28 +217,28 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents } if (emitterUserProfile !== undefined) { - let query = NT.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() + let query = NT.projects.network.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() query.initialize({ targetUserProfileId: event.emitterUserProfileId }) eventResponse.emitterUserProfile = query.execute() query.finalize() } if (targetUserProfile !== undefined) { - let query = NT.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() + let query = NT.projects.network.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() query.initialize({ targetUserProfileId: event.targetUserProfileId }) eventResponse.targetUserProfile = query.execute() query.finalize() } if (emitterBotProfile !== undefined) { - let query = NT.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() + let query = NT.projects.network.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() query.initialize({ targetUserProfileId: event.emitterUserProfileId, targetBotProfileId: emitterBotProfileId }) eventResponse.emitterBotProfile = query.execute() query.finalize() } if (targetBotProfile !== undefined) { - let query = NT.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() + let query = NT.projects.network.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() query.initialize({ targetUserProfileId: event.targetUserProfileId, targetBotProfileId: targetBotProfileId }) eventResponse.targetBotProfile = query.execute() query.finalize() diff --git a/Projects/Network/NT/Modules/Queries/PostReplies.js b/Projects/Network/NT/Modules/Queries/PostReplies.js index cb0a36882..4d7400049 100644 --- a/Projects/Network/NT/Modules/Queries/PostReplies.js +++ b/Projects/Network/NT/Modules/Queries/PostReplies.js @@ -39,7 +39,7 @@ exports.newNetworkModulesQueriesPostReplies = function newNetworkModulesQueriesP let array = Array.from(thisObject.post.replies) switch (thisObject.direction) { - case NT.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (post === undefined) { break } @@ -47,7 +47,7 @@ exports.newNetworkModulesQueriesPostReplies = function newNetworkModulesQueriesP } break } - case NT.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (post === undefined) { break } diff --git a/Projects/Network/NT/Modules/Queries/ProfileFollowers.js b/Projects/Network/NT/Modules/Queries/ProfileFollowers.js index 45c877e46..929074103 100644 --- a/Projects/Network/NT/Modules/Queries/ProfileFollowers.js +++ b/Projects/Network/NT/Modules/Queries/ProfileFollowers.js @@ -32,7 +32,7 @@ exports.newNetworkModulesQueriesProfileFollowers = function newNetworkModulesQue let array = Array.from(thisObject.profile.followers) switch (thisObject.direction) { - case NT.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -40,7 +40,7 @@ exports.newNetworkModulesQueriesProfileFollowers = function newNetworkModulesQue } break } - case NT.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Projects/Network/NT/Modules/Queries/ProfileFollowing.js b/Projects/Network/NT/Modules/Queries/ProfileFollowing.js index ae0dd7e1c..19d600d5d 100644 --- a/Projects/Network/NT/Modules/Queries/ProfileFollowing.js +++ b/Projects/Network/NT/Modules/Queries/ProfileFollowing.js @@ -32,7 +32,7 @@ exports.newNetworkModulesQueriesProfileFollowing = function newNetworkModulesQue let array = Array.from(thisObject.profile.following) switch (thisObject.direction) { - case NT.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -40,7 +40,7 @@ exports.newNetworkModulesQueriesProfileFollowing = function newNetworkModulesQue } break } - case NT.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Projects/Network/NT/Modules/Queries/ProfilePosts.js b/Projects/Network/NT/Modules/Queries/ProfilePosts.js index a20065330..07803098c 100644 --- a/Projects/Network/NT/Modules/Queries/ProfilePosts.js +++ b/Projects/Network/NT/Modules/Queries/ProfilePosts.js @@ -35,7 +35,7 @@ exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQue let array = Array.from(thisObject.profile.posts) switch (thisObject.direction) { - case NT.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -43,7 +43,7 @@ exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQue } break } - case NT.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Projects/Network/NT/Modules/Queries/UserProfileStats.js b/Projects/Network/NT/Modules/Queries/UserProfileStats.js index dbae46ca1..0c56e93e4 100644 --- a/Projects/Network/NT/Modules/Queries/UserProfileStats.js +++ b/Projects/Network/NT/Modules/Queries/UserProfileStats.js @@ -18,9 +18,9 @@ exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQue Validate User Profile */ if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + thisObject.profile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - thisObject.profile = NT.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + thisObject.profile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (thisObject.profile === undefined) { diff --git a/Projects/Network/NT/Modules/Query.js b/Projects/Network/NT/Modules/Query.js index 97fb101a0..aa0022a4c 100644 --- a/Projects/Network/NT/Modules/Query.js +++ b/Projects/Network/NT/Modules/Query.js @@ -41,49 +41,49 @@ exports.newNetworkModulesQuery = function newNetworkModulesQuery() { switch (thisObject.queryType) { case QUERY_TYPES.USER_PROFILE_STATS: { - thisObject.query = NT.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() + thisObject.query = NT.projects.network.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.BOT_PROFILE_STATS: { - thisObject.query = NT.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() + thisObject.query = NT.projects.network.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_POSTS: { - thisObject.query = NT.modules.queriesProfilePosts.newNetworkModulesQueriesProfilePosts() + thisObject.query = NT.projects.network.modules.queriesProfilePosts.newNetworkModulesQueriesProfilePosts() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.POST_REPLIES: { - thisObject.query = NT.modules.queriesPostReplies.newNetworkModulesQueriesPostReplies() + thisObject.query = NT.projects.network.modules.queriesPostReplies.newNetworkModulesQueriesPostReplies() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_FOLLOWERS: { - thisObject.query = NT.modules.queriesProfileFollowers.newNetworkModulesQueriesProfileFollowers() + thisObject.query = NT.projects.network.modules.queriesProfileFollowers.newNetworkModulesQueriesProfileFollowers() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_FOLLOWING: { - thisObject.query = NT.modules.queriesProfileFollowing.newNetworkModulesQueriesProfileFollowing() + thisObject.query = NT.projects.network.modules.queriesProfileFollowing.newNetworkModulesQueriesProfileFollowing() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.maps.EVENTS: { - thisObject.query = NT.modules.queriesEvents.newNetworkModulesQueriesEvents() + thisObject.query = NT.projects.network.modules.queriesEvents.newNetworkModulesQueriesEvents() query.initialize(queryReceived) query.finalize() break diff --git a/Projects/Network/NT/Modules/Social-Graph/BotProfile.js b/Projects/Network/NT/Modules/Social-Graph/BotProfile.js index 7718c9942..d860958df 100644 --- a/Projects/Network/NT/Modules/Social-Graph/BotProfile.js +++ b/Projects/Network/NT/Modules/Social-Graph/BotProfile.js @@ -80,7 +80,7 @@ exports.newNetworkModulesSocialGraphBotProfile = function newNetworkModulesSocia if (thisObject.posts.get(emitterPostHash) !== undefined) { throw ('Post Already Exists.') } else { - let post = NT.modules.socialGraphPost.newNetworkModulesSocialGraphPost() + let post = NT.projects.network.modules.socialGraphPost.newNetworkModulesSocialGraphPost() post.initialize( emitterUserProfileId, targetUserProfileId, diff --git a/Projects/Network/NT/Modules/Social-Graph/Post.js b/Projects/Network/NT/Modules/Social-Graph/Post.js index c34f006b3..36e3541d3 100644 --- a/Projects/Network/NT/Modules/Social-Graph/Post.js +++ b/Projects/Network/NT/Modules/Social-Graph/Post.js @@ -97,7 +97,7 @@ exports.newNetworkModulesSocialGraphPost = function newNetworkModulesSocialGraph /* Validate Target User Profile. */ - let targetUserProfile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + let targetUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } diff --git a/Projects/Network/NT/Modules/Social-Graph/UserProfile.js b/Projects/Network/NT/Modules/Social-Graph/UserProfile.js index a4f86dfc0..527b36ef2 100644 --- a/Projects/Network/NT/Modules/Social-Graph/UserProfile.js +++ b/Projects/Network/NT/Modules/Social-Graph/UserProfile.js @@ -84,7 +84,7 @@ exports.newNetworkModulesSocialGraphUserProfile = function newNetworkModulesSoci if (thisObject.posts.get(emitterPostHash) !== undefined) { throw ('Post Already Exists.') } else { - let post = NT.modules.socialGraphPost.newNetworkModulesSocialGraphPost() + let post = NT.projects.network.modules.socialGraphPost.newNetworkModulesSocialGraphPost() post.initialize( emitterUserProfileId, targetUserProfileId, @@ -159,7 +159,7 @@ exports.newNetworkModulesSocialGraphUserProfile = function newNetworkModulesSoci if (bot !== undefined) { throw ('Bot Already Exists.') } else { - let bot = NT.modules.BOTS.newBot() + let bot = NT.projects.network.modules.BOTS.newBot() bot.initialize( userProfileId, botProfileId, diff --git a/Projects/Network/NT/Modules/SocialGraph.js b/Projects/Network/NT/Modules/SocialGraph.js index e9c4c03e5..0d475d950 100644 --- a/Projects/Network/NT/Modules/SocialGraph.js +++ b/Projects/Network/NT/Modules/SocialGraph.js @@ -20,8 +20,8 @@ exports.newSocialGraph = function newSocialGraph() { } - function initialize() { - let bootstrapProcess = NT.modules.bootstrap.newBootstrap() - bootstrapProcess.initialize() + async function initialize() { + let bootstrapProcess = NT.projects.network.modules.bootstrap.newBootstrap() + await bootstrapProcess.initialize() } } \ No newline at end of file diff --git a/Projects/Network/NT/Utilities/QueriesValidations.js b/Projects/Network/NT/Utilities/QueriesValidations.js index c88d7e891..d98b58e4a 100644 --- a/Projects/Network/NT/Utilities/QueriesValidations.js +++ b/Projects/Network/NT/Utilities/QueriesValidations.js @@ -15,7 +15,7 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer Validate User Profile */ if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + thisObject.profile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } if (thisObject.profile === undefined) { @@ -51,11 +51,11 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer throw ('Initial Index Undefined.') } - if (queryReceived.initialIndex === NT.globals.queryConstants.INITIAL_INDEX_LAST) { + if (queryReceived.initialIndex === NT.projects.network.globals.queryConstants.INITIAL_INDEX_LAST) { queryReceived.initialIndex = thisObject.profile.posts.length - 1 } - if (queryReceived.initialIndex === NT.globals.queryConstants.INITIAL_INDEX_FIRST) { + if (queryReceived.initialIndex === NT.projects.network.globals.queryConstants.INITIAL_INDEX_FIRST) { queryReceived.initialIndex = 0 } @@ -75,11 +75,11 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer throw ('Amount Requested Is Not a Number.') } - if (queryReceived.amountRequested < NT.globals.queryConstants.MIN_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested < NT.projects.network.globals.queryConstants.MIN_AMOUNT_REQUESTED) { throw ('Amount Requested Below Min.') } - if (queryReceived.amountRequested > NT.globals.queryConstants.MAX_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested > NT.projects.network.globals.queryConstants.MAX_AMOUNT_REQUESTED) { throw ('Amount Requested Above Max.') } /* @@ -89,7 +89,7 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer throw ('Direction Undefined.') } - if (queryReceived.direction !== NT.globals.queryConstants.DIRECTION_FUTURE && queryReceived.direction !== NT.globals.queryConstants.DIRECTION_PAST) { + if (queryReceived.direction !== NT.projects.network.globals.queryConstants.DIRECTION_FUTURE && queryReceived.direction !== NT.projects.network.globals.queryConstants.DIRECTION_PAST) { throw ('Direction Not Supported.') } diff --git a/package-lock.json b/package-lock.json index 9e2d86b73..890365e86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,3014 @@ { - "name": "Superalgos", - "lockfileVersion": 2, "requires": true, - "packages": {} + "lockfileVersion": 1, + "dependencies": { + "@ethereumjs/common": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.4.0.tgz", + "integrity": "sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w==", + "requires": { + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.0" + } + }, + "@ethereumjs/tx": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.0.tgz", + "integrity": "sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA==", + "requires": { + "@ethereumjs/common": "^2.4.0", + "ethereumjs-util": "^7.1.0" + } + }, + "@ethersproject/abi": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + }, + "@ethersproject/abstract-provider": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz", + "integrity": "sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ==", + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/networks": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/web": "^5.4.0" + } + }, + "@ethersproject/abstract-signer": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz", + "integrity": "sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA==", + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0" + } + }, + "@ethersproject/address": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.4.0.tgz", + "integrity": "sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q==", + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/rlp": "^5.4.0" + } + }, + "@ethersproject/base64": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.4.0.tgz", + "integrity": "sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ==", + "requires": { + "@ethersproject/bytes": "^5.4.0" + } + }, + "@ethersproject/bignumber": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.1.tgz", + "integrity": "sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "bn.js": "^4.11.9" + } + }, + "@ethersproject/bytes": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.4.0.tgz", + "integrity": "sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA==", + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/constants": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.4.0.tgz", + "integrity": "sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q==", + "requires": { + "@ethersproject/bignumber": "^5.4.0" + } + }, + "@ethersproject/hash": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.4.0.tgz", + "integrity": "sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA==", + "requires": { + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@ethersproject/keccak256": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.4.0.tgz", + "integrity": "sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "js-sha3": "0.5.7" + }, + "dependencies": { + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + } + } + }, + "@ethersproject/logger": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.4.1.tgz", + "integrity": "sha512-DZ+bRinnYLPw1yAC64oRl0QyVZj43QeHIhVKfD/+YwSz4wsv1pfwb5SOFjz+r710YEWzU6LrhuSjpSO+6PeE4A==" + }, + "@ethersproject/networks": { + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.4.2.tgz", + "integrity": "sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw==", + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/properties": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.4.1.tgz", + "integrity": "sha512-cyCGlF8wWlIZyizsj2PpbJ9I7rIlUAfnHYwy/T90pdkSn/NFTa5YWZx2wTJBe9V7dD65dcrrEMisCRUJiq6n3w==", + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/rlp": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.4.0.tgz", + "integrity": "sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/signing-key": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.4.0.tgz", + "integrity": "sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "@ethersproject/strings": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.4.0.tgz", + "integrity": "sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA==", + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/transactions": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.4.0.tgz", + "integrity": "sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ==", + "requires": { + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/rlp": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0" + } + }, + "@ethersproject/web": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.4.0.tgz", + "integrity": "sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og==", + "requires": { + "@ethersproject/base64": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==" + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "12.20.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.21.tgz", + "integrity": "sha512-Qk7rOvV2A4vNgXNS88vEvbJE1NDFPCQ8AU+pNElrU2bA4yrRDef3fg3SUe+xkwyin3Bpg/Xh5JkNWTlsOcS2tA==" + }, + "@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "requires": { + "@types/node": "*" + } + }, + "@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "requires": { + "@types/node": "*" + } + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "available-typed-arrays": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz", + "integrity": "sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" + }, + "blakejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==" + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + } + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "requires": { + "base-x": "^3.0.2" + } + }, + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "requires": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=" + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "bufferutil": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", + "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + } + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "requires": { + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" + }, + "dependencies": { + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "requires": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + } + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "requires": { + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "crc-32": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", + "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", + "requires": { + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + }, + "dependencies": { + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + } + } + }, + "eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + } + }, + "ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "requires": { + "js-sha3": "^0.8.0" + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "ethereumjs-util": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + }, + "dependencies": { + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + } + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==" + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "ext": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.5.0.tgz", + "integrity": "sha512-+ONcYoWj/SoQwUofMr94aGu05Ou4FepKi7N7b+O8T4jVfyIsZQV1/xeS8jpaBzF0csAk0KLXoHCxU7cKYZjo1Q==", + "requires": { + "type": "^2.5.0" + }, + "dependencies": { + "type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "requires": { + "pump": "^3.0.0" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==" + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + } + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" + }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, + "is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.7.tgz", + "integrity": "sha512-VxlpTBGknhQ3o7YiVjIhdLU6+oD8dPz/79vvvH4F+S/c8608UCVa9fgDpa1kZgFoUST2DCgacc70UszKgzKuvA==", + "requires": { + "available-typed-arrays": "^1.0.4", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "keccak": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz", + "integrity": "sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==", + "requires": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "requires": { + "json-buffer": "3.0.0" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==" + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" + }, + "mime-types": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "requires": { + "mime-db": "1.49.0" + } + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "requires": { + "mkdirp": "*" + } + }, + "mock-fs": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", + "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "requires": { + "varint": "^5.0.0" + } + }, + "multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "requires": { + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + }, + "dependencies": { + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } + } + }, + "nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, + "node-gyp-build": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==" + }, + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==" + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", + "requires": { + "http-https": "^1.0.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "requires": { + "p-finally": "^1.0.0" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-headers": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.4.tgz", + "integrity": "sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw==" + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" + }, + "printj": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + } + } + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "requires": { + "bn.js": "^4.11.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "requires": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "requires": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "swarm-js": { + "version": "0.1.40", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", + "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request": "^1.0.1" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, + "tar": { + "version": "4.4.19", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", + "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", + "requires": { + "chownr": "^1.1.4", + "fs-minipass": "^1.2.7", + "minipass": "^2.9.0", + "minizlib": "^1.3.3", + "mkdirp": "^0.5.5", + "safe-buffer": "^5.2.1", + "yallist": "^3.1.1" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + } + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" + }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==" + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==" + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "requires": { + "prepend-http": "^2.0.0" + } + }, + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=" + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" + }, + "utf-8-validate": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz", + "integrity": "sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ==", + "requires": { + "node-gyp-build": "^4.2.0" + } + }, + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "util": { + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", + "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "web3": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.2.tgz", + "integrity": "sha512-aapKLdO8t7Cos6tZLeeQUtCJvTiPMlLcHsHHDLSBZ/VaJEucSTxzun32M8sp3BmF4waDEmhY+iyUM1BKvtAcVQ==", + "requires": { + "web3-bzz": "1.5.2", + "web3-core": "1.5.2", + "web3-eth": "1.5.2", + "web3-eth-personal": "1.5.2", + "web3-net": "1.5.2", + "web3-shh": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-bzz": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.2.tgz", + "integrity": "sha512-W/sPCdA+XQ9duUYKHAwf/g69cbbV8gTCRsa1MpZwU7spXECiyJ2EvD/QzAZ+UpJk3GELXFF/fUByeZ3VRQKF2g==", + "requires": { + "@types/node": "^12.12.6", + "got": "9.6.0", + "swarm-js": "^0.1.40" + } + }, + "web3-core": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.2.tgz", + "integrity": "sha512-sebMpQbg3kbh3vHUbHrlKGKOxDWqjgt8KatmTBsTAWj/HwWYVDzeX+2Q84+swNYsm2DrTBVFlqTErFUwPBvyaA==", + "requires": { + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-core-requestmanager": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-core-helpers": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.2.tgz", + "integrity": "sha512-U7LJoeUdQ3aY9t5gU7t/1XpcApsWm+4AcW5qKl/44ZxD44w0Dmsq1c5zJm3GuLr/a9MwQfXK4lpmvxVQWHHQRg==", + "requires": { + "web3-eth-iban": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-core-method": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.2.tgz", + "integrity": "sha512-/mC5t9UjjJoQmJJqO5nWK41YHo+tMzFaT7Tp7jDCQsBkinE68KsUJkt0jzygpheW84Zra0DVp6q19gf96+cugg==", + "requires": { + "@ethereumjs/common": "^2.4.0", + "@ethersproject/transactions": "^5.0.0-beta.135", + "web3-core-helpers": "1.5.2", + "web3-core-promievent": "1.5.2", + "web3-core-subscriptions": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-core-promievent": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.2.tgz", + "integrity": "sha512-5DacbJXe98ozSor7JlkTNCy6G8945VunRRkPxMk98rUrg60ECVEM/vuefk1atACzjQsKx6tmLZuHxbJQ64TQeQ==", + "requires": { + "eventemitter3": "4.0.4" + } + }, + "web3-core-requestmanager": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.2.tgz", + "integrity": "sha512-oRVW9OrAsXN2JIZt68OEg1Mb1A9a/L3JAGMv15zLEFEnJEGw0KQsGK1ET2kvZBzvpFd5G0EVkYCnx7WDe4HSNw==", + "requires": { + "util": "^0.12.0", + "web3-core-helpers": "1.5.2", + "web3-providers-http": "1.5.2", + "web3-providers-ipc": "1.5.2", + "web3-providers-ws": "1.5.2" + } + }, + "web3-core-subscriptions": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.2.tgz", + "integrity": "sha512-hapI4rKFk22yurtIv0BYvkraHsM7epA4iI8Np+HuH6P9DD0zj/llaps6TXLM9HyacLBRwmOLZmr+pHBsPopUnQ==", + "requires": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.5.2" + } + }, + "web3-eth": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.2.tgz", + "integrity": "sha512-DwWQ6TCOUqvYyo7T20S7HpQDPveNHNqOn2Q2F3E8ZFyEjmqT4XsGiwvm08kB/VgQ4e/ANyq/i8PPFSYMT8JKHg==", + "requires": { + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-core-subscriptions": "1.5.2", + "web3-eth-abi": "1.5.2", + "web3-eth-accounts": "1.5.2", + "web3-eth-contract": "1.5.2", + "web3-eth-ens": "1.5.2", + "web3-eth-iban": "1.5.2", + "web3-eth-personal": "1.5.2", + "web3-net": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-eth-abi": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.2.tgz", + "integrity": "sha512-P3bJbDR5wib4kWGfVeBKBVi27T+AiHy4EJxYM6SMNbpm3DboLDdisu9YBd6INMs8rzxgnprBbGmmyn4jKIDKAA==", + "requires": { + "@ethersproject/abi": "5.0.7", + "web3-utils": "1.5.2" + } + }, + "web3-eth-accounts": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.2.tgz", + "integrity": "sha512-F8mtzxgEhxfLc66vPi0Gqd6mpscvvk7Ua575bsJ1p9J2X/VtuKgDgpWcU4e4LKeROQ+ouCpAG9//0j9jQuij3A==", + "requires": { + "@ethereumjs/common": "^2.3.0", + "@ethereumjs/tx": "^3.2.1", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.0.10", + "scrypt-js": "^3.0.1", + "uuid": "3.3.2", + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-utils": "1.5.2" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + } + } + }, + "web3-eth-contract": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.2.tgz", + "integrity": "sha512-4B8X/IPFxZCTmtENpdWXtyw5fskf2muyc3Jm5brBQRb4H3lVh1/ZyQy7vOIkdphyaXu4m8hBLHzeyKkd37mOUg==", + "requires": { + "@types/bn.js": "^4.11.5", + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-core-promievent": "1.5.2", + "web3-core-subscriptions": "1.5.2", + "web3-eth-abi": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-eth-ens": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.2.tgz", + "integrity": "sha512-/UrLL42ZOCYge+BpFBdzG8ICugaRS4f6X7PxJKO+zAt+TwNgBpjuWfW/ZYNcuqJun/ZyfcTuj03TXqA1RlNhZQ==", + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-promievent": "1.5.2", + "web3-eth-abi": "1.5.2", + "web3-eth-contract": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-eth-iban": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.2.tgz", + "integrity": "sha512-C04YDXuSG/aDwOHSX+HySBGb0KraiAVt+/l1Mw7y/fCUrKC/K0yYzMYqY/uYOcvLtepBPsC4ZfUYWUBZ2PO8Vg==", + "requires": { + "bn.js": "^4.11.9", + "web3-utils": "1.5.2" + } + }, + "web3-eth-personal": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.2.tgz", + "integrity": "sha512-nH5N2GiVC0C5XeMEKU16PeFP3Hb3hkPvlR6Tf9WQ+pE+jw1c8eaXBO1CJQLr15ikhUF3s94ICyHcfjzkDsmRbA==", + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.5.2", + "web3-core-helpers": "1.5.2", + "web3-core-method": "1.5.2", + "web3-net": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-net": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.2.tgz", + "integrity": "sha512-VEc9c+jfoERhbJIxnx0VPlQDot8Lm4JW/tOWFU+ekHgIiu2zFKj5YxhURIth7RAbsaRsqCb79aE+M0eI8maxVQ==", + "requires": { + "web3-core": "1.5.2", + "web3-core-method": "1.5.2", + "web3-utils": "1.5.2" + } + }, + "web3-providers-http": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.2.tgz", + "integrity": "sha512-dUNFJc9IMYDLZnkoQX3H4ZjvHjGO6VRVCqrBrdh84wPX/0da9dOA7DwIWnG0Gv3n9ybWwu5JHQxK4MNQ444lyA==", + "requires": { + "web3-core-helpers": "1.5.2", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.2.tgz", + "integrity": "sha512-SJC4Sivt4g9LHKlRy7cs1jkJgp7bjrQeUndE6BKs0zNALKguxu6QYnzbmuHCTFW85GfMDjhvi24jyyZHMnBNXQ==", + "requires": { + "oboe": "2.1.5", + "web3-core-helpers": "1.5.2" + } + }, + "web3-providers-ws": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.2.tgz", + "integrity": "sha512-xy9RGlyO8MbJDuKv2vAMDkg+en+OvXG0CGTCM2BTl6l1vIdHpCa+6A/9KV2rK8aU9OBZ7/Pf+Y19517kHVl9RA==", + "requires": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.5.2", + "websocket": "^1.0.32" + } + }, + "web3-shh": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.2.tgz", + "integrity": "sha512-wOxOcYt4Sa0AHAI8gG7RulCwVuVjSRS/M/AbFsea3XfJdN6sU13/syY7OdZNjNYuKjYTzxKYrd3dU/K2iqffVw==", + "requires": { + "web3-core": "1.5.2", + "web3-core-method": "1.5.2", + "web3-core-subscriptions": "1.5.2", + "web3-net": "1.5.2" + } + }, + "web3-utils": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.2.tgz", + "integrity": "sha512-quTtTeQJHYSxAwIBOCGEcQtqdVcFWX6mCFNoqnp+mRbq+Hxbs8CGgO/6oqfBx4OvxIOfCpgJWYVHswRXnbEu9Q==", + "requires": { + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "requires": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-typed-array": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.6.tgz", + "integrity": "sha512-DdY984dGD5sQ7Tf+x1CkXzdg85b9uEel6nr4UkFg1LoE9OXv3uRuZhe5CoWdawhGACeFpEZXH8fFLQnDhbpm/Q==", + "requires": { + "available-typed-arrays": "^1.0.4", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.6" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + }, + "xhr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", + "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", + "requires": { + "global": "~4.4.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "requires": { + "xhr-request": "^1.1.0" + } + }, + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "requires": { + "cookiejar": "^2.1.1" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } + } } diff --git a/package.json b/package.json index 0967ef424..fb7fc1957 100644 --- a/package.json +++ b/package.json @@ -1 +1,6 @@ -{} +{ + "dependencies": { + "node-fetch": "^2.6.1", + "web3": "^1.5.2" + } +} From 02396798b899da87937036272261e01339713166 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Aug 2021 17:19:56 +0200 Subject: [PATCH 53/81] Superalgos Network: DeepScan bug fixes --- Projects/Network/NT/Modules/Queries/Events.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Projects/Network/NT/Modules/Queries/Events.js b/Projects/Network/NT/Modules/Queries/Events.js index 7e1b401c9..9d3c2b25b 100644 --- a/Projects/Network/NT/Modules/Queries/Events.js +++ b/Projects/Network/NT/Modules/Queries/Events.js @@ -60,11 +60,17 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents Any of the above happening, means that indeed it is related. */ let emitterUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) - let targetUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) let emitterBotProfile = emitterUserProfile.bots.get(eventReceived.emitterBotProfileId) - let targetBotProfile = targetUserProfile.bots.get(eventReceived.targetBotProfileId) let emitterPost = emitterUserProfile.posts.get(eventReceived.emitterPostHash) - let targetPost = targetUserProfile.posts.get(eventReceived.targetPostHash) + + let targetUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) + let targetBotProfile + let targetPost + + if (targetUserProfile !== undefined) { + targetBotProfile = targetUserProfile.bots.get(eventReceived.targetBotProfileId) + targetPost = targetUserProfile.posts.get(eventReceived.targetPostHash) + } /* Test #1 : The Emitter or Target profile must be the same as the Context Profile. */ From 6fe27dd72bb07d6e53b7396f482dd0580f8db4ad Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Mon, 30 Aug 2021 21:19:32 +0200 Subject: [PATCH 54/81] Claim Votes section --- .../C/Claim/Claim-Votes/claim-votes.json | 8 ++-- .../reusable-governance-snippets.json | 35 +++++++++++++++- .../W/Weight/Weight-Votes/weight-votes.json | 10 ++++- .../Asset-Claim-Vote/asset-claim-vote.json | 21 ++++++++-- .../asset-contribution-claim.json | 4 +- .../claim-votes-switch.json | 35 ++++++++++++++-- .../feature-claim-vote.json | 21 ++++++++-- .../feature-contribution-claim.json | 4 +- .../position-claim-vote.json | 22 ++++++++-- .../position-contribution-claim.json | 4 +- .../V/Votes/Votes-Switch/votes-switch.json | 2 +- .../Voting/Voting-Program/voting-program.json | 41 ++++++------------- ...2-token-rewards-and-voting-power-flow.json | 10 +++-- 13 files changed, 154 insertions(+), 63 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Votes/claim-votes.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Votes/claim-votes.json index c16f62e38..478f5ee31 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Votes/claim-votes.json +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Votes/claim-votes.json @@ -1,8 +1,8 @@ { "type": "Claim Votes", "definition": { - "text": "In general terms, Claim Votes allows you to support the claims of other users. The term Claim Votes is a generalization referring to either or all of the existing types: Position Claim Vote, Feature Claim Vote, and Asset Claim Vote nodes.", - "updated": 1630329885463 + "text": "In general terms, Claim Votes allow you to support the claims of other users. The term Claim Votes is a generalization referring to either or all of the existing types: Position Claim Vote, Feature Claim Vote, and Asset Claim Vote nodes.", + "updated": 1630343978470 }, "paragraphs": [ { @@ -12,8 +12,8 @@ }, { "style": "Callout", - "text": "In general terms, Claim Votes allows you to support the claims of other users. The term Claim Votes is a generalization referring to either or all of the existing particular types: Position Claim Vote, Feature Claim Vote, and Asset Claim Vote nodes.", - "updated": 1630329908369 + "text": "In general terms, Claim Votes allow you to support the claims of other users. The term Claim Votes is a generalization referring to either or all of the existing particular types: Position Claim Vote, Feature Claim Vote, and Asset Claim Vote nodes.", + "updated": 1630343984130 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json index e96164d23..cf7748392 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json @@ -77,13 +77,46 @@ "text": "Claims Content" }, { - "style": "Success", + "style": "Important", "text": "Make sure you're driving enough Claim Power to the node so that you may get the reward you deserve! And remember to ask the people who know your work to vouch for your claims with their Claim Votes. That is how your contribution gets validated and how you get the associated rewards.", "updated": 1630325171869 }, { "style": "Note", "text": "Learn more about How Claims are Resolved!" + }, + { + "style": "Block", + "text": "Dummy", + "updated": 1630350577178 + }, + { + "style": "Title", + "text": "Claim Votes Content", + "updated": 1630350592141 + }, + { + "style": "Block", + "text": "Claim Votes Content", + "updated": 1630350596729 + }, + { + "style": "Important", + "text": "The Voting Power you drive into Claim Votes nodes is significant, as it is a measure of your support to the claim. The ideal case scenario for the party placing the claim is that the claim gets enough Claim Votes with enough Voting Power to match the Claim Power the claim carries.", + "updated": 1630350695978 + }, + { + "style": "Success", + "text": "You may want to learn more about How Claims are Resolved!" + }, + { + "style": "Block", + "text": "Dummy" + }, + { + "style": "Text", + "text": "Title", + "updated": 1630350617116 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json index bfc6c4e88..9ec0158fe 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json +++ b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json @@ -6,8 +6,14 @@ }, "paragraphs": [ { - "style": "Text", - "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + "style": "Block", + "text": "Content", + "updated": 1630345048703 + }, + { + "style": "Success", + "text": "The Token Rewards and Voting Power Flow page in the Governance Flow topic covers important details of how Weight Votes work. Make sure you read the whole topic!", + "updated": 1630345114908 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claim-Vote/asset-claim-vote.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claim-Vote/asset-claim-vote.json index 9a0b3d4b8..9f0db9f57 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claim-Vote/asset-claim-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claim-Vote/asset-claim-vote.json @@ -1,13 +1,26 @@ { "type": "Asset Claim Vote", "definition": { - "text": "This node is used to pass votes, via a reference, to an Asset Contribution Claim made by a user, in order to support that claim and allow the user making the claim to receive tokens for contributing either with the creation of that an asset or it's mantainance.", - "updated": 1622988917379 + "text": "Use this node to establish a reference with an Asset Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Voting Power you drive into the Claims Vote node!", + "updated": 1630351081241 }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630351012870 + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Claim Votes Content" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Contribution-Claim/asset-contribution-claim.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Contribution-Claim/asset-contribution-claim.json index fd641d3f0..8916e53ad 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Contribution-Claim/asset-contribution-claim.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Contribution-Claim/asset-contribution-claim.json @@ -1,8 +1,8 @@ { "type": "Asset Contribution Claim", "definition": { - "text": "Use this node to reference an Asset node in one of the Assets hierarchy to establish an Asset Contribution Claim.", - "updated": 1630324852856 + "text": "Use this node to reference an Asset node in one of the Assets hierarchy to establish an Asset Contribution Claim. This claim means that you declare that you have worked on that Asset, either creating or improving it, and that you expect to be rewarded accordingly!", + "updated": 1630349414102 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json index 077fadc24..dafa0e6ba 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json @@ -1,8 +1,8 @@ { "type": "Claim Votes Switch", "definition": { - "text": "This type of switch is used to spawn different types of claim vote nodes, and to reference “folder” type of nodes within the Claims Program section of the User Profile hierarchy.", - "updated": 1624729577011 + "text": "Use this switch to spawn different types of Claim Votes, and to reference Claims Folder types of nodes within the Claims Program section of the User Profile hierarchy to map large structures of claims.", + "updated": 1630349853006 }, "paragraphs": [ { @@ -12,11 +12,38 @@ }, { "style": "Text", - "text": "When a Claim Votes Switch references any of the existing “folder” type of nodes (Position Contribution Claims Folder, Feature Contribution Claims Folder, or Asset Contribution Claims Folder), the Install Missing Votes option on the menu becomes usable." + "text": "You may use this switch for three different purposes:", + "updated": 1630345326820 + }, + { + "style": "List", + "text": "As an organizational device: You may create arbitrary arrangements of votes, spawning more switches and votes.", + "updated": 1630345425238 + }, + { + "style": "List", + "text": "As a switch: You may control the flow of Voting Power, pretty much like the Token Power Switch, but within the Voting Program. If you need a reminder, read about how Token Power Flows.", + "updated": 1630345441006 + }, + { + "style": "List", + "text": "As a data-structure mapper: Use the node to reference Claims Folder types of nodes to map entire structures of claims on other User Profile hierarchies.", + "updated": 1630345729468 + }, + { + "style": "Text", + "text": "The first two use cases are self-explanatory. Let's explore the third one in more detail.", + "updated": 1630349876232 + }, + { + "style": "Callout", + "text": "Use a Claim Votes Switch node to establish a reference with a Claims Folder type of node — Position Claims Folder, Feature Claims Folder, or Asset Claims Folder — within the Claims Program section of your colleague's User Profile node. Then use the Install Missing Votes option on the menu of the Claim Votes Switch to map the entire Claims Folder! The process creates a Claim Votes Switch for each Claims Folder, and matching Claim Votes for each Asset Contribution Claim, Feature Contribution Claim, or Position Contribution Claim defined within each folder.", + "updated": 1630349946670 }, { "style": "Success", - "text": "Installing votes allows mapping entire sections of claim definitions so that you may vouch for multiple claims easily." + "text": "If something changes on the side of the definitions, you may always go back a run the Install Missing Votes process again. The process will remap the structure with the appropriate votes and switches.", + "updated": 1630348162382 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claim-Vote/feature-claim-vote.json b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claim-Vote/feature-claim-vote.json index 4594b9d84..4f3154b76 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claim-Vote/feature-claim-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claim-Vote/feature-claim-vote.json @@ -1,13 +1,26 @@ { "type": "Feature Claim Vote", "definition": { - "text": "This node is used to pass votes, via a reference, to a Feature Contribution Claim made by a user, in order to support that claim and allow the user making the claim to receive tokens for contributing either with the creation of that an feature or it's mantainance.", - "updated": 1622988841078 + "text": "Use this node to establish a reference with a Feature Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Voting Power you drive into the Claims Vote node!", + "updated": 1630351095609 }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630351115901 + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Claim Votes Content" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Contribution-Claim/feature-contribution-claim.json b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Contribution-Claim/feature-contribution-claim.json index dac483f88..b478c323c 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Contribution-Claim/feature-contribution-claim.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Contribution-Claim/feature-contribution-claim.json @@ -1,8 +1,8 @@ { "type": "Feature Contribution Claim", "definition": { - "text": "Use this node to reference a Feature node in one of the Features hierarchy to establish a Feature Contribution Claim.", - "updated": 1630325556674 + "text": "Use this node to reference a Feature node in one of the Features hierarchy to establish a Feature Contribution Claim. This claim means that you declare that you have worked on that Feature, either creating or improving it, and that you expect to be rewarded accordingly!", + "updated": 1630349366359 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claim-Vote/position-claim-vote.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claim-Vote/position-claim-vote.json index d1be265d8..efb0f8bec 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claim-Vote/position-claim-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claim-Vote/position-claim-vote.json @@ -1,13 +1,27 @@ { "type": "Position Claim Vote", "definition": { - "text": "This node is used to pass votes, via a reference, to a Position Claim made by a user, in order to support that claim and allow the user making the claim to receive tokens for playing a role at the said position.", - "updated": 1622988653975 + "text": "Use this node to establish a reference with a Position Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Voting Power you drive into the Claims Vote node!", + "updated": 1630350980353 }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630350078214 + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Claim Votes Content", + "updated": 1630350813522 + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Contribution-Claim/position-contribution-claim.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Contribution-Claim/position-contribution-claim.json index 5e8193246..d9f754495 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Contribution-Claim/position-contribution-claim.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Contribution-Claim/position-contribution-claim.json @@ -1,8 +1,8 @@ { "type": "Position Contribution Claim", "definition": { - "text": "Use this node to reference a Position node in one of the Positions hierarchy to establish a Position Contribution Claim.", - "updated": 1630325495738 + "text": "Use this node to reference a Position node in one of the Positions hierarchy to establish a Position Contribution Claim. This claim means that you declare that you have worked on that Position, and that you expect to be rewarded accordingly!", + "updated": 1630349455755 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/V/Votes/Votes-Switch/votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/V/Votes/Votes-Switch/votes-switch.json index 0de582fac..ab0786fd3 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/V/Votes/Votes-Switch/votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/V/Votes/Votes-Switch/votes-switch.json @@ -11,7 +11,7 @@ "updated": 1624729535872 }, { - "style": "Text", + "style": "Important", "text": "This node can not reference “class” or “folder” types of nodes on other hierarchies. It is merely an organizational device." }, { diff --git a/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json b/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json index b809c9610..1d8688cff 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json @@ -17,24 +17,28 @@ }, { "style": "Text", - "text": "The features in the Voting Program allow you to cast three different broad categories of votes:", - "updated": 1630329757543 + "text": "The features in the Voting Program allow you to cast three different categories of votes:", + "updated": 1630344509716 }, { "style": "List", - "text": "Claim Votes include Asset Claim Vote, Feature Claim Vote, and Position Claim Vote nodes." + "text": "Claim Votes: Use Claim Votes to support the claims of other users so that they may get the rewards they deserve for their contributions. There are three types of claim vote nodes, namely Asset Claim Vote, Feature Claim Vote, and Position Claim Vote nodes.", + "updated": 1630344722135 }, { "style": "List", - "text": "Weight Votes include Pool Weight Vote, Asset Weight Vote, Feature Weight Vote, and Position Weight Vote nodes." + "text": "Weight Votes: Use Weight Votes to influence what areas of the project should be incentivized. There are four types of weight votes, namely Pool Weight Vote, Asset Weight Vote, Feature Weight Vote, and Position Weight Vote nodes.", + "updated": 1630344790466 }, { "style": "List", - "text": "User Profile Vote" + "text": "User Profile Votes: Use a User Profile Vote to transfer Voting Power to other users.", + "updated": 1630344853204 }, { "style": "Text", - "text": "There is a top-level Votes Switch node that allows spawning several other switches, each associated to the different types of votes described above:" + "text": "There is a top-level Votes Switch node that allows spawning several other switches, each one associated to the different types of votes described above:", + "updated": 1630343139964 }, { "style": "List", @@ -49,31 +53,10 @@ "style": "List", "text": "User Profile Votes Switch" }, - { - "style": "Text", - "text": "All of the above switches feature three different functions:" - }, - { - "style": "List", - "text": "They work like organizational devices, so that you may create arbitrary arrangements of votes, spawning more switches and votes." - }, - { - "style": "List", - "text": "They may reference Class types of nodes in Project Definition Hierarchies and map entire structures of those hierarchies." - }, - { - "style": "List", - "text": "They also work like switches, allowing the control of the flow of Voting Power, pretty much like the Token Power Switch, but within the Voting Program. If you need a reminder, read about Token Power Flows." - }, - { - "style": "Text", - "text": "The different types of votes are explained in the page each type of switch node.", - "updated": 1630329669482 - }, { "style": "Success", - "text": "The Token Rewards and Voting Power Flow page in the Governance Flow topic covers important details of how votes work. Make sure you read the whole topic!", - "updated": 1630329713208 + "text": "These switches control the flow of Voting Power, may be used as organizational devices, may spawn the different types of votes, and may help you map entire data structures easily. Find the details on the page of each switch!", + "updated": 1630348670996 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-voting-power-flow.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-voting-power-flow.json index 131887d39..5e9d8bb00 100644 --- a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-voting-power-flow.json +++ b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-voting-power-flow.json @@ -23,11 +23,13 @@ }, { "style": "Text", - "text": "This is where Token Rewards intersect with Voting Power, as it is Voting Power that drives Token Rewards." + "text": "This is where Token Rewards intersect with Voting Power, as it is Voting Power that drives Token Rewards through Weight Votes.", + "updated": 1630343425368 }, { "style": "Text", - "text": "Your Token Power flows into the different programs available under your User Profile. The portion of Token Power that flows into your Voting Program turns into Voting Power, which is channeled through different types of switches. You use Weight Vote Switch nodes to turn Voting Power into Weight Votes." + "text": "Your Token Power flows into the different programs available under your User Profile. The portion of Token Power that flows into your Voting Program turns into Voting Power, which is channeled through different types of switches. You use Weight Votes Switch nodes to turn Voting Power into Weight Votes.", + "updated": 1630343456190 }, { "style": "Text", @@ -44,8 +46,8 @@ }, { "style": "Json", - "text": "Weight (of a node) = Node’s Incoming Weight Votes / Sum of Weight Votes in the Hierarchy * 100", - "updated": 1624781181588 + "text": "Weight (of a node) = Node's Incoming Weight Votes / \n Sum of Weight Votes in the Hierarchy * 100", + "updated": 1630343557835 }, { "style": "Note", From f208abe3698d82fb10fc830514dfc51b3df459dc Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Mon, 30 Aug 2021 23:01:13 +0200 Subject: [PATCH 55/81] Weight Votes --- .../claim-support-power.json | 13 +++++++++ .../C/Claims/Claims-Folder/claims-folder.json | 8 +++-- .../contribution-claims.json | 13 +++++++++ .../reusable-governance-snippets.json | 4 +-- .../W/Weight/Weight-Power/weight-power.json | 13 +++++++++ .../W/Weight/Weight-Votes/weight-votes.json | 12 +++++--- .../Asset-Claim-Vote/asset-claim-vote.json | 4 +-- .../asset-claims-folder.json | 4 +-- .../Asset-Weight-Vote/asset-weight-vote.json | 21 +++++++++++--- .../claim-votes-switch.json | 4 +-- .../feature-claim-vote.json | 4 +-- .../feature-claims-folder.json | 4 +-- .../feature-weight-vote.json | 21 +++++++++++--- .../Pool-Weight-Vote/pool-weight-vote.json | 22 +++++++++++--- .../position-claim-vote.json | 4 +-- .../position-claims-folder.json | 4 +-- .../position-weight-vote.json | 21 +++++++++++--- .../Voting/Voting-Program/voting-program.json | 4 +-- .../weight-votes-switch.json | 29 ++++++++++++++++--- 19 files changed, 165 insertions(+), 44 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Support-Power/claim-support-power.json create mode 100644 Projects/Governance/Schemas/Docs-Concepts/C/Contribution/Contribution-Claims/contribution-claims.json create mode 100644 Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Power/weight-power.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Support-Power/claim-support-power.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Support-Power/claim-support-power.json new file mode 100644 index 000000000..2d4cd09fb --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Claim/Claim-Support-Power/claim-support-power.json @@ -0,0 +1,13 @@ +{ + "type": "Claim Support Power", + "definition": { + "text": "Claim Support Power is the Voting Power that goes into a Claim Votes Switch or Claim Votes in general and is a measure of how much you wish to support the Contribution Claims you are voting for.", + "updated": 1630355883567 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json index af5b64180..aebfde144 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Claims/Claims-Folder/claims-folder.json @@ -61,8 +61,12 @@ }, { "style": "Callout", - "text": "Use a Claims Folder node to establish a reference with the corresponding type of Class node. Then use the Install Missing Claims option on the menu of the Claims Folder to map the entire Class! The process creates a Claims Folder for each Class, and a claim for each Asset, Feature, or Position defined within each Class. If something changes on the side of the definitions, you may always go back a run the Install Missing Claims process again. The process will remap the structure with the appropriate claims and folders.", - "updated": 1630324164950 + "text": "Use a Claims Folder node to establish a reference with the corresponding type of Class node. Then use the Install Missing Claims option on the menu of the Claims Folder to map the entire Class! The process creates a Claims Folder for each Class, and a claim for each Asset, Feature, or Position defined within each Class. ", + "updated": 1630357212192 + }, + { + "style": "Success", + "text": "If something changes on the side of the definitions, you may always go back a run the Install Missing Claims process again. The process will remap the structure with the appropriate claims and folders." } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Contribution/Contribution-Claims/contribution-claims.json b/Projects/Governance/Schemas/Docs-Concepts/C/Contribution/Contribution-Claims/contribution-claims.json new file mode 100644 index 000000000..6789ecf8e --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Contribution/Contribution-Claims/contribution-claims.json @@ -0,0 +1,13 @@ +{ + "type": "Contribution Claims", + "definition": { + "text": "The term Contribution Claims is a generalization of the concept of claims and may refer to any or all of the existing types, namely Asset Contribution Claim, Feature Contribution Claim, and Position Contribution Claim nodes.", + "updated": 1630351499915 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json index cf7748392..3ead2e35b 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Reusable/Reusable-Governance-Snippets/reusable-governance-snippets.json @@ -102,8 +102,8 @@ }, { "style": "Important", - "text": "The Voting Power you drive into Claim Votes nodes is significant, as it is a measure of your support to the claim. The ideal case scenario for the party placing the claim is that the claim gets enough Claim Votes with enough Voting Power to match the Claim Power the claim carries.", - "updated": 1630350695978 + "text": "The Claim Support Power you drive into Claim Votes nodes is significant, as it is a measure of your support to the claim. The ideal case scenario for the party placing the claim is that the claim gets enough Claim Votes with enough Claim Support Power to match the Claim Power the claim carries.", + "updated": 1630356135160 }, { "style": "Success", diff --git a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Power/weight-power.json b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Power/weight-power.json new file mode 100644 index 000000000..82bb4c6f1 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Power/weight-power.json @@ -0,0 +1,13 @@ +{ + "type": "Weight Power", + "definition": { + "text": "Weight Power is the Voting Power that goes into a Weight Votes Switch or Weight Votes in general and is a measure of how much you wish to incentivize the node you are voting for.", + "updated": 1630355707896 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json index 9ec0158fe..355397366 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json +++ b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json @@ -1,8 +1,8 @@ { "type": "Weight Votes", "definition": { - "text": "A type of vote within the Voting Program used to confer Weight to different types of nodes in the multiple project definition hierarchies. ", - "updated": 1624729793292 + "text": "A type of vote within the Voting Program used to confer Weight to different types of nodes in the multiple Project Definition Hierarchies. The term is a generalization describing any or all of the types of weight vote nodes, namely Pool Weight Vote, Position Weight Vote, Feature Weight Vote, and Asset Weight Vote.", + "updated": 1630355074330 }, "paragraphs": [ { @@ -10,10 +10,14 @@ "text": "Content", "updated": 1630345048703 }, + { + "style": "Important", + "text": "The Weight Power you drive into Weight Votes nodes is significant, as it is a measure of how much you wish to incentivize the referenced node. Nodes in Project Definition Hierarchies get Token Rewards proportional to the Weight Power they get from all Weight Votes they receive!", + "updated": 1630355171054 + }, { "style": "Success", - "text": "The Token Rewards and Voting Power Flow page in the Governance Flow topic covers important details of how Weight Votes work. Make sure you read the whole topic!", - "updated": 1630345114908 + "text": "You may want to learn more about Token Rewards and Voting Power Flow!" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claim-Vote/asset-claim-vote.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claim-Vote/asset-claim-vote.json index 9f0db9f57..11f93f55d 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claim-Vote/asset-claim-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claim-Vote/asset-claim-vote.json @@ -1,8 +1,8 @@ { "type": "Asset Claim Vote", "definition": { - "text": "Use this node to establish a reference with an Asset Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Voting Power you drive into the Claims Vote node!", - "updated": 1630351081241 + "text": "Use this node to establish a reference with an Asset Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Claim Support Power you drive into the Claim Votes node!", + "updated": 1630356280267 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json index 1bcfae25d..9fbb03f6a 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Claims-Folder/asset-claims-folder.json @@ -1,8 +1,8 @@ { "type": "Asset Claims Folder", "definition": { - "text": "The Asset Claims Folder node is an organizational device used to arrange Asset Contribution Claim nodes in arbitrary arrangements or to map entire structures in the Assets hierarchy.", - "updated": 1630259461725 + "text": "Use this node as an organizational device, to spawn Asset Contribution Claim nodes, and to map entire structures in an Assets hierarchy to place multiple Contribution Claims at once.", + "updated": 1630352114041 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Weight-Vote/asset-weight-vote.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Weight-Vote/asset-weight-vote.json index 2bbd584ed..6c84c5b08 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Weight-Vote/asset-weight-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Weight-Vote/asset-weight-vote.json @@ -1,13 +1,26 @@ { "type": "Asset Weight Vote", "definition": { - "text": "A Weight Vote that may reference an Asset node in the Assets hierarchy.", - "updated": 1624729908316 + "text": "Use this node to establish a reference with an Asset node in an Assets hierarchy. With this vote, you are passing on Weight Power to the referenced node. That way, the node gets more of the Token Rewards available in the hierarchy. This is how you influence how different areas of the project are incentivized.", + "updated": 1630356598807 }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630356862496 + }, + { + "style": "Include", + "text": "Governance->Concept->Weight Votes->Content" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json index dafa0e6ba..2b7735a67 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json @@ -22,8 +22,8 @@ }, { "style": "List", - "text": "As a switch: You may control the flow of Voting Power, pretty much like the Token Power Switch, but within the Voting Program. If you need a reminder, read about how Token Power Flows.", - "updated": 1630345441006 + "text": "As a switch: You may control the flow of Claim Support Power, pretty much like with the Token Power Switch, but within the Voting Program. If you need a reminder, read about how Token Power Flows.", + "updated": 1630355954531 }, { "style": "List", diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claim-Vote/feature-claim-vote.json b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claim-Vote/feature-claim-vote.json index 4f3154b76..cdedd0085 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claim-Vote/feature-claim-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claim-Vote/feature-claim-vote.json @@ -1,8 +1,8 @@ { "type": "Feature Claim Vote", "definition": { - "text": "Use this node to establish a reference with a Feature Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Voting Power you drive into the Claims Vote node!", - "updated": 1630351095609 + "text": "Use this node to establish a reference with a Feature Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Claim Support Power you drive into the Claim Votes node!", + "updated": 1630356075429 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claims-Folder/feature-claims-folder.json b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claims-Folder/feature-claims-folder.json index b71da50a5..1ae6122be 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claims-Folder/feature-claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Claims-Folder/feature-claims-folder.json @@ -1,8 +1,8 @@ { "type": "Feature Claims Folder", "definition": { - "text": "The Feature Claims Folder node is an organizational device used to arrange Feature Contribution Claim nodes in arbitrary arrangements or to map entire structures in the Features hierarchy.", - "updated": 1630260148773 + "text": "Use this node as an organizational device, to spawn Feature Contribution Claim nodes, and to map entire structures in a Features hierarchy to place multiple Contribution Claims at once.", + "updated": 1630352152356 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Weight-Vote/feature-weight-vote.json b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Weight-Vote/feature-weight-vote.json index 717c0aa04..7fed44919 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Weight-Vote/feature-weight-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature-Weight-Vote/feature-weight-vote.json @@ -1,13 +1,26 @@ { "type": "Feature Weight Vote", "definition": { - "text": "A Weight Vote that may reference a Feature node in the Features hierarchy.", - "updated": 1624729893680 + "text": "Use this node to establish a reference with a Feature node in a Features hierarchy. With this vote, you are passing on Weight Power to the referenced node. That way, the node gets more of the Token Rewards available in the hierarchy. This is how you influence how different areas of the project are incentivized.", + "updated": 1630356636079 }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630356880239 + }, + { + "style": "Include", + "text": "Governance->Concept->Weight Votes->Content" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool-Weight-Vote/pool-weight-vote.json b/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool-Weight-Vote/pool-weight-vote.json index b393bedc5..7807a1a84 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool-Weight-Vote/pool-weight-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool-Weight-Vote/pool-weight-vote.json @@ -1,13 +1,27 @@ { "type": "Pool Weight Vote", "definition": { - "text": "A Weight Vote that may reference a Pool node in the Pools hierarchy.", - "updated": 1624729823524 + "text": "Use this node to establish a reference with a Pool node in a Pools hierarchy. With this vote, you are passing on Weight Power to the referenced node. That way, the node gets more of the Token Rewards available in the hierarchy. This is how you influence how different areas of the project are incentivized.", + "updated": 1630356667487 }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630356719004 + }, + { + "style": "Include", + "text": "Governance->Concept->Weight Votes->Content", + "updated": 1630356837090 + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claim-Vote/position-claim-vote.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claim-Vote/position-claim-vote.json index efb0f8bec..f7734dcb5 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claim-Vote/position-claim-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claim-Vote/position-claim-vote.json @@ -1,8 +1,8 @@ { "type": "Position Claim Vote", "definition": { - "text": "Use this node to establish a reference with a Position Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Voting Power you drive into the Claims Vote node!", - "updated": 1630350980353 + "text": "Use this node to establish a reference with a Position Contribution Claim placed by your colleague in the Claims Program section of their User Profile. This vote means that you support your colleague's claim with the Claim Support Power you drive into the Claim Votes node!", + "updated": 1630356265895 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claims-Folder/position-claims-folder.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claims-Folder/position-claims-folder.json index c18313a25..758d45eba 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claims-Folder/position-claims-folder.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Claims-Folder/position-claims-folder.json @@ -1,8 +1,8 @@ { "type": "Position Claims Folder", "definition": { - "text": "The Position Claims Folder node is an organizational device used to arrange Position Contribution Claim nodes in arbitrary arrangements or to map entire structures in the Positions hierarchy.", - "updated": 1630260192942 + "text": "Use this node as an organizational device, to spawn Position Contribution Claim nodes, and to map entire structures in a Positions hierarchy to place multiple Contribution Claims at once.", + "updated": 1630352182572 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Weight-Vote/position-weight-vote.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Weight-Vote/position-weight-vote.json index 14ad9dcaa..c33fd295a 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Weight-Vote/position-weight-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Weight-Vote/position-weight-vote.json @@ -1,13 +1,26 @@ { "type": "Position Weight Vote", "definition": { - "text": "A Weight Vote that may reference a Position node in the Positions hierarchy.", - "updated": 1624729877473 + "text": "Use this node to establish a reference with a Position node in a Positions hierarchy. With this vote, you are passing on Weight Power to the referenced node. That way, the node gets more of the Token Rewards available in the hierarchy. This is how you influence how different areas of the project are incentivized.", + "updated": 1630356651483 }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630356906843 + }, + { + "style": "Include", + "text": "Governance->Concept->Weight Votes->Content" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json b/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json index 1d8688cff..b7e3f03c7 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json @@ -1,8 +1,8 @@ { "type": "Voting Program", "definition": { - "text": "The Voting Program is the heart and soul of governance, as it enables you to cast various types of votes. You may decide what to incentivize, weighing Pools, Assets, Features, and Positions. You may also evaluate contributions and transfer Voting Power to other users.", - "updated": 1630329477687 + "text": "The Voting Program is the heart and soul of governance, as it enables you to cast various types of votes. You may decide what to incentivize, weighing Pools, Assets, Features, and Positions. You may also evaluate and support Contribution Claims and transfer Voting Power to other users.", + "updated": 1630351287920 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json index 7afac294f..8285d3b0d 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json @@ -1,8 +1,8 @@ { "type": "Weight Votes Switch", "definition": { - "text": "This type of switch is used to spawn different types of weight vote nodes, and to reference “class” type of nodes within the different hierarchies that define Project incentives.", - "updated": 1624729654009 + "text": "Use this switch to spawn different types of Weight Votes, and to reference Class types of nodes within any of the Project Definition Hierarchies to map large structures of definitions.", + "updated": 1630356971950 }, "paragraphs": [ { @@ -12,11 +12,32 @@ }, { "style": "Text", - "text": "When a Weight Votes Switch references any of the existing “class” type of nodes in the Pools, Positions, Features, and Assets hierarchies, the Install Missing Votes option on the menu becomes usable." + "text": "You may use this switch for three different purposes:" + }, + { + "style": "List", + "text": "As an organizational device: You may create arbitrary arrangements of votes, spawning more switches and votes." + }, + { + "style": "List", + "text": "As a switch: You may control the flow of Weight Power, pretty much like the with a Token Power Switch, but within the Voting Program. If you need a reminder, read about how Token Power Flows.", + "updated": 1630357007626 + }, + { + "style": "List", + "text": "As a data-structure mapper: Use the node to reference Class types of nodes within Project Definition Hierarchies to map entire structures of definitions." + }, + { + "style": "Text", + "text": "The first two use cases are self-explanatory. Let's explore the third one in more detail." + }, + { + "style": "Callout", + "text": "Use a Weight Votes Switch node to establish a reference with a Class type of node — Pool Class, Position Class, Feature Class, or Asset Class — within Project Definition Hierarchies. Then use the Install Missing Votes option on the menu of the Weight Votes Switch to map the entire Class section of the hierarchy! The process creates a Weight Votes Switch for each Class type of node, and matching Weight Votes for each Asset, Feature, Position, or Pool defined within each Class node." }, { "style": "Success", - "text": "Installing votes allows mapping entire sections of project definitions so that you may vote to incentivize multiple definitions easily." + "text": "If something changes on the side of the definitions, you may always go back a run the Install Missing Votes process again. The process will remap the structure with the appropriate votes and switches." }, { "style": "Block", From 0374939ad63e5dc38c45d1605f3f4b708d21807c Mon Sep 17 00:00:00 2001 From: thaissmolina75 Date: Mon, 30 Aug 2021 23:13:02 -0400 Subject: [PATCH 56/81] spanish trans --- ...-002-tutorial-defining-a-trading-idea.json | 44 ++++++++++++++++--- ...ea-003-tutorial-step-before-we-start..json | 31 ++++++++++--- ...idea-004-tutorial-step-ready-to-mine..json | 31 ++++++++++--- 3 files changed, 90 insertions(+), 16 deletions(-) diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-002-tutorial-defining-a-trading-idea.json b/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-002-tutorial-defining-a-trading-idea.json index 99da54921..02b43c124 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-002-tutorial-defining-a-trading-idea.json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-002-tutorial-defining-a-trading-idea.json @@ -4,23 +4,55 @@ "type": "Tutorial - Defining a Trading Idea", "definition": { "icon": { - "project": "Foundations", - "name": "trading-strategy" + "name": "Trading\\trading-strategy", + "project": "Foundations" }, - "text": "Before you may build a Trading Strategy, you first need to come up with a clear and testable trading idea." + "text": "Before you may build a Trading Strategy, you first need to come up with a clear and testable trading idea.", + "updated": 1630376091762, + "translations": [ + { + "language": "ES", + "text": "Antes de que puedas crear una estrategia comercial, primero debe tener una idea comercial clara y comprobable.", + "updated": 1630376694793 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "A trading idea is a precursor to a trading strategy. While a complete strategy entails the rules for taking, managing and exiting a position, a trading idea is concerned with the first of those issues only." + "text": "A trading idea is a precursor to a trading strategy. While a complete strategy entails the rules for taking, managing and exiting a position, a trading idea is concerned with the first of those issues only.", + "updated": 1630376114821, + "translations": [ + { + "language": "ES", + "text": "Una idea trading es un precursor de una estrategia comercial. Si bien una estrategia completa implica las reglas para tomar, administrar y salir de una posición, una idea trading se ocupa únicamente del primero de esos aspectos.", + "updated": 1630376730606 + } + ] }, { "style": "Callout", - "text": "Testing a trading idea before committing to building a complete strategy is the logical approach because managing and exiting failed entries is not what you should be aiming for!" + "text": "Testing a trading idea before committing to building a complete strategy is the logical approach because managing and exiting failed entries is not what you should be aiming for!", + "updated": 1630376167390, + "translations": [ + { + "language": "ES", + "text": "Probar una idea trading antes de comprometerse a construir una estrategia completa es el enfoque lógico porque administrar y salir de las entradas fallidas no es lo que debería apuntar.", + "updated": 1630376759318 + } + ] }, { "style": "Text", - "text": "This tutorial explains how to properly formulate a trading idea that may later be tested." + "text": "This tutorial explains how to properly formulate a trading idea that may later be tested.", + "updated": 1630376190150, + "translations": [ + { + "language": "ES", + "text": "Este tutorial explica cómo formular correctamente una idea trading que luego se puede probar.", + "updated": 1630376776923 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-003-tutorial-step-before-we-start..json b/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-003-tutorial-step-before-we-start..json index 36857f0bc..6a95fea02 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-003-tutorial-step-before-we-start..json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-003-tutorial-step-before-we-start..json @@ -4,19 +4,40 @@ "type": "Tutorial Step - Before we start...", "definition": { "icon": { - "project": "Foundations", - "name": "bullet-warning" + "name": "Bullet\\bullet-warning", + "project": "Foundations" }, - "text": "Let me give you the heads up on a few matters you should consider before we start!" + "text": "Let me give you the heads up on a few matters you should consider before we start!", + "translations": [ + { + "language": "ES", + "text": "¡Permítanme informarles sobre algunos asuntos que deben considerar antes de comenzar!", + "updated": 1630376946171 + } + ] }, "paragraphs": [ { "style": "List", - "text": "Take any trading-related information for what it's worth! When I share trading concepts, take them with a grain of salt! I'm just a tutorial, not your financial advisor! I'm here to teach you Superalgos, not to tell you how to trade! If you are not a trader, you may pick up something of value, but always make sure you do your own research!" + "text": "Take any trading-related information for what it's worth! When I share trading concepts, take them with a grain of salt! I'm just a tutorial, not your financial advisor! I'm here to teach you Superalgos, not to tell you how to trade! If you are not a trader, you may pick up something of value, but always make sure you do your own research!", + "translations": [ + { + "language": "ES", + "text": "¡Toma cualquier información relacionada con el comercio por lo que vale! Cuando comparta conceptos comerciales, ¡tómelos con un grano de sal! ¡Soy solo un tutorial, no su asesor financiero! ¡Estoy aquí para enseñarte Superalgos, no para decirte cómo comerciar! Si no es un comerciante, puede adquirir algo de valor, ¡pero asegúrese siempre de hacer su propia investigación!", + "updated": 1630376997809 + } + ] }, { "style": "List", - "text": "This tutorial is aimed at a wide audience! I'll take it easy and lay out concepts so that everyone may understand them. If you are a seasoned trader you may feel some explanations are too basic. In that case, feel free to skip this tutorial and go to the next one in the series." + "text": "This tutorial is aimed at a wide audience! I'll take it easy and lay out concepts so that everyone may understand them. If you are a seasoned trader you may feel some explanations are too basic. In that case, feel free to skip this tutorial and go to the next one in the series.", + "translations": [ + { + "language": "ES", + "text": " Me lo tomaré con calma y expondré conceptos para que todos puedan entenderlos. Si eres es un comerciante experimentado, puede sentir que algunas explicaciones son demasiado básicas. En ese caso, no dudes en omitir este tutorial y pasar al siguiente de la serie.", + "updated": 1630377193083 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-004-tutorial-step-ready-to-mine..json b/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-004-tutorial-step-ready-to-mine..json index 2e5eef97f..5313ac4bd 100644 --- a/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-004-tutorial-step-ready-to-mine..json +++ b/Projects/Foundations/Schemas/Docs-Tutorials/D/Defining/Defining-a-Trading-Idea/defining-a-trading-idea-004-tutorial-step-ready-to-mine..json @@ -4,19 +4,40 @@ "type": "Tutorial Step - Ready to Mine..?", "definition": { "icon": { - "project": "Foundations", - "name": "data-tasks" + "name": "Data\\data-tasks", + "project": "Foundations" }, - "text": "We'll mine some data to analyze a few events over the charts. We'll use the same data to test the trading idea in the next tutorial!" + "text": "We'll mine some data to analyze a few events over the charts. We'll use the same data to test the trading idea in the next tutorial!", + "translations": [ + { + "language": "ES", + "text": "Extraeremos algunos datos para analizar algunos eventos en los gráficos. ¡Usaremos los mismos datos para probar la idea comercial en el próximo tutorial!", + "updated": 1630377229613 + } + ] }, "paragraphs": [ { "style": "Note", - "text": "The sensor bot will run on the BTC/USDT market (Binance) from January 1st, 2020, along with the following indicators from the Masters data mine: Candles Volumes, Bollinger Bands, and Bollinger Channels." + "text": "The sensor bot will run on the BTC/USDT market (Binance) from January 1st, 2020, along with the following indicators from the Masters data mine: Candles Volumes, Bollinger Bands, and Bollinger Channels.", + "translations": [ + { + "language": "ES", + "text": "El robot sensor se ejecutará en el mercado BTC / USDT (Binance) a partir del 1 de enero de 2020, junto con los siguientes indicadores de la mina de datos Masters: Candles Volumes, Bollinger Bands y Bollinger Channels.", + "updated": 1630377249570 + } + ] }, { "style": "Warning", - "text": "If you have data on this market/exchange but on a different time range, this may affect your data! Read the sensor bot documentation to learn how! If the data you have is not important, feel free to keep going!" + "text": "If you have data on this market/exchange but on a different time range, this may affect your data! Read the sensor bot documentation to learn how! If the data you have is not important, feel free to keep going!", + "translations": [ + { + "language": "ES", + "text": "Si tiene datos en este mercado / intercambio pero en un rango de tiempo diferente, ¡esto puede afectar tus datos! ¡Lee la documentación del robot sensor para aprender cómo hacerlo! Si los datos que tiene no son importantes, ¡no dude en continuar!", + "updated": 1630377309627 + } + ] } ] } \ No newline at end of file From 06d0f3bf53f430c5a6cf1e6c849f5749b28964e9 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 09:23:10 +0200 Subject: [PATCH 57/81] Websockets Handshake Procedure --- Client/client.js | 2 +- Client/webSocketsInterface.js | 2 +- Environment.js | 2 +- EnvironmentForDebug.js | 2 +- Network/NetwokNode.js | 3 +- Network/WebSocketsInterface.js | 181 +++++++++++++++++++++++ Projects/Network/NT/Globals/Memory.js | 11 +- Projects/Network/NT/Modules/Bootstrap.js | 5 +- 8 files changed, 196 insertions(+), 12 deletions(-) create mode 100644 Network/WebSocketsInterface.js diff --git a/Client/client.js b/Client/client.js index d44a7aa2b..07990149a 100644 --- a/Client/client.js +++ b/Client/client.js @@ -163,7 +163,7 @@ try { WEB_SOCKETS_INTERFACE = WEB_SOCKETS_INTERFACE.newWebSocketsInterface() WEB_SOCKETS_INTERFACE.initialize() WEB_SOCKETS_INTERFACE.run() - console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.WEB_SOCKETS_INTERFACE_PORT) + console.log('Web Sockets Interface ....................................... Listening at port ' + global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT) HTTP_INTERFACE = HTTP_INTERFACE.newHttpInterface() HTTP_INTERFACE.initialize() diff --git a/Client/webSocketsInterface.js b/Client/webSocketsInterface.js index 84963a977..36dfd2aef 100644 --- a/Client/webSocketsInterface.js +++ b/Client/webSocketsInterface.js @@ -10,7 +10,7 @@ const WEB_SOCKET = require('ws') let socketServer - let port = global.env.WEB_SOCKETS_INTERFACE_PORT + let port = global.env.CLIENT_WEB_SOCKETS_INTERFACE_PORT return thisObject diff --git a/Environment.js b/Environment.js index aed0520ff..76276e22a 100644 --- a/Environment.js +++ b/Environment.js @@ -2,7 +2,7 @@ exports.newEnvironment = function () { let thisObject = { WEB_SERVER_URL: 'localhost', - WEB_SOCKETS_INTERFACE_PORT: 18041, + CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041, HTTP_INTERFACE_PORT: 34248, PATH_TO_TASK_SERVER: './TaskServer', PATH_TO_DATA_STORAGE: './Data-Storage', diff --git a/EnvironmentForDebug.js b/EnvironmentForDebug.js index 3d1094e83..cbb68d289 100644 --- a/EnvironmentForDebug.js +++ b/EnvironmentForDebug.js @@ -2,7 +2,7 @@ exports.newEnvironment = function () { let thisObject = { WEB_SERVER_URL: 'localhost', - WEB_SOCKETS_INTERFACE_PORT: 18041, + CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041, HTTP_INTERFACE_PORT: 34248, PATH_TO_TASK_SERVER: '../TaskServer', PATH_TO_DATA_STORAGE: '../Data-Storage', diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index 73520d046..f712800d4 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -42,7 +42,8 @@ Setting up external dependencies. SA.nodeModules = { fs: require('fs'), nodeFetch: require('node-fetch'), - web3: require('web3') + web3: require('web3'), + ws: require('ws') } start() diff --git a/Network/WebSocketsInterface.js b/Network/WebSocketsInterface.js new file mode 100644 index 000000000..1f80b7d04 --- /dev/null +++ b/Network/WebSocketsInterface.js @@ -0,0 +1,181 @@ +exports.newWebSocketsInterface = function newWebSocketsInterface() { + + let thisObject = { + initialize: initialize, + finalize: finalize, + run: run + } + + let socketServer + let port = global.env.Network_WEB_SOCKETS_INTERFACE_PORT + + return thisObject + + function finalize() { + + } + + function initialize() { + + } + + function run() { + setUpWebSocketServer() + } + + function setUpWebSocketServer() { + try { + socketServer = new SA.nodeModule.ws.Server({ port: port }) + socketServer.on('connection', onConnection) + + function onConnection(socket) { + let caller = {} + socket.on('message', onMenssage) + + + function onMenssage(message) { + try { + let messageHeader = JSON.parse(message) + /* + We will run some validations. + */ + if (messageHeader.messageType === undefined) { + let response = { + result: 'Error', + message: 'messageType Not Provided.' + } + socket.send(JSON.stringify(response)) + return + } + + switch (messageHeader.messageType) { + case "Handshake": { + handShakeProducedure(socket, caller, messageHeader) + break + + } + case "Request": { + break + } + + } + + + + + + + + + + + let origin = messageArray[0] + let nonce = messageArray[1] + let messageToEventServer = messageArray[2] + + if (origin === 'Web Browser') { + try { + JSON.parse(messageToEventServer) + } catch (err) { + console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> Message received from the browser is not a valid JSON. message = ' + message.substring(0, 1000)) + console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> Message received from the browser is not a valid JSON. messageToEventServer = ' + messageToEventServer) + return + } + + let acknowledgeMessage = { + action: 'Acknowledge', + nonce: nonce + } + + socket.send(JSON.stringify(acknowledgeMessage)) + } + + + CL.servers.EVENT_SERVER.onMessage(messageToEventServer, onResponse) + + function onResponse(message) { + socket.send(message) + } + } catch (err) { + console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> Nonce received is less than Last Nonce. err = ' + err.stack) + } + } + } + + + function handShakeProducedure(socket, caller, messageHeader) { + /* + The caller needs to identify itself as either a Network Client or Peer. + */ + if (messageHeader.callerRole === undefined) { + let response = { + result: 'Error', + message: 'callerRole Not Provided.' + } + socket.send(JSON.stringify(response)) + return + } + + if (messageHeader.callerRole !== 'Network Client' && messageHeader.callerRole !== 'Network Peer') { + let response = { + result: 'Error', + message: 'callerRole Not Supported.' + } + socket.send(JSON.stringify(response)) + return + } + + caller.role = messageHeader.callerRole + /* + We will identify the caller by the signature at the message. + */ + if (messageHeader.signature === undefined) { + let response = { + result: 'Error', + message: 'signature Not Provided.' + } + socket.send(JSON.stringify(response)) + return + } + + let web3 = new SA.nodeModules.web3() + let blockchainAccount = web3.eth.accounts.recover(messageHeader.signature) + + if (caller.blockchainAccount === undefined) { + let response = { + result: 'Error', + message: 'Bad signature.' + } + socket.send(JSON.stringify(response)) + return + } + /* + The signature gives us the blockchain account, and the account the user profile. + */ + let userProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount) + + if (userProfile === undefined) { + let response = { + result: 'Error', + message: 'userProfile Not Found.' + } + socket.send(JSON.stringify(response)) + return + } + /* + We will remember the user profile behind this caller. + */ + caller.userProfile = userProfile + + let response = { + result: 'Ok', + message: 'Handshake Successful.' + } + socket.send(JSON.stringify(response)) + } + + } catch (err) { + console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.message = ' + err.message.substring(0, 1000)) + } + } +} \ No newline at end of file diff --git a/Projects/Network/NT/Globals/Memory.js b/Projects/Network/NT/Globals/Memory.js index 3248bd2ca..1c5fbb70d 100644 --- a/Projects/Network/NT/Globals/Memory.js +++ b/Projects/Network/NT/Globals/Memory.js @@ -4,13 +4,14 @@ exports.newNetworkGlobalsMemory = function () { */ let thisObject = { maps: { - USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id. - USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle. - EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once. + USER_PROFILES_BY_ID: new Map(), // Here we will store the user profiles by User Profile Id. + USER_PROFILES_BY_HANDLE: new Map(), // Here we will store the user profiles by User Profile Handle. + USER_PROFILES_BY_BLOCHAIN_ACCOUNT: new Map(), // Here we will store the user profiles by Blockchain Account. + EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once. }, arrays: { - NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking. - NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking. + NETWORK_CLIENTS: [], // These are the Network Clients connected to this Network Node ordered by Ranking. + NETWORK_PEERS: [], // These are the Network Peers connected to this Network Node ordered by Ranking. } } diff --git a/Projects/Network/NT/Modules/Bootstrap.js b/Projects/Network/NT/Modules/Bootstrap.js index b840e3575..c98029769 100644 --- a/Projects/Network/NT/Modules/Bootstrap.js +++ b/Projects/Network/NT/Modules/Bootstrap.js @@ -36,7 +36,7 @@ exports.newBootstrap = function newBootstrap() { let config = JSON.parse(userProfilePlugin.config) let signatureObject = config.signature let web3 = new SA.nodeModules.web3() - let bloackchainAddress = web3.eth.accounts.recover(signatureObject) + 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 @@ -45,12 +45,13 @@ exports.newBootstrap = function newBootstrap() { userProfile.initialize( userProfileId, userHandle, - bloackchainAddress, + blockchainAccount, ranking ) NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile) NT.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile) + NT.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile) } } From f297991e20611f1d02f5f3b34b3e711a944160e0 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 31 Aug 2021 10:09:19 +0200 Subject: [PATCH 58/81] Voting Program done --- .../Liquid-Democracy/liquid-democracy.json | 18 ++++++++++ .../User-Profile-Vote/user-profile-vote.json | 34 +++++++++++++++++-- .../user-profile-votes-switch.json | 29 ++++++++++++++-- .../weight-votes-switch.json | 4 +-- 4 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Concepts/L/Liquid/Liquid-Democracy/liquid-democracy.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/L/Liquid/Liquid-Democracy/liquid-democracy.json b/Projects/Governance/Schemas/Docs-Concepts/L/Liquid/Liquid-Democracy/liquid-democracy.json new file mode 100644 index 000000000..ef1f0a961 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/L/Liquid/Liquid-Democracy/liquid-democracy.json @@ -0,0 +1,18 @@ +{ + "type": "Liquid Democracy", + "definition": { + "text": "The form of Liquid Democracy in Superalgos utilizes elements of direct and representative democracy. Users have the right to vote directly, like in a direct democracy, but also have the option to delegate their Voting Power for someone else to vote on their behalf, like in a representative democracy. ", + "updated": 1630396811020 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630396824875 + }, + { + "style": "Text", + "text": "The form of Liquid Democracy in Superalgos utilizes elements of direct and representative democracy. Users have the right to vote directly, like in a direct democracy, but also have the option to delegate their Voting Power for someone else to vote on their behalf, like in a representative democracy." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Vote/user-profile-vote.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Vote/user-profile-vote.json index d0883ea9e..5e14865f7 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Vote/user-profile-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Vote/user-profile-vote.json @@ -1,13 +1,41 @@ { "type": "User Profile Vote", "definition": { - "text": "A type of vote within the Voting Program used to confer Voting Power to another User Profile.", - "updated": 1624729935183 + "text": "Use this node to establish a reference with a colleague's User Profile. With this vote, you are passing on Voting Power directly into your colleague's Voting Program, effectively delegating your Voting Power.", + "updated": 1630394852693 }, "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630394887268 + }, + { + "style": "Success", + "text": "You may delegate your Voting Power to empower voices you trust! Trusted members of the Community may make good use of your Voting Power, particularly if you feel you don't have the time or expertise to be on top of certain aspects of governance.", + "updated": 1630397257327 + }, + { + "style": "Include", + "text": "Governance->Concept->Liquid Democracy->Content" + }, { "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "text": "The same Voting Power may be delegated multiple times, and the delegation may be withdrawn at any point as well, simply by removing the User Profile Vote node or its reference.", + "updated": 1630396998228 + }, + { + "style": "Important", + "text": "The Voting Power you drive into User Profile Vote nodes is significant, as it is that much Voting Power you will be passing on. Your colleague will be able to use the Incoming Power in whatever way, within the Voting Program.", + "updated": 1630397320144 + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Votes-Switch/user-profile-votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Votes-Switch/user-profile-votes-switch.json index f49ebbb9c..e5e9986cf 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Votes-Switch/user-profile-votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Votes-Switch/user-profile-votes-switch.json @@ -1,13 +1,36 @@ { "type": "User Profile Votes Switch", "definition": { - "text": "This type of switch is used to spawn User Profile Vote nodes.", - "updated": 1624729715052 + "text": "Use this switch as an organizational device, and to spawn User Profile Vote nodes. ", + "updated": 1630394573673 }, "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630394627447 + }, { "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "text": "You may use this switch for two different purposes:", + "updated": 1630394642130 + }, + { + "style": "List", + "text": "As an organizational device: You may create arbitrary arrangements of votes, spawning more switches and votes." + }, + { + "style": "List", + "text": "As a switch: You may control the flow of Voting Power, pretty much like with a Token Power Switch, but within the Voting Program. If you need a reminder, read about how Token Power Flows.", + "updated": 1630394687805 + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json index 8285d3b0d..4f7cdd11f 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json @@ -20,8 +20,8 @@ }, { "style": "List", - "text": "As a switch: You may control the flow of Weight Power, pretty much like the with a Token Power Switch, but within the Voting Program. If you need a reminder, read about how Token Power Flows.", - "updated": 1630357007626 + "text": "As a switch: You may control the flow of Weight Power, pretty much like with a Token Power Switch, but within the Voting Program. If you need a reminder, read about how Token Power Flows.", + "updated": 1630394709837 }, { "style": "List", From 6858abf5e260a4a82041db3d37d7b0a2f250f008 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 10:53:34 +0200 Subject: [PATCH 59/81] eventReceived of Client Interface Implemented --- Network/NetwokNode.js | 5 + Network/clientsInterface.js | 87 --------- .../Network/NT/Modules/ClientInterface.js | 166 ++++++++++++++++++ .../Network/NT/Modules/PeerInterface.js | 2 +- .../NT/Modules}/WebSocketsInterface.js | 104 +++++------ Projects/ProjectsSchema.json | 18 ++ 6 files changed, 238 insertions(+), 144 deletions(-) delete mode 100644 Network/clientsInterface.js create mode 100644 Projects/Network/NT/Modules/ClientInterface.js rename Network/peerInterface.js => Projects/Network/NT/Modules/PeerInterface.js (73%) rename {Network => Projects/Network/NT/Modules}/WebSocketsInterface.js (62%) diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index f712800d4..b3eb4577f 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -45,6 +45,11 @@ SA.nodeModules = { web3: require('web3'), ws: require('ws') } +/* +Let's start the Network Interfaces +*/ +NT.webSocketsInterface = NT.projects.network.modules.webSocketsInterface.newNetworkModulesWebSocketsInterface() +NT.webSocketsInterface.initialize() start() diff --git a/Network/clientsInterface.js b/Network/clientsInterface.js deleted file mode 100644 index 2e48e99a4..000000000 --- a/Network/clientsInterface.js +++ /dev/null @@ -1,87 +0,0 @@ -exports.newClientInterface = function newClientInterface() { - /* - This module represents the Interface the Network Node have - with Network Clients connected to it. There are two things - Network Clients can do with this Network Node: - - * Send an Event that happened at the Network Client to the Network. - * Make a Query to the Network Node for info needed at the Network Client. - */ - let thisObject = { - eventReceived: eventReceived, - queryReceived: queryReceived, - initialize: initialize, - finalize: finalize - } - - return thisObject - - function finalize() { - - } - - function initialize() { - - } - - function eventReceived(eventMessage) { - /* - We expect here a JSON string with some or all of the following properties: - - { - "eventId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "eventType": 10, - "emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "emitterBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "targetBBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "timestamp": 124234234234, - "botAsset": "BTC", - "botExchange": "Binance", - "botEnabled": true - } - */ - - let eventReceived = JSON.parse(eventMessage) - if (NT.projects.network.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { - throw ('Event Already Exists.') - } - - let event = NT.projects.network.modules.event.newNetworkModulesEvent() - event.initialize(eventReceived) - NT.projects.network.globals.memory.maps.EVENTS.set(eventReceived.eventId, event) - } - - function queryReceived(queryMessage) { - /* - We expect here a JSON string with some or all of the following properties: - - { - "equeryId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "queryType": 10, - "emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "emitterUserProfileHandle": "Luis-Fernando-Molina", - "targetUserProfileHandle": "Luis-Fernando-Molina", - "emitterBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "targetBBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", - "timestamp": 124234234234, - "botAsset": "BTC", - "botExchange": "Binance", - "botEnabled": true, - "initialIndex": 35, - "amountRequested": 50, - "direction": "Past" - } - */ - - let queryReceived = JSON.parse(queryMessage) - let query = NT.projects.network.modules.queriesQuery.newNetworkModulesQuery() - query.initialize(queryReceived) - return query.execute() - } -} \ No newline at end of file diff --git a/Projects/Network/NT/Modules/ClientInterface.js b/Projects/Network/NT/Modules/ClientInterface.js new file mode 100644 index 000000000..f63dce04e --- /dev/null +++ b/Projects/Network/NT/Modules/ClientInterface.js @@ -0,0 +1,166 @@ +exports.newNetworkModulesClientInterface = function newNetworkModulesClientInterface() { + /* + This module represents the Interface the Network Node have + with Network Clients connected to it. There are two things + Network Clients can do with this Network Node: + + * Send an Event that happened at the Network Client to the Network. + * Make a Query to the Network Node for info needed at the Network Client. + */ + let thisObject = { + messageReceived: messageReceived, + initialize: initialize, + finalize: finalize + } + + return thisObject + + function finalize() { + + } + + function initialize() { + + } + + async function messageReceived(message, userProfile) { + let messageHeader + try { + messageHeader = JSON.parse(message) + } catch (err) { + let response = { + result: 'Error', + message: 'Client Interface message Not Coorrect JSON Format.' + } + return response + } + + if (messageHeader.messageType === undefined) { + let response = { + result: 'Error', + message: 'Client Interface messageType Not Provided.' + } + return response + } + + if (messageHeader.messageType !== 'Event' && messageHeader.messageType !== 'Query') { + let response = { + result: 'Error', + message: 'Client Interface messageType Not Supported.' + } + return response + } + + switch (messageHeader.messageType) { + case 'Event': { + return await eventReceived(messageHeader.eventMessage, userProfile) + } + case 'Query': { + return await queryReceived(messageHeader.queryMessage, userProfile) + } + } + } + + async function eventReceived(eventMessage, userProfile) { + /* + We expect here a JSON string with some or all of the following properties: + + { + "eventId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "eventType": 10, + "emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "emitterBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "targetBBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "timestamp": 124234234234, + "botAsset": "BTC", + "botExchange": "Binance", + "botEnabled": true + } + */ + + let eventReceived + try { + eventReceived = JSON.parse(eventMessage) + } catch (err) { + let response = { + result: 'Error', + message: 'Client Interface eventMessage Not Coorrect JSON Format.' + } + return response + } + /* + At the Client Interface, events need to be emmitted by the same userProfile that is + connected at the Network Node. + */ + if (eventReceived.emitterUserProfileId !== userProfile.userProfileId) { + let response = { + result: 'Error', + message: 'Client Interface emitterUserProfileId !== userProfileId Connected to Network Node.' + } + return response + } + /* + We will not accept events that have already been processed. + */ + + if (NT.projects.network.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { + let response = { + result: 'Error', + message: 'Client Interface Event Already Exists.' + } + return response + } + /* + Here we will process the event and change the state of the Social Graph. + */ + try { + let event = NT.projects.network.modules.event.newNetworkModulesEvent() + event.initialize(eventReceived) + NT.projects.network.globals.memory.maps.EVENTS.set(eventReceived.eventId, event) + } catch (err) { + /* + Any exception that happens while trying to change the state of the Social Graph, + will be returned to the caller without doing anything else here. + */ + let response = { + result: 'Error', + message: 'Client Interface ' + err.message + } + return response + } + } + + async function queryReceived(queryMessage) { + /* + We expect here a JSON string with some or all of the following properties: + + { + "equeryId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "queryType": 10, + "emitterUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "targetUserProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "emitterUserProfileHandle": "Luis-Fernando-Molina", + "targetUserProfileHandle": "Luis-Fernando-Molina", + "emitterBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "targetBBotProfileId": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "emitterPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "targetPostHash": "a8de78f0-c3e4-4a2a-b7e8-f659073969db", + "timestamp": 124234234234, + "botAsset": "BTC", + "botExchange": "Binance", + "botEnabled": true, + "initialIndex": 35, + "amountRequested": 50, + "direction": "Past" + } + */ + + let queryReceived = JSON.parse(queryMessage) + let query = NT.projects.network.modules.queriesQuery.newNetworkModulesQuery() + query.initialize(queryReceived) + return query.execute() + } +} \ No newline at end of file diff --git a/Network/peerInterface.js b/Projects/Network/NT/Modules/PeerInterface.js similarity index 73% rename from Network/peerInterface.js rename to Projects/Network/NT/Modules/PeerInterface.js index 423579324..44c4412b0 100644 --- a/Network/peerInterface.js +++ b/Projects/Network/NT/Modules/PeerInterface.js @@ -1,4 +1,4 @@ -exports.newPeerInterface = function newPeerInterface() { +exports.newNetworkModulesPeerInterface = function newNetworkModulesPeerInterface() { let thisObject = { initialize: initialize, diff --git a/Network/WebSocketsInterface.js b/Projects/Network/NT/Modules/WebSocketsInterface.js similarity index 62% rename from Network/WebSocketsInterface.js rename to Projects/Network/NT/Modules/WebSocketsInterface.js index 1f80b7d04..740e6d244 100644 --- a/Network/WebSocketsInterface.js +++ b/Projects/Network/NT/Modules/WebSocketsInterface.js @@ -1,41 +1,51 @@ -exports.newWebSocketsInterface = function newWebSocketsInterface() { +exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSocketsInterface() { let thisObject = { initialize: initialize, - finalize: finalize, - run: run + finalize: finalize } let socketServer - let port = global.env.Network_WEB_SOCKETS_INTERFACE_PORT + let clientInterface + let peerInterface return thisObject function finalize() { - + socketServer = undefined + clientInterface = undefined + peerInterface = undefined } function initialize() { + socketServer = new SA.nodeModule.ws.Server({ port: global.env.Network_WEB_SOCKETS_INTERFACE_PORT }) + clientInterface = NT.projects.network.modules.clientInterface.newNetworkModulesClientInterface() + peerInterface = NT.projects.network.modules.peerInterface.newNetworkModulesPeerInterface() - } - - function run() { setUpWebSocketServer() } function setUpWebSocketServer() { try { - socketServer = new SA.nodeModule.ws.Server({ port: port }) socketServer.on('connection', onConnection) function onConnection(socket) { let caller = {} socket.on('message', onMenssage) - - function onMenssage(message) { + async function onMenssage(message) { try { - let messageHeader = JSON.parse(message) + let messageHeader + try { + messageHeader = JSON.parse(message) + } catch (err) { + let response = { + result: 'Error', + message: 'messageHeader Not Coorrect JSON Format.' + } + socket.send(JSON.stringify(response)) + return + } /* We will run some validations. */ @@ -50,60 +60,42 @@ exports.newWebSocketsInterface = function newWebSocketsInterface() { switch (messageHeader.messageType) { case "Handshake": { - handShakeProducedure(socket, caller, messageHeader) + handshakeProducedure(socket, caller, messageHeader) break - } case "Request": { + + if (caller.userProfile === undefined) { + let response = { + result: 'Error', + message: 'Handshake Not Done Yet.' + } + socket.send(JSON.stringify(response)) + return + } + + switch (caller.role) { + case 'Network Client': { + let response = await clientInterface.messageReceived(messageHeader.payload, caller.userProfile) + socket.send(JSON.stringify(response)) + break + } + case 'Network Peer': { + let response = await peerInterface.messageReceived(messageHeader.payload) + socket.send(JSON.stringify(response)) + break + } + } break } - - } - - - - - - - - - - - let origin = messageArray[0] - let nonce = messageArray[1] - let messageToEventServer = messageArray[2] - - if (origin === 'Web Browser') { - try { - JSON.parse(messageToEventServer) - } catch (err) { - console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> Message received from the browser is not a valid JSON. message = ' + message.substring(0, 1000)) - console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> Message received from the browser is not a valid JSON. messageToEventServer = ' + messageToEventServer) - return - } - - let acknowledgeMessage = { - action: 'Acknowledge', - nonce: nonce - } - - socket.send(JSON.stringify(acknowledgeMessage)) - } - - - CL.servers.EVENT_SERVER.onMessage(messageToEventServer, onResponse) - - function onResponse(message) { - socket.send(message) } } catch (err) { - console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> Nonce received is less than Last Nonce. err = ' + err.stack) + console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.stack = ' + err.stack) } } } - - function handShakeProducedure(socket, caller, messageHeader) { + function handshakeProducedure(socket, caller, messageHeader) { /* The caller needs to identify itself as either a Network Client or Peer. */ @@ -175,7 +167,7 @@ exports.newWebSocketsInterface = function newWebSocketsInterface() { } } catch (err) { - console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.message = ' + err.message.substring(0, 1000)) + console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.stack = ' + err.stack) } } } \ No newline at end of file diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index aaf9a7d65..7b9676298 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1370,6 +1370,24 @@ "propertyName": "event", "functionName": "newNetworkModulesEvent", "fileName": "Event.js" + }, + { + "name": "Client Interface", + "propertyName": "clientInterface", + "functionName": "newNetworkModulesClientInterface", + "fileName": "ClientInterface.js" + }, + { + "name": "Peer Interface", + "propertyName": "peerInterface", + "functionName": "newNetworkModulesPeerInterface", + "fileName": "PeerInterface.js" + }, + { + "name": "Web Sockets Interface", + "propertyName": "webSocketsInterface", + "functionName": "newNetworkModulesWebSocketsInterface", + "fileName": "WebSocketsInterface.js" } ], "utilities": [ From d3062bdc14dc5645414785f4f12ce6d42f69a76e Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 31 Aug 2021 10:53:50 +0200 Subject: [PATCH 60/81] Financial Programs WIP --- .../B/Bonus/Bonus-Pool/bonus-pool.json | 4 +- .../R/Rewards/Rewards-Pool/rewards-pool.json | 4 +- .../community-building-programs.json | 4 +- .../financial-programs.json | 17 ++++++- .../Staking-Program/staking-program.json | 49 +++++++++++++++++++ 5 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Nodes/S/Staking/Staking-Program/staking-program.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/B/Bonus/Bonus-Pool/bonus-pool.json b/Projects/Governance/Schemas/Docs-Concepts/B/Bonus/Bonus-Pool/bonus-pool.json index a8b1b97da..0d247503b 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/B/Bonus/Bonus-Pool/bonus-pool.json +++ b/Projects/Governance/Schemas/Docs-Concepts/B/Bonus/Bonus-Pool/bonus-pool.json @@ -1,8 +1,8 @@ { "type": "Bonus Pool", "definition": { - "text": "A Bonus Pool allocates the tokens to be distributed as bonuses for participating in certain Governance Programs. Each program that features a Token Bonus has its Bonus Pool defined under the Governance Programs section of the Superalgos Pools hierarchy. A bonus represents an incentive to participate in the given program and is displayed Tokens Bonus node.", - "updated": 1630169555986 + "text": "A Bonus Pool allocates tokens to incentivize participation in specific Governance Programs. Each program that features a Tokens Bonus node has its Bonus Pool defined under the Governance Programs section of the Superalgos Pools hierarchy. A bonus is an incentive to participate in the given program and its value is displayed in the Tokens Bonus node.", + "updated": 1630399869123 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Rewards/Rewards-Pool/rewards-pool.json b/Projects/Governance/Schemas/Docs-Concepts/R/Rewards/Rewards-Pool/rewards-pool.json index 9faa1dac0..263148226 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/R/Rewards/Rewards-Pool/rewards-pool.json +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Rewards/Rewards-Pool/rewards-pool.json @@ -1,8 +1,8 @@ { "type": "Rewards Pool", "definition": { - "text": "A Rewards Pool allocates the tokens to be distributed as rewards for contributions on several of the existing Governance Programs. Each program that distributes rewards has its Rewards Pool defined under the Governance Programs section of the Superalgos Pools hierarchy. Rewards represent the value of your contributions to each of the programs. Each program calculates rewards in a particular way and displays the result in its Tokens Rewards node.", - "updated": 1630169267228 + "text": "A Rewards Pool allocates tokens to reward contributions to specific Governance Programs. Each program that features a Tokens Awarded node distributes rewards from a Rewards Pool defined under the Governance Programs section of the Superalgos Pools hierarchy. Rewards represent the value of your contributions to each of the programs. Each program calculates rewards in a particular way and displays the result in the Tokens Awarded node.", + "updated": 1630399801989 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json b/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json index b6b48cdad..286cc2fe5 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Community/Community-Building-Programs/community-building-programs.json @@ -26,8 +26,8 @@ }, { "style": "Text", - "text": "Let's explore how Rewards Pools are distributed in the case of Community Building Programs. In general terms, the Referral Program, Support Program, and Mentorship Program all have the following common rules:", - "updated": 1630168572231 + "text": "Let's explore how each Rewards Pool is distributed in the case of Community Building Programs. In general terms, the Referral Program, Support Program, and Mentorship Program all have the following common rules:", + "updated": 1630399976367 }, { "style": "List", diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Financial/Financial-Programs/financial-programs.json b/Projects/Governance/Schemas/Docs-Nodes/F/Financial/Financial-Programs/financial-programs.json index 92a267988..2dfb660a5 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Financial/Financial-Programs/financial-programs.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Financial/Financial-Programs/financial-programs.json @@ -6,8 +6,21 @@ }, "paragraphs": [ { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." + "style": "Block", + "text": "Content", + "updated": 1630397902177 + }, + { + "style": "Success", + "text": "Learn more about how Token Power Flows into these programs!" + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/S/Staking/Staking-Program/staking-program.json b/Projects/Governance/Schemas/Docs-Nodes/S/Staking/Staking-Program/staking-program.json new file mode 100644 index 000000000..c871e7c96 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Nodes/S/Staking/Staking-Program/staking-program.json @@ -0,0 +1,49 @@ +{ + "type": "Staking Program", + "definition": { + "text": "The staking program allows the Superalgos Community to compensate token holders for the sake of holding tokens. Holding tokens may be a valuable contribution that the Community may decide to incentivize at any point.", + "updated": 1630399040101 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630399087739 + }, + { + "style": "Text", + "text": "This is a very simple program, as it doesn't involve smart contracts or transferring funds out of your Governance Address." + }, + { + "style": "Text", + "text": "You may participate in the Staking Program with the Token Power that you haven’t used for other purposes. All you need to do is spawn the program from within the Financial Programs node and let some Token Power flow into it.", + "updated": 1630399445299 + }, + { + "style": "Text", + "text": "You will get tokens from the Staking Rewards Pool defined in the Superalgos Pools hierarchy under the Governance Programs node, proportional to the Staking Power you direct to the program." + }, + { + "style": "Text", + "text": "The calculation of the Tokens Awarded for this program is similar to how Tokens Bonus is calculated on other programs, as a direct Rule of Three:" + }, + { + "style": "Json", + "text": "Total Staking Power [*] -> 100% of the pool\n Your Staking Power [**] -> X% of the pool -> Tokens Awarded\n\nTokens Awarded = Your Staking Power * 100% / Total Staking Power\n\n[*] The power driven to the Staking Program by all User Profiles combined.\n[**] The power you drive to the Staking Program.", + "updated": 1630399128595 + }, + { + "style": "Note", + "text": "Notice that staking may not be the best way to accumulate more tokens. Some other programs, like the Community Building Programs, may offer a better financial opportunity through their Tokens Bonus! You may want to check how big are the Bonus Pool incentives in other programs and compare those with the Staking Rewards Pool!", + "updated": 1630399853495 + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" + } + ] +} \ No newline at end of file From b264900b87dccd77b71ca3225af1870a00f5f66b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 11:07:52 +0200 Subject: [PATCH 61/81] Update ClientInterface.js --- .../Network/NT/Modules/ClientInterface.js | 50 +++++++++++++++++-- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/Projects/Network/NT/Modules/ClientInterface.js b/Projects/Network/NT/Modules/ClientInterface.js index f63dce04e..2c04a96f0 100644 --- a/Projects/Network/NT/Modules/ClientInterface.js +++ b/Projects/Network/NT/Modules/ClientInterface.js @@ -120,6 +120,13 @@ exports.newNetworkModulesClientInterface = function newNetworkModulesClientInter let event = NT.projects.network.modules.event.newNetworkModulesEvent() event.initialize(eventReceived) NT.projects.network.globals.memory.maps.EVENTS.set(eventReceived.eventId, event) + + let response = { + result: 'Ok', + message: 'Client Interface Event Processed.' + } + return response + } catch (err) { /* Any exception that happens while trying to change the state of the Social Graph, @@ -158,9 +165,44 @@ exports.newNetworkModulesClientInterface = function newNetworkModulesClientInter } */ - let queryReceived = JSON.parse(queryMessage) - let query = NT.projects.network.modules.queriesQuery.newNetworkModulesQuery() - query.initialize(queryReceived) - return query.execute() + let queryReceived + try { + queryReceived = JSON.parse(queryMessage) + } catch (err) { + let response = { + result: 'Error', + message: 'Client Interface queryMessage Not Coorrect JSON Format.' + } + return response + } + /* + At the Client Interface, queries need to be emmitted by the same userProfile that is + connected at the Network Node. + */ + if (queryReceived.emitterUserProfileId !== userProfile.userProfileId) { + let response = { + result: 'Error', + message: 'Client Interface emitterUserProfileId !== userProfileId Connected to Network Node.' + } + return response + } + /* + Here we will process the query. This does not change the state of the Social Graph. + */ + try { + let query = NT.projects.network.modules.queriesQuery.newNetworkModulesQuery() + query.initialize(queryReceived) + return query.execute() + + } catch (err) { + /* + Any exception that happens while trying to execute the query. + */ + let response = { + result: 'Error', + message: 'Client Interface ' + err.message + } + return response + } } } \ No newline at end of file From a50a8b7c794458cd3383db5cf456e0d08d2b5252 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 12:23:19 +0200 Subject: [PATCH 62/81] node modules --- package-lock.json => Network/package-lock.json | 0 package.json => Network/package.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename package-lock.json => Network/package-lock.json (100%) rename package.json => Network/package.json (100%) diff --git a/package-lock.json b/Network/package-lock.json similarity index 100% rename from package-lock.json rename to Network/package-lock.json diff --git a/package.json b/Network/package.json similarity index 100% rename from package.json rename to Network/package.json From 895c57aa0da05f49e4ee0f9c4aef17b4d251d5e3 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 12:28:49 +0200 Subject: [PATCH 63/81] Node Modules --- Network/package-lock.json | 23 +++++++++++++++-------- Network/package.json | 3 ++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Network/package-lock.json b/Network/package-lock.json index 890365e86..11e53b3fd 100644 --- a/Network/package-lock.json +++ b/Network/package-lock.json @@ -977,6 +977,18 @@ "servify": "^0.1.12", "ws": "^3.0.0", "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + } } }, "ethereum-bloom-filters": { @@ -2945,14 +2957,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.1.tgz", + "integrity": "sha512-XkgWpJU3sHU7gX8f13NqTn6KQ85bd1WU7noBHTT8fSohx7OS1TPY8k+cyRPCzFkia7C4mM229yeHr1qK9sM4JQ==" }, "xhr": { "version": "2.6.0", diff --git a/Network/package.json b/Network/package.json index fb7fc1957..98b8d8879 100644 --- a/Network/package.json +++ b/Network/package.json @@ -1,6 +1,7 @@ { "dependencies": { "node-fetch": "^2.6.1", - "web3": "^1.5.2" + "web3": "^1.5.2", + "ws": "^8.2.1" } } From 743885aff59e02dcc170e553e8a468ad0e270200 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 13:26:55 +0200 Subject: [PATCH 64/81] runNetworkScript Debugged --- EnvironmentForDebug.js | 23 ++++--- Network/NetwokNode.js | 69 +++++-------------- .../Network/NT/Modules/WebSocketsInterface.js | 2 +- .../package-lock.json => package-lock.json | 0 Network/package.json => package.json | 0 runNetwork.js | 52 ++++++++++++++ 6 files changed, 82 insertions(+), 64 deletions(-) rename Network/package-lock.json => package-lock.json (100%) rename Network/package.json => package.json (100%) create mode 100644 runNetwork.js diff --git a/EnvironmentForDebug.js b/EnvironmentForDebug.js index cbb68d289..5e88fb9da 100644 --- a/EnvironmentForDebug.js +++ b/EnvironmentForDebug.js @@ -3,19 +3,20 @@ exports.newEnvironment = function () { let thisObject = { WEB_SERVER_URL: 'localhost', CLIENT_WEB_SOCKETS_INTERFACE_PORT: 18041, + NETWORK_WEB_SOCKETS_INTERFACE_PORT: 18042, HTTP_INTERFACE_PORT: 34248, - PATH_TO_TASK_SERVER: '../TaskServer', - PATH_TO_DATA_STORAGE: '../Data-Storage', - PATH_TO_PROJECTS: '../Projects', - PATH_TO_LOG_FILES: '../Log-Files', + PATH_TO_TASK_SERVER: './TaskServer', + PATH_TO_DATA_STORAGE: './Data-Storage', + PATH_TO_PROJECTS: './Projects', + PATH_TO_LOG_FILES: './Log-Files', PATH_TO_PROJECTS_REQUIRED: './Projects', - PATH_TO_PROJECT_SCHEMA: '../Projects/ProjectsSchema.json', - PATH_TO_UI: '../UI', - PATH_TO_DATA_FILES: '../UI/Data-Files/src', - PATH_TO_CLIENT: '../Client/', - PATH_TO_DEFAULT_WORKSPACE: '../Projects/Foundations/Plugins/Workspaces', - PATH_TO_MY_WORKSPACES: '../My-Workspaces', - PATH_TO_FONTS: '../Client/WebServer/Fonts' + PATH_TO_PROJECT_SCHEMA: './Projects/ProjectsSchema.json', + PATH_TO_UI: './UI', + PATH_TO_DATA_FILES: './UI/Data-Files/src', + PATH_TO_CLIENT: './Client/', + PATH_TO_DEFAULT_WORKSPACE: './Projects/Foundations/Plugins/Workspaces', + PATH_TO_MY_WORKSPACES: './My-Workspaces', + PATH_TO_FONTS: './Client/WebServer/Fonts' } return thisObject diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index b3eb4577f..8406c76df 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -1,59 +1,24 @@ -/* -The Superalgos Network offers 3 types of services: +exports.newNetworkNode = function newNetworkNode() { - * Social Graph Service - * Search Index Service - * Private Message Service - -Users can decide which services to run at their node. + let thisObject = { + run: run + } -This module is the starting point of the Network Node. + return thisObject -*/ + function run() { + /* + Let's start the Network Interfaces + */ + NT.webSocketsInterface = NT.projects.network.modules.webSocketsInterface.newNetworkModulesWebSocketsInterface() + NT.webSocketsInterface.initialize() -/* -The NT object is accesible everywhere at the Superalgos Network. -It provides access to all modules built for this Network. -*/ -global.NT = {} -/* -The SA object is accesible everywhere at the Superalgos Network. -It provides access to all modules built for Superalgos in general. -*/ -global.SA = {} -/* Load Environment Variables */ -let ENVIRONMENT = require('../EnvironmentForDebug.js'); -let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment() -global.env = ENVIRONMENT_MODULE -/* -First thing is to load the project schema file. -*/ -global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA) -/* -Setting up the modules that will be available for the Servers Running inside this Client -*/ -let MULTI_PROJECT = require('../MultiProject.js'); -let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() -MULTI_PROJECT_MODULE.initialize(NT, 'NT') -MULTI_PROJECT_MODULE.initialize(SA, 'SA') -/* -Setting up external dependencies. -*/ -SA.nodeModules = { - fs: require('fs'), - nodeFetch: require('node-fetch'), - web3: require('web3'), - ws: require('ws') -} -/* -Let's start the Network Interfaces -*/ -NT.webSocketsInterface = NT.projects.network.modules.webSocketsInterface.newNetworkModulesWebSocketsInterface() -NT.webSocketsInterface.initialize() + start() -start() + async function start() { + let socialGraphService = NT.projects.network.modules.socialGraph.newSocialGraph() + await socialGraphService.initialize() + } -async function start() { - let socialGraphService = NT.projects.network.modules.socialGraph.newSocialGraph() - await socialGraphService.initialize() + } } diff --git a/Projects/Network/NT/Modules/WebSocketsInterface.js b/Projects/Network/NT/Modules/WebSocketsInterface.js index 740e6d244..912a66740 100644 --- a/Projects/Network/NT/Modules/WebSocketsInterface.js +++ b/Projects/Network/NT/Modules/WebSocketsInterface.js @@ -18,7 +18,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock } function initialize() { - socketServer = new SA.nodeModule.ws.Server({ port: global.env.Network_WEB_SOCKETS_INTERFACE_PORT }) + socketServer = new SA.nodeModules.ws.Server({ port: global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT }) clientInterface = NT.projects.network.modules.clientInterface.newNetworkModulesClientInterface() peerInterface = NT.projects.network.modules.peerInterface.newNetworkModulesPeerInterface() diff --git a/Network/package-lock.json b/package-lock.json similarity index 100% rename from Network/package-lock.json rename to package-lock.json diff --git a/Network/package.json b/package.json similarity index 100% rename from Network/package.json rename to package.json diff --git a/runNetwork.js b/runNetwork.js new file mode 100644 index 000000000..9aae83d5e --- /dev/null +++ b/runNetwork.js @@ -0,0 +1,52 @@ +/* +The Superalgos Network offers 3 types of services: + + * Social Graph Service + * Search Index Service + * Private Message Service + +Users can decide which services to run at their node.(TODO) + +This module is the starting point of the Network Node. + +*/ + +/* +The NT object is accesible everywhere at the Superalgos Network. +It provides access to all modules built for this Network. +*/ +global.NT = {} +/* +The SA object is accesible everywhere at the Superalgos Network. +It provides access to all modules built for Superalgos in general. +*/ +global.SA = {} +/* Load Environment Variables */ +let ENVIRONMENT = require('./EnvironmentForDebug.js'); +let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment() +global.env = ENVIRONMENT_MODULE +/* +First thing is to load the project schema file. +*/ +global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA) +/* +Setting up the modules that will be available, defined at the Project Schema file. +*/ +let MULTI_PROJECT = require('./MultiProject.js'); +let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() +MULTI_PROJECT_MODULE.initialize(NT, 'NT') +MULTI_PROJECT_MODULE.initialize(SA, 'SA') +/* +Setting up external dependencies. +*/ +SA.nodeModules = { + fs: require('fs'), + nodeFetch: require('node-fetch'), + web3: require('web3'), + ws: require('ws') +} + +NT.app = require('./Network/NetwokNode.js').newNetworkNode() +NT.app.run() + +console.log('Superalgos Network is Running.') \ No newline at end of file From b262400441a5690ff6545fd1f2d6229cd8632afe Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 13:30:29 +0200 Subject: [PATCH 65/81] Superalgos Network: DeepScan Bugs Fixed --- Projects/Network/NT/Modules/ClientInterface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Network/NT/Modules/ClientInterface.js b/Projects/Network/NT/Modules/ClientInterface.js index 2c04a96f0..d96d5d419 100644 --- a/Projects/Network/NT/Modules/ClientInterface.js +++ b/Projects/Network/NT/Modules/ClientInterface.js @@ -140,7 +140,7 @@ exports.newNetworkModulesClientInterface = function newNetworkModulesClientInter } } - async function queryReceived(queryMessage) { + async function queryReceived(queryMessage, userProfile) { /* We expect here a JSON string with some or all of the following properties: From b47b9b3dcf57b9e43e7705a0246f4af3ec894667 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 14:42:44 +0200 Subject: [PATCH 66/81] Adding the Social Trading Project --- Desktop/DesktopApp.js | 26 ++ .../.vscode/Superalgos Network.code-workspace | 3 + Network/NetwokNode.js | 2 +- .../Network/NT/Modules/WebSocketsInterface.js | 6 +- Projects/ProjectsSchema.json | 232 +++++++++--------- .../NT/Globals/Memory.js | 2 +- .../NT/Globals/QueryConstants.js | 2 +- .../NT/Modules/Bootstrap.js | 8 +- .../NT/Modules/ClientInterface.js | 10 +- .../NT/Modules/Event.js | 6 +- .../NT/Modules/PeerInterface.js | 2 +- .../NT/Modules/Queries/BotProfileStats.js | 6 +- .../NT/Modules/Queries/Events.js | 18 +- .../NT/Modules/Queries/PostReplies.js | 6 +- .../NT/Modules/Queries/ProfileFollowers.js | 6 +- .../NT/Modules/Queries/ProfileFollowing.js | 6 +- .../NT/Modules/Queries/ProfilePosts.js | 6 +- .../NT/Modules/Queries/UserProfileStats.js | 6 +- .../NT/Modules/Query.js | 16 +- .../NT/Modules/Social-Graph/BotProfile.js | 4 +- .../NT/Modules/Social-Graph/Post.js | 4 +- .../NT/Modules/Social-Graph/UserProfile.js | 6 +- .../NT/Modules/SocialGraph.js | 2 +- .../NT/Utilities/QueriesValidations.js | 14 +- runDesktop.js | 51 ++++ 25 files changed, 270 insertions(+), 180 deletions(-) create mode 100644 Desktop/DesktopApp.js rename Projects/{Network => Social-Trading}/NT/Globals/Memory.js (94%) rename Projects/{Network => Social-Trading}/NT/Globals/QueryConstants.js (80%) rename Projects/{Network => Social-Trading}/NT/Modules/Bootstrap.js (77%) rename Projects/{Network => Social-Trading}/NT/Modules/ClientInterface.js (93%) rename Projects/{Network => Social-Trading}/NT/Modules/Event.js (97%) rename Projects/{Network => Social-Trading}/NT/Modules/PeerInterface.js (71%) rename Projects/{Network => Social-Trading}/NT/Modules/Queries/BotProfileStats.js (78%) rename Projects/{Network => Social-Trading}/NT/Modules/Queries/Events.js (91%) rename Projects/{Network => Social-Trading}/NT/Modules/Queries/PostReplies.js (90%) rename Projects/{Network => Social-Trading}/NT/Modules/Queries/ProfileFollowers.js (86%) rename Projects/{Network => Social-Trading}/NT/Modules/Queries/ProfileFollowing.js (86%) rename Projects/{Network => Social-Trading}/NT/Modules/Queries/ProfilePosts.js (89%) rename Projects/{Network => Social-Trading}/NT/Modules/Queries/UserProfileStats.js (75%) rename Projects/{Network => Social-Trading}/NT/Modules/Query.js (68%) rename Projects/{Network => Social-Trading}/NT/Modules/Social-Graph/BotProfile.js (94%) rename Projects/{Network => Social-Trading}/NT/Modules/Social-Graph/Post.js (94%) rename Projects/{Network => Social-Trading}/NT/Modules/Social-Graph/UserProfile.js (94%) rename Projects/{Network => Social-Trading}/NT/Modules/SocialGraph.js (88%) rename Projects/{Network => Social-Trading}/NT/Utilities/QueriesValidations.js (73%) create mode 100644 runDesktop.js diff --git a/Desktop/DesktopApp.js b/Desktop/DesktopApp.js new file mode 100644 index 000000000..6f2bef1ff --- /dev/null +++ b/Desktop/DesktopApp.js @@ -0,0 +1,26 @@ +exports.newDesktopApp = function newDesktopApp() { + + let thisObject = { + run: run + } + + return thisObject + + function run() { + /* + Let's start the Network Interfaces + */ + DK.webSocketsClient = DK.projects.network.modules.webSocketsClient.newDesktopModulesWebSocketsClient() + DK.webSocketsClient.initialize() + + + return + start() + + async function start() { + let socialGraphService = NT.projects.network.modules.socialGraph.newSocialGraph() + await socialGraphService.initialize() + } + + } +} diff --git a/Network/.vscode/Superalgos Network.code-workspace b/Network/.vscode/Superalgos Network.code-workspace index 757812e5e..9970dd1eb 100644 --- a/Network/.vscode/Superalgos Network.code-workspace +++ b/Network/.vscode/Superalgos Network.code-workspace @@ -5,6 +5,9 @@ }, { "path": "C:\\Superalgos\\Projects\\Network" + }, + { + "path": "C:\\Superalgos\\Projects\\Social-Trading" } ], "settings": {} diff --git a/Network/NetwokNode.js b/Network/NetwokNode.js index 8406c76df..af1913a24 100644 --- a/Network/NetwokNode.js +++ b/Network/NetwokNode.js @@ -16,7 +16,7 @@ exports.newNetworkNode = function newNetworkNode() { start() async function start() { - let socialGraphService = NT.projects.network.modules.socialGraph.newSocialGraph() + let socialGraphService = NT.projects.socialTrading.modules.socialGraph.newSocialGraph() await socialGraphService.initialize() } diff --git a/Projects/Network/NT/Modules/WebSocketsInterface.js b/Projects/Network/NT/Modules/WebSocketsInterface.js index 912a66740..6314b0e95 100644 --- a/Projects/Network/NT/Modules/WebSocketsInterface.js +++ b/Projects/Network/NT/Modules/WebSocketsInterface.js @@ -19,8 +19,8 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock function initialize() { socketServer = new SA.nodeModules.ws.Server({ port: global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT }) - clientInterface = NT.projects.network.modules.clientInterface.newNetworkModulesClientInterface() - peerInterface = NT.projects.network.modules.peerInterface.newNetworkModulesPeerInterface() + clientInterface = NT.projects.socialTrading.modules.clientInterface.newSocialTradingModulesClientInterface() + peerInterface = NT.projects.socialTrading.modules.peerInterface.newSocialTradingModulesPeerInterface() setUpWebSocketServer() } @@ -144,7 +144,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock /* The signature gives us the blockchain account, and the account the user profile. */ - let userProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount) + let userProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount) if (userProfile === undefined) { let response = { diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 7b9676298..0ba8c9061 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1272,117 +1272,8 @@ "name": "Network", "propertyName": "network", "NT": { - "globals": [ - { - "name": "Query Constants", - "propertyName": "queryConstants", - "functionName": "newNetworkGlobalsQueryConstants", - "fileName": "QueryConstants.js" - }, - { - "name": "Memory", - "propertyName": "memory", - "functionName": "newNetworkGlobalsMemory", - "fileName": "Memory.js" - } - ], + "globals": [], "modules": [ - { - "name": "Bot Profile Stats", - "propertyName": "queriesBotProfileStats", - "functionName": "newNetworkModulesQueriesBotProfileStats", - "fileName": "Queries/BotProfileStats.js" - }, - { - "name": "User Profile Stats", - "propertyName": "queriesUserProfileStats", - "functionName": "newNetworkModulesQueriesUserProfileStats", - "fileName": "Queries/UserProfileStats.js" - }, - { - "name": "Profile Posts", - "propertyName": "queriesProfilePosts", - "functionName": "newNetworkModulesQueriesProfilePosts", - "fileName": "Queries/ProfilePosts.js" - }, - { - "name": "Profile Followers", - "propertyName": "queriesProfileFollowers", - "functionName": "newNetworkModulesQueriesProfileFollowers", - "fileName": "Queries/ProfileFollowers.js" - }, - { - "name": "Profile Following", - "propertyName": "queriesProfileFollowing", - "functionName": "newNetworkModulesQueriesProfileFollowing", - "fileName": "Queries/ProfileFollowing.js" - }, - { - "name": "Post Replies", - "propertyName": "queriesPostReplies", - "functionName": "newNetworkModulesQueriesPostReplies", - "fileName": "Queries/PostReplies.js" - }, - { - "name": "Events", - "propertyName": "queriesEvents", - "functionName": "newNetworkModulesQueriesEvents", - "fileName": "Queries/Events.js" - }, - { - "name": "User Profile", - "propertyName": "socialGraphUserProfile", - "functionName": "newNetworkModulesSocialGraphUserProfile", - "fileName": "Social-Graph/UserProfile.js" - }, - { - "name": "Bot Profile", - "propertyName": "socialGraphBotProfile", - "functionName": "newNetworkModulesSocialGraphBotProfile", - "fileName": "Social-Graph/BotProfile.js" - }, - { - "name": "Post", - "propertyName": "socialGraphPost", - "functionName": "newNetworkModulesSocialGraphPost", - "fileName": "Social-Graph/Post.js" - }, - { - "name": "Social Graph", - "propertyName": "socialGraph", - "functionName": "newNetworkModulesSocialGraph", - "fileName": "SocialGraph.js" - }, - { - "name": "Bootstrap", - "propertyName": "bootstrap", - "functionName": "newNetworkModulesBootstrap", - "fileName": "Bootstrap.js" - }, - { - "name": "Query", - "propertyName": "Query", - "functionName": "newNetworkModulesQuery", - "fileName": "Query.js" - }, - { - "name": "Event", - "propertyName": "event", - "functionName": "newNetworkModulesEvent", - "fileName": "Event.js" - }, - { - "name": "Client Interface", - "propertyName": "clientInterface", - "functionName": "newNetworkModulesClientInterface", - "fileName": "ClientInterface.js" - }, - { - "name": "Peer Interface", - "propertyName": "peerInterface", - "functionName": "newNetworkModulesPeerInterface", - "fileName": "PeerInterface.js" - }, { "name": "Web Sockets Interface", "propertyName": "webSocketsInterface", @@ -1390,11 +1281,130 @@ "fileName": "WebSocketsInterface.js" } ], + "utilities": [] + } + }, + { + "name": "Social-Trading", + "propertyName": "socialTrading", + "NT": { + "globals": [ + { + "name": "Query Constants", + "propertyName": "queryConstants", + "functionName": "newSocialTradingGlobalsQueryConstants", + "fileName": "QueryConstants.js" + }, + { + "name": "Memory", + "propertyName": "memory", + "functionName": "newSocialTradingGlobalsMemory", + "fileName": "Memory.js" + } + ], + "modules": [ + { + "name": "Bot Profile Stats", + "propertyName": "queriesBotProfileStats", + "functionName": "newSocialTradingModulesQueriesBotProfileStats", + "fileName": "Queries/BotProfileStats.js" + }, + { + "name": "User Profile Stats", + "propertyName": "queriesUserProfileStats", + "functionName": "newSocialTradingModulesQueriesUserProfileStats", + "fileName": "Queries/UserProfileStats.js" + }, + { + "name": "Profile Posts", + "propertyName": "queriesProfilePosts", + "functionName": "newSocialTradingModulesQueriesProfilePosts", + "fileName": "Queries/ProfilePosts.js" + }, + { + "name": "Profile Followers", + "propertyName": "queriesProfileFollowers", + "functionName": "newSocialTradingModulesQueriesProfileFollowers", + "fileName": "Queries/ProfileFollowers.js" + }, + { + "name": "Profile Following", + "propertyName": "queriesProfileFollowing", + "functionName": "newSocialTradingModulesQueriesProfileFollowing", + "fileName": "Queries/ProfileFollowing.js" + }, + { + "name": "Post Replies", + "propertyName": "queriesPostReplies", + "functionName": "newSocialTradingModulesQueriesPostReplies", + "fileName": "Queries/PostReplies.js" + }, + { + "name": "Events", + "propertyName": "queriesEvents", + "functionName": "newSocialTradingModulesQueriesEvents", + "fileName": "Queries/Events.js" + }, + { + "name": "User Profile", + "propertyName": "socialGraphUserProfile", + "functionName": "newSocialTradingModulesSocialGraphUserProfile", + "fileName": "Social-Graph/UserProfile.js" + }, + { + "name": "Bot Profile", + "propertyName": "socialGraphBotProfile", + "functionName": "newSocialTradingModulesSocialGraphBotProfile", + "fileName": "Social-Graph/BotProfile.js" + }, + { + "name": "Post", + "propertyName": "socialGraphPost", + "functionName": "newSocialTradingModulesSocialGraphPost", + "fileName": "Social-Graph/Post.js" + }, + { + "name": "Social Graph", + "propertyName": "socialGraph", + "functionName": "newSocialTradingModulesSocialGraph", + "fileName": "SocialGraph.js" + }, + { + "name": "Bootstrap", + "propertyName": "bootstrap", + "functionName": "newSocialTradingModulesBootstrap", + "fileName": "Bootstrap.js" + }, + { + "name": "Query", + "propertyName": "Query", + "functionName": "newSocialTradingModulesQuery", + "fileName": "Query.js" + }, + { + "name": "Event", + "propertyName": "event", + "functionName": "newSocialTradingModulesEvent", + "fileName": "Event.js" + }, + { + "name": "Client Interface", + "propertyName": "clientInterface", + "functionName": "newSocialTradingModulesClientInterface", + "fileName": "ClientInterface.js" + }, + { + "name": "Peer Interface", + "propertyName": "peerInterface", + "functionName": "newSocialTradingModulesPeerInterface", + "fileName": "PeerInterface.js" + } + ], "utilities": [ { "name": "Queries Validations", "propertyName": "queriesValidations", - "functionName": "newNetworkUtilitiesQueriesValidations", + "functionName": "newSocialTradingUtilitiesQueriesValidations", "fileName": "QueriesValidations.js" } ] diff --git a/Projects/Network/NT/Globals/Memory.js b/Projects/Social-Trading/NT/Globals/Memory.js similarity index 94% rename from Projects/Network/NT/Globals/Memory.js rename to Projects/Social-Trading/NT/Globals/Memory.js index 1c5fbb70d..6a42e762a 100644 --- a/Projects/Network/NT/Globals/Memory.js +++ b/Projects/Social-Trading/NT/Globals/Memory.js @@ -1,4 +1,4 @@ -exports.newNetworkGlobalsMemory = function () { +exports.newSocialTradingGlobalsMemory = function () { /* Here is the Data we are going to keep in memory. */ diff --git a/Projects/Network/NT/Globals/QueryConstants.js b/Projects/Social-Trading/NT/Globals/QueryConstants.js similarity index 80% rename from Projects/Network/NT/Globals/QueryConstants.js rename to Projects/Social-Trading/NT/Globals/QueryConstants.js index 92737b6b4..8f62db770 100644 --- a/Projects/Network/NT/Globals/QueryConstants.js +++ b/Projects/Social-Trading/NT/Globals/QueryConstants.js @@ -1,4 +1,4 @@ -exports.newNetworkGlobalsQueryConstants = function () { +exports.newSocialTradingGlobalsQueryConstants = function () { let thisObject = { INITIAL_INDEX_FIRST: 'First', diff --git a/Projects/Network/NT/Modules/Bootstrap.js b/Projects/Social-Trading/NT/Modules/Bootstrap.js similarity index 77% rename from Projects/Network/NT/Modules/Bootstrap.js rename to Projects/Social-Trading/NT/Modules/Bootstrap.js index c98029769..58ab6bbe1 100644 --- a/Projects/Network/NT/Modules/Bootstrap.js +++ b/Projects/Social-Trading/NT/Modules/Bootstrap.js @@ -41,7 +41,7 @@ exports.newBootstrap = function newBootstrap() { let userProfileId = userProfilePlugin.id let userHandle = config.signature.message - let userProfile = NT.projects.network.modules.socialGraphUserProfile.newNetworkModulesSocialGraphUserProfile() + let userProfile = NT.projects.socialTrading.modules.socialGraphUserProfile.newSocialTradingModulesSocialGraphUserProfile() userProfile.initialize( userProfileId, userHandle, @@ -49,9 +49,9 @@ exports.newBootstrap = function newBootstrap() { ranking ) - NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile) - NT.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile) - NT.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile) + NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.set(userProfileId, userProfile) + NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_HANDLE.set(userHandle, userProfile) + NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_BLOCHAIN_ACCOUNT.set(blockchainAccount, userProfile) } } diff --git a/Projects/Network/NT/Modules/ClientInterface.js b/Projects/Social-Trading/NT/Modules/ClientInterface.js similarity index 93% rename from Projects/Network/NT/Modules/ClientInterface.js rename to Projects/Social-Trading/NT/Modules/ClientInterface.js index d96d5d419..bbfd8b8f1 100644 --- a/Projects/Network/NT/Modules/ClientInterface.js +++ b/Projects/Social-Trading/NT/Modules/ClientInterface.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesClientInterface = function newNetworkModulesClientInterface() { +exports.newSocialTradingModulesClientInterface = function newSocialTradingModulesClientInterface() { /* This module represents the Interface the Network Node have with Network Clients connected to it. There are two things @@ -106,7 +106,7 @@ exports.newNetworkModulesClientInterface = function newNetworkModulesClientInter We will not accept events that have already been processed. */ - if (NT.projects.network.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { + if (NT.projects.socialTrading.globals.memory.maps.EVENTS.get(eventReceived.eventId) !== undefined) { let response = { result: 'Error', message: 'Client Interface Event Already Exists.' @@ -117,9 +117,9 @@ exports.newNetworkModulesClientInterface = function newNetworkModulesClientInter Here we will process the event and change the state of the Social Graph. */ try { - let event = NT.projects.network.modules.event.newNetworkModulesEvent() + let event = NT.projects.socialTrading.modules.event.newSocialTradingModulesEvent() event.initialize(eventReceived) - NT.projects.network.globals.memory.maps.EVENTS.set(eventReceived.eventId, event) + NT.projects.socialTrading.globals.memory.maps.EVENTS.set(eventReceived.eventId, event) let response = { result: 'Ok', @@ -190,7 +190,7 @@ exports.newNetworkModulesClientInterface = function newNetworkModulesClientInter Here we will process the query. This does not change the state of the Social Graph. */ try { - let query = NT.projects.network.modules.queriesQuery.newNetworkModulesQuery() + let query = NT.projects.socialTrading.modules.queriesQuery.newSocialTradingModulesQuery() query.initialize(queryReceived) return query.execute() diff --git a/Projects/Network/NT/Modules/Event.js b/Projects/Social-Trading/NT/Modules/Event.js similarity index 97% rename from Projects/Network/NT/Modules/Event.js rename to Projects/Social-Trading/NT/Modules/Event.js index adbc87424..bd39bcb81 100644 --- a/Projects/Network/NT/Modules/Event.js +++ b/Projects/Social-Trading/NT/Modules/Event.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesEvent = function newNetworkModulesEvent() { +exports.newSocialTradingModulesEvent = function newSocialTradingModulesEvent() { /* An Event is anything that happens system wide that needs to be delivered to relevant entities via @@ -104,7 +104,7 @@ exports.newNetworkModulesEvent = function newNetworkModulesEvent() { if (emitterUserProfileId === undefined) { throw ('Emitter User Profile Id Not Provided.') } - emitterUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) + emitterUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.emitterUserProfileId) if (emitterUserProfile === undefined) { throw ('Emitter User Profile Not Found.') } @@ -112,7 +112,7 @@ exports.newNetworkModulesEvent = function newNetworkModulesEvent() { Validate Target User Profile. */ if (thisObject.targetUserProfileId !== undefined) { - targetUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + targetUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } diff --git a/Projects/Network/NT/Modules/PeerInterface.js b/Projects/Social-Trading/NT/Modules/PeerInterface.js similarity index 71% rename from Projects/Network/NT/Modules/PeerInterface.js rename to Projects/Social-Trading/NT/Modules/PeerInterface.js index 44c4412b0..6cb730381 100644 --- a/Projects/Network/NT/Modules/PeerInterface.js +++ b/Projects/Social-Trading/NT/Modules/PeerInterface.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesPeerInterface = function newNetworkModulesPeerInterface() { +exports.newSocialTradingModulesPeerInterface = function newSocialTradingModulesPeerInterface() { let thisObject = { initialize: initialize, diff --git a/Projects/Network/NT/Modules/Queries/BotProfileStats.js b/Projects/Social-Trading/NT/Modules/Queries/BotProfileStats.js similarity index 78% rename from Projects/Network/NT/Modules/Queries/BotProfileStats.js rename to Projects/Social-Trading/NT/Modules/Queries/BotProfileStats.js index 9afa338e8..2db10f72b 100644 --- a/Projects/Network/NT/Modules/Queries/BotProfileStats.js +++ b/Projects/Social-Trading/NT/Modules/Queries/BotProfileStats.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesQueriesBotProfileStats = function newNetworkModulesQueriesBotProfileStats() { +exports.newSocialTradingModulesQueriesBotProfileStats = function newSocialTradingModulesQueriesBotProfileStats() { let thisObject = { profile: undefined, @@ -19,9 +19,9 @@ exports.newNetworkModulesQueriesBotProfileStats = function newNetworkModulesQuer */ let userProfile if (queryReceived.targetUserProfileId !== undefined) { - userProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + userProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - userProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + userProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (userProfile === undefined) { diff --git a/Projects/Network/NT/Modules/Queries/Events.js b/Projects/Social-Trading/NT/Modules/Queries/Events.js similarity index 91% rename from Projects/Network/NT/Modules/Queries/Events.js rename to Projects/Social-Trading/NT/Modules/Queries/Events.js index 9d3c2b25b..0565bf027 100644 --- a/Projects/Network/NT/Modules/Queries/Events.js +++ b/Projects/Social-Trading/NT/Modules/Queries/Events.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents() { +exports.newSocialTradingModulesQueriesEvents = function newSocialTradingModulesQueriesEvents() { /* This is the query executed to fill the timeline of a certain User or Bot Profile. @@ -29,7 +29,7 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents function execute() { let response = [] switch (thisObject.direction) { - case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let event = NT.memory.arrays.EVENTS[i] if (event === undefined) { break } @@ -37,7 +37,7 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents } break } - case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let event = NT.memory.arrays.EVENTS[i] if (event === undefined) { break } @@ -59,11 +59,11 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents Any of the above happening, means that indeed it is related. */ - let emitterUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) + let emitterUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.emitterUserProfileId) let emitterBotProfile = emitterUserProfile.bots.get(eventReceived.emitterBotProfileId) let emitterPost = emitterUserProfile.posts.get(eventReceived.emitterPostHash) - let targetUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) + let targetUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(eventReceived.targetUserProfileId) let targetBotProfile let targetPost @@ -223,28 +223,28 @@ exports.newNetworkModulesQueriesEvents = function newNetworkModulesQueriesEvents } if (emitterUserProfile !== undefined) { - let query = NT.projects.network.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() + let query = NT.projects.socialTrading.modules.queriesUserProfileStats.newSocialTradingModulesQueriesUserProfileStats() query.initialize({ targetUserProfileId: event.emitterUserProfileId }) eventResponse.emitterUserProfile = query.execute() query.finalize() } if (targetUserProfile !== undefined) { - let query = NT.projects.network.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() + let query = NT.projects.socialTrading.modules.queriesUserProfileStats.newSocialTradingModulesQueriesUserProfileStats() query.initialize({ targetUserProfileId: event.targetUserProfileId }) eventResponse.targetUserProfile = query.execute() query.finalize() } if (emitterBotProfile !== undefined) { - let query = NT.projects.network.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() + let query = NT.projects.socialTrading.modules.queriesBotProfileStats.newSocialTradingModulesQueriesBotProfileStats() query.initialize({ targetUserProfileId: event.emitterUserProfileId, targetBotProfileId: emitterBotProfileId }) eventResponse.emitterBotProfile = query.execute() query.finalize() } if (targetBotProfile !== undefined) { - let query = NT.projects.network.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() + let query = NT.projects.socialTrading.modules.queriesBotProfileStats.newSocialTradingModulesQueriesBotProfileStats() query.initialize({ targetUserProfileId: event.targetUserProfileId, targetBotProfileId: targetBotProfileId }) eventResponse.targetBotProfile = query.execute() query.finalize() diff --git a/Projects/Network/NT/Modules/Queries/PostReplies.js b/Projects/Social-Trading/NT/Modules/Queries/PostReplies.js similarity index 90% rename from Projects/Network/NT/Modules/Queries/PostReplies.js rename to Projects/Social-Trading/NT/Modules/Queries/PostReplies.js index 4d7400049..4c0b63ecf 100644 --- a/Projects/Network/NT/Modules/Queries/PostReplies.js +++ b/Projects/Social-Trading/NT/Modules/Queries/PostReplies.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesQueriesPostReplies = function newNetworkModulesQueriesPostReplies() { +exports.newSocialTradingModulesQueriesPostReplies = function newSocialTradingModulesQueriesPostReplies() { /* Each Post regardless if it is authored by a User or Bot Profile, can have replies. This query is designed for Network Clients to @@ -39,7 +39,7 @@ exports.newNetworkModulesQueriesPostReplies = function newNetworkModulesQueriesP let array = Array.from(thisObject.post.replies) switch (thisObject.direction) { - case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (post === undefined) { break } @@ -47,7 +47,7 @@ exports.newNetworkModulesQueriesPostReplies = function newNetworkModulesQueriesP } break } - case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (post === undefined) { break } diff --git a/Projects/Network/NT/Modules/Queries/ProfileFollowers.js b/Projects/Social-Trading/NT/Modules/Queries/ProfileFollowers.js similarity index 86% rename from Projects/Network/NT/Modules/Queries/ProfileFollowers.js rename to Projects/Social-Trading/NT/Modules/Queries/ProfileFollowers.js index 929074103..5b500c24c 100644 --- a/Projects/Network/NT/Modules/Queries/ProfileFollowers.js +++ b/Projects/Social-Trading/NT/Modules/Queries/ProfileFollowers.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesQueriesProfileFollowers = function newNetworkModulesQueriesProfileFollowers() { +exports.newSocialTradingModulesQueriesProfileFollowers = function newSocialTradingModulesQueriesProfileFollowers() { /* This module represents the query that allows a Network Client to know all the User or Bot profiles that are following a certain User or Bot profile. @@ -32,7 +32,7 @@ exports.newNetworkModulesQueriesProfileFollowers = function newNetworkModulesQue let array = Array.from(thisObject.profile.followers) switch (thisObject.direction) { - case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -40,7 +40,7 @@ exports.newNetworkModulesQueriesProfileFollowers = function newNetworkModulesQue } break } - case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Projects/Network/NT/Modules/Queries/ProfileFollowing.js b/Projects/Social-Trading/NT/Modules/Queries/ProfileFollowing.js similarity index 86% rename from Projects/Network/NT/Modules/Queries/ProfileFollowing.js rename to Projects/Social-Trading/NT/Modules/Queries/ProfileFollowing.js index 19d600d5d..aa21b6193 100644 --- a/Projects/Network/NT/Modules/Queries/ProfileFollowing.js +++ b/Projects/Social-Trading/NT/Modules/Queries/ProfileFollowing.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesQueriesProfileFollowing = function newNetworkModulesQueriesProfileFollowing() { +exports.newSocialTradingModulesQueriesProfileFollowing = function newSocialTradingModulesQueriesProfileFollowing() { /* This module represents the query that allows a Network Client to know all the User or Bot profiles that are being followed by a certain User or Bot profile. @@ -32,7 +32,7 @@ exports.newNetworkModulesQueriesProfileFollowing = function newNetworkModulesQue let array = Array.from(thisObject.profile.following) switch (thisObject.direction) { - case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -40,7 +40,7 @@ exports.newNetworkModulesQueriesProfileFollowing = function newNetworkModulesQue } break } - case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Projects/Network/NT/Modules/Queries/ProfilePosts.js b/Projects/Social-Trading/NT/Modules/Queries/ProfilePosts.js similarity index 89% rename from Projects/Network/NT/Modules/Queries/ProfilePosts.js rename to Projects/Social-Trading/NT/Modules/Queries/ProfilePosts.js index 07803098c..c14dcd49f 100644 --- a/Projects/Network/NT/Modules/Queries/ProfilePosts.js +++ b/Projects/Social-Trading/NT/Modules/Queries/ProfilePosts.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQueriesUserProfileStats() { +exports.newSocialTradingModulesQueriesUserProfileStats = function newSocialTradingModulesQueriesUserProfileStats() { /* Each User or Bot Profile can have posts. This query is designed for Network Clients to fetch the posts @@ -35,7 +35,7 @@ exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQue let array = Array.from(thisObject.profile.posts) switch (thisObject.direction) { - case NT.projects.network.globals.queryConstants.DIRECTION_FUTURE: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_FUTURE: { for (let i = thisObject.initialIndex; i < thisObject.initialIndex + thisObject.amountRequested; i++) { let arrayItem = array[i] if (arrayItem === undefined) { break } @@ -43,7 +43,7 @@ exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQue } break } - case NT.projects.network.globals.queryConstants.DIRECTION_PAST: { + case NT.projects.socialTrading.globals.queryConstants.DIRECTION_PAST: { for (let i = thisObject.initialIndex; i > thisObject.initialIndex - thisObject.amountRequested; i--) { let arrayItem = array[i] if (arrayItem === undefined) { break } diff --git a/Projects/Network/NT/Modules/Queries/UserProfileStats.js b/Projects/Social-Trading/NT/Modules/Queries/UserProfileStats.js similarity index 75% rename from Projects/Network/NT/Modules/Queries/UserProfileStats.js rename to Projects/Social-Trading/NT/Modules/Queries/UserProfileStats.js index 0c56e93e4..5825be95f 100644 --- a/Projects/Network/NT/Modules/Queries/UserProfileStats.js +++ b/Projects/Social-Trading/NT/Modules/Queries/UserProfileStats.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQueriesUserProfileStats() { +exports.newSocialTradingModulesQueriesUserProfileStats = function newSocialTradingModulesQueriesUserProfileStats() { let thisObject = { profile: undefined, @@ -18,9 +18,9 @@ exports.newNetworkModulesQueriesUserProfileStats = function newNetworkModulesQue Validate User Profile */ if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + thisObject.profile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } else { - thisObject.profile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) + thisObject.profile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_HANDLE.get(queryReceived.targetUserProfileHandle) } if (thisObject.profile === undefined) { diff --git a/Projects/Network/NT/Modules/Query.js b/Projects/Social-Trading/NT/Modules/Query.js similarity index 68% rename from Projects/Network/NT/Modules/Query.js rename to Projects/Social-Trading/NT/Modules/Query.js index aa0022a4c..1a3e9389b 100644 --- a/Projects/Network/NT/Modules/Query.js +++ b/Projects/Social-Trading/NT/Modules/Query.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesQuery = function newNetworkModulesQuery() { +exports.newSocialTradingModulesQuery = function newSocialTradingModulesQuery() { /* A Query is a call from a Network Client to a Network Node with the purpose to get @@ -41,49 +41,49 @@ exports.newNetworkModulesQuery = function newNetworkModulesQuery() { switch (thisObject.queryType) { case QUERY_TYPES.USER_PROFILE_STATS: { - thisObject.query = NT.projects.network.modules.queriesUserProfileStats.newNetworkModulesQueriesUserProfileStats() + thisObject.query = NT.projects.socialTrading.modules.queriesUserProfileStats.newSocialTradingModulesQueriesUserProfileStats() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.BOT_PROFILE_STATS: { - thisObject.query = NT.projects.network.modules.queriesBotProfileStats.newNetworkModulesQueriesBotProfileStats() + thisObject.query = NT.projects.socialTrading.modules.queriesBotProfileStats.newSocialTradingModulesQueriesBotProfileStats() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_POSTS: { - thisObject.query = NT.projects.network.modules.queriesProfilePosts.newNetworkModulesQueriesProfilePosts() + thisObject.query = NT.projects.socialTrading.modules.queriesProfilePosts.newSocialTradingModulesQueriesProfilePosts() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.POST_REPLIES: { - thisObject.query = NT.projects.network.modules.queriesPostReplies.newNetworkModulesQueriesPostReplies() + thisObject.query = NT.projects.socialTrading.modules.queriesPostReplies.newSocialTradingModulesQueriesPostReplies() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_FOLLOWERS: { - thisObject.query = NT.projects.network.modules.queriesProfileFollowers.newNetworkModulesQueriesProfileFollowers() + thisObject.query = NT.projects.socialTrading.modules.queriesProfileFollowers.newSocialTradingModulesQueriesProfileFollowers() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.PROFILE_FOLLOWING: { - thisObject.query = NT.projects.network.modules.queriesProfileFollowing.newNetworkModulesQueriesProfileFollowing() + thisObject.query = NT.projects.socialTrading.modules.queriesProfileFollowing.newSocialTradingModulesQueriesProfileFollowing() query.initialize(queryReceived) query.finalize() break } case QUERY_TYPES.maps.EVENTS: { - thisObject.query = NT.projects.network.modules.queriesEvents.newNetworkModulesQueriesEvents() + thisObject.query = NT.projects.socialTrading.modules.queriesEvents.newSocialTradingModulesQueriesEvents() query.initialize(queryReceived) query.finalize() break diff --git a/Projects/Network/NT/Modules/Social-Graph/BotProfile.js b/Projects/Social-Trading/NT/Modules/Social-Graph/BotProfile.js similarity index 94% rename from Projects/Network/NT/Modules/Social-Graph/BotProfile.js rename to Projects/Social-Trading/NT/Modules/Social-Graph/BotProfile.js index d860958df..2f1b41b47 100644 --- a/Projects/Network/NT/Modules/Social-Graph/BotProfile.js +++ b/Projects/Social-Trading/NT/Modules/Social-Graph/BotProfile.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesSocialGraphBotProfile = function newNetworkModulesSocialGraphBotProfile() { +exports.newSocialTradingModulesSocialGraphBotProfile = function newSocialTradingModulesSocialGraphBotProfile() { /* Users can have a Profile that can: * follow other bots profiles. @@ -80,7 +80,7 @@ exports.newNetworkModulesSocialGraphBotProfile = function newNetworkModulesSocia if (thisObject.posts.get(emitterPostHash) !== undefined) { throw ('Post Already Exists.') } else { - let post = NT.projects.network.modules.socialGraphPost.newNetworkModulesSocialGraphPost() + let post = NT.projects.socialTrading.modules.socialGraphPost.newSocialTradingModulesSocialGraphPost() post.initialize( emitterUserProfileId, targetUserProfileId, diff --git a/Projects/Network/NT/Modules/Social-Graph/Post.js b/Projects/Social-Trading/NT/Modules/Social-Graph/Post.js similarity index 94% rename from Projects/Network/NT/Modules/Social-Graph/Post.js rename to Projects/Social-Trading/NT/Modules/Social-Graph/Post.js index 36e3541d3..42ffbc346 100644 --- a/Projects/Network/NT/Modules/Social-Graph/Post.js +++ b/Projects/Social-Trading/NT/Modules/Social-Graph/Post.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesSocialGraphPost = function newNetworkModulesSocialGraphPost() { +exports.newSocialTradingModulesSocialGraphPost = function newSocialTradingModulesSocialGraphPost() { /* Posts represent a collection of multimedia content sotored somewhere else and identified by that content hash. Posts might belong to: @@ -97,7 +97,7 @@ exports.newNetworkModulesSocialGraphPost = function newNetworkModulesSocialGraph /* Validate Target User Profile. */ - let targetUserProfile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) + let targetUserProfile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(thisObject.targetUserProfileId) if (targetUserProfile === undefined) { throw ('Target User Profile Not Found.') } diff --git a/Projects/Network/NT/Modules/Social-Graph/UserProfile.js b/Projects/Social-Trading/NT/Modules/Social-Graph/UserProfile.js similarity index 94% rename from Projects/Network/NT/Modules/Social-Graph/UserProfile.js rename to Projects/Social-Trading/NT/Modules/Social-Graph/UserProfile.js index 527b36ef2..a54d0b6b2 100644 --- a/Projects/Network/NT/Modules/Social-Graph/UserProfile.js +++ b/Projects/Social-Trading/NT/Modules/Social-Graph/UserProfile.js @@ -1,4 +1,4 @@ -exports.newNetworkModulesSocialGraphUserProfile = function newNetworkModulesSocialGraphUserProfile() { +exports.newSocialTradingModulesSocialGraphUserProfile = function newSocialTradingModulesSocialGraphUserProfile() { /* Users can have a Profile that can: * follow other user profiles. @@ -84,7 +84,7 @@ exports.newNetworkModulesSocialGraphUserProfile = function newNetworkModulesSoci if (thisObject.posts.get(emitterPostHash) !== undefined) { throw ('Post Already Exists.') } else { - let post = NT.projects.network.modules.socialGraphPost.newNetworkModulesSocialGraphPost() + let post = NT.projects.socialTrading.modules.socialGraphPost.newSocialTradingModulesSocialGraphPost() post.initialize( emitterUserProfileId, targetUserProfileId, @@ -159,7 +159,7 @@ exports.newNetworkModulesSocialGraphUserProfile = function newNetworkModulesSoci if (bot !== undefined) { throw ('Bot Already Exists.') } else { - let bot = NT.projects.network.modules.BOTS.newBot() + let bot = NT.projects.socialTrading.modules.BOTS.newBot() bot.initialize( userProfileId, botProfileId, diff --git a/Projects/Network/NT/Modules/SocialGraph.js b/Projects/Social-Trading/NT/Modules/SocialGraph.js similarity index 88% rename from Projects/Network/NT/Modules/SocialGraph.js rename to Projects/Social-Trading/NT/Modules/SocialGraph.js index 0d475d950..3ac068e92 100644 --- a/Projects/Network/NT/Modules/SocialGraph.js +++ b/Projects/Social-Trading/NT/Modules/SocialGraph.js @@ -21,7 +21,7 @@ exports.newSocialGraph = function newSocialGraph() { } async function initialize() { - let bootstrapProcess = NT.projects.network.modules.bootstrap.newBootstrap() + let bootstrapProcess = NT.projects.socialTrading.modules.bootstrap.newBootstrap() await bootstrapProcess.initialize() } } \ No newline at end of file diff --git a/Projects/Network/NT/Utilities/QueriesValidations.js b/Projects/Social-Trading/NT/Utilities/QueriesValidations.js similarity index 73% rename from Projects/Network/NT/Utilities/QueriesValidations.js rename to Projects/Social-Trading/NT/Utilities/QueriesValidations.js index d98b58e4a..722b54835 100644 --- a/Projects/Network/NT/Utilities/QueriesValidations.js +++ b/Projects/Social-Trading/NT/Utilities/QueriesValidations.js @@ -1,4 +1,4 @@ -exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQueriesValidations() { +exports.newSocialTradingUtilitiesQueriesValidations = function newSocialTradingUtilitiesQueriesValidations() { /* This module have a few funcions that are often needed at Queries Modules. */ @@ -15,7 +15,7 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer Validate User Profile */ if (queryReceived.targetUserProfileId !== undefined) { - thisObject.profile = NT.projects.network.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) + thisObject.profile = NT.projects.socialTrading.globals.memory.maps.USER_PROFILES_BY_ID.get(queryReceived.targetUserProfileId) } if (thisObject.profile === undefined) { @@ -51,11 +51,11 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer throw ('Initial Index Undefined.') } - if (queryReceived.initialIndex === NT.projects.network.globals.queryConstants.INITIAL_INDEX_LAST) { + if (queryReceived.initialIndex === NT.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_LAST) { queryReceived.initialIndex = thisObject.profile.posts.length - 1 } - if (queryReceived.initialIndex === NT.projects.network.globals.queryConstants.INITIAL_INDEX_FIRST) { + if (queryReceived.initialIndex === NT.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_FIRST) { queryReceived.initialIndex = 0 } @@ -75,11 +75,11 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer throw ('Amount Requested Is Not a Number.') } - if (queryReceived.amountRequested < NT.projects.network.globals.queryConstants.MIN_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested < NT.projects.socialTrading.globals.queryConstants.MIN_AMOUNT_REQUESTED) { throw ('Amount Requested Below Min.') } - if (queryReceived.amountRequested > NT.projects.network.globals.queryConstants.MAX_AMOUNT_REQUESTED) { + if (queryReceived.amountRequested > NT.projects.socialTrading.globals.queryConstants.MAX_AMOUNT_REQUESTED) { throw ('Amount Requested Above Max.') } /* @@ -89,7 +89,7 @@ exports.newNetworkUtilitiesQueriesValidations = function newNetworkUtilitiesQuer throw ('Direction Undefined.') } - if (queryReceived.direction !== NT.projects.network.globals.queryConstants.DIRECTION_FUTURE && queryReceived.direction !== NT.projects.network.globals.queryConstants.DIRECTION_PAST) { + if (queryReceived.direction !== NT.projects.socialTrading.globals.queryConstants.DIRECTION_FUTURE && queryReceived.direction !== NT.projects.socialTrading.globals.queryConstants.DIRECTION_PAST) { throw ('Direction Not Supported.') } diff --git a/runDesktop.js b/runDesktop.js new file mode 100644 index 000000000..250438f83 --- /dev/null +++ b/runDesktop.js @@ -0,0 +1,51 @@ +/* +The Superalgos Desktop is one of the 3 clients of the Superalgos Network: + + * Superalgos Mobile + * Superalgos Desktop + * Superalgos Server + +Users can unse any of these clients for their social trading activities. + +This module is the starting point of the Superalgos Desktop App. + +*/ + +/* +The DK object is accesible everywhere at the Superalgos Desktop App. +It provides access to all modules built for this App. +*/ +global.DK = {} +/* +The SA object is accesible everywhere at the Superalgos Desktop App. +It provides access to all modules built for Superalgos in general. +*/ +global.SA = {} +/* Load Environment Variables */ +let ENVIRONMENT = require('./EnvironmentForDebug.js'); +let ENVIRONMENT_MODULE = ENVIRONMENT.newEnvironment() +global.env = ENVIRONMENT_MODULE +/* +First thing is to load the project schema file. +*/ +global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA) +/* +Setting up the modules that will be available, defined at the Project Schema file. +*/ +let MULTI_PROJECT = require('./MultiProject.js'); +let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject() +MULTI_PROJECT_MODULE.initialize(DK, 'DK') +MULTI_PROJECT_MODULE.initialize(SA, 'SA') +/* +Setting up external dependencies. +*/ +SA.nodeModules = { + fs: require('fs'), + web3: require('web3'), + ws: require('ws') +} + +DK.app = require('./Network/DesktopApp.js').newNetworkNode() +DK.app.run() + +console.log('Superalgos Desktop is Running.') \ No newline at end of file From b18b1f234217936be307c63cf7b3cbbdea407326 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 15:48:03 +0200 Subject: [PATCH 67/81] Web Socket Client Implemented --- .../Network/NT/Modules/WebSocietsClient.js | 97 +++++++++++++++++++ .../Network/NT/Modules/WebSocketsInterface.js | 4 +- Projects/ProjectsSchema.json | 6 ++ runDesktop.js | 2 +- 4 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 Projects/Network/NT/Modules/WebSocietsClient.js diff --git a/Projects/Network/NT/Modules/WebSocietsClient.js b/Projects/Network/NT/Modules/WebSocietsClient.js new file mode 100644 index 000000000..996d0d07e --- /dev/null +++ b/Projects/Network/NT/Modules/WebSocietsClient.js @@ -0,0 +1,97 @@ +exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSocketsClient() { + + let thisObject = { + sendMessage: sendMessage, + initialize: initialize, + finalize: finalize + } + + let socketClient + let callbackFunction + + return thisObject + + function finalize() { + socketClient.close() + socketClient = undefined + networkInterface = undefined + peerInterface = undefined + } + + function initialize() { + socketClient = new SA.nodeModules.ws({ host: 'localhost', port: global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT }) + //networkInterface = SA.projects.socialTrading.modules.networkInterface.newSocialTradingModulesNetworkInterface() + + setUpWebsocketClient() + } + + function setUpWebsocketClient() { + try { + let handshakeDone = false + + socketClient.on('onopen', onConnection) + socketClient.on('onmessage', onMenssage) + socketClient.on('onerror', onError) + + function onConnection(socket) { + /* + Send Handshake Message + */ + socketClient.send('Handshake Message') + console.log('Handshake Message Sent') + } + + async function onMenssage(socketMessage) { + try { + + let message = JSON.parse(socketMessage.data) + /* + Chack if we are waiting for the Handshake response. + */ + if (handshakeDone === false) { + if (message.result === 'Ok') { + handshakeDone = true + return + } + } + + callbackFunction.receiveResponse(message) + callbackFunction = undefined + + } catch (err) { + callbackFunction = undefined + console.log('[ERROR] Web Sockets Client -> setUpWebsocketClient -> err.stack = ' + err.stack) + } + } + + function onError(err) { + console.log('[ERROR] Web Sockets Client -> setUpWebsocketClient -> onError -> err.stack = ' + err.stack) + } + + } catch (err) { + console.log('[ERROR] Web Sockets Client -> setUpWebsocketClient -> err.stack = ' + err.stack) + } + } + + function sendMessage(message, callback) { + if (callbackFunction !== undefined) { + console.log('[ERROR] Web Sockets Client -> sendMessage -> Cannot send more messages while waiting for a response.') + return false + } + + if (socketClient.readyState !== 1) { // 1 means connected and ready. + console.log('[ERROR] Web Sockets Client -> sendMessage -> Cannot send message while connection is closed.') + return false + } + + try { + callbackFunction = callback + socketClient.send(message) + return true + } catch (err) { + callbackFunction = false + console.log('[ERROR] Web Sockets Client -> sendMessage -> err.stack = ' + err.stack) + return false + } + } +} \ No newline at end of file diff --git a/Projects/Network/NT/Modules/WebSocketsInterface.js b/Projects/Network/NT/Modules/WebSocketsInterface.js index 6314b0e95..a1a286d87 100644 --- a/Projects/Network/NT/Modules/WebSocketsInterface.js +++ b/Projects/Network/NT/Modules/WebSocketsInterface.js @@ -90,7 +90,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock } } } catch (err) { - console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets Interface -> setUpWebSocketServer -> err.stack = ' + err.stack) } } } @@ -167,7 +167,7 @@ exports.newNetworkModulesWebSocketsInterface = function newNetworkModulesWebSock } } catch (err) { - console.log('[ERROR] Network -> Web Sockets Interface -> run -> setUpWebSocketServer -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets Interface -> setUpWebSocketServer -> err.stack = ' + err.stack) } } } \ No newline at end of file diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index 0ba8c9061..fbb9b98df 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1279,6 +1279,12 @@ "propertyName": "webSocketsInterface", "functionName": "newNetworkModulesWebSocketsInterface", "fileName": "WebSocketsInterface.js" + }, + { + "name": "Web Sockets Client", + "propertyName": "webSocketsClient", + "functionName": "newNetworkModulesWebSocketsClient", + "fileName": "WebSocketsClient.js" } ], "utilities": [] diff --git a/runDesktop.js b/runDesktop.js index 250438f83..96c4c24c5 100644 --- a/runDesktop.js +++ b/runDesktop.js @@ -45,7 +45,7 @@ SA.nodeModules = { ws: require('ws') } -DK.app = require('./Network/DesktopApp.js').newNetworkNode() +DK.app = require('./Desktop/DesktopApp.js').newDesktopApp() DK.app.run() console.log('Superalgos Desktop is Running.') \ No newline at end of file From 3f679e8e90647f7a7459410a1dbfb2bef04e9354 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 31 Aug 2021 17:31:35 +0200 Subject: [PATCH 68/81] All programs finished --- .../Delegate-Power/delegate-power.json | 13 +++++ .../delegate-power-switch.json | 34 +++++++++++++ .../delegation-program.json | 35 ++++++++++++++ .../Staking-Program/staking-program.json | 5 +- .../Tokens/Tokens-Awarded/tokens-awarded.json | 4 ++ .../U/User/User-Delegate/user-delegate.json | 48 +++++++++++++++++++ .../User-Profile-Vote/user-profile-vote.json | 10 ++-- .../user-profile-votes-switch.json | 4 +- 8 files changed, 144 insertions(+), 9 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Concepts/D/Delegate/Delegate-Power/delegate-power.json create mode 100644 Projects/Governance/Schemas/Docs-Nodes/D/Delegate/Delegate-Power-Switch/delegate-power-switch.json create mode 100644 Projects/Governance/Schemas/Docs-Nodes/D/Delegation/Delegation-Program/delegation-program.json create mode 100644 Projects/Governance/Schemas/Docs-Nodes/U/User/User-Delegate/user-delegate.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/D/Delegate/Delegate-Power/delegate-power.json b/Projects/Governance/Schemas/Docs-Concepts/D/Delegate/Delegate-Power/delegate-power.json new file mode 100644 index 000000000..9c6fb05e2 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Concepts/D/Delegate/Delegate-Power/delegate-power.json @@ -0,0 +1,13 @@ +{ + "type": "Delegate Power", + "definition": { + "text": "Delegate Power is the Token Power that goes into the Delegation Program. Only 10% of the Delegate Power flowing into a User Delegate node reaches the recipient User Profile.", + "updated": 1630423869047 + }, + "paragraphs": [ + { + "style": "Text", + "text": "Right click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode. Then you can use docs.save to save your changes and app.contribute to send it to the main repository." + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/D/Delegate/Delegate-Power-Switch/delegate-power-switch.json b/Projects/Governance/Schemas/Docs-Nodes/D/Delegate/Delegate-Power-Switch/delegate-power-switch.json new file mode 100644 index 000000000..ff315c3a2 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Nodes/D/Delegate/Delegate-Power-Switch/delegate-power-switch.json @@ -0,0 +1,34 @@ +{ + "type": "Delegate Power Switch", + "definition": { + "text": "Use this switch as an organizational device, and spawn User Delegate nodes.", + "updated": 1630421941682 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630421951903 + }, + { + "style": "Text", + "text": "You may use this switch for two different purposes:" + }, + { + "style": "List", + "text": "As an organizational device: You may create arbitrary arrangements, spawning more switches and User Delegate nodes." + }, + { + "style": "List", + "text": "As a switch: You may control the flow of Delegate Power, pretty much like with a Token Power Switch, but within the Delegation Program. If you need a reminder, read about how Token Power Flows." + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/D/Delegation/Delegation-Program/delegation-program.json b/Projects/Governance/Schemas/Docs-Nodes/D/Delegation/Delegation-Program/delegation-program.json new file mode 100644 index 000000000..f3a18692a --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Nodes/D/Delegation/Delegation-Program/delegation-program.json @@ -0,0 +1,35 @@ +{ + "type": "Delegation Program", + "definition": { + "text": "The Delegation Program allows you to delegate Token Power to empower other members of the Community, giving them a louder voice in governance. The Token Power you delegate may be used by the recipient in any Governance Program, with no restrictions.", + "updated": 1630408676672 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630408752467 + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Featuring Tokens Bonus" + }, + { + "style": "Text", + "text": "When you delegate Voting Power through the Voting Program, the recipient may only use the delegated power within the Voting Program. Instead, the Delegation Program allows you to delegate Token Power, which may be used by the recipient in any program.", + "updated": 1630408794134 + }, + { + "style": "Warning", + "text": "Only 10% of the Token Power you drive into a User Delegate node reaches the recipient User Profile. This is to disincentivize fraudulent behaviors that may arise involving circular declarations, fake profiles, or trading of votes." + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/S/Staking/Staking-Program/staking-program.json b/Projects/Governance/Schemas/Docs-Nodes/S/Staking/Staking-Program/staking-program.json index c871e7c96..69a97a6c2 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/S/Staking/Staking-Program/staking-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/S/Staking/Staking-Program/staking-program.json @@ -15,7 +15,7 @@ "text": "This is a very simple program, as it doesn't involve smart contracts or transferring funds out of your Governance Address." }, { - "style": "Text", + "style": "Callout", "text": "You may participate in the Staking Program with the Token Power that you haven’t used for other purposes. All you need to do is spawn the program from within the Financial Programs node and let some Token Power flow into it.", "updated": 1630399445299 }, @@ -25,7 +25,8 @@ }, { "style": "Text", - "text": "The calculation of the Tokens Awarded for this program is similar to how Tokens Bonus is calculated on other programs, as a direct Rule of Three:" + "text": "The calculation of the Tokens Awarded for this program is similar to how Tokens Bonus is calculated on other programs: as a direct Rule of Three.", + "updated": 1630409043816 }, { "style": "Json", diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json index a0730dd10..d89d8b01c 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json @@ -44,6 +44,10 @@ "style": "List", "text": "The How Claims are Resolved page explains how tokens are awarded in the Claims Program." }, + { + "style": "List", + "text": "In the Staking Program." + }, { "style": "Text", "text": "" diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Delegate/user-delegate.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Delegate/user-delegate.json new file mode 100644 index 000000000..373ee70c6 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Delegate/user-delegate.json @@ -0,0 +1,48 @@ +{ + "type": "User Delegate", + "definition": { + "text": "Use this node to establish a reference with a colleague's User Profile. With this reference, you are passing on Token Power directly into your colleague's profile, effectively delegating your Token Power. Your colleague may use the power in any of the Governance Programs.", + "updated": 1630423548110 + }, + "paragraphs": [ + { + "style": "Block", + "text": "Content", + "updated": 1630423559633 + }, + { + "style": "Text", + "text": "The main use case for delegating Token Power is when mentors wish to help their mentees make their first few Contribution Claims. " + }, + { + "style": "Text", + "text": "Contributors need to drive Claim Power to their claims for them to be effective. However, when they are new to Superalgos, they may not have enough tokens to back their claims.", + "updated": 1630423586473 + }, + { + "style": "Text", + "text": "Mentors are happy to help their mentees get their first few tokens, and are rewarded for their work and generosity through the Mentorship Program." + }, + { + "style": "Note", + "text": "This form of Token Power delegation is inspired in the concept of Liquid Democracy, also implemented in the Voting Program." + }, + { + "style": "Text", + "text": "The same Token Power may be delegated multiple times with the caveat in the below warning box. The delegation may be withdrawn at any point as well, simply by removing the User Delegate node or its reference." + }, + { + "style": "Warning", + "text": "Only 10% of the Delegate Power you drive into a User Delegate node reaches the recipient User Profile. This is to disincentivize fraudulent behaviors that may arise involving circular declarations, fake profiles, or trading of votes.", + "updated": 1630423731772 + }, + { + "style": "Block", + "text": "Configuration" + }, + { + "style": "Title", + "text": "Configuration" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Vote/user-profile-vote.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Vote/user-profile-vote.json index 5e14865f7..254e8cc8c 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Vote/user-profile-vote.json +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Vote/user-profile-vote.json @@ -21,13 +21,13 @@ }, { "style": "Text", - "text": "The same Voting Power may be delegated multiple times, and the delegation may be withdrawn at any point as well, simply by removing the User Profile Vote node or its reference.", - "updated": 1630396998228 + "text": "The same Voting Power may be delegated multiple times with the caveat in the below warning box. The delegation may be withdrawn at any point as well, simply by removing the User Profile Vote node or its reference.", + "updated": 1630423697159 }, { - "style": "Important", - "text": "The Voting Power you drive into User Profile Vote nodes is significant, as it is that much Voting Power you will be passing on. Your colleague will be able to use the Incoming Power in whatever way, within the Voting Program.", - "updated": 1630397320144 + "style": "Warning", + "text": "Only 10% of the Voting Power you drive into a User Profile Vote node reaches the recipient User Profile. This is to disincentivize fraudulent behaviors that may arise involving circular declarations, fake profiles, or trading of votes.", + "updated": 1630408559866 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Votes-Switch/user-profile-votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Votes-Switch/user-profile-votes-switch.json index e5e9986cf..58b312333 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Votes-Switch/user-profile-votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Profile-Votes-Switch/user-profile-votes-switch.json @@ -1,8 +1,8 @@ { "type": "User Profile Votes Switch", "definition": { - "text": "Use this switch as an organizational device, and to spawn User Profile Vote nodes. ", - "updated": 1630394573673 + "text": "Use this switch as an organizational device, and to spawn User Profile Vote nodes.", + "updated": 1630421929174 }, "paragraphs": [ { From a4ac062fc0606616132299edfaf630a18fb2e32c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 31 Aug 2021 18:41:58 +0200 Subject: [PATCH 69/81] Superalgos Network: Web Sockets Client and Server working. --- .vscode/Desktop.code-workspace | 10 +++++++ .vscode/Network.code-workspace | 10 +++++++ Desktop/DesktopApp.js | 2 +- .../Modules/WebSocketsClient.js} | 26 +++++++++++-------- Projects/ProjectsSchema.json | 8 +++++- 5 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 .vscode/Desktop.code-workspace create mode 100644 .vscode/Network.code-workspace rename Projects/Network/{NT/Modules/WebSocietsClient.js => SA/Modules/WebSocketsClient.js} (71%) diff --git a/.vscode/Desktop.code-workspace b/.vscode/Desktop.code-workspace new file mode 100644 index 000000000..97e2d4c8f --- /dev/null +++ b/.vscode/Desktop.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "C:\\Superalgos" + } + ], + "settings": { + "search.maintainFileSearchCache": true + } +} \ No newline at end of file diff --git a/.vscode/Network.code-workspace b/.vscode/Network.code-workspace new file mode 100644 index 000000000..97e2d4c8f --- /dev/null +++ b/.vscode/Network.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "C:\\Superalgos" + } + ], + "settings": { + "search.maintainFileSearchCache": true + } +} \ No newline at end of file diff --git a/Desktop/DesktopApp.js b/Desktop/DesktopApp.js index 6f2bef1ff..3c225154c 100644 --- a/Desktop/DesktopApp.js +++ b/Desktop/DesktopApp.js @@ -10,7 +10,7 @@ exports.newDesktopApp = function newDesktopApp() { /* Let's start the Network Interfaces */ - DK.webSocketsClient = DK.projects.network.modules.webSocketsClient.newDesktopModulesWebSocketsClient() + DK.webSocketsClient = SA.projects.network.modules.webSocketsClient.newNetworkModulesWebSocketsClient() DK.webSocketsClient.initialize() diff --git a/Projects/Network/NT/Modules/WebSocietsClient.js b/Projects/Network/SA/Modules/WebSocketsClient.js similarity index 71% rename from Projects/Network/NT/Modules/WebSocietsClient.js rename to Projects/Network/SA/Modules/WebSocketsClient.js index 996d0d07e..01e53f1ed 100644 --- a/Projects/Network/NT/Modules/WebSocietsClient.js +++ b/Projects/Network/SA/Modules/WebSocketsClient.js @@ -19,7 +19,7 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets } function initialize() { - socketClient = new SA.nodeModules.ws({ host: 'localhost', port: global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT }) + socketClient = new SA.nodeModules.ws('ws://' + 'localhost' + ':' + global.env.NETWORK_WEB_SOCKETS_INTERFACE_PORT) //networkInterface = SA.projects.socialTrading.modules.networkInterface.newSocialTradingModulesNetworkInterface() setUpWebsocketClient() @@ -29,11 +29,11 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets try { let handshakeDone = false - socketClient.on('onopen', onConnection) - socketClient.on('onmessage', onMenssage) - socketClient.on('onerror', onError) + socketClient.onopen = () => { onConnection() } + socketClient.onmessage = socketMessage => { onMenssage(socketMessage) } + socketClient.onerror = err => { onError(err) } - function onConnection(socket) { + function onConnection() { /* Send Handshake Message */ @@ -44,28 +44,32 @@ exports.newNetworkModulesWebSocketsClient = function newNetworkModulesWebSockets async function onMenssage(socketMessage) { try { - let message = JSON.parse(socketMessage.data) + let response = JSON.parse(socketMessage.data) /* Chack if we are waiting for the Handshake response. */ if (handshakeDone === false) { - if (message.result === 'Ok') { + if (response.result === 'Ok') { handshakeDone = true return + } else { + console.log('[ERROR] Web Sockets Client -> onMenssage -> handshakeDone -> message.response = ' + response.message) + return } - } - + } + callbackFunction.receiveResponse(message) callbackFunction = undefined } catch (err) { callbackFunction = undefined - console.log('[ERROR] Web Sockets Client -> setUpWebsocketClient -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets Client -> err.stack = ' + err.stack) } } function onError(err) { - console.log('[ERROR] Web Sockets Client -> setUpWebsocketClient -> onError -> err.stack = ' + err.stack) + console.log('[ERROR] Web Sockets Client -> onError -> err.message = ' + err.message) + console.log('[ERROR] Web Sockets Client -> onError -> err.stack = ' + err.stack) } } catch (err) { diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index fbb9b98df..b67c60a29 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1279,7 +1279,13 @@ "propertyName": "webSocketsInterface", "functionName": "newNetworkModulesWebSocketsInterface", "fileName": "WebSocketsInterface.js" - }, + } + ], + "utilities": [] + }, + "SA": { + "globals": [], + "modules": [ { "name": "Web Sockets Client", "propertyName": "webSocketsClient", From 173ba7a5128b0c17f34af549b40b767042279f1f Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 31 Aug 2021 18:43:58 +0200 Subject: [PATCH 70/81] Definitions topic revision --- .../Superalgos-Pools/superalgos-pools.json | 8 +- .../Docs-Nodes/F/Feature/Feature/feature.json | 6 +- .../F/Features/Features/features.json | 4 +- .../P/Pool/Pool-Class/pool-class.json | 9 +- .../Schemas/Docs-Nodes/P/Pool/Pool/pool.json | 11 +- .../Docs-Nodes/P/Pools/Pools/pools.json | 14 +- .../Position-Class/position-class.json | 4 +- .../P/Position/Position/position.json | 7 +- .../P/Positions/Positions/positions.json | 3 +- .../Voting/Voting-Program/voting-program.json | 8 +- ...nance-definitions-002-pools-hierarchy.json | 4 +- ...to-governance-001-governance-overview.json | 18 ++- ...to-governance-003-governance-programs.json | 124 ++++++++++++++++++ ...ernance-003-referral-program-overview.json | 51 ------- ...vernance-004-support-program-overview.json | 63 --------- ...nance-005-mentorship-program-overview.json | 66 ---------- ...-contribution-claims-program-overview.json | 44 ------- ...overnance-007-voting-program-overview.json | 105 --------------- ...nance-008-delegation-program-overview.json | 28 ---- ...vernance-009-staking-program-overview.json | 26 ---- ...vernance-2.1-airdrop-program-overview.json | 20 --- ...overnance-2.2-github-program-overview.json | 20 --- 22 files changed, 182 insertions(+), 461 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-003-governance-programs.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-003-referral-program-overview.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-004-support-program-overview.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-005-mentorship-program-overview.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-006-contribution-claims-program-overview.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-007-voting-program-overview.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-008-delegation-program-overview.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-009-staking-program-overview.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-2.1-airdrop-program-overview.json delete mode 100644 Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-2.2-github-program-overview.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Pools/superalgos-pools.json b/Projects/Governance/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Pools/superalgos-pools.json index 9911f46d2..2326507fd 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Pools/superalgos-pools.json +++ b/Projects/Governance/Schemas/Docs-Concepts/S/Superalgos/Superalgos-Pools/superalgos-pools.json @@ -2,7 +2,7 @@ "type": "Superalgos Pools", "definition": { "text": "Superalgos Pools is the top-level hierarchy kickstarting the definition of the whole Superalgos Project. It features the definition of several Pool nodes describing the main areas of project development that the Community wishes to incentivize.", - "updated": 1630170275507 + "updated": 1630426704558 }, "paragraphs": [ { @@ -12,7 +12,8 @@ }, { "style": "Text", - "text": "Because this is the highest level definition of how tokens will be distributed, the Superalgos Pools hierarchy is present in all governance Plugin Workspaces." + "text": "Because this is the highest level definition of how tokens will be distributed, the Superalgos Pools hierarchy is present in all Governance Plugin Workspaces.", + "updated": 1630426648511 }, { "style": "Success", @@ -21,7 +22,8 @@ }, { "style": "Note", - "text": "The configuration of the top-level node in the hierarchy determines how many tokens will be distributed in the release." + "text": "The configuration of the top-level node in the hierarchy determines how many tokens are distributed in the Distribution Event.", + "updated": 1630426722866 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature/feature.json b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature/feature.json index d3ab4f7a0..2345439ec 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature/feature.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Feature/Feature/feature.json @@ -15,9 +15,9 @@ "text": "You may cast Weight Votes on individual Feature nodes to incentivize the improvement, development, and maintenance of the said feature." }, { - "style": "Text", - "text": "If you are involved in the development or maintenance of the said feature, you may place a Feature Contribution Claim and rally the Community to support your claim so that you may be compensated for your work.", - "updated": 1624708816194 + "style": "Callout", + "text": "If you are involved in the development or maintenance of a feature, you may place a Feature Contribution Claim and rally the Community to support your claim with Feature Claim Vote nodes so that you may be rewarded for your work.", + "updated": 1630428072285 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/F/Features/Features/features.json b/Projects/Governance/Schemas/Docs-Nodes/F/Features/Features/features.json index 1dab93b90..95b3c1192 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/F/Features/Features/features.json +++ b/Projects/Governance/Schemas/Docs-Nodes/F/Features/Features/features.json @@ -1,8 +1,8 @@ { "type": "Features", "definition": { - "text": "The Features hierarchy defines existing software features, or features in the wish list, yet to be developed. When Weight Votes are directed at existing features, the tokens allocated to the said features are distributed among Contributors maintaining the code. When Weight Votes are directed at features that don’t yet exist, then the tokens incentivize the creation and contribution of the said features.", - "updated": 1624708469928 + "text": "The Features hierarchy defines existing software features, or features in the wish list, yet to be developed. The definition of existing features exist to reward Contributors maintaining the code. Definitions of features that don’t yet exist are intended to incentivize the creation and contribution of the said features.", + "updated": 1630427874621 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool-Class/pool-class.json b/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool-Class/pool-class.json index 72c854743..544044983 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool-Class/pool-class.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool-Class/pool-class.json @@ -1,8 +1,8 @@ { "type": "Pool Class", "definition": { - "text": "The Pool Class node is an organizational device used to arrange Pool nodes in suitable hierarchical structures.", - "updated": 1624707077159 + "text": "The Pool Class node is an organizational device used to arrange Pool nodes in suitable hierarchical structures. Use this node to spawn other Pool Class nodes and Pool nodes.", + "updated": 1630427259648 }, "paragraphs": [ { @@ -11,8 +11,9 @@ "updated": 1624707110607 }, { - "style": "Text", - "text": "Their main purpose is to help organize Pool nodes in the most appropriate manner." + "style": "Note", + "text": "The main purpose of this node is to help organize Pool nodes in the most appropriate manner.", + "updated": 1630426852609 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool/pool.json b/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool/pool.json index 953fd60ac..e5ab32aa9 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool/pool.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Pool/Pool/pool.json @@ -1,8 +1,8 @@ { "type": "Pool", "definition": { - "text": "A Pool represents a high-level container of Token Rewards. The node is used to receive Weight Votes and to route tokens to other hierarchies via references. Contributors may direct Weight Votes to Pool nodes to affect how many tokens will be routed to and distributed at the referenced hierarchy.", - "updated": 1624707171824 + "text": "A Pool represents a high-level container of Token Rewards. The node may receive Weight Votes and route Token Rewards to other hierarchies via references. Contributors may direct Weight Votes to Pool nodes to affect how many tokens will be routed to and distributed at the referenced hierarchy.", + "updated": 1630426946700 }, "paragraphs": [ { @@ -35,11 +35,12 @@ "text": "Weight: The total weight of the Pool is expressed as a percentage of the total Weight Votes directed at the whole hierarchy." }, { - "style": "Callout", - "text": "Notice that Pool nodes participate in the pool of tokens assigned to the Pools hierarchy it belongs to. The aforementioned Weight value is in relation to the said hierarchy, and not necessarily to the top-level Superalgos Pools hierarchy." + "style": "Note", + "text": "Notice that a Pool node gets Token Rewards allocated to the hierarchy it belongs to. The aforementioned Weight value is in relation to the said hierarchy, and not necessarily to the top-level Superalgos Pools hierarchy.", + "updated": 1630427153739 }, { - "style": "Text", + "style": "Callout", "text": "We mentioned that Pool nodes may pass on Token Rewards to other hierarchies which, in turn, further break up the definitions of where tokens go to. We’ll explore those hierarchies in the next few pages." }, { diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Pools/Pools/pools.json b/Projects/Governance/Schemas/Docs-Nodes/P/Pools/Pools/pools.json index fface73a7..25a1a5b95 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Pools/Pools/pools.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Pools/Pools/pools.json @@ -1,8 +1,8 @@ { "type": "Pools", "definition": { - "text": "This hierarchy breaks up the definition of a Project in specific areas. Each area is a Pool that may be incentivized by the Community. Users collectively decide how many tokens will be allocated to each Pool using Weight Votes. The sum of Weight Votes in each Pool determines the proportion of tokens each pool gets from the total of tokens allocated to the release.", - "updated": 1624706823509 + "text": "The Superalgos Pools is the top-level hierarchy kickstarting the definition of the whole Superalgos Project. It features the definition of several Pool nodes describing the main areas of project development that the Community wishes to incentivize.", + "updated": 1630426598623 }, "paragraphs": [ { @@ -28,12 +28,14 @@ "text": "On the other hand, each Pool may accept Weight Votes from User Profiles. This is how the Community determines how many tokens will go to each distribution pool." }, { - "style": "Callout", - "text": "At the same time, a Pool may reference other types of hierarchies, namely Positions, Assets, and Features. These hierarchies take the granularity of the definition to a whole new level! But we’ll go into those later on!" + "style": "Text", + "text": "In addition, there is a third resource characteristic to the Pool Hierarchy. Each Pool may reference a separate Pools hierarchy so that the definitions may continue on a separate hierarchy, which may be included as a plugin in the same or in separate Governance Plugin Workspaces.", + "updated": 1630426515819 }, { - "style": "Text", - "text": "In addition, there is a third resource characteristic to the Pool Hierarchy. Each Pool may reference a separate Pools hierarchy so that the definitions may continue on a separate hierarchy, which may be included as a plugin in the same or in a separate Plugin Workspace." + "style": "Callout", + "text": "A Pool may also reference other types of hierarchies, namely Positions, Assets, and Features. These hierarchies take the granularity of the definition to a whole new level! But we’ll go into those later on!", + "updated": 1630426529656 }, { "style": "Text", diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Class/position-class.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Class/position-class.json index a70056805..345d06fb9 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Class/position-class.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position-Class/position-class.json @@ -1,8 +1,8 @@ { "type": "Position Class", "definition": { - "text": "The Position Class node is an organizational device used to group positions in arbitrary arrangements. The node may receive Weight Votes. When it does, votes are evenly distributed among offspring nodes.", - "updated": 1624707573898 + "text": "A Position Class node is an organizational device used to group positions in arbitrary arrangements. The node may receive Weight Votes. When it does, votes are evenly distributed among offspring nodes.", + "updated": 1630427487603 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position/position.json b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position/position.json index a4e9226f8..9ed324a78 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position/position.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Position/Position/position.json @@ -1,8 +1,8 @@ { "type": "Position", "definition": { - "text": "A Position node represents a role within the project’s organization. However, unlike traditional organizations, positions within Superalgos are open, in the sense that any Contributor may assume any position at any point. If you spend time working in a position, you may produce a Position Claim and rally the Community to support your claim so that you may earn tokens allocated to the said position.", - "updated": 1624707652230 + "text": "A Position node represents a role within the project’s organization. However, unlike traditional organizations, positions within Superalgos are open, in the sense that any Contributor may assume any position at any point. If you spend time working in a position, you may produce a Position Contribution Claim and rally the Community to support your claim so that you may earn Token Rewards allocated to the said position.", + "updated": 1630427602367 }, "paragraphs": [ { @@ -12,7 +12,8 @@ }, { "style": "Text", - "text": "You may direct Weight Votes to a Position node to support the particular position." + "text": "You may direct Weight Votes to a Position node to incetivize the particular position.", + "updated": 1630427617707 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/P/Positions/Positions/positions.json b/Projects/Governance/Schemas/Docs-Nodes/P/Positions/Positions/positions.json index 30b8d6683..f5734a593 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/P/Positions/Positions/positions.json +++ b/Projects/Governance/Schemas/Docs-Nodes/P/Positions/Positions/positions.json @@ -16,7 +16,8 @@ }, { "style": "Text", - "text": "Any Position and Position Class node within the hierarchy may receive Weight Votes to determine how the Token Rewards in the hierarchy is distributed. How many tokens each Position is awarded depends on the relative weight of the position determined by the number of Weight Votes each position receives from Contributors." + "text": "Any Position and Position Class node within the hierarchy may receive Weight Votes to determine how the Token Rewards in the hierarchy is distributed. How many tokens each Position is awarded depends on the relative weight of the position determined by the number of Weight Votes each position receives from users.", + "updated": 1630427395380 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json b/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json index b7e3f03c7..560de8ca3 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json +++ b/Projects/Governance/Schemas/Docs-Nodes/V/Voting/Voting-Program/voting-program.json @@ -15,10 +15,14 @@ "text": "Governance->Concept->Reusable Governance Snippets->Featuring Tokens Bonus", "updated": 1630329521827 }, + { + "style": "Note", + "text": "Your Reputation is added to the Token Power that flows into the Voting Program, effectively increasing your Voting Power. Read more about Reputation!", + "updated": 1630424362937 + }, { "style": "Text", - "text": "The features in the Voting Program allow you to cast three different categories of votes:", - "updated": 1630344509716 + "text": "The features in the Voting Program allow you to cast three different categories of votes:" }, { "style": "List", diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Definitions/governance-definitions-002-pools-hierarchy.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Definitions/governance-definitions-002-pools-hierarchy.json index 5d426face..67c8cf52b 100644 --- a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Definitions/governance-definitions-002-pools-hierarchy.json +++ b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Definitions/governance-definitions-002-pools-hierarchy.json @@ -23,8 +23,8 @@ }, { "style": "Title", - "text": "Pool Classes Nodes", - "updated": 1624710545392 + "text": "Pool Class Nodes", + "updated": 1630427241695 }, { "style": "Include", diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-001-governance-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-001-governance-overview.json index 2f68b2319..bfb92a303 100644 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-001-governance-overview.json +++ b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-001-governance-overview.json @@ -3,8 +3,8 @@ "pageNumber": "1", "type": "Governance Overview", "definition": { - "text": "Governance of the Superalgos Project is distributed among all members of the Superalgos Community willing to participate. You may engage in multiple manners, help drive development in the desired directions, and contribute to nurturing a healthy community. ", - "updated": 1624697432247 + "text": "Governance of the Superalgos Project is distributed among all members of the Community willing to participate. You may engage in multiple manners, help drive development in the desired directions, and contribute to nurturing a healthy community.", + "updated": 1630424148804 }, "paragraphs": [ { @@ -50,17 +50,24 @@ }, { "style": "Callout", - "text": "This flexibility is a crucial feature that will allow us to evolve the governance system, adapt the game theory behind it, and correct any exploits that people may find over time." + "text": "This flexibility is a crucial feature that will allow us to evolve the governance system, adapt the game theory behind it, and correct any exploits that bad actors may find over time.", + "updated": 1630424896773 }, { "style": "Text", - "text": "Governance is defined across multiple Plugin Workspaces that users may load and contribute to. These workspaces feature the definitions of several hierarchies that determine the relationship of all the concepts affecting governance." + "text": "Governance is defined across multiple Governance Plugin Workspaces that users may load and contribute to. These workspaces feature the definitions of several hierarchies that determine the relationship of all the concepts affecting governance.", + "updated": 1630424913354 }, { "style": "Text", "text": "To participate in governance, users must set up and submit a User Profile plugin defining how they intend to exert the influence conferred by their Superalgos SA Token holdings. The influence and participation is defined through different types of programs, votes, and claims.", "updated": 1629992750219 }, + { + "style": "Text", + "text": "The Governance System computes votes and claims in realtime, showing a preview of what the distribution may look like, on the UI.", + "updated": 1630425053320 + }, { "style": "Include", "text": "Governance->Concept->Reusable Governance Snippets->Computational Limitations", @@ -93,7 +100,8 @@ }, { "style": "List", - "text": "Any user may obtain (from GitHub) and load historical versions of the software, and run a simulation of the Superalgos SA Token Distribution Process to verify how tokens were distributed in past releases. Notice that, in this case, the absolute number of votes may not be valid as token holdings will have varied; however, any user may validate the relative distribution." + "text": "Any user may obtain (from GitHub) and load historical versions of the software, and run a simulation of the Superalgos SA Token Distribution Event to verify how tokens were distributed in past releases. Notice that, in this case, the absolute number of votes may not be valid as token holdings will have varied; however, any user may validate the relative distribution.", + "updated": 1630425087155 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-003-governance-programs.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-003-governance-programs.json new file mode 100644 index 000000000..38d789d7c --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-003-governance-programs.json @@ -0,0 +1,124 @@ +{ + "topic": "Introduction to Governance", + "pageNumber": "3", + "type": "Governance Programs", + "definition": { + "text": "The Community may participate in multiple Governance Programs, each designed to fulfill a specific goal. Programs are grouped in the following domains: Onboarding Programs, Community Building Programs, Votes and Claims Programs, and Financial Programs.", + "updated": 1630425525513 + }, + "paragraphs": [ + { + "style": "Title", + "text": "Onboarding Programs", + "updated": 1630425562962 + }, + { + "style": "Include", + "text": "Governance->Node->Onboarding Programs->Definition", + "updated": 1630425699135 + }, + { + "style": "Subtitle", + "text": "Airdrop Program", + "updated": 1630425792121 + }, + { + "style": "Include", + "text": "Governance->Node->Airdrop Program->Definition", + "updated": 1630425814203 + }, + { + "style": "Subtitle", + "text": "Github Program" + }, + { + "style": "Include", + "text": "Governance->Node->Github Program->Definition", + "updated": 1630425836224 + }, + { + "style": "Title", + "text": "Community Building Programs" + }, + { + "style": "Include", + "text": "Governance->Node->Community Building Programs->Definition", + "updated": 1630425759750 + }, + { + "style": "Subtitle", + "text": "Referral Program" + }, + { + "style": "Include", + "text": "Governance->Node->Referral Program->Definition" + }, + { + "style": "Subtitle", + "text": "Support Program" + }, + { + "style": "Include", + "text": "Governance->Node->Support Program->Definition" + }, + { + "style": "Subtitle", + "text": "Mentorship Program" + }, + { + "style": "Include", + "text": "Governance->Node->Mentorship Program->Definition" + }, + { + "style": "Title", + "text": "Votes And Claims Programs", + "updated": 1630425627375 + }, + { + "style": "Include", + "text": "Governance->Node->Votes And Claims Programs->Definition", + "updated": 1630425763995 + }, + { + "style": "Subtitle", + "text": "Claims Program" + }, + { + "style": "Include", + "text": "Governance->Node->Claims Program->Definition" + }, + { + "style": "Subtitle", + "text": "Voting Program" + }, + { + "style": "Include", + "text": "Governance->Node->Voting Program->Definition" + }, + { + "style": "Title", + "text": "Financial Programs" + }, + { + "style": "Include", + "text": "Governance->Node->Financial Programs->Definition", + "updated": 1630425768655 + }, + { + "style": "Subtitle", + "text": "Staking Program" + }, + { + "style": "Include", + "text": "Governance->Node->Staking Program->Definition" + }, + { + "style": "Subtitle", + "text": "Delegation Program" + }, + { + "style": "Include", + "text": "Governance->Node->Delegation Program->Definition" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-003-referral-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-003-referral-program-overview.json deleted file mode 100644 index 3e62d8a5f..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-003-referral-program-overview.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "3", - "type": "Referral Program Overview", - "definition": { - "text": "The referral program is one of the Community Building Programs designed to incentivize the promotion of the project, either by word-of-mouth or “en masse” through articles, social media posts, videos, and other forms of influencer marketing.", - "updated": 1629994461511 - }, - "paragraphs": [ - { - "style": "Text", - "text": "In a nutshell, you may earn Superalgos SA Tokens for every user you refer to the project and their descendants!", - "updated": 1624698280534 - }, - { - "style": "Text", - "text": "Users may declare who referred them to Superalgos and pass on some Referral Power to their referrers. The more people you refer, the more Referral Power you may get!", - "updated": 1630004903819 - }, - { - "style": "Text", - "text": "The Referral Power that you get determines the proportion of the tokens allocated to the Referrals Rewards Pool that you may get on each release.", - "updated": 1630004849661 - }, - { - "style": "Title", - "text": "Your Referrers" - }, - { - "style": "Text", - "text": "You declare who your referrers are by establishing references from User Referrer nodes under the Referral Program node to the User Profile of the persons you learned about Superalgos from." - }, - { - "style": "Text", - "text": "There is no hard definition of who or what a referrer is. It is up to you to decide. Maybe you learned about Superalgos from an article, a video, a comment on Reddit, a tweet, the official website, or someone told you about us!" - }, - { - "style": "Success", - "text": "Declaring your referrers is the best way to thank the person that may have written that article or tweet, produced that video, maintained the website, or the friend who told you about Superalgos! Without them, you probably wouldn’t be here yet!" - }, - { - "style": "Title", - "text": "Token Bonus" - }, - { - "style": "Text", - "text": "The program features a Token Bonus. That is, simply by spawning the program and declaring your referrers, you earn tokens!", - "updated": 1629996937677 - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-004-support-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-004-support-program-overview.json deleted file mode 100644 index 4dade345b..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-004-support-program-overview.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "4", - "type": "Support Program Overview", - "definition": { - "text": "At Superalgos, we take pride in the level of support we offer to newcomers and the Community in general. We get frequent compliments in that sense, and many users have expressed how impressed they are by the speedy and helpful responses in the Support Groups.", - "updated": 1624705282082 - }, - "paragraphs": [ - { - "style": "Text", - "text": "This is no accident. In fact, it is a crucial aspect of our culture, based above all on collaboration.", - "updated": 1624705296139 - }, - { - "style": "Text", - "text": "Superalgos is a vast system and the learning curve is still quite steep. Many users need help, particularly during the early stages. " - }, - { - "style": "Text", - "text": "While the broader community is always ready to help with typical support questions, we’ve noticed that it takes a certain level of experience and knowledge to provide effective support. This is why select Community Mods are in charge of Support." - }, - { - "style": "Text", - "text": "The Support Program is designed to incentivize participating in support and to let the Community decide how to compensate Community Mods contributing to the project’s support efforts." - }, - { - "style": "Success", - "text": "If you ever wish to become a Community Mod, you may start by participating in the various groups in Telegram, as well as in Discord Channels, helping other users and answering questions from newcomers. We’ll surely spot you and draft you into the team!" - }, - { - "style": "Title", - "text": "Your Favorite Supporters" - }, - { - "style": "Text", - "text": "To designate a supporter, you must spawn the Support Program within the Community Building Programs node, spawn a User Supporter node, and use it to reference the User Profile of the person of your choice. Then you will pass him or her 10% of the Support Power you direct to the User Supporter node!", - "updated": 1630005725102 - }, - { - "style": "Note", - "text": "You may declare as many supporters as you wish.", - "updated": 1630005323368 - }, - { - "style": "Text", - "text": "Community Mods are awarded tokens from the Support Rewards Pool. How many depends on the Support Power they get from users pointing them as their favorite supporters." - }, - { - "style": "Success", - "text": "If you seldom use the support groups, that may be thanks to the effort put in crafting and maintaining tutorials and documentation. If that is your case, then feel free to select the individuals or teams doing this work as your preferred supporters!" - }, - { - "style": "Title", - "text": "Token Bonus" - }, - { - "style": "Text", - "text": "You guessed right! You may earn tokens simply by spawning the program and declaring your favorite supporters!", - "updated": 1629997651973 - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-005-mentorship-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-005-mentorship-program-overview.json deleted file mode 100644 index 3694984d8..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-005-mentorship-program-overview.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "5", - "type": "Mentorship Program Overview", - "definition": { - "text": "Superalgos is a community-driven project designed, nurtured, and incentivized to grow into a massive collaboration. One of the incentives to grow the collaboration is embodied in the Mentorship Program, designed to encourage the recruiting, nurturing, and mentoring of Contributors.", - "updated": 1624705390084 - }, - "paragraphs": [ - { - "style": "Text", - "text": "In a nutshell, when you spawn the Mentorship Program and declare a User Mentor by referencing the User Profile of your mentor, you pass him or her 10% of the Mentorship Power you direct to the User Mentor node!", - "updated": 1629998677982 - }, - { - "style": "Text", - "text": "The core idea is that mentors may earn a percentage of the tokens allocated to the Mentorship Rewards Pool on each release. How much of the pool they get depends on the Mentorship Power they get from their mentees.", - "updated": 1630005807344 - }, - { - "style": "Note", - "text": "This incentive encourages power users to help newcomers with the initial learning curve, all the way until they get to the point in which they may contribute something of value." - }, - { - "style": "Title", - "text": "Your Mentors" - }, - { - "style": "Text", - "text": "You declare who your mentors are by establishing references from User Mentor nodes under the Mentorship Program node to the User Profile of the persons that:", - "updated": 1629998973037 - }, - { - "style": "List", - "text": "helped you with your onboarding;" - }, - { - "style": "List", - "text": "mentored you during the early stages;" - }, - { - "style": "List", - "text": "helped you with your Contributions;" - }, - { - "style": "List", - "text": "produced the educational material you used to learn the system..." - }, - { - "style": "Text", - "text": "Notice that there is no hard definition of who or what a mentor is. It is up to you to decide. Also notice that you may assign arbitrary Mentorship Power to each of your mentors." - }, - { - "style": "Success", - "text": "Declaring your mentors and participating in the program is the best way to thank the people that helped you succeed with Superalgos!" - }, - { - "style": "Title", - "text": "Token Bonus" - }, - { - "style": "Text", - "text": "Yes! This program has a bonus too! Declare your mentors and earn tokens!" - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-006-contribution-claims-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-006-contribution-claims-program-overview.json deleted file mode 100644 index 36717742a..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-006-contribution-claims-program-overview.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "6", - "type": "Contribution Claims Program Overview", - "definition": { - "text": "When you contribute to Superalgos, you must produce a claim for your contribution, and you must harness the support of the Community that will vouch for or vote for your claims.", - "updated": 1629999195759 - }, - "paragraphs": [ - { - "style": "Text", - "text": "Remember that governance is decentralized! There is no central authority controlling who contributes what. Instead, the project delegates in the Community the capacity to establish the value of Contributions and to determine who contributed what.", - "updated": 1624705497978 - }, - { - "style": "Callout", - "text": "As such, governance is a social system. When you get involved with Superalgos, you interact with the Community and find ways to contribute. While doing so, you relate to or associate with community members that have similar interests or are focused on the same areas of the project you may be working in. It is these people that will vouch for your claims, as explained later on under the Voting Program section." - }, - { - "style": "Text", - "text": "You define your claims under the Claims Program section of the User Profile hierarchy." - }, - { - "style": "Text", - "text": "There are three different types of Contribution Claims you may define:" - }, - { - "style": "List", - "text": "Asset Contribution Claim" - }, - { - "style": "List", - "text": "Feature Contribution Claim" - }, - { - "style": "List", - "text": "Position Contribution Claim" - }, - { - "style": "Text", - "text": "We shall explore each later on." - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-007-voting-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-007-voting-program-overview.json deleted file mode 100644 index 250f99439..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-007-voting-program-overview.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "7", - "type": "Voting Program Overview", - "definition": { - "text": "The Voting Program allows you to influence how tokens are distributed, effectively influencing the direction of development. You also use votes to vouch for other contributor’s claims, which is a clear expression of your influence in the project as well.", - "updated": 1624705585070 - }, - "paragraphs": [ - { - "style": "Text", - "text": "You may deploy your votes in different manners:", - "updated": 1624705603842 - }, - { - "style": "List", - "text": "Weight Votes allow you to influence which areas of development will be incentivized." - }, - { - "style": "List", - "text": "Claim Votes allow you to support the Contribution Claims of other Contributors so that they may be compensated for their Contributions." - }, - { - "style": "List", - "text": "User Profile Votes allow you to delegate your Voting Power to other users, so that people you trust may vote on topics you are not well versed on, using your power.", - "updated": 1630055605861 - }, - { - "style": "Text", - "text": "You produce these definitions under the Voting Program section of the User Profile hierarchy. Because you define the distribution of votes in a hierarchical structure of nodes, votes flow down the Voting Program section in a cascading style. " - }, - { - "style": "Text", - "text": "By default, each parent node sends an equal number of votes to each offspring. However, you may easily override the default behavior via the configuration of any given node." - }, - { - "style": "Title", - "text": "Weight Votes" - }, - { - "style": "Text", - "text": "Weight votes come in different flavors:" - }, - { - "style": "List", - "text": "Pool Weight Vote" - }, - { - "style": "List", - "text": "Position Weight Vote" - }, - { - "style": "List", - "text": "Asset Weight Vote" - }, - { - "style": "List", - "text": "Feature Weight Vote" - }, - { - "style": "Text", - "text": "The above are the different concepts you may choose to incentivize with your votes. We’ll dive into each at a later time." - }, - { - "style": "Callout", - "text": "The key underlying concept is that the project distributes more tokens to the concepts holding more Weight Votes. This is how you may influence the direction of development of the project, as Contributors are more prone to work on the areas that are more heavily incentivized." - }, - { - "style": "Title", - "text": "Claim Votes" - }, - { - "style": "Text", - "text": "You may set up Claim Votes for each of the types of Contribution Claims mentioned earlier. This is how you support Contributors that have worked close to you, or in areas of the project you are familiar with or active on, so that they may get compensated for their work." - }, - { - "style": "Title", - "text": "Profile Votes" - }, - { - "style": "Text", - "text": "You use Profile Votes to delegate your Voting Power on other users, in a liquid democracy style. This feature may be useful in many different instances. Let’s explore a few examples:" - }, - { - "style": "List", - "text": "You lack expertise in a certain area and wish someone else to direct your Voting Power." - }, - { - "style": "List", - "text": "You wish someone knowledgeable in certain areas of the Project to have more power to influence the direction of development." - }, - { - "style": "List", - "text": "You trust someone and their judgement and want to get behind his or her ideas and support them." - }, - { - "style": "Title", - "text": "Token Bonus" - }, - { - "style": "Text", - "text": "Participating in the decision-making process around governance issues is an important civic duty, and therefore, it is incentivized. Your Voting Power earns you tokens too!" - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-008-delegation-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-008-delegation-program-overview.json deleted file mode 100644 index 1c395e68e..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-008-delegation-program-overview.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "8", - "type": "Delegation Program Overview", - "definition": { - "text": "The Delegation Program allows you to pass on Token Power to other User Profiles for them to use in whatever way they wish. ", - "updated": 1624705757048 - }, - "paragraphs": [ - { - "style": "Text", - "text": "This is another feature with characteristics inspired in liquid democracy, and also plays an important societal function: new Contributors need Claim Power to place their first claims, but — given that they are new to Superalgos — they may hold no tokens.", - "updated": 1630056075583 - }, - { - "style": "Text", - "text": "In such cases, new Contributors may ask their mentors to borrow some Token Power that they may turn into Claim Power to place their first few claims." - }, - { - "style": "Callout", - "text": "As you can see, Superalgos Governance weaves desirable social interactions that cement the collaboration, promote trust, and develop a sense of belonging in the Community." - }, - { - "style": "Text", - "text": "Other reasons why you may wish to delegate Token Power is if you lack the time or knowledge to actively participate in governance, but you don’t want your Voting Power to go to waste." - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-009-staking-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-009-staking-program-overview.json deleted file mode 100644 index 57b91398b..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-009-staking-program-overview.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "9", - "type": "Staking Program Overview", - "definition": { - "text": "The staking program allows the Superalgos Community to compensate token holders for the sake of holding tokens. Holding tokens may be a valuable contribution that the Community may decide to incentivize at any point.", - "updated": 1624705892261 - }, - "paragraphs": [ - { - "style": "Text", - "text": "It is a very simple program, as it doesn't involve smart contracts or transferring funds out of your wallet.", - "updated": 1624705902644 - }, - { - "style": "Text", - "text": "You may participate in the Staking Program with the Token Power that you haven’t used for other purposes. All you need to do is spawn the program from within the Financials Program node and let some Token Power flow into it.", - "updated": 1630056267000 - }, - { - "style": "Success", - "text": "You will get a tokens from the Staking Rewards Pool proportional to the Staking Power you direct to the program.", - "updated": 1630056331489 - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-2.1-airdrop-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-2.1-airdrop-program-overview.json deleted file mode 100644 index 47f2f55ab..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-2.1-airdrop-program-overview.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "2.1", - "type": "Airdrop Program Overview", - "definition": { - "text": "We don't like meaningless airdrops. But what if airdrops bring users a step closer to participating in governance?", - "updated": 1629995579855 - }, - "paragraphs": [ - { - "style": "Text", - "text": "The Airdrops program is designed to incentivize users to take the very first step: creating and submitting their User Profiles. This is the sole technical requirement to receive the airdropped tokens and is — at the same time — the first step to participate in governance and contribute to the project.", - "updated": 1629995714192 - }, - { - "style": "Success", - "text": "The Airdrop program distributes the tokens in the Airdrops pool evenly to all existing profiles, with a cap of SA 1,000 per profile, on each release!" - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-2.2-github-program-overview.json b/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-2.2-github-program-overview.json deleted file mode 100644 index 4dc04f0ae..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/I/Introduction/Introduction-to-Governance/introduction-to-governance-2.2-github-program-overview.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "topic": "Introduction to Governance", - "pageNumber": "2.2", - "type": "Github Program Overview", - "definition": { - "text": "This program is designed to incentivize users to fork the Superalgos repository, a necessary step to contributing.", - "updated": 1630004483687 - }, - "paragraphs": [ - { - "style": "Text", - "text": "Giving a star and watching the repository is incentivized to make the repository easier to find by developers serching on Github.com.", - "updated": 1630004556023 - }, - { - "style": "Success", - "text": "This program distributes tokens from the Github pool. Maintaining your fork of the Superalgos repository may grant you up to SA 1,000. The same goes for a star, and for watching the repo. That is, this program features a cap of SA 3,000 per user." - } - ] -} \ No newline at end of file From e9ed6e6c10d46e048c8dd4e19511dc7f77a12dbb Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 31 Aug 2021 20:41:21 +0200 Subject: [PATCH 71/81] Definitions finished --- .../A/Asset/Asset-Class/asset-class.json | 3 ++- .../Schemas/Docs-Nodes/A/Asset/Asset/asset.json | 11 ++++++----- .../Docs-Nodes/A/Assets/Assets/assets.json | 15 +++++++++++---- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Class/asset-class.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Class/asset-class.json index e900b255b..af6d372d2 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Class/asset-class.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset-Class/asset-class.json @@ -12,7 +12,8 @@ }, { "style": "Text", - "text": "You may direct Weight Votes to an Asset Class node when you intend to support the whole class, including all assets within." + "text": "You may direct Weight Votes to an Asset Class node when you intend to drive Weight to the whole class, including all assets within.", + "updated": 1630434955110 }, { "style": "Text", diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset/asset.json b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset/asset.json index 00bd14b07..82b783bee 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset/asset.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Asset/Asset/asset.json @@ -1,8 +1,8 @@ { "type": "Asset", "definition": { - "text": "An Asset is an artifact, mostly in a digital format, that belongs to a Project. It may be a code file, a documentation or tutorial page, an image, a video, a social media account or even a post, marketing collateral, and more. To incentivize the production and maintenance of Assets, the node may receive Weight Votes. It may also receive Contributor Claims from Contributors involved in their production and maintenance.", - "updated": 1624709807952 + "text": "An Asset is an artifact, mostly in a digital format, that belongs to a Project. It may be a code file, a documentation or tutorial page, an image, a video, a social media account or even a post, marketing collateral, and more. To incentivize the production and maintenance of Assets, the node may receive Weight Votes. It may also receive Contribution Claims from Contributors involved in their production and maintenance.", + "updated": 1630435180948 }, "paragraphs": [ { @@ -12,12 +12,13 @@ }, { "style": "Text", - "text": "You may cast Weight Votes on individual Asset nodes to incentivize the improvement, development, and maintenance of the said feature.", - "updated": 1624709824891 + "text": "You may cast Weight Votes on individual Asset nodes to incentivize the improvement, development, and maintenance of the said asset.", + "updated": 1630435190635 }, { "style": "Text", - "text": "If you are involved in the development or maintenance of the said asset, you may place an Asset Contribution Claim and rally the Community to support your claim so that you may be compensated for your work." + "text": "If you are involved in the development or maintenance of the said asset, you may place an Asset Contribution Claim and rally the Community to support your claim so that you may be rewarded for your work.", + "updated": 1630435212758 }, { "style": "Block", diff --git a/Projects/Governance/Schemas/Docs-Nodes/A/Assets/Assets/assets.json b/Projects/Governance/Schemas/Docs-Nodes/A/Assets/Assets/assets.json index 9299b7cb9..3cdcb6014 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/A/Assets/Assets/assets.json +++ b/Projects/Governance/Schemas/Docs-Nodes/A/Assets/Assets/assets.json @@ -16,7 +16,8 @@ }, { "style": "Text", - "text": "The hierarchy features Asset Class nodes, an organizational device, and Asset nodes, the representation of actual assets. Both types of nodes may accept incoming Weight Votes but only Asset nodes may accept Contributor Claims." + "text": "The hierarchy features Asset Class nodes, an organizational device, and Asset nodes, the representation of actual assets. Both types of nodes may accept incoming Weight Votes but only Asset nodes may accept Contribution Claims.", + "updated": 1630434541690 }, { "style": "Success", @@ -24,13 +25,18 @@ "updated": 1624709216096 }, { - "style": "Title", + "style": "Subtitle", "text": "Install Missing Assets", "updated": 1624709536566 }, + { + "style": "Note", + "text": "The Install Missing Assets feature is oriented to people maintaining Project Definition Hierarchies. You may safely skip this explanation if you are a regular user learning about governance.", + "updated": 1630434796338 + }, { "style": "Text", - "text": "Both the Assets node and the Asset Class nodes support the Install Assets command available on the menu. Because Assets map digital files shipping with the system, the Install Assets feature is designed to map files on disk into a hierarchical structure of nodes below the node where the Install Assets command is run. In the resulting structure of nodes, Asset Class nodes represent folders, and Asset nodes represent files." + "text": "Both the Assets node and Asset Class nodes support the Install Missing Assets command available on the menu. Because Asset nodes map digital files shipping with the system, the Install Missing Assets feature is designed to map files on disk into a hierarchical structures of nodes below the node where the Install Missing Assets command is run. In the resulting structure of nodes, Asset Class nodes represent folders, and Asset nodes represent files." }, { "style": "Text", @@ -47,7 +53,8 @@ }, { "style": "Text", - "text": "Using the above configuration, the Install Assets command creates a Superalgos Asset Class node (the root of the Superalgos folder), and the UI Asset Class node as an offspring node. Then, the contents of the UI folder are mapped as offspring of the UI Asset Class node." + "text": "Using the above configuration, the Install Missing Assets command creates a Superalgos Asset Class node (the root of the Superalgos folder), and the UI Asset Class node as an offspring node. Then, the contents of the UI folder are mapped as offspring of the UI Asset Class node.", + "updated": 1630434897746 }, { "style": "Block", From ba57ac8b07114316eb5293aec35f57541dff98cf Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Tue, 31 Aug 2021 21:12:14 +0200 Subject: [PATCH 72/81] User Profile topic WIP --- .../Token-Power-Flows/token-power-flows.json | 18 +++++++++++------- .../Tokens/Tokens-Awarded/tokens-awarded.json | 4 ++-- ...user-profile-001-building-your-profile.json | 7 ++++--- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Concepts/T/Token/Token-Power-Flows/token-power-flows.json b/Projects/Governance/Schemas/Docs-Concepts/T/Token/Token-Power-Flows/token-power-flows.json index 0a93c0f3a..288b5eb98 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/T/Token/Token-Power-Flows/token-power-flows.json +++ b/Projects/Governance/Schemas/Docs-Concepts/T/Token/Token-Power-Flows/token-power-flows.json @@ -33,11 +33,13 @@ }, { "style": "Text", - "text": "For example, let's say you have 1,000 Token Power flowing into your Token Power Switch node. Let's say you spawn the Onboarding Programs, Community Building Programs, Votes and Claims Programs, and Financial Programs nodes." + "text": "For example, let's say you have 1,000 Token Power flowing into your Token Power Switch node. Let's say you spawn the Onboarding Programs, Community Building Programs, Votes And Claims Programs, and Financial Programs nodes.", + "updated": 1630436060757 }, { "style": "Callout", - "text": "As soon as you deploy these four offspring of the Token Power Switch node, you will see that each of these nodes gets 25% of the Token Power by default." + "text": "As soon as you deploy these four offspring of the Token Power Switch node, you will see that each of the nodes gets 25% of the Token Power by default.", + "updated": 1630436087763 }, { "style": "Text", @@ -54,7 +56,8 @@ }, { "style": "Text", - "text": "Now let's say you wish to use only 10% of your Token Power in the Onboarding Programs. So you set up the following config:" + "text": "Now let's say you wish to use only 10% of your Token Power in the Community Building Programs. So you set up the following config:", + "updated": 1630436162265 }, { "style": "Json", @@ -63,12 +66,13 @@ }, { "style": "Callout", - "text": "As a result, 10% of the Token Power flows into the Onboarding Programs, while the remaining nodes get 45% of the Token Power each." + "text": "As a result, 10% of the Token Power flows into the Community Building Programs, while the remaining nodes get 45% of the Token Power each.", + "updated": 1630436168281 }, { - "style": "Success", - "text": "The same logic applies to the flow of Token Power throughout the hierarchy!", - "updated": 1630216063140 + "style": "Important", + "text": "One more thing! When Token Power flows into a specific program, it turns into a specific form of power associated with the said program! For example, Token Power that flows into the Support Program turns into Support Power. In the Voting Program, it turns into Voting Power. Notice that this is just a change in the name, as all these forms of powers behave in the same manner throughout the User Profile hierarchy.", + "updated": 1630436471069 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json index d89d8b01c..c9a6bb2bf 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json +++ b/Projects/Governance/Schemas/Docs-Nodes/T/Tokens/Tokens-Awarded/tokens-awarded.json @@ -1,8 +1,8 @@ { "type": "Tokens Awarded", "definition": { - "text": "The Tokens Awarded node is present on each of the programs in the hierarchy. It exists to accumulate and display the number of Superalgos SA Tokens awarded to your profile through each program.", - "updated": 1630164138055 + "text": "The Tokens Awarded node represents the number of tokens you get in reward for your contributions. The node is present on many of the Governance Programs.", + "updated": 1630436769778 }, "paragraphs": [ { diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-001-building-your-profile.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-001-building-your-profile.json index c5e33b8f0..84de5fe91 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-001-building-your-profile.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-001-building-your-profile.json @@ -47,7 +47,7 @@ { "style": "Text", "text": "You may start with the Token Distribution Superalgos Plugin Workspace so that you may later interact with the top-level Superalgos Project definitions.", - "updated": 1630067911494 + "updated": 1630435453964 }, { "style": "Subtitle", @@ -151,7 +151,7 @@ "updated": 1630083527720 }, { - "style": "Text", + "style": "Note", "text": "If you used a mnemonic to authenticate an existing address, you may safely disregard what comes next.", "updated": 1630083542691 }, @@ -195,7 +195,8 @@ }, { "style": "Text", - "text": "This step is not required for interacting with governance, however, we’ll cover it as you most likely will want to do it at some point, and it is recommended anyway, even if not strictly necessary." + "text": "This step is not required for interacting with governance, however, we’ll cover it as you will, most likely, want to do it at some point, and it is recommended anyway, even if not strictly necessary.", + "updated": 1630435748864 }, { "style": "Note", From 1cb72cfbc255fb8adb531664c2d8600ee6c3ee75 Mon Sep 17 00:00:00 2001 From: Raphl2502 Date: Tue, 31 Aug 2021 22:20:28 +0200 Subject: [PATCH 73/81] Submission of thomas profile (Raphl2502) --- .../Plugins/User-Profiles/Raplh2502.json | 791 ++++++++++++++---- 1 file changed, 622 insertions(+), 169 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/Raplh2502.json b/Projects/Governance/Plugins/User-Profiles/Raplh2502.json index e8ff6a5de..7c3c10360 100644 --- a/Projects/Governance/Plugins/User-Profiles/Raplh2502.json +++ b/Projects/Governance/Plugins/User-Profiles/Raplh2502.json @@ -1,7 +1,7 @@ { "type": "User Profile", "name": "Raplh2502", - "config": "{\n \"signature\": {\n \"message\": \"Raplh2502\",\n \"messageHash\": \"0x002241abadf010338ef270d56138327b257a020ba556107b978f7e4a4f78e10f\",\n \"v\": \"0x1b\",\n \"r\": \"0xa45e37a0d602e45300e319a1ee714dcee22fdd44774b638a6086fe66fd5d25b1\",\n \"s\": \"0x36c0c11cbc382a559ae30d7d53940586b60b5a28e39a3240af33a58129accc25\",\n \"signature\": \"0xa45e37a0d602e45300e319a1ee714dcee22fdd44774b638a6086fe66fd5d25b136c0c11cbc382a559ae30d7d53940586b60b5a28e39a3240af33a58129accc251b\"\n },\n \"codeName\": \"Raplh2502\"\n}", + "config": "{\"signature\":{\"message\":\"Raplh2502\",\"messageHash\":\"0x002241abadf010338ef270d56138327b257a020ba556107b978f7e4a4f78e10f\",\"v\":\"0x1b\",\"r\":\"0xa45e37a0d602e45300e319a1ee714dcee22fdd44774b638a6086fe66fd5d25b1\",\"s\":\"0x36c0c11cbc382a559ae30d7d53940586b60b5a28e39a3240af33a58129accc25\",\"signature\":\"0xa45e37a0d602e45300e319a1ee714dcee22fdd44774b638a6086fe66fd5d25b136c0c11cbc382a559ae30d7d53940586b60b5a28e39a3240af33a58129accc251b\"},\"codeName\":\"Raplh2502\"}", "project": "Governance", "tokenPowerSwitch": { "type": "Token Power Switch", @@ -14,26 +14,26 @@ "name": "New Community Building Programs", "config": "{}", "project": "Governance", - "supportProgram": { - "type": "Support Program", - "name": "New Support Program", + "referralProgram": { + "type": "Referral Program", + "name": "New Referral Program", "config": "{}", "project": "Governance", - "userSupporters": [ + "userReferrers": [ { - "type": "User Supporter", + "type": "User Referrer", "name": "Julian-Molina", "config": "{}", "project": "Governance", - "id": "8654e417-6ac3-44da-89de-b348fba4aed4", + "id": "6cbb2eb6-53ee-4d1a-a7bb-f941553ce10e", "savedPayload": { "position": { - "x": 35941.4493554574, - "y": 23003.65789426258 + "x": 30040.192378864664, + "y": 24100 }, "targetPosition": { - "x": 36241.4493554574, - "y": 23003.65789426258 + "x": 30190.192378864664, + "y": 23840.192378864667 }, "floatingObject": { "isPinned": false, @@ -54,85 +54,9 @@ "referenceParentCombinedNodePath": [ [ "Julian-Molina", - "User Profile" - ] - ] - } - }, - { - "type": "User Supporter", - "name": "harrellbm", - "config": "{}", - "project": "Governance", - "id": "47ec59fb-4a1e-4e8d-a2df-5796ad4f8a7d", - "savedPayload": { - "position": { - "x": 36091.4493554574, - "y": 22743.850273127246 - }, - "targetPosition": { - "x": 36241.4493554574, - "y": 23003.65789426258 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 1, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - }, - "referenceParent": { - "type": "User Profile", - "name": "harrellbm", - "id": "107d3e44-1685-4540-8316-3bc6591298e9" - }, - "referenceParentCombinedNodePath": [ - [ - "harrellbm", - "User Profile" - ] - ] - } - }, - { - "type": "User Supporter", - "name": "Luis-Fernando-Molina", - "config": "{}", - "project": "Governance", - "id": "9d61971c-d916-454a-97a0-9d7a68747175", - "savedPayload": { - "position": { - "x": 36391.4493554574, - "y": 22743.850273127246 - }, - "targetPosition": { - "x": 36241.4493554574, - "y": 23003.65789426258 - }, - "floatingObject": { - "isPinned": false, - "isFrozen": false, - "isCollapsed": false, - "angleToParent": 1, - "distanceToParent": 3, - "arrangementStyle": 0 - }, - "uiObject": { - "isRunning": false - }, - "referenceParent": { - "type": "User Profile", - "name": "Luis-Fernando-Molina", - "id": "148911b3-b2f3-44fb-8cb4-017991789132" - }, - "referenceParentCombinedNodePath": [ - [ - "Luis-Fernando-Molina", - "User Profile" + "User Profile", + "Governance", + "1fd95e41-4b22-48d5-be3a-904c37afcb11" ] ] } @@ -142,15 +66,15 @@ "type": "Tokens Awarded", "name": "New Tokens Awarded", "project": "Governance", - "id": "8ac68836-fdb6-4549-83bb-4d9d253cec6e", + "id": "e80cafb6-7090-4eaa-b674-f9b5b5b8a42e", "savedPayload": { "position": { - "x": 36541.4493554574, - "y": 23003.65789426258 + "x": 29930.38475772933, + "y": 23690.192378864667 }, "targetPosition": { - "x": 36241.4493554574, - "y": 23003.65789426258 + "x": 30190.192378864664, + "y": 23840.192378864667 }, "floatingObject": { "isPinned": false, @@ -169,15 +93,15 @@ "type": "Tokens Bonus", "name": "New Tokens Bonus", "project": "Governance", - "id": "de5c95e6-ff42-41a9-a253-7cd0115234ac", + "id": "8ef66cc7-be91-48e0-b065-bda219234215", "savedPayload": { "position": { - "x": 36391.4493554574, - "y": 23263.46551539791 + "x": 30340.192378864664, + "y": 23580.384757729335 }, "targetPosition": { - "x": 36241.4493554574, - "y": 23003.65789426258 + "x": 30190.192378864664, + "y": 23840.192378864667 }, "floatingObject": { "isPinned": false, @@ -192,15 +116,15 @@ } } }, - "id": "6b249e23-8de3-48e9-9f11-14f8c57dd8d5", + "id": "83a049e3-5222-4656-a6de-2ba670ae06dd", "savedPayload": { "position": { - "x": 36241.4493554574, - "y": 23003.65789426258 + "x": 30190.192378864664, + "y": 23840.192378864667 }, "targetPosition": { - "x": 36091.4493554574, - "y": 23263.46551539791 + "x": 30449.999999999996, + "y": 23990.192378864667 }, "floatingObject": { "isPinned": false, @@ -215,15 +139,544 @@ } } }, - "id": "61dfffc2-6a9a-450a-abe6-78c19ef34f73", + "supportProgram": { + "type": "Support Program", + "name": "New Support Program", + "config": "{}", + "project": "Governance", + "userSupporters": [ + { + "type": "User Supporter", + "name": "Julian-Molina", + "config": "{}", + "project": "Governance", + "id": "98b2403d-8b67-4589-99e0-e324cfed7540", + "savedPayload": { + "position": { + "x": 42707.936362707216, + "y": 24108.655750652073 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "Julian-Molina", + "id": "1fd95e41-4b22-48d5-be3a-904c37afcb11" + }, + "referenceParentCombinedNodePath": [ + [ + "Julian-Molina", + "User Profile", + "Governance", + "1fd95e41-4b22-48d5-be3a-904c37afcb11" + ] + ] + } + }, + { + "type": "User Supporter", + "name": "harrellbm", + "config": "{}", + "project": "Governance", + "id": "e456cb6d-3935-4d0c-b744-053a5658aeb4", + "savedPayload": { + "position": { + "x": 42688.555719779855, + "y": 23924.261250484007 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "harrellbm", + "id": "3af73d3b-7c0e-4de7-a1e1-a72238081740" + }, + "referenceParentCombinedNodePath": [ + [ + "harrellbm", + "User Profile", + "Governance", + "3af73d3b-7c0e-4de7-a1e1-a72238081740" + ] + ] + } + }, + { + "type": "User Supporter", + "name": "Luis-Fernando-Molina", + "config": "{}", + "project": "Governance", + "id": "162e169b-5db5-4977-bf65-e0b2e643c7eb", + "savedPayload": { + "position": { + "x": 42781.26081809234, + "y": 23763.691310086117 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "Luis-Fernando-Molina", + "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile", + "Governance", + "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + ] + ] + } + }, + { + "type": "User Supporter", + "name": "ssplatt", + "config": "{}", + "project": "Governance", + "id": "43c5b4ff-44e0-4f9f-803b-5e054b92df1a", + "savedPayload": { + "position": { + "x": 42950.6414610197, + "y": 23688.278189118853 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "ssplatt", + "id": "56600855-7a91-49e8-8a58-2fa28d07efd1" + }, + "referenceParentCombinedNodePath": [ + [ + "ssplatt", + "User Profile" + ] + ] + } + }, + { + "type": "User Supporter", + "name": "9808us", + "config": "{}", + "project": "Governance", + "id": "7b4f9489-a596-4298-9b94-b66d2d4658bd", + "savedPayload": { + "position": { + "x": 43132, + "y": 23726.827136594 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "9808us", + "id": "280f0baf-bc13-497c-b255-618c1a146442" + }, + "referenceParentCombinedNodePath": [ + [ + "9808us", + "User Profile" + ] + ] + } + }, + { + "type": "User Supporter", + "name": "Smidy13", + "config": "{}", + "project": "Governance", + "id": "fd7c0cb5-00d4-4a39-9a43-90353d47aed1", + "savedPayload": { + "position": { + "x": 43256.063637292784, + "y": 23864.613764806596 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "Smidy13", + "id": "4b5eca40-4d97-454d-91f3-8627a98ef682" + }, + "referenceParentCombinedNodePath": [ + [ + "Smidy13", + "User Profile" + ] + ] + } + }, + { + "type": "User Supporter", + "name": "cozed-gh", + "config": "{}", + "project": "Governance", + "id": "96b71bb0-b795-4925-a1b6-f6a2ebc37aca", + "savedPayload": { + "position": { + "x": 43275.444280220145, + "y": 24049.008264974662 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "cozed-gh", + "id": "07f0b13a-a50f-4488-8a2c-a3f8f08e889d" + }, + "referenceParentCombinedNodePath": [ + [ + "cozed-gh", + "User Profile" + ] + ] + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "c551ba14-52b5-49a1-9359-e2573d39ae3d", + "savedPayload": { + "position": { + "x": 43182.73918190766, + "y": 24209.578205372552 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "f8c43611-cecd-4606-914a-45554b4b933a", + "savedPayload": { + "position": { + "x": 43013.3585389803, + "y": 24284.991326339816 + }, + "targetPosition": { + "x": 42982, + "y": 23986.634757729335 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "cbf9752e-13db-443c-8f42-0001df229ac9", + "savedPayload": { + "position": { + "x": 30599.999999999996, + "y": 23730.384757729335 + }, + "targetPosition": { + "x": 30449.999999999996, + "y": 23990.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "mentorshipProgram": { + "type": "Mentorship Program", + "name": "New Mentorship Program", + "config": "{}", + "project": "Governance", + "userMentors": [ + { + "type": "User Mentor", + "name": "Luis-Fernando-Molina", + "config": "{}", + "project": "Governance", + "id": "6e659c1f-e68f-4d74-a878-052f3a5082a6", + "savedPayload": { + "position": { + "x": 30772.181128380656, + "y": 23846.748098644526 + }, + "targetPosition": { + "x": 30709.80762113533, + "y": 24140.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "Luis-Fernando-Molina", + "id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + }, + "referenceParentCombinedNodePath": [ + [ + "Luis-Fernando-Molina", + "User Profile", + "Governance", + "a8de78f0-c3e4-4a2a-b7e8-f659073969db" + ] + ] + } + }, + { + "type": "User Mentor", + "name": "PLuv", + "config": "{}", + "project": "Governance", + "id": "130fc498-de5e-4607-bb18-dd8ba5b4bf18", + "savedPayload": { + "position": { + "x": 31008.16418974581, + "y": 24108.83383988437 + }, + "targetPosition": { + "x": 30709.80762113533, + "y": 24140.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "User Profile", + "name": "PLuv", + "id": "142f5de2-3762-4f55-a839-22eac5c03c8f" + }, + "referenceParentCombinedNodePath": [ + [ + "PLuv", + "User Profile", + "Governance", + "142f5de2-3762-4f55-a839-22eac5c03c8f" + ] + ] + } + } + ], + "tokensAwarded": { + "type": "Tokens Awarded", + "name": "New Tokens Awarded", + "project": "Governance", + "id": "a335874e-f035-4301-aa67-157a9b831f6a", + "savedPayload": { + "position": { + "x": 30831.828614058068, + "y": 24414.256016157447 + }, + "targetPosition": { + "x": 30709.80762113533, + "y": 24140.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "tokensBonus": { + "type": "Tokens Bonus", + "name": "New Tokens Bonus", + "project": "Governance", + "id": "3fdc564c-e5d9-4b87-9f28-1440d68b0723", + "savedPayload": { + "position": { + "x": 30486.86417349211, + "y": 24340.931560772326 + }, + "targetPosition": { + "x": 30709.80762113533, + "y": 24140.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "86586fb4-2a3b-49d6-bdd5-36975fa1a0a9", + "savedPayload": { + "position": { + "x": 30709.80762113533, + "y": 24140.192378864667 + }, + "targetPosition": { + "x": 30449.999999999996, + "y": 23990.192378864667 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": true, + "angleToParent": 1, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + }, + "id": "a32cc538-068f-49fd-a426-100a29f90339", "savedPayload": { "position": { - "x": 36091.4493554574, - "y": 23263.46551539791 + "x": 30449.999999999996, + "y": 23990.192378864667 }, "targetPosition": { - "x": 35941.4493554574, - "y": 23523.273136533244 + "x": 30299.999999999996, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -262,15 +715,15 @@ "name": "", "config": "{}", "project": "Governance", - "id": "2dd37827-1cc1-40aa-b89a-917ccfe24d9b", + "id": "28aedac0-26d8-4278-9b75-3c10cf83e2a0", "savedPayload": { "position": { - "x": 36501.25697659273, - "y": 23592.88837880391 + "x": 35060.4883090863, + "y": 10904.798575428878 }, "targetPosition": { - "x": 36501.25697659273, - "y": 23892.88837880391 + "x": 35060.4883090863, + "y": 11204.798575428878 }, "floatingObject": { "isPinned": false, @@ -314,18 +767,18 @@ }, { "type": "Feature Contribution Claim", - "name": "User Defined Variables and Code New Features", + "name": "", "config": "{}", "project": "Governance", - "id": "67e36fdc-9a1d-42c7-a62a-e99c605c5d33", + "id": "664ff3bf-0cad-467a-868f-d16a9ab4cc54", "savedPayload": { "position": { - "x": 36761.064597728066, - "y": 24042.88837880391 + "x": 35320.29593022163, + "y": 11354.798575428878 }, "targetPosition": { - "x": 36501.25697659273, - "y": 23892.88837880391 + "x": 35060.4883090863, + "y": 11204.798575428878 }, "floatingObject": { "isPinned": false, @@ -368,15 +821,15 @@ } } ], - "id": "a0af8811-9dc2-4a9a-a28f-358738a6994f", + "id": "f0f53e80-19a7-4364-b484-61b6242e7b8b", "savedPayload": { "position": { - "x": 36501.25697659273, - "y": 23892.88837880391 + "x": 35060.4883090863, + "y": 11204.798575428878 }, "targetPosition": { - "x": 36241.4493554574, - "y": 24042.88837880391 + "x": 34800.68068795097, + "y": 11354.798575428878 }, "floatingObject": { "isPinned": false, @@ -402,18 +855,18 @@ "positionContributionClaims": [ { "type": "Position Contribution Claim", - "name": "Moderator Community Management", + "name": "", "config": "{}", "project": "Governance", - "id": "74cbbf75-2a2c-4081-9415-ba423848f2db", + "id": "ea777ab1-3cbf-4a71-935c-b0edd69f88ce", "savedPayload": { "position": { - "x": 36541.4493554574, - "y": 24562.503621074575 + "x": 35100.68068795097, + "y": 11874.413817699544 }, "targetPosition": { - "x": 36391.4493554574, - "y": 24302.695999939242 + "x": 34950.68068795097, + "y": 11614.606196564211 }, "floatingObject": { "isPinned": false, @@ -452,15 +905,15 @@ } } ], - "id": "e880f8a6-8e53-43dd-8b11-4210ca18c9ab", + "id": "2277d694-8325-4db1-997b-4d2972e7c232", "savedPayload": { "position": { - "x": 36391.4493554574, - "y": 24302.695999939242 + "x": 34950.68068795097, + "y": 11614.606196564211 }, "targetPosition": { - "x": 36241.4493554574, - "y": 24042.88837880391 + "x": 34800.68068795097, + "y": 11354.798575428878 }, "floatingObject": { "isPinned": false, @@ -499,15 +952,15 @@ "type": "Tokens Awarded", "name": "New Tokens Awarded", "project": "Governance", - "id": "f7c63ab2-c803-4886-b043-6c6297981f85", + "id": "fdf321ca-029e-45c5-8178-6d28f5031ceb", "savedPayload": { "position": { - "x": 35981.64173432207, - "y": 24192.88837880391 + "x": 34540.873066815635, + "y": 11504.798575428878 }, "targetPosition": { - "x": 36241.4493554574, - "y": 24042.88837880391 + "x": 34800.68068795097, + "y": 11354.798575428878 }, "floatingObject": { "isPinned": false, @@ -522,20 +975,20 @@ } } }, - "id": "bd26adac-cf78-4aec-888f-a8718a657469", + "id": "f719f049-9b08-4343-8b4d-6bf4e48638b1", "savedPayload": { "position": { - "x": 36241.4493554574, - "y": 24042.88837880391 + "x": 30599.999999999996, + "y": 24769.615242270665 }, "targetPosition": { - "x": 36091.4493554574, - "y": 23783.080757668577 + "x": 30449.999999999996, + "y": 24509.807621135333 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 @@ -545,15 +998,15 @@ } } }, - "id": "22eacf7e-c02b-4853-a529-7789aeadb64e", + "id": "d317ab89-cb64-426b-931c-48755502da5d", "savedPayload": { "position": { - "x": 36091.4493554574, - "y": 23783.080757668577 + "x": 30449.999999999996, + "y": 24509.807621135333 }, "targetPosition": { - "x": 35941.4493554574, - "y": 23523.273136533244 + "x": 30299.999999999996, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -568,15 +1021,15 @@ } } }, - "id": "13f0fedf-2d0a-4b80-a191-05236a8138a6", + "id": "c67fa458-eb61-44c4-8f83-8cd5f8d1dbf9", "savedPayload": { "position": { - "x": 35941.4493554574, - "y": 23523.273136533244 + "x": 30299.999999999996, + "y": 24250 }, "targetPosition": { - "x": 35641.4493554574, - "y": 23523.273136533244 + "x": 29999.999999999996, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -595,15 +1048,15 @@ "type": "Tokens Mined", "name": "New Tokens Mined", "project": "Governance", - "id": "b4c844ba-f1c1-44e8-96f6-96fbd6a8cbfd", + "id": "ea95efe5-2255-480b-8a3d-8c3e2fc62202", "savedPayload": { "position": { - "x": 35341.4493554574, - "y": 23523.273136533244 + "x": 29699.999999999996, + "y": 24250 }, "targetPosition": { - "x": 35641.4493554574, - "y": 23523.273136533244 + "x": 29999.999999999996, + "y": 24250 }, "floatingObject": { "isPinned": false, @@ -618,20 +1071,20 @@ } } }, - "id": "59a87d1a-0457-4a49-a11b-216716e5c889", + "id": "c538f02f-9a2c-47e2-bf92-f6e97ede4031", "savedPayload": { "position": { - "x": 35641.4493554574, - "y": 23523.273136533244 + "x": 29999.999999999996, + "y": 24250 }, "targetPosition": { - "x": 35641.4493554574, - "y": 23523.273136533244 + "x": 29999.999999999996, + "y": 24250 }, "floatingObject": { "isPinned": true, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 From 0ef9969e555d2e080936669d7d38aedbf16c94db Mon Sep 17 00:00:00 2001 From: Philip Love Date: Wed, 1 Sep 2021 00:58:51 -0400 Subject: [PATCH 74/81] Modify setup.js: In event WinOS error installing TF-modules provides user with detailed instructions on how to get their WinOS/nodejs dependencies installed correctly to facilitate installation of tfjs-node --- .../Plugins/User-Profiles/PLuv.json | 764 +++++++++++++----- setup.js | 33 +- 2 files changed, 586 insertions(+), 211 deletions(-) diff --git a/Projects/Governance/Plugins/User-Profiles/PLuv.json b/Projects/Governance/Plugins/User-Profiles/PLuv.json index 430ae1b92..d97b9e7ec 100644 --- a/Projects/Governance/Plugins/User-Profiles/PLuv.json +++ b/Projects/Governance/Plugins/User-Profiles/PLuv.json @@ -127,12 +127,12 @@ "id": "6d16ca2f-a4e7-4c12-bc3c-98754ac90e08", "savedPayload": { "position": { - "x": 19408.46583462777, - "y": 16805.50679562789 + "x": 16873.961568354185, + "y": 17964.683045111455 }, "targetPosition": { - "x": 19501.17093294025, - "y": 17090.823750516436 + "x": 16966.666666666668, + "y": 18250 }, "floatingObject": { "isPinned": false, @@ -150,7 +150,7 @@ "communityBuildingPrograms": { "type": "Community Building Programs", "name": "New Community Building Programs", - "config": "{\n \"percentage\": 3\n}", + "config": "{\n \"percentage\": 1\n}", "project": "Governance", "referralProgram": { "type": "Referral Program", @@ -900,12 +900,12 @@ "id": "7d10759e-f52d-418a-9a0c-2cf0bbb3e309", "savedPayload": { "position": { - "x": 19743.876031252734, - "y": 16914.488174828693 + "x": 17209.37176497915, + "y": 18073.664424312257 }, "targetPosition": { - "x": 19501.17093294025, - "y": 17090.823750516436 + "x": 16966.666666666668, + "y": 18250 }, "floatingObject": { "isPinned": false, @@ -934,7 +934,7 @@ { "type": "Votes Switch", "name": "Other People's Stuff", - "config": "{\n \"percentage\": 3\n}", + "config": "{\n \"percentage\": 1\n}", "project": "Governance", "votesSwitch": [], "claimVotesSwitch": [ @@ -1348,12 +1348,12 @@ "id": "9df9510a-691c-4f05-bea4-214ea218263e", "savedPayload": { "position": { - "x": 19077.09315829752, - "y": 16072.912037378894 + "x": 19483.09315829752, + "y": 16331.912037378896 }, "targetPosition": { - "x": 19748.395437671104, - "y": 16143.468750084561 + "x": 20154.395437671104, + "y": 16402.46875008456 }, "floatingObject": { "isPinned": false, @@ -1384,12 +1384,12 @@ "id": "6292f3d5-fcaa-4249-97e1-094fc6cd3faa", "savedPayload": { "position": { - "x": 18338.202519733757, - "y": 15851.574899334562 + "x": 18772.266615918157, + "y": 16207.532982488976 }, "targetPosition": { - "x": 19323.604173712465, - "y": 15618.895226101107 + "x": 19729.604173712465, + "y": 15877.895226101105 }, "floatingObject": { "isPinned": false, @@ -1467,12 +1467,12 @@ "id": "c182f0a8-e833-4455-9018-8008781e5bfe", "savedPayload": { "position": { - "x": 18334.832034458916, - "y": 15400.98261371725 + "x": 18717.258382366617, + "y": 15860.224664583357 }, "targetPosition": { - "x": 19323.604173712465, - "y": 15618.895226101107 + "x": 19729.604173712465, + "y": 15877.895226101105 }, "floatingObject": { "isPinned": false, @@ -1550,12 +1550,12 @@ "id": "2b483422-88aa-40d1-8901-8e23293425fa", "savedPayload": { "position": { - "x": 18527.29999785772, - "y": 14993.550593505366 + "x": 18784.353991884047, + "y": 15515.047677186489 }, "targetPosition": { - "x": 19323.604173712465, - "y": 15618.895226101107 + "x": 19729.604173712465, + "y": 15877.895226101105 }, "floatingObject": { "isPinned": false, @@ -1633,12 +1633,12 @@ "id": "b21f9f40-267d-4148-9735-829647ccc5ae", "savedPayload": { "position": { - "x": 18877.485769314382, - "y": 14709.97574712769 + "x": 18965.46072373691, + "y": 15213.635459248217 }, "targetPosition": { - "x": 19323.604173712465, - "y": 15618.895226101107 + "x": 19729.604173712465, + "y": 15877.895226101105 }, "floatingObject": { "isPinned": false, @@ -1716,12 +1716,12 @@ "id": "efe425a4-b02d-4cf1-942f-21de1c782f25", "savedPayload": { "position": { - "x": 19316.03076204526, - "y": 14606.42355072657 + "x": 19238.73443321305, + "y": 14992.342772622467 }, "targetPosition": { - "x": 19323.604173712465, - "y": 15618.895226101107 + "x": 19729.604173712465, + "y": 15877.895226101105 }, "floatingObject": { "isPinned": false, @@ -1805,12 +1805,12 @@ "id": "13bb8738-b245-467f-850b-2b46cad1f16e", "savedPayload": { "position": { - "x": 19756.075761838627, - "y": 14703.403786783601 + "x": 19571.21427785923, + "y": 14877.860781248528 }, "targetPosition": { - "x": 19323.604173712465, - "y": 15618.895226101107 + "x": 19729.604173712465, + "y": 15877.895226101105 }, "floatingObject": { "isPinned": false, @@ -1867,18 +1867,184 @@ ] ] } + }, + { + "type": "Asset Claim Vote", + "name": "Smidy13 ", + "config": "{}", + "project": "Governance", + "id": "f39a2c29-1935-4233-95d8-b343b314d6e4", + "savedPayload": { + "position": { + "x": 19922.798281531217, + "y": 14883.997702860346 + }, + "targetPosition": { + "x": 19729.604173712465, + "y": 15877.895226101105 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 4, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Asset Contribution Claim", + "name": "", + "id": "f1add2dd-8cbc-40c0-a189-922b3d729e06" + }, + "referenceParentCombinedNodePath": [ + [ + "Smidy13", + "User Profile", + "Governance", + "4b5eca40-4d97-454d-91f3-8627a98ef682" + ], + [ + "New Token Power Switch", + "Token Power Switch", + "Governance", + "7fb54153-47b4-48dc-b2e0-99b52eda5949" + ], + [ + "New Votes And Claims Programs", + "Votes And Claims Programs", + "Governance", + "7b4da8e8-6c7e-43eb-bfab-22c4b57ad286" + ], + [ + "New Claims Program", + "Claims Program", + "Governance", + "121a7d91-bb40-466f-88a4-b354fd22e1d6" + ], + [ + "New Asset Claims Folder", + "Asset Claims Folder", + "Governance", + "22f676a5-1868-473c-b3e5-a70faf6d35b5" + ], + [ + "Foundations", + "Asset Claims Folder", + "Governance", + "c987460d-37a3-4e72-8a56-04dd07944313" + ], + [ + "Bug Fixes", + "Asset Claims Folder", + "Governance", + "7682f51b-38f8-4cfa-becd-48113ce3c6cd" + ], + [ + "", + "Asset Contribution Claim", + "Governance", + "f1add2dd-8cbc-40c0-a189-922b3d729e06" + ] + ] + } + }, + { + "type": "Asset Claim Vote", + "name": "Smidy13 ", + "config": "{}", + "project": "Governance", + "id": "69077036-299f-4d31-8ef5-0f544b052158", + "savedPayload": { + "position": { + "x": 20251.080224558897, + "y": 15010.013334140216 + }, + "targetPosition": { + "x": 19729.604173712465, + "y": 15877.895226101105 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 4, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Asset Contribution Claim", + "name": "", + "id": "2f1021db-f803-44a2-a40b-6593f590589d" + }, + "referenceParentCombinedNodePath": [ + [ + "Smidy13", + "User Profile", + "Governance", + "4b5eca40-4d97-454d-91f3-8627a98ef682" + ], + [ + "New Token Power Switch", + "Token Power Switch", + "Governance", + "7fb54153-47b4-48dc-b2e0-99b52eda5949" + ], + [ + "New Votes And Claims Programs", + "Votes And Claims Programs", + "Governance", + "7b4da8e8-6c7e-43eb-bfab-22c4b57ad286" + ], + [ + "New Claims Program", + "Claims Program", + "Governance", + "121a7d91-bb40-466f-88a4-b354fd22e1d6" + ], + [ + "New Asset Claims Folder", + "Asset Claims Folder", + "Governance", + "22f676a5-1868-473c-b3e5-a70faf6d35b5" + ], + [ + "Foundations", + "Asset Claims Folder", + "Governance", + "c987460d-37a3-4e72-8a56-04dd07944313" + ], + [ + "Bug Fixes", + "Asset Claims Folder", + "Governance", + "7682f51b-38f8-4cfa-becd-48113ce3c6cd" + ], + [ + "", + "Asset Contribution Claim", + "Governance", + "2f1021db-f803-44a2-a40b-6593f590589d" + ] + ] + } } ], "featureClaimVotes": [], "id": "c1768c6f-680c-4ac7-b255-741cc0c8a8a9", "savedPayload": { "position": { - "x": 19323.604173712465, - "y": 15618.895226101107 + "x": 19729.604173712465, + "y": 15877.895226101105 }, "targetPosition": { - "x": 19748.395437671104, - "y": 16143.468750084561 + "x": 20154.395437671104, + "y": 16402.46875008456 }, "floatingObject": { "isPinned": false, @@ -1910,12 +2076,12 @@ "id": "a6c1ced3-2da8-48a3-ad5c-ee63064df8f4", "savedPayload": { "position": { - "x": 19601.666682280975, - "y": 15648.120773420254 + "x": 20007.666682280975, + "y": 15907.120773420254 }, "targetPosition": { - "x": 20272.96896165456, - "y": 15718.677486125918 + "x": 20678.96896165456, + "y": 15977.67748612592 }, "floatingObject": { "isPinned": false, @@ -1987,18 +2153,18 @@ "id": "708dc168-d47c-4105-81b5-261ab635a1d5", "savedPayload": { "position": { - "x": 19848.17769769592, - "y": 15194.103962142464 + "x": 20749.525674360226, + "y": 15306.375206752335 }, "targetPosition": { - "x": 20272.96896165456, - "y": 15718.677486125918 + "x": 20678.96896165456, + "y": 15977.67748612592 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -2064,18 +2230,18 @@ "id": "e02a4ea0-0971-4f40-8442-ff66cea39bfe", "savedPayload": { "position": { - "x": 20343.525674360226, - "y": 15047.375206752335 + "x": 21001.051124829795, + "y": 15384.475935079094 }, "targetPosition": { - "x": 20272.96896165456, - "y": 15718.677486125918 + "x": 20678.96896165456, + "y": 15977.67748612592 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -2141,18 +2307,18 @@ "id": "21af8982-6406-4eab-b2c0-9711c45b68f9", "savedPayload": { "position": { - "x": 20797.542485638012, - "y": 15293.886222167279 + "x": 21203.542485638012, + "y": 15552.886222167279 }, "targetPosition": { - "x": 20272.96896165456, - "y": 15718.677486125918 + "x": 20678.96896165456, + "y": 15977.67748612592 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -2218,18 +2384,18 @@ "id": "06b3fe21-0af3-4098-aa29-92d6b761d82c", "savedPayload": { "position": { - "x": 20944.271241028142, - "y": 15789.234198831586 + "x": 21326.17228269059, + "y": 15785.967128450773 }, "targetPosition": { - "x": 20272.96896165456, - "y": 15718.677486125918 + "x": 20678.96896165456, + "y": 15977.67748612592 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -2289,18 +2455,18 @@ "id": "5a5c2895-4761-48ac-a1ef-4b51ab40ee05", "savedPayload": { "position": { - "x": 20697.760225613198, - "y": 16243.251010109376 + "x": 21350.271241028142, + "y": 16048.234198831586 }, "targetPosition": { - "x": 20272.96896165456, - "y": 15718.677486125918 + "x": 20678.96896165456, + "y": 15977.67748612592 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -2372,18 +2538,18 @@ "id": "38b6d567-4641-40ec-893e-9f76cca8ebd8", "savedPayload": { "position": { - "x": 20202.41224894889, - "y": 16389.979765499505 + "x": 21272.170512701385, + "y": 16299.759649301155 }, "targetPosition": { - "x": 20272.96896165456, - "y": 15718.677486125918 + "x": 20678.96896165456, + "y": 15977.67748612592 }, "floatingObject": { "isPinned": false, "isFrozen": false, "isCollapsed": false, - "angleToParent": 1, + "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 }, @@ -2451,12 +2617,12 @@ "id": "efbc2c39-9c26-41af-bca5-0222fb9f6a4c", "savedPayload": { "position": { - "x": 20272.96896165456, - "y": 15718.677486125918 + "x": 20678.96896165456, + "y": 15977.67748612592 }, "targetPosition": { - "x": 19748.395437671104, - "y": 16143.468750084561 + "x": 20154.395437671104, + "y": 16402.46875008456 }, "floatingObject": { "isPinned": false, @@ -2478,12 +2644,12 @@ "id": "38ad8b59-129e-460e-bbfe-cc6e328992b7", "savedPayload": { "position": { - "x": 19748.395437671104, - "y": 16143.468750084561 + "x": 20154.395437671104, + "y": 16402.46875008456 }, "targetPosition": { - "x": 20031.589613643533, - "y": 16493.1844327402 + "x": 20437.589613643533, + "y": 16752.1844327402 }, "floatingObject": { "isPinned": false, @@ -10338,12 +10504,12 @@ "id": "6eba9686-b5d4-44cb-bde9-002082ed733a", "savedPayload": { "position": { - "x": 20381.30529629917, - "y": 16209.990256767771 + "x": 20787.30529629917, + "y": 16468.99025676777 }, "targetPosition": { - "x": 20031.589613643533, - "y": 16493.1844327402 + "x": 20437.589613643533, + "y": 16752.1844327402 }, "floatingObject": { "isPinned": false, @@ -10364,12 +10530,12 @@ "id": "e071b504-73cb-4d66-bc92-90a5c48e17b0", "savedPayload": { "position": { - "x": 20437.589613643533, - "y": 16752.1844327402 + "x": 17903.08534736995, + "y": 17911.360682223763 }, "targetPosition": { - "x": 20276.32403634815, - "y": 17172.29562466394 + "x": 17741.819770074566, + "y": 18331.471874147504 }, "floatingObject": { "isPinned": false, @@ -10409,17 +10575,17 @@ { "type": "Feature Claim Vote", "name": "PLuv Tensor Flow Integration New Features", - "config": "{}", + "config": "{\n \"percentage\": 50\n}", "project": "Governance", "id": "7e7385b4-9f96-4da7-9066-e010e1023905", "savedPayload": { "position": { - "x": 21410.05612022855, - "y": 15994.640145511272 + "x": 18654.88074998019, + "y": 17100.83795018773 }, "targetPosition": { - "x": 21363.018311758107, - "y": 16442.174998426995 + "x": 18725.276259248294, + "y": 17545.297703455544 }, "floatingObject": { "isPinned": false, @@ -10480,17 +10646,17 @@ { "type": "Feature Claim Vote", "name": "PLuv User Defined Variables and Code New Features", - "config": "{\n}", + "config": "{}", "project": "Governance", "id": "72086cca-208e-4864-8a21-51fadac28c98", "savedPayload": { "position": { - "x": 21774.11376769728, - "y": 16259.143509042886 + "x": 19074.991941903932, + "y": 17262.103527483116 }, "targetPosition": { - "x": 21363.018311758107, - "y": 16442.174998426995 + "x": 18725.276259248294, + "y": 17545.297703455544 }, "floatingObject": { "isPinned": false, @@ -10552,12 +10718,12 @@ "id": "33000f65-87b3-45c2-aaec-067b12404b88", "savedPayload": { "position": { - "x": 21363.018311758107, - "y": 16442.174998426995 + "x": 18725.276259248294, + "y": 17545.297703455544 }, "targetPosition": { - "x": 21098.514948226493, - "y": 16806.23264589572 + "x": 18564.01068195291, + "y": 17965.408895379285 }, "floatingObject": { "isPinned": false, @@ -10624,12 +10790,12 @@ "id": "40a03471-49ab-4b22-8d38-47676d0469d5", "savedPayload": { "position": { - "x": 21993.58465405794, - "y": 16900.308262836606 + "x": 19386.201593831254, + "y": 17599.345916611066 }, "targetPosition": { - "x": 21546.049801142217, - "y": 16853.270454366164 + "x": 18975.106137892082, + "y": 17782.377405995176 }, "floatingObject": { "isPinned": false, @@ -10693,12 +10859,195 @@ "id": "8b21bb4d-41f5-4876-9e62-4665f1429cf4", "savedPayload": { "position": { - "x": 21546.049801142217, - "y": 16853.270454366164 + "x": 18975.106137892082, + "y": 17782.377405995176 }, "targetPosition": { - "x": 21098.514948226493, - "y": 16806.23264589572 + "x": 18564.01068195291, + "y": 17965.408895379285 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + } + } + } + ], + "weightVotesSwitch": [ + { + "type": "Weight Votes Switch", + "name": "New Weight Votes Switch", + "config": "{\n \"percentage\": 0\n}", + "project": "Governance", + "weightVotesSwitch": [], + "poolWeightVotes": [ + { + "type": "Pool Weight Vote", + "name": "Project Positions, Assets, Features Pool Class", + "config": "{}", + "project": "Governance", + "id": "dd6428c8-059a-47e2-adc7-e1de10ec621c", + "savedPayload": { + "position": { + "x": 19395.217329815823, + "y": 17943.64298329056 + }, + "targetPosition": { + "x": 18984.12187387665, + "y": 18126.67447267467 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Pool Class", + "name": "Project Positions, Assets, Features", + "id": "b27df32a-70f3-470b-b8bb-471c156b0c30" + }, + "referenceParentCombinedNodePath": [ + [ + "Superalgos", + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" + ], + [ + "Project Positions, Assets, Features", + "Pool Class", + "Governance", + "b27df32a-70f3-470b-b8bb-471c156b0c30" + ] + ] + } + }, + { + "type": "Pool Weight Vote", + "name": "Features Pool Class", + "config": "{\n \"percentage\": 25\n}", + "project": "Governance", + "id": "81da8791-9e3f-4c6b-897e-40d82f1a0551", + "savedPayload": { + "position": { + "x": 19404.233065800392, + "y": 18287.940049970053 + }, + "targetPosition": { + "x": 18984.12187387665, + "y": 18126.67447267467 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Pool Class", + "name": "Features", + "id": "a1bc781c-242d-464f-8e1a-ee34b76e139c" + }, + "referenceParentCombinedNodePath": [ + [ + "Superalgos", + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" + ], + [ + "Project Positions, Assets, Features", + "Pool Class", + "Governance", + "b27df32a-70f3-470b-b8bb-471c156b0c30" + ], + [ + "Features", + "Pool Class", + "Governance", + "a1bc781c-242d-464f-8e1a-ee34b76e139c" + ] + ] + } + }, + { + "type": "Pool Weight Vote", + "name": "Exchanges Pool Class", + "config": "{\n}", + "project": "Governance", + "id": "7839eb51-c4a5-4e0e-a2fd-fd01d0f9b2f0", + "savedPayload": { + "position": { + "x": 19167.15336326076, + "y": 18537.76992861384 + }, + "targetPosition": { + "x": 18984.12187387665, + "y": 18126.67447267467 + }, + "floatingObject": { + "isPinned": false, + "isFrozen": false, + "isCollapsed": false, + "angleToParent": 2, + "distanceToParent": 3, + "arrangementStyle": 0 + }, + "uiObject": { + "isRunning": false + }, + "referenceParent": { + "type": "Pool Class", + "name": "Exchanges", + "id": "b6d7a4fe-8990-47a2-a7ce-f5fd90384b53" + }, + "referenceParentCombinedNodePath": [ + [ + "Superalgos", + "Pools", + "Governance", + "6f0aed87-db13-4818-bfe6-68abc463ebec" + ], + [ + "Exchanges", + "Pool Class", + "Governance", + "b6d7a4fe-8990-47a2-a7ce-f5fd90384b53" + ] + ] + } + } + ], + "assetWeightVotes": [], + "featureWeightVotes": [], + "positionWeightVotes": [], + "id": "e182eed3-badb-4d47-8cd4-5bac2399d501", + "savedPayload": { + "position": { + "x": 18984.12187387665, + "y": 18126.67447267467 + }, + "targetPosition": { + "x": 18564.01068195291, + "y": 17965.408895379285 }, "floatingObject": { "isPinned": false, @@ -10714,17 +11063,16 @@ } } ], - "weightVotesSwitch": [], "userProfileVotesSwitch": [], "id": "9a70336d-9543-401a-bd60-a6c2fa8c08fb", "savedPayload": { "position": { - "x": 21098.514948226493, - "y": 16806.23264589572 + "x": 18564.01068195291, + "y": 17965.408895379285 }, "targetPosition": { - "x": 20687.41949228732, - "y": 16989.26413527983 + "x": 18152.915226013738, + "y": 18148.440384763395 }, "floatingObject": { "isPinned": false, @@ -10746,12 +11094,12 @@ "id": "268bce42-91b0-4de4-bb36-7055b75db2b9", "savedPayload": { "position": { - "x": 20687.41949228732, - "y": 16989.26413527983 + "x": 18152.915226013738, + "y": 18148.440384763395 }, "targetPosition": { - "x": 20276.32403634815, - "y": 17172.29562466394 + "x": 17741.819770074566, + "y": 18331.471874147504 }, "floatingObject": { "isPinned": false, @@ -10774,12 +11122,12 @@ "id": "6091d138-b20d-4a19-b8cb-24142377abb7", "savedPayload": { "position": { - "x": 20486.379632310018, - "y": 17252.928413311634 + "x": 17951.875366036435, + "y": 18412.1046627952 }, "targetPosition": { - "x": 20276.32403634815, - "y": 17172.29562466394 + "x": 17741.819770074566, + "y": 18331.471874147504 }, "floatingObject": { "isPinned": false, @@ -10797,12 +11145,12 @@ "id": "6106dc15-c8c2-49fb-9db3-c494711ef844", "savedPayload": { "position": { - "x": 20276.32403634815, - "y": 17172.29562466394 + "x": 17741.819770074566, + "y": 18331.471874147504 }, "targetPosition": { - "x": 19865.228580408977, - "y": 17355.32711404805 + "x": 17330.724314135394, + "y": 18514.503363531614 }, "floatingObject": { "isPinned": false, @@ -10820,7 +11168,7 @@ "claimsProgram": { "type": "Claims Program", "name": "New Claims Program", - "config": "{\n \"percentage\": 50\n}", + "config": "{\n \"percentage\": 51\n}", "project": "Governance", "assetClaimsFolders": [ { @@ -10838,12 +11186,12 @@ "id": "e0f84f5a-a3fc-4fc2-8c82-9116b20ea4d5", "savedPayload": { "position": { - "x": 20640.38168381688, - "y": 17436.798988195555 + "x": 18105.877417543295, + "y": 18595.97523767912 }, "targetPosition": { - "x": 20229.286227877707, - "y": 17619.830477579664 + "x": 17694.781961604123, + "y": 18779.006727063228 }, "floatingObject": { "isPinned": false, @@ -10885,12 +11233,12 @@ "id": "dc382aa3-fb73-4770-817d-2d69da57fd26", "savedPayload": { "position": { - "x": 20229.286227877707, - "y": 17619.830477579664 + "x": 17694.781961604123, + "y": 18779.006727063228 }, "targetPosition": { - "x": 19818.190771938534, - "y": 17802.861966963774 + "x": 17283.68650566495, + "y": 18962.038216447338 }, "floatingObject": { "isPinned": false, @@ -10920,12 +11268,12 @@ "id": "7a943c21-0e4d-4ca2-ad65-2cee16923774", "savedPayload": { "position": { - "x": 20626.708172675073, - "y": 17996.969821227285 + "x": 18092.20390640149, + "y": 19156.14607071085 }, "targetPosition": { - "x": 20182.24841940726, - "y": 18067.365330495388 + "x": 17647.744153133677, + "y": 19226.54157997895 }, "floatingObject": { "isPinned": false, @@ -10979,12 +11327,12 @@ "id": "e44cbbd2-9ee2-46e9-aad1-747ac5670bea", "savedPayload": { "position": { - "x": 20546.306066875986, - "y": 18331.868694027 + "x": 18011.801800602403, + "y": 19491.044943510566 }, "targetPosition": { - "x": 20182.24841940726, - "y": 18067.365330495388 + "x": 17647.744153133677, + "y": 19226.54157997895 }, "floatingObject": { "isPinned": false, @@ -11038,12 +11386,12 @@ "id": "d90040a0-f341-4ccc-b04f-5e86b12de4a6", "savedPayload": { "position": { - "x": 20252.643928675363, - "y": 18511.8250837632 + "x": 17718.13966240178, + "y": 19671.001333246764 }, "targetPosition": { - "x": 20182.24841940726, - "y": 18067.365330495388 + "x": 17647.744153133677, + "y": 19226.54157997895 }, "floatingObject": { "isPinned": false, @@ -11093,12 +11441,12 @@ "id": "d64547b8-fa87-4ea3-a53a-90d55b325d14", "savedPayload": { "position": { - "x": 20182.24841940726, - "y": 18067.365330495388 + "x": 17647.744153133677, + "y": 19226.54157997895 }, "targetPosition": { - "x": 19818.190771938534, - "y": 17802.861966963774 + "x": 17283.68650566495, + "y": 18962.038216447338 }, "floatingObject": { "isPinned": false, @@ -11152,17 +11500,17 @@ { "type": "Feature Contribution Claim", "name": "Tensor Flow Integration New Features", - "config": "{}", + "config": "{\n \"percentage\": 50\n}", "project": "Governance", "id": "b79c3adb-f641-42a9-bba9-312afb225a7b", "savedPayload": { "position": { - "x": 20135.210610936818, - "y": 18514.90018341111 + "x": 17600.706344663235, + "y": 19674.076432894675 }, "targetPosition": { - "x": 19771.152963468092, - "y": 18250.396819879497 + "x": 17236.64869719451, + "y": 19409.57306936306 }, "floatingObject": { "isPinned": false, @@ -11217,17 +11565,17 @@ { "type": "Feature Contribution Claim", "name": "User Defined Variables and Code New Features", - "config": "{\n}", + "config": "{}", "project": "Governance", "id": "9d526dfa-522d-463f-9569-383be672d116", "savedPayload": { "position": { - "x": 19360.05750752892, - "y": 18433.428309263607 + "x": 16825.553241255337, + "y": 19592.60455874717 }, "targetPosition": { - "x": 19771.152963468092, - "y": 18250.396819879497 + "x": 17236.64869719451, + "y": 19409.57306936306 }, "floatingObject": { "isPinned": false, @@ -11283,12 +11631,12 @@ "id": "7f8f1fec-5a45-41c1-a297-a92a22b3e524", "savedPayload": { "position": { - "x": 19771.152963468092, - "y": 18250.396819879497 + "x": 17236.64869719451, + "y": 19409.57306936306 }, "targetPosition": { - "x": 19818.190771938534, - "y": 17802.861966963774 + "x": 17283.68650566495, + "y": 18962.038216447338 }, "floatingObject": { "isPinned": false, @@ -11320,12 +11668,12 @@ "id": "ffeb7ead-1cfd-4c0f-802a-64ab3d0ca55b", "savedPayload": { "position": { - "x": 18995.99986006019, - "y": 18168.924945731993 + "x": 16461.495593786607, + "y": 19328.101195215557 }, "targetPosition": { - "x": 19407.095315999362, - "y": 17985.893456347883 + "x": 16872.59104972578, + "y": 19145.069705831447 }, "floatingObject": { "isPinned": false, @@ -11375,12 +11723,12 @@ "id": "5cbec4c5-0432-4cf9-b105-34342ca701db", "savedPayload": { "position": { - "x": 19407.095315999362, - "y": 17985.893456347883 + "x": 16872.59104972578, + "y": 19145.069705831447 }, "targetPosition": { - "x": 19818.190771938534, - "y": 17802.861966963774 + "x": 17283.68650566495, + "y": 18962.038216447338 }, "floatingObject": { "isPinned": false, @@ -11403,12 +11751,12 @@ "id": "3ed14538-feda-4865-be79-3908e4ff44e8", "savedPayload": { "position": { - "x": 19636.16194820417, - "y": 17670.610285197967 + "x": 17101.65768193059, + "y": 18829.78653468153 }, "targetPosition": { - "x": 19818.190771938534, - "y": 17802.861966963774 + "x": 17283.68650566495, + "y": 18962.038216447338 }, "floatingObject": { "isPinned": false, @@ -11426,12 +11774,12 @@ "id": "647eddb0-6989-49ca-9288-8aaade078bec", "savedPayload": { "position": { - "x": 19818.190771938534, - "y": 17802.861966963774 + "x": 17283.68650566495, + "y": 18962.038216447338 }, "targetPosition": { - "x": 19865.228580408977, - "y": 17355.32711404805 + "x": 17330.724314135394, + "y": 18514.503363531614 }, "floatingObject": { "isPinned": false, @@ -11449,12 +11797,12 @@ "id": "704ea112-7592-4d37-b300-9227448bfe9f", "savedPayload": { "position": { - "x": 19865.228580408977, - "y": 17355.32711404805 + "x": 17330.724314135394, + "y": 18514.503363531614 }, "targetPosition": { - "x": 19501.17093294025, - "y": 17090.823750516436 + "x": 16966.666666666668, + "y": 18250 }, "floatingObject": { "isPinned": false, @@ -11472,7 +11820,7 @@ "financialPrograms": { "type": "Financial Programs", "name": "New Financial Programs", - "config": "{\n \"percentage\": 2\n}", + "config": "{\n \"percentage\": 0\n}", "project": "Governance", "stakingProgram": { "type": "Staking Program", @@ -11588,12 +11936,12 @@ "id": "182c1476-f2a8-4c5a-8173-f37050aab5d5", "savedPayload": { "position": { - "x": 19408.46583462777, - "y": 17376.14070540498 + "x": 16873.961568354185, + "y": 18535.316954888545 }, "targetPosition": { - "x": 19501.17093294025, - "y": 17090.823750516436 + "x": 16966.666666666668, + "y": 18250 }, "floatingObject": { "isPinned": false, @@ -11611,12 +11959,12 @@ "id": "9b72df20-a4f0-4023-ae17-c46a64920716", "savedPayload": { "position": { - "x": 19501.17093294025, - "y": 17090.823750516436 + "x": 16966.666666666668, + "y": 18250 }, "targetPosition": { - "x": 19201.17093294025, - "y": 17090.823750516436 + "x": 16666.666666666668, + "y": 18250 }, "floatingObject": { "isPinned": false, @@ -11638,12 +11986,12 @@ "id": "a9459b1f-80a5-4676-a9eb-a21a11e32c50", "savedPayload": { "position": { - "x": 18901.17093294025, - "y": 17090.823750516436 + "x": 16366.666666666668, + "y": 18250 }, "targetPosition": { - "x": 19201.17093294025, - "y": 17090.823750516436 + "x": 16666.666666666668, + "y": 18250 }, "floatingObject": { "isPinned": false, @@ -11661,17 +12009,17 @@ "id": "142f5de2-3762-4f55-a839-22eac5c03c8f", "savedPayload": { "position": { - "x": 19201.17093294025, - "y": 17090.823750516436 + "x": 16666.666666666668, + "y": 18250 }, "targetPosition": { - "x": 19201.17093294025, - "y": 17090.823750516436 + "x": 16666.666666666668, + "y": 18250 }, "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 1, "distanceToParent": 3, "arrangementStyle": 0 diff --git a/setup.js b/setup.js index 6384f38e2..3651482fc 100644 --- a/setup.js +++ b/setup.js @@ -2,6 +2,7 @@ const path = require("path"); const process = require("process"); const { exec } = require("child_process"); const systemCheck = require('./Launch-Scripts/system-check') +const platform = require('os').platform(); // Possible values are: 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32'. // Check system is set up correctly systemCheck(); @@ -33,11 +34,15 @@ let nodeModulesDirs = [ path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Trading-Bot", "Announcements"), path.join( process.cwd(), "Projects", "Foundations", "TS", "Bot-Modules", "Trading-Bot", "Low-Frequency-Trading", "APIs"), path.join( process.cwd(), "Projects", "Foundations", "TS", "Task-Modules"), - /* Aug-27-21 - TensorFlow dependency integration undergoing modifications. Should be resolved within a day or two: path.join( process.cwd(), "Projects", "TensorFlow", "TS", "Bot-Modules", "Learning-Bot", "Low-Frequency-Learning") - */ ]; +// Check if WinOS because extra dependencies may be required for tfjs: +var tfjsWinInstallFlag = false; +if (platform === 'win32') { // *Note: win32 == win32 || win64 + tfjsWinInstallFlag = true; +} + console.log(''); console.log("Installing node dependencies at the following directories:"); console.log(''); @@ -57,9 +62,31 @@ for (let dir of nodeModulesDirs) { console.log("There was an error installing some dependencies error: "); console.log(''); console.log( error ); + if (tfjsWinInstallFlag == true && dir == path.join(process.cwd(), "Projects", "TensorFlow", "TS", "Bot-Modules", "Learning-Bot", "Low-Frequency-Learning")) { + tfjsWinInstall(); + } return; } console.log(''); console.log( stdout ); }); -}; \ No newline at end of file +}; + + +/* If WinOS && error with tfjs installation: + * This is a well known and documented issue with @Tensorflow/tfjs-node installation on WinOS. + * npm's windows-build-tools via: `npm install --global --production windows-build-tools` && + * `npm install -g node-gyp` can sometimes correct the issue but not always depending on the + * version and options the user defined when installing npm/nodejs. + * The best reliable way to correct that I (Pluvtech) have found to work on many versions of WinOS + * is to reinstall nodejs and select to install chocolatey during the installation configuration. + */ +function tfjsWinInstall() { + console.log("\n*** Note to Windows Users Regarding the Superalgos TensorFlow Project ***"); + console.log("If you have no other errors with this setup script and do not wish to use the TensorFlow Project:\nThen all is successful with your Superalgos setup and you may proceed to use the software."); + console.log("\nIf you do wish to install the @Tensorflow/tfjs-node modules required for use with the Superalgos TensorFlow Project:"); + console.log("In this case it is likely your system is missing some dependencies required to build the TensorFlow (tfjs-node) bindings and you will need to follow the below steps:"); + console.log("\n1.) Reinstall node.js from https://nodejs.org/en/download/ @Version 14.17.5 or higher.\nDuring installation, when you arrive at the 'Tools for Native Modules' screen you need to select the box to:\n\t'Automatically install the necessary tools...Chocolatey...'"); + console.log("Doing this will cause a pop-up script in a new window which will install many npm/node tools and dependencies for use within the WinOS ecosystem."); + console.log("2.) When the installations finally complete you need to navigate back to your Superalgos directory and run `node setup` again.\n"); +} \ No newline at end of file From 064e98c0b1bb71ea653c89af1435c91e6fe19ba5 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Wed, 1 Sep 2021 11:34:28 +0200 Subject: [PATCH 75/81] User profile topic WIP --- ...-2.1-onboarding-programs-introduction.json | 20 ++++++++++++++++ .../user-profile-2.2-the-airdrop-program.json | 24 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.1-onboarding-programs-introduction.json create mode 100644 Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.2-the-airdrop-program.json diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.1-onboarding-programs-introduction.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.1-onboarding-programs-introduction.json new file mode 100644 index 000000000..1a8060d93 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.1-onboarding-programs-introduction.json @@ -0,0 +1,20 @@ +{ + "topic": "User Profile", + "pageNumber": "2.1", + "type": "Onboarding Programs Introduction", + "definition": { + "text": "Get on board and earn your first few tokens just by setting up and submitting your User Profile!", + "updated": 1630487139929 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Node->Onboarding Programs->Definition", + "updated": 1630487058848 + }, + { + "style": "Include", + "text": "Governance->Node->Onboarding Programs->Content" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.2-the-airdrop-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.2-the-airdrop-program.json new file mode 100644 index 000000000..2ea3110a3 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.2-the-airdrop-program.json @@ -0,0 +1,24 @@ +{ + "topic": "User Profile", + "pageNumber": "2.2", + "type": "The Airdrop Program", + "definition": { + "text": "Superalgos does an airdrop on each release of the software! We wish to welcome you and everyone in the Community onboard and grant you your first few tokens so that you may participate in governance.", + "updated": 1630487391797 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Node->Airdrop Program->Definition", + "updated": 1630487237360 + }, + { + "style": "Include", + "text": "Governance->Node->Airdrop Program->Content" + }, + { + "style": "Text", + "text": "" + } + ] +} \ No newline at end of file From 483ccbc39a506854e47a908904be3c1a6db14fa7 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Wed, 1 Sep 2021 14:25:52 +0200 Subject: [PATCH 76/81] Voting program done --- .../Community-Mods/community-mods.json | 3 +- .../W/Weight/Weight-Votes/weight-votes.json | 7 +- .../claim-votes-switch.json | 8 +- .../weight-votes-switch.json | 7 +- ...user-profile-003-the-referral-program.json | 22 +-- .../user-profile-004-the-support-program.json | 12 +- ...er-profile-005-the-mentorship-program.json | 12 +- .../user-profile-006-the-claims-program.json | 74 ++++++++++- .../user-profile-007-the-voting-program.json | 125 ++++++++++++++++-- .../user-profile-2.3-the-github-program.json | 20 +++ ...2.4-community-building-programs-intro.json | 20 +++ ...e-5.1-votes-and-claims-programs-intro.json | 20 +++ 12 files changed, 275 insertions(+), 55 deletions(-) create mode 100644 Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.3-the-github-program.json create mode 100644 Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.4-community-building-programs-intro.json create mode 100644 Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-5.1-votes-and-claims-programs-intro.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/C/Community/Community-Mods/community-mods.json b/Projects/Governance/Schemas/Docs-Concepts/C/Community/Community-Mods/community-mods.json index c7b64cecc..6c7b216ba 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/C/Community/Community-Mods/community-mods.json +++ b/Projects/Governance/Schemas/Docs-Concepts/C/Community/Community-Mods/community-mods.json @@ -12,7 +12,8 @@ }, { "style": "Callout", - "text": "To become a Community Mod, you must go deep into the rabbit hole, study the Docs and tutorials, and start using the system. It takes a deep understanding of how things work before you’re able to explain it to someone else. That said, it doesn’t take much to help newcomers with the easier questions. You may get involved and participate in the Community and Support Group, and, at some point, we’ll draft you to join the team!" + "text": "To become a Community Mod, you must go deep into the rabbit hole, study the Docs and tutorials, and start using the system. It takes a deep understanding of how things work before you’re able to explain it to someone else. That said, it doesn’t take much to help newcomers with the easier questions. You may get involved and participate in the Community Group and Support Group, and, at some point, we’ll draft you to join the team!", + "updated": 1630495449816 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json index 355397366..20f7c5709 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json +++ b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight-Votes/weight-votes.json @@ -1,8 +1,8 @@ { "type": "Weight Votes", "definition": { - "text": "A type of vote within the Voting Program used to confer Weight to different types of nodes in the multiple Project Definition Hierarchies. The term is a generalization describing any or all of the types of weight vote nodes, namely Pool Weight Vote, Position Weight Vote, Feature Weight Vote, and Asset Weight Vote.", - "updated": 1630355074330 + "text": "Weight Votes are a type of vote within the Voting Program used to confer Weight to different types of nodes in the multiple Project Definition Hierarchies. The Weight that Asset, Feature, Position, and Pool nodes get from Weight Votes cast by the Community determines the Token Rewards available as incentives for those nodes. The term Weight Votes is a generalization describing any or all of the types of weight vote nodes, namely Pool Weight Vote, Position Weight Vote, Feature Weight Vote, and Asset Weight Vote.", + "updated": 1630498313646 }, "paragraphs": [ { @@ -17,7 +17,8 @@ }, { "style": "Success", - "text": "You may want to learn more about Token Rewards and Voting Power Flow!" + "text": "You may want to learn more about Token Rewards and Voting Power Flow! The page explains how Token Rewards are allocated to each node in the Project Definition Hierarchies depending on the Weight they get from Weight Votes.", + "updated": 1630498497344 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json index 2b7735a67..004e18f3a 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/C/Claim/Claim-Votes-Switch/claim-votes-switch.json @@ -37,8 +37,12 @@ }, { "style": "Callout", - "text": "Use a Claim Votes Switch node to establish a reference with a Claims Folder type of node — Position Claims Folder, Feature Claims Folder, or Asset Claims Folder — within the Claims Program section of your colleague's User Profile node. Then use the Install Missing Votes option on the menu of the Claim Votes Switch to map the entire Claims Folder! The process creates a Claim Votes Switch for each Claims Folder, and matching Claim Votes for each Asset Contribution Claim, Feature Contribution Claim, or Position Contribution Claim defined within each folder.", - "updated": 1630349946670 + "text": "Use a Claim Votes Switch node to establish a reference with a Claims Folder type of node — Position Claims Folder, Feature Claims Folder, or Asset Claims Folder — within the Claims Program section of your colleague's User Profile node. Then use the Install Missing Votes option on the menu of the Claim Votes Switch to map the entire Claims Folder! ", + "updated": 1630497475900 + }, + { + "style": "Note", + "text": "The process creates a Claim Votes Switch for each Claims Folder, and matching Claim Votes for each Asset Contribution Claim, Feature Contribution Claim, or Position Contribution Claim defined within each folder." }, { "style": "Success", diff --git a/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json b/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json index 4f7cdd11f..459c5bc1a 100644 --- a/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json +++ b/Projects/Governance/Schemas/Docs-Nodes/W/Weight/Weight-Votes-Switch/weight-votes-switch.json @@ -33,7 +33,12 @@ }, { "style": "Callout", - "text": "Use a Weight Votes Switch node to establish a reference with a Class type of node — Pool Class, Position Class, Feature Class, or Asset Class — within Project Definition Hierarchies. Then use the Install Missing Votes option on the menu of the Weight Votes Switch to map the entire Class section of the hierarchy! The process creates a Weight Votes Switch for each Class type of node, and matching Weight Votes for each Asset, Feature, Position, or Pool defined within each Class node." + "text": "Use a Weight Votes Switch node to establish a reference with a Class type of node — Pool Class, Position Class, Feature Class, or Asset Class — within Project Definition Hierarchies. Then use the Install Missing Votes option on the menu of the Weight Votes Switch to map the entire Class section of the hierarchy! ", + "updated": 1630498028825 + }, + { + "style": "Note", + "text": "The process creates a Weight Votes Switch for each Class type of node, and matching Weight Votes for each Asset, Feature, Position, or Pool defined within each Class node." }, { "style": "Success", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-the-referral-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-the-referral-program.json index 9359a94f9..2e6630d82 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-the-referral-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-the-referral-program.json @@ -3,8 +3,8 @@ "pageNumber": "3", "type": "The Referral Program", "definition": { - "text": "The Referral Program helps people find Superalgos.", - "updated": 1624732524023 + "text": "Help us spread the word about Superalgos!", + "updated": 1630495118436 }, "paragraphs": [ { @@ -18,7 +18,8 @@ }, { "style": "Title", - "text": "User Referrer" + "text": "Your Referrers", + "updated": 1630495480122 }, { "style": "Include", @@ -27,21 +28,6 @@ { "style": "Include", "text": "Governance->Node->User Referrer->Content" - }, - { - "style": "Title", - "text": "Tokens Bonus", - "updated": 1624732636384 - }, - { - "style": "Include", - "text": "Governance->Node->Tokens Bonus->Definition", - "updated": 1624732644483 - }, - { - "style": "Text", - "text": "In the case of the Referral Program, you get your Tokens Bonus tokens from the Referral Bonus Pool.", - "updated": 1624732742383 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-support-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-support-program.json index 170aad695..8b35adf1d 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-support-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-support-program.json @@ -3,8 +3,8 @@ "pageNumber": "4", "type": "The Support Program", "definition": { - "text": "The Support Program helps new users get better support.", - "updated": 1624732840040 + "text": "Let's reward Community Mods so that they keep up the good work, and so that more people want to join the team!", + "updated": 1630495305649 }, "paragraphs": [ { @@ -28,14 +28,6 @@ "style": "Include", "text": "Governance->Node->User Supporter->Content" }, - { - "style": "Title", - "text": "Token Bonus" - }, - { - "style": "Text", - "text": "The Support program grants you a Token Bonus through the Support Bonus Pool." - }, { "style": "Title", "text": "Becoming a Community Mod" diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-mentorship-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-mentorship-program.json index 1a5f18f28..e5c72b058 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-mentorship-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-mentorship-program.json @@ -3,8 +3,8 @@ "pageNumber": "5", "type": "The Mentorship Program", "definition": { - "text": "The Mentorship Program helps users advance faster to power-user level.", - "updated": 1624734024802 + "text": "Helps us reward mentors so that they keep up the good work forming Contributors!", + "updated": 1630495605300 }, "paragraphs": [ { @@ -28,14 +28,6 @@ "style": "Include", "text": "Governance->Node->User Mentor->Content" }, - { - "style": "Title", - "text": "Tokens Bonus" - }, - { - "style": "Text", - "text": "This program grants you a Tokens Bonus in proportion to the Mentorship Power you let into the program." - }, { "style": "Text", "text": "" diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-the-claims-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-the-claims-program.json index d3a3833a1..e5bfb855a 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-the-claims-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-the-claims-program.json @@ -3,8 +3,8 @@ "pageNumber": "6", "type": "The Claims Program", "definition": { - "text": "The Claims Program help Contributors get compensation for their work.", - "updated": 1624734366643 + "text": "Tell us what you've done for the project and how we should reward you!", + "updated": 1630495910859 }, "paragraphs": [ { @@ -15,6 +15,76 @@ { "style": "Include", "text": "Governance->Node->Claims Program->Content" + }, + { + "style": "Title", + "text": "Three Types of Claim Folders", + "updated": 1630496493305 + }, + { + "style": "Include", + "text": "Governance->Concept->Claims Folder->Content", + "updated": 1630496432492 + }, + { + "style": "Subtitle", + "text": "Asset Claims Folder", + "updated": 1630496355821 + }, + { + "style": "Include", + "text": "Governance->Node->Asset Claims Folder->Definition" + }, + { + "style": "Subtitle", + "text": "Feature Claims Folder", + "updated": 1630496368526 + }, + { + "style": "Include", + "text": "Governance->Node->Feature Claims Folder->Definition" + }, + { + "style": "Subtitle", + "text": "Position Claims Folder" + }, + { + "style": "Include", + "text": "Governance->Node->Position Claims Folder->Definition" + }, + { + "style": "Title", + "text": "Three Types of Contribution Claims", + "updated": 1630496650088 + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Claims Content", + "updated": 1630496784756 + }, + { + "style": "Subtitle", + "text": "Asset Contribution Claim" + }, + { + "style": "Include", + "text": "Governance->Node->Asset Contribution Claim->Definition" + }, + { + "style": "Subtitle", + "text": "Feature Contribution Claim" + }, + { + "style": "Include", + "text": "Governance->Node->Feature Contribution Claim->Definition" + }, + { + "style": "Subtitle", + "text": "Position Contribution Claim" + }, + { + "style": "Include", + "text": "Governance->Node->Position Contribution Claim->Definition" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-voting-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-voting-program.json index e7232fc1d..df190780d 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-voting-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-voting-program.json @@ -3,8 +3,8 @@ "pageNumber": "7", "type": "The Voting Program", "definition": { - "text": "The Voting Program helps decentralize the distribution of the Superalgos SA Token, and helps distribute the validation of Contributions.", - "updated": 1624734799887 + "text": "Help us decide how what areas of project development to incentivize, and help us validate Contribution Claims!", + "updated": 1630496977699 }, "paragraphs": [ { @@ -33,8 +33,17 @@ }, { "style": "Title", - "text": "Claim Votes Switch Node", - "updated": 1624735041939 + "text": "About Claim Votes", + "updated": 1630497203825 + }, + { + "style": "Include", + "text": "Governance->Concept->Claim Votes->Definition", + "updated": 1630497746423 + }, + { + "style": "Subtitle", + "text": "Claim Votes Switch" }, { "style": "Include", @@ -46,10 +55,56 @@ "text": "Governance->Node->Claim Votes Switch->Content", "updated": 1624735231547 }, + { + "style": "Subtitle", + "text": "Three Types of Claim Votes", + "updated": 1630497351240 + }, + { + "style": "Include", + "text": "Governance->Concept->Reusable Governance Snippets->Claim Votes Content" + }, + { + "style": "Subtitle", + "text": "Asset Claim Vote" + }, + { + "style": "Include", + "text": "Governance->Node->Asset Claim Vote->Definition" + }, + { + "style": "Subtitle", + "text": "Feature Claim Vote" + }, + { + "style": "Include", + "text": "Governance->Node->Feature Claim Vote->Definition" + }, + { + "style": "Subtitle", + "text": "Position Claim Vote" + }, + { + "style": "Include", + "text": "Governance->Node->Position Claim Vote->Definition" + }, { "style": "Title", - "text": "Weight Votes Switch Node", - "updated": 1624735074339 + "text": "About Weight Votes", + "updated": 1630497602868 + }, + { + "style": "Include", + "text": "Governance->Concept->Weight Votes->Definition", + "updated": 1630497799945 + }, + { + "style": "Title", + "text": "" + }, + { + "style": "Subtitle", + "text": "Weight Votes Switch" }, { "style": "Include", @@ -61,16 +116,66 @@ "text": "Governance->Node->Weight Votes Switch->Content", "updated": 1624735088260 }, + { + "style": "Subtitle", + "text": "Three Types of Weight Votes", + "updated": 1630498074833 + }, + { + "style": "Include", + "text": "Governance->Concept->Weight Votes->Content" + }, + { + "style": "Subtitle", + "text": "" + }, + { + "style": "Subtitle", + "text": "Asset Weight Vote" + }, + { + "style": "Include", + "text": "Governance->Node->Asset Weight Vote->Definition" + }, + { + "style": "Subtitle", + "text": "Feature Weight Vote" + }, + { + "style": "Include", + "text": "Governance->Node->Feature Weight Vote->Definition" + }, + { + "style": "Subtitle", + "text": "Position Weight Vote" + }, + { + "style": "Include", + "text": "Governance->Node->Position Weight Vote->Definition" + }, { "style": "Title", - "text": "User Profile Switch Node", - "updated": 1624735319623 + "text": "About User Profile Votes", + "updated": 1630498579196 + }, + { + "style": "Include", + "text": "Governance->Concept->Liquid Democracy->Definition", + "updated": 1630499078885 + }, + { + "style": "Subtitle", + "text": "User Profile Switch" }, { "style": "Include", "text": "Governance->Node->User Profile Votes Switch->Definition", "updated": 1624735290341 }, + { + "style": "Include", + "text": "Governance->Node->User Profile Votes Switch->Content" + }, { "style": "Title", "text": "User Profile Vote Node", @@ -79,6 +184,10 @@ { "style": "Include", "text": "Governance->Node->User Profile Vote->Definition" + }, + { + "style": "Include", + "text": "Governance->Node->User Profile Vote->Content" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.3-the-github-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.3-the-github-program.json new file mode 100644 index 000000000..e94e72c16 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.3-the-github-program.json @@ -0,0 +1,20 @@ +{ + "topic": "User Profile", + "pageNumber": "2.3", + "type": "The Github Program", + "definition": { + "text": "Set yourself up to contribute and help more developers find us on Github!", + "updated": 1630494854079 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Node->Github Program->Definition", + "updated": 1630494807978 + }, + { + "style": "Include", + "text": "Governance->Node->Github Program->Content" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.4-community-building-programs-intro.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.4-community-building-programs-intro.json new file mode 100644 index 000000000..27524bc6e --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.4-community-building-programs-intro.json @@ -0,0 +1,20 @@ +{ + "topic": "User Profile", + "pageNumber": "2.4", + "type": "Community Building Programs Intro", + "definition": { + "text": "Help us build a strong and healthy Community!", + "updated": 1630494969779 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Node->Community Building Programs->Definition", + "updated": 1630495003728 + }, + { + "style": "Include", + "text": "Governance->Node->Community Building Programs->Content" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-5.1-votes-and-claims-programs-intro.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-5.1-votes-and-claims-programs-intro.json new file mode 100644 index 000000000..c6fb43fa5 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-5.1-votes-and-claims-programs-intro.json @@ -0,0 +1,20 @@ +{ + "topic": "User Profile", + "pageNumber": "5.1", + "type": "Votes And Claims Programs Intro", + "definition": { + "text": "Help us govern the Superalgos Project!", + "updated": 1630495810385 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Node->Votes And Claims Programs->Definition", + "updated": 1630495822844 + }, + { + "style": "Include", + "text": "Governance->Node->Votes And Claims Programs->Content" + } + ] +} \ No newline at end of file From 7c6361a69b079133b9c3b6f1bb5ff1988729fe62 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Wed, 1 Sep 2021 14:52:28 +0200 Subject: [PATCH 77/81] User Profile topic done --- ...-commands-007-docs-repaginate-command.json | 3 +- ...ser-profile-001-building-your-profile.json | 2 +- ...er-profile-002-user-profile-hierarchy.json | 2 +- ...rofile-003-onboarding-programs-intro.json} | 4 +- ...user-profile-004-the-airdrop-program.json} | 2 +- ... user-profile-005-the-github-program.json} | 2 +- ...06-community-building-programs-intro.json} | 2 +- ...ser-profile-007-the-referral-program.json} | 2 +- ...user-profile-008-the-support-program.json} | 2 +- ...r-profile-009-the-mentorship-program.json} | 2 +- ...-010-votes-and-claims-programs-intro.json} | 2 +- ... user-profile-011-the-claims-program.json} | 2 +- ... user-profile-012-the-voting-program.json} | 2 +- ...-profile-013-financial-programs-intro.json | 20 ++++++++ .../user-profile-014-the-staking-program.json | 20 ++++++++ ...er-profile-015-the-delegation-program.json | 46 +++++++++++++++++++ 16 files changed, 101 insertions(+), 14 deletions(-) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-2.1-onboarding-programs-introduction.json => user-profile-003-onboarding-programs-intro.json} (87%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-2.2-the-airdrop-program.json => user-profile-004-the-airdrop-program.json} (96%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-2.3-the-github-program.json => user-profile-005-the-github-program.json} (95%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-2.4-community-building-programs-intro.json => user-profile-006-community-building-programs-intro.json} (95%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-003-the-referral-program.json => user-profile-007-the-referral-program.json} (97%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-004-the-support-program.json => user-profile-008-the-support-program.json} (98%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-005-the-mentorship-program.json => user-profile-009-the-mentorship-program.json} (97%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-5.1-votes-and-claims-programs-intro.json => user-profile-010-votes-and-claims-programs-intro.json} (95%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-006-the-claims-program.json => user-profile-011-the-claims-program.json} (99%) rename Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/{user-profile-007-the-voting-program.json => user-profile-012-the-voting-program.json} (99%) create mode 100644 Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-013-financial-programs-intro.json create mode 100644 Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-014-the-staking-program.json create mode 100644 Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-015-the-delegation-program.json diff --git a/Projects/Foundations/Schemas/Docs-Topics/D/Docs/Docs-Commands/docs-commands-007-docs-repaginate-command.json b/Projects/Foundations/Schemas/Docs-Topics/D/Docs/Docs-Commands/docs-commands-007-docs-repaginate-command.json index 341bb9cb3..01600e992 100644 --- a/Projects/Foundations/Schemas/Docs-Topics/D/Docs/Docs-Commands/docs-commands-007-docs-repaginate-command.json +++ b/Projects/Foundations/Schemas/Docs-Topics/D/Docs/Docs-Commands/docs-commands-007-docs-repaginate-command.json @@ -51,7 +51,8 @@ }, { "style": "Text", - "text": "After you repaginate a Topic or Tutorial, the best way to proceed it to manually delete from disk all the files associated with that Topic / Tutorial. After you delete them, you execute the repaginate command and then the docs.save command. " + "text": "After you repaginate a Topic or Tutorial, the best way to proceed is to manually delete from disk all the files associated with that Topic / Tutorial. After you delete them, you execute the repaginate command and then the docs.save command.", + "updated": 1630500489007 }, { "style": "Text", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-001-building-your-profile.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-001-building-your-profile.json index 84de5fe91..312a44fce 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-001-building-your-profile.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-001-building-your-profile.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "1", + "pageNumber": 1, "type": "Building Your Profile", "definition": { "text": "Building your User Profile involves linking your Governance Address to your identity in Github.com, using the Profile Constructor. ", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-002-user-profile-hierarchy.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-002-user-profile-hierarchy.json index 41d68424f..104e36e56 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-002-user-profile-hierarchy.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-002-user-profile-hierarchy.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "2", + "pageNumber": 2, "type": "User Profile Hierarchy", "definition": { "text": "Your User Profile is where you define how you wish to participate in governance.", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.1-onboarding-programs-introduction.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-onboarding-programs-intro.json similarity index 87% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.1-onboarding-programs-introduction.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-onboarding-programs-intro.json index 1a8060d93..37ed8cb26 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.1-onboarding-programs-introduction.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-onboarding-programs-intro.json @@ -1,7 +1,7 @@ { "topic": "User Profile", - "pageNumber": "2.1", - "type": "Onboarding Programs Introduction", + "pageNumber": 3, + "type": "Onboarding Programs Intro", "definition": { "text": "Get on board and earn your first few tokens just by setting up and submitting your User Profile!", "updated": 1630487139929 diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.2-the-airdrop-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-airdrop-program.json similarity index 96% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.2-the-airdrop-program.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-airdrop-program.json index 2ea3110a3..d21cea330 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.2-the-airdrop-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-airdrop-program.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "2.2", + "pageNumber": 4, "type": "The Airdrop Program", "definition": { "text": "Superalgos does an airdrop on each release of the software! We wish to welcome you and everyone in the Community onboard and grant you your first few tokens so that you may participate in governance.", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.3-the-github-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-github-program.json similarity index 95% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.3-the-github-program.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-github-program.json index e94e72c16..cca0a8672 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.3-the-github-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-github-program.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "2.3", + "pageNumber": 5, "type": "The Github Program", "definition": { "text": "Set yourself up to contribute and help more developers find us on Github!", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.4-community-building-programs-intro.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-community-building-programs-intro.json similarity index 95% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.4-community-building-programs-intro.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-community-building-programs-intro.json index 27524bc6e..2531e2759 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-2.4-community-building-programs-intro.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-community-building-programs-intro.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "2.4", + "pageNumber": 6, "type": "Community Building Programs Intro", "definition": { "text": "Help us build a strong and healthy Community!", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-the-referral-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-referral-program.json similarity index 97% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-the-referral-program.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-referral-program.json index 2e6630d82..90f10c092 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-003-the-referral-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-referral-program.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "3", + "pageNumber": 7, "type": "The Referral Program", "definition": { "text": "Help us spread the word about Superalgos!", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-support-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-008-the-support-program.json similarity index 98% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-support-program.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-008-the-support-program.json index 8b35adf1d..a8d51e094 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-004-the-support-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-008-the-support-program.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "4", + "pageNumber": 8, "type": "The Support Program", "definition": { "text": "Let's reward Community Mods so that they keep up the good work, and so that more people want to join the team!", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-mentorship-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-009-the-mentorship-program.json similarity index 97% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-mentorship-program.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-009-the-mentorship-program.json index e5c72b058..a63fb74c3 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-005-the-mentorship-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-009-the-mentorship-program.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "5", + "pageNumber": 9, "type": "The Mentorship Program", "definition": { "text": "Helps us reward mentors so that they keep up the good work forming Contributors!", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-5.1-votes-and-claims-programs-intro.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-010-votes-and-claims-programs-intro.json similarity index 95% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-5.1-votes-and-claims-programs-intro.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-010-votes-and-claims-programs-intro.json index c6fb43fa5..c0cc1deb7 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-5.1-votes-and-claims-programs-intro.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-010-votes-and-claims-programs-intro.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "5.1", + "pageNumber": 10, "type": "Votes And Claims Programs Intro", "definition": { "text": "Help us govern the Superalgos Project!", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-the-claims-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-011-the-claims-program.json similarity index 99% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-the-claims-program.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-011-the-claims-program.json index e5bfb855a..28c799712 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-006-the-claims-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-011-the-claims-program.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "6", + "pageNumber": 11, "type": "The Claims Program", "definition": { "text": "Tell us what you've done for the project and how we should reward you!", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-voting-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-012-the-voting-program.json similarity index 99% rename from Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-voting-program.json rename to Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-012-the-voting-program.json index df190780d..efb95c9aa 100644 --- a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-007-the-voting-program.json +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-012-the-voting-program.json @@ -1,6 +1,6 @@ { "topic": "User Profile", - "pageNumber": "7", + "pageNumber": 12, "type": "The Voting Program", "definition": { "text": "Help us decide how what areas of project development to incentivize, and help us validate Contribution Claims!", diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-013-financial-programs-intro.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-013-financial-programs-intro.json new file mode 100644 index 000000000..171322303 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-013-financial-programs-intro.json @@ -0,0 +1,20 @@ +{ + "topic": "User Profile", + "pageNumber": 13, + "type": "Financial Programs Intro", + "definition": { + "text": "This is what you may do with the Token Power you're not using for other purposes!", + "updated": 1630499936092 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Node->Financial Programs->Definition", + "updated": 1630499946613 + }, + { + "style": "Include", + "text": "Governance->Node->Financial Programs->Content" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-014-the-staking-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-014-the-staking-program.json new file mode 100644 index 000000000..94ad6aa95 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-014-the-staking-program.json @@ -0,0 +1,20 @@ +{ + "topic": "User Profile", + "pageNumber": 14, + "type": "The Staking Program", + "definition": { + "text": "Staking in Superalgos is as simple as it gets!", + "updated": 1630500044430 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Node->Staking Program->Definition", + "updated": 1630499989010 + }, + { + "style": "Include", + "text": "Governance->Node->Staking Program->Content" + } + ] +} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-015-the-delegation-program.json b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-015-the-delegation-program.json new file mode 100644 index 000000000..aba6a99b0 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/U/User/User-Profile/user-profile-015-the-delegation-program.json @@ -0,0 +1,46 @@ +{ + "topic": "User Profile", + "pageNumber": 15, + "type": "The Delegation Program", + "definition": { + "text": "Help your colleagues place their first few claims!", + "updated": 1630500145104 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Node->Delegation Program->Definition", + "updated": 1630500092742 + }, + { + "style": "Include", + "text": "Governance->Node->Delegation Program->Content" + }, + { + "style": "Subtitle", + "text": "Delegate Power Switch", + "updated": 1630500226629 + }, + { + "style": "Include", + "text": "Governance->Node->Delegate Power Switch->Definition" + }, + { + "style": "Include", + "text": "Governance->Node->Delegate Power Switch->Content" + }, + { + "style": "Subtitle", + "text": "User Delegate", + "updated": 1630500262556 + }, + { + "style": "Include", + "text": "Governance->Node->User Delegate->Definition" + }, + { + "style": "Include", + "text": "Governance->Node->User Delegate->Content" + } + ] +} \ No newline at end of file From 1f1ca73592bc22d1e436af6463bd661851fd9e58 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Wed, 1 Sep 2021 15:00:02 +0200 Subject: [PATCH 78/81] Deleted offending Docs Node Page causing trouble --- .../User/User-Vote-Transfer/user-vote-transfer.json | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 Projects/Governance/Schemas/Docs-Nodes/U/User/User-Vote-Transfer/user-vote-transfer.json diff --git a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Vote-Transfer/user-vote-transfer.json b/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Vote-Transfer/user-vote-transfer.json deleted file mode 100644 index 0084e1129..000000000 --- a/Projects/Governance/Schemas/Docs-Nodes/U/User/User-Vote-Transfer/user-vote-transfer.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "User Profile Vote", - "definition": { - "text": "This node allows users to transfer some of their voting power to other users, effectively creating a Delegation. Votes received by users are then flowed through the recipient user's token streams, increasing their size.", - "updated": 1622989097099 - }, - "paragraphs": [ - { - "style": "Text", - "text": "Right click and select the pencil button to enter edit mode." - } - ] -} \ No newline at end of file From e4f2d51c47ae8111323c4d5df3b4a6563c24d67a Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Wed, 1 Sep 2021 18:08:01 +0200 Subject: [PATCH 79/81] Flows topic WIP --- .../R/Reputation/Reputation/reputation.json | 7 +- .../Docs-Concepts/W/Weight/Weight/weight.json | 7 +- ...e-flow-001-the-superalgos-meritocracy.json | 9 ++ ...2-token-rewards-and-voting-power-flow.json | 78 ------------- ...2-token-rewards-and-weight-power-flow.json | 108 ++++++++++++++++++ 5 files changed, 127 insertions(+), 82 deletions(-) delete mode 100644 Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-voting-power-flow.json create mode 100644 Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-weight-power-flow.json diff --git a/Projects/Governance/Schemas/Docs-Concepts/R/Reputation/Reputation/reputation.json b/Projects/Governance/Schemas/Docs-Concepts/R/Reputation/Reputation/reputation.json index 6274a88b6..9d65f6255 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/R/Reputation/Reputation/reputation.json +++ b/Projects/Governance/Schemas/Docs-Concepts/R/Reputation/Reputation/reputation.json @@ -6,7 +6,12 @@ }, "paragraphs": [ { - "style": "Text", + "style": "Block", + "text": "Content", + "updated": 1630508809125 + }, + { + "style": "Important", "text": "Only the tokens you get for contributing to the project grant you reputation. Reputation is not transferable, so the tokens you acquire by any other means (buying, swapping, borrowing, trading, etc.) do not carry a reputation value." }, { diff --git a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight/weight.json b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight/weight.json index 03befed8e..25572d4e8 100644 --- a/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight/weight.json +++ b/Projects/Governance/Schemas/Docs-Concepts/W/Weight/Weight/weight.json @@ -1,8 +1,8 @@ { "type": "Weight", "definition": { - "text": "The Weight of a node is a direct proportion of the Weight Votes coming into the node divided by the total number of Weight Votes coming into the whole hierarchy, and multiplied by 100, to express it as a percentage.", - "updated": 1624781091970 + "text": "The Weight of a node is a direct proportion of the Weight Power coming into the node divided by the total amount of Weight Power coming into the whole hierarchy, and multiplied by 100, to express it as a percentage.", + "updated": 1630510882454 }, "paragraphs": [ { @@ -12,7 +12,8 @@ }, { "style": "Callout", - "text": "The Weight of a node is a direct proportion of the Weight Votes coming into the node divided by the total number of Weight Votes coming into the whole hierarchy, and multiplied by 100, to express it as a percentage." + "text": "The Weight of a node is a direct proportion of the Weight Power coming into the node divided by the total amount of Weight Power coming into the whole hierarchy, and multiplied by 100, to express it as a percentage.", + "updated": 1630510887120 } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-001-the-superalgos-meritocracy.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-001-the-superalgos-meritocracy.json index d42f5f30f..2cb4fc05d 100644 --- a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-001-the-superalgos-meritocracy.json +++ b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-001-the-superalgos-meritocracy.json @@ -16,6 +16,15 @@ "style": "Include", "text": "Governance->Concept->Token Power->Content", "updated": 1624780741084 + }, + { + "style": "Text", + "text": "There is a second concept that is crucial to how Superalgos values contributions: Reputation.", + "updated": 1630508777182 + }, + { + "style": "Include", + "text": "Governance->Concept->Reputation->Content" } ] } \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-voting-power-flow.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-voting-power-flow.json deleted file mode 100644 index 5e9d8bb00..000000000 --- a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-voting-power-flow.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "topic": "Governance Flow", - "pageNumber": "2", - "type": "Token Rewards and Voting Power Flow", - "definition": { - "text": "Let’s analyze the flow of Token Rewards through Pools in parallel with the flow of Token Power, and in particular Voting Power, as they are interdependent.", - "updated": 1624780824020 - }, - "paragraphs": [ - { - "style": "Include", - "text": "Governance->Concept->Token Rewards->Content", - "updated": 1624780974906 - }, - { - "style": "Text", - "text": "Each release distributes a number of tokens as specified in the configuration of the top-level Superalgos Pools hierarchy (within the Token Distribution Superalgos Plugin Workspace). For tokens to be distributed, they first need to flow into the Pool nodes defined in this hierarchy.", - "updated": 1624781023264 - }, - { - "style": "Text", - "text": "Token Rewards flow within the hierarchy in response to Weight Votes casted by the Community. That is, the Community decides the Weight of each Pool by casting Weight Votes." - }, - { - "style": "Text", - "text": "This is where Token Rewards intersect with Voting Power, as it is Voting Power that drives Token Rewards through Weight Votes.", - "updated": 1630343425368 - }, - { - "style": "Text", - "text": "Your Token Power flows into the different programs available under your User Profile. The portion of Token Power that flows into your Voting Program turns into Voting Power, which is channeled through different types of switches. You use Weight Votes Switch nodes to turn Voting Power into Weight Votes.", - "updated": 1630343456190 - }, - { - "style": "Text", - "text": "So, for example, when you reference a Pool node with a Pool Weight Vote node, you are conferring your Weight Votes to that particular Pool node." - }, - { - "style": "Text", - "text": "Now that this Pool node has some Weight, the Token Reward available for the hierarchy may flow into this Pool node. How much? It depends on the weight of the node relative to the weight of the rest of the nodes in the hierarchy!" - }, - { - "style": "Include", - "text": "Governance->Concept->Weight->Content", - "updated": 1624781155330 - }, - { - "style": "Json", - "text": "Weight (of a node) = Node's Incoming Weight Votes / \n Sum of Weight Votes in the Hierarchy * 100", - "updated": 1630343557835 - }, - { - "style": "Note", - "text": "If a Pool node ends up with no Weight Votes, then no Token Rewards flow into the node." - }, - { - "style": "Title", - "text": "Token Reward Flow Into Other Hierarchies" - }, - { - "style": "Text", - "text": "Pool nodes in the top-level Superalgos Pools hierarchy reference other hierarchies where project definitions continue. Those hierarchies may be other Pools, Positions, Features, or Asset hierarchies." - }, - { - "style": "Text", - "text": "When a Pool node in the top-level hierarchy gets Weight Votes, the Token Rewards flowing to the node is immediately passed on to the referenced hierarchy. So, now the referenced hierarchy has Token Rewards of its own!" - }, - { - "style": "Text", - "text": "How do Token Rewards flow within these secondary hierarchies? In the exact manner! When Weight Votes are casted within the hierarchy, Token Rewards flow into the affected nodes in Weight proportions calculated within the scope of the hierarchy.", - "updated": 1624781274277 - }, - { - "style": "Note", - "text": "The cycle goes on and on through all the existing levels of nested hierarchies. The process and flows are the same regardless of the type of hierarchy." - } - ] -} \ No newline at end of file diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-weight-power-flow.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-weight-power-flow.json new file mode 100644 index 000000000..3467b3e73 --- /dev/null +++ b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-weight-power-flow.json @@ -0,0 +1,108 @@ +{ + "topic": "Governance Flow", + "pageNumber": "2", + "type": "Token Rewards and Weight Power Flow", + "definition": { + "text": "Let’s analyze the flow of Token Rewards through Pools in parallel with the flow of Token Power, and in particular Weight Power, as they are interdependent.", + "updated": 1624780824020 + }, + "paragraphs": [ + { + "style": "Include", + "text": "Governance->Concept->Token Rewards->Content", + "updated": 1624780974906 + }, + { + "style": "Title", + "text": "The Master Distribution Pool", + "updated": 1630510334093 + }, + { + "style": "Text", + "text": "Each release distributes a number of tokens as specified in the configuration of the top-level Superalgos Pools hierarchy. The head of this hierarchy is the master distribution pool, where it all begins in terms of the flow of Token Rewards.", + "updated": 1630510402640 + }, + { + "style": "Note", + "text": "Visualize the flow of Token Rewards as a cascade starting at the head of the Superalgos Pools hierarchy that needs to trickle down to the different Pool nodes in the hierarchy, and then jump to the heads of other Project Definition Hierarchies.", + "updated": 1630511702008 + }, + { + "style": "Text", + "text": "Unlike the flow of Token Power within a User Profile, which is determined by configurations entered by the owner of the profile, the flow of Token Rewards is subject to the will of the Community. In other words, it is the community that must decide how rewards flow, and how many tokens must go to incentivize what. ", + "updated": 1630511815154 + }, + { + "style": "Subtitle", + "text": "This is Where Weight Votes Come in the Picture", + "updated": 1630512058431 + }, + { + "style": "Callout", + "text": "Weight Votes are the instrument the Community uses to expresses how Token Rewards should flow. Token Rewards flow within the hierarchy in response to Weight Votes cast by the Community. That is, the Community decides the Weight of each Pool by casting Weight Votes.", + "updated": 1630512042083 + }, + { + "style": "Text", + "text": "This is where Token Rewards intersect with Weight Power, as it is Weight Power that drives the flow of Token Rewards through Weight Votes.", + "updated": 1630510680354 + }, + { + "style": "Note", + "text": "Remember that your Token Power flows into the different programs available under your User Profile. The portion of Token Power that flows into your Voting Program turns into Voting Power, which is channeled through different types of switches. You use Weight Votes Switch nodes to turn Voting Power into Weight Power that then flows into Weight Votes.", + "updated": 1630512123642 + }, + { + "style": "Subtitle", + "text": "For Example", + "updated": 1630512233819 + }, + { + "style": "Text", + "text": "When you reference a Pool node with a Pool Weight Vote node, you are conferring the Weight Power in your Pool Weight Vote to that particular Pool node.", + "updated": 1630512248393 + }, + { + "style": "Text", + "text": "Now that this Pool node has some Weight, the Token Rewards available at the top of the hierarchy may flow into this Pool node. How much? It depends on the Weight Power the Pool gets relative to the Weight Power the rest of the Pools in the hierarchy get!", + "updated": 1630512360936 + }, + { + "style": "Include", + "text": "Governance->Concept->Weight->Content", + "updated": 1624781155330 + }, + { + "style": "Json", + "text": "Weight (of a node) = Node's Incoming Weight Power / \n Sum of Weight Power in the Hierarchy * 100", + "updated": 1630512395411 + }, + { + "style": "Note", + "text": "If a Pool node ends up with no Weight Power, then no Token Rewards flow into the node.", + "updated": 1630512412251 + }, + { + "style": "Title", + "text": "Token Rewards Flow Into Other Hierarchies", + "updated": 1630510284691 + }, + { + "style": "Text", + "text": "Pool nodes in the top-level Superalgos Pools hierarchy reference other hierarchies where project definitions continue. Those hierarchies may be other Pools, Positions, Features, or Asset hierarchies." + }, + { + "style": "Text", + "text": "When a Pool node in the top-level hierarchy gets Weight Votes, the Token Rewards flowing to the node is immediately passed on to the referenced hierarchy. So, now the referenced hierarchy has Token Rewards of its own!" + }, + { + "style": "Text", + "text": "How do Token Rewards flow within these secondary hierarchies? In the exact manner! When Weight Votes are casted within the hierarchy, Token Rewards flow into the affected nodes in Weight proportions calculated within the scope of the hierarchy.", + "updated": 1624781274277 + }, + { + "style": "Note", + "text": "The cycle goes on and on through all the existing levels of nested hierarchies. The process and flows are the same regardless of the type of hierarchy." + } + ] +} \ No newline at end of file From e9ec8688db76adfde75ee0baca9a97a19cbd3de0 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Wed, 1 Sep 2021 18:18:54 +0200 Subject: [PATCH 80/81] Token rewards flow --- ...-002-token-rewards-and-weight-power-flow.json | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-weight-power-flow.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-weight-power-flow.json index 3467b3e73..4e8410d45 100644 --- a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-weight-power-flow.json +++ b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-002-token-rewards-and-weight-power-flow.json @@ -92,17 +92,23 @@ "text": "Pool nodes in the top-level Superalgos Pools hierarchy reference other hierarchies where project definitions continue. Those hierarchies may be other Pools, Positions, Features, or Asset hierarchies." }, { - "style": "Text", - "text": "When a Pool node in the top-level hierarchy gets Weight Votes, the Token Rewards flowing to the node is immediately passed on to the referenced hierarchy. So, now the referenced hierarchy has Token Rewards of its own!" + "style": "Callout", + "text": "When a Pool node in the Superalgos Pools hierarchy gets some Weight Power, the Token Rewards flowing to the node are immediately passed on to the referenced hierarchy. So, now the referenced hierarchy has Token Rewards of its own at the head of the hierarchy!", + "updated": 1630513045548 }, { "style": "Text", - "text": "How do Token Rewards flow within these secondary hierarchies? In the exact manner! When Weight Votes are casted within the hierarchy, Token Rewards flow into the affected nodes in Weight proportions calculated within the scope of the hierarchy.", - "updated": 1624781274277 + "text": "How do Token Rewards flow within these secondary hierarchies? In the exact manner! When Weight Votes are cast within the hierarchy, Token Rewards flow into the affected nodes in proportion to the Weight calculated within the scope of the hierarchy.", + "updated": 1630512699763 + }, + { + "style": "Important", + "text": "The scope of the calculation of Weight proportions is limited to the hierarchy in question." }, { "style": "Note", - "text": "The cycle goes on and on through all the existing levels of nested hierarchies. The process and flows are the same regardless of the type of hierarchy." + "text": "The cycle goes on and on through all the existing levels of nested hierarchies. The processes and flows are the same regardless of the type of hierarchy.", + "updated": 1630512917168 } ] } \ No newline at end of file From 47c1744dbf72556417b42881e90cc864200e98e5 Mon Sep 17 00:00:00 2001 From: Julian Molina Date: Wed, 1 Sep 2021 19:58:43 +0200 Subject: [PATCH 81/81] Book revision complete --- ...ance-flow-003-how-claims-are-resolved.json | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json index fab257b1a..260eedc5e 100644 --- a/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json +++ b/Projects/Governance/Schemas/Docs-Topics/G/Governance/Governance-Flow/governance-flow-003-how-claims-are-resolved.json @@ -3,23 +3,28 @@ "pageNumber": "3", "type": "How Claims are Resolved", "definition": { - "text": "These three concepts, Claim Power, Claim Votes, and Token Rewards are intimately related and make up the logic of the token distribution.", - "updated": 1624781724176 + "text": "These three concepts, Claim Power, Claim Votes, and Token Rewards are intimately related and make up the logic of the token distribution among Contributors.", + "updated": 1630518244395 }, "paragraphs": [ + { + "style": "Title", + "text": "Dealing With Claim Power", + "updated": 1630518680345 + }, { "style": "Include", - "text": "Governance->Concept->Claim Power->Content", - "updated": 1624781714508 + "text": "Governance->Concept->Claim Power->Content" }, { "style": "Text", - "text": "You control the flow of your Claim Power so that the appropriate number reaches the node with which you wish to present a claim. That is, you present claims for a specific number of tokens, determined by the Claim Power that reaches the corresponding claim node.", - "updated": 1624781792664 + "text": "You control the flow of your Claim Power so that the appropriate value reaches the node with which you wish to present a claim. That is, you present claims for a specific number of tokens, determined by the Claim Power that reaches the corresponding claim node.", + "updated": 1630518610936 }, { "style": "Text", - "text": "You already know that the Token Rewards in a definition node (a Position, Feature, or Asset node) determines how many tokens are available to incentivize the production and/or maintenance of the concept represented by the node." + "text": "You already know that the Token Rewards in a definition node — a Position, Feature, or Asset node — determines how many tokens are available to incentivize the production and/or maintenance of the concept represented by the node.", + "updated": 1630518717152 }, { "style": "Callout", @@ -35,7 +40,8 @@ }, { "style": "List", - "text": "Your claim may be equal, smaller, or greater than the Token Rewards available in the node." + "text": "Your claim may have Claim Power equal, smaller, or greater than the Token Rewards available in the node.", + "updated": 1630518355289 }, { "style": "List", @@ -49,6 +55,10 @@ "style": "Text", "text": "And that is not all! On top of the above scenarios, we need to account for Claim Votes!" }, + { + "style": "Title", + "text": "Adding Claim Votes in the Mix" + }, { "style": "Include", "text": "Governance->Concept->Claim Votes->Content", @@ -56,16 +66,22 @@ }, { "style": "Text", - "text": "The flow of Voting Power into Claim Votes follows the same principles as the rest of the flows in the Voting Program. This means that Claim Votes have a specific Voting Power, pretty much like claims have a specific Claim Power.", - "updated": 1624781873207 + "text": "The flow of Claim Support Power into Claim Votes follows the same principles as the rest of the power flows in the Voting Program. This means that Claim Votes have a specific Claim Support Power, pretty much like claims have a specific Claim Power.", + "updated": 1630518813163 + }, + { + "style": "Note", + "text": "In other words, when you vote on someone’s claim, you don’t necessarily vote for the entirety of the claim. Your vote carries a specific Claim Support Power that may be equal, lesser, or greater than the Claim Power in the claim!", + "updated": 1630518516835 }, { "style": "Text", - "text": "In other words, when you vote on someone’s claim, you don’t necessarily vote for the entirety of the claim. Your vote carries a specific Voting Power that may be equal, lesser, or greater than the Claim Power in the claim!" + "text": "In addition, more Contributors may vote for the same claim!", + "updated": 1630518549067 }, { - "style": "Text", - "text": "In addition, more Contributors may vote for the same claim." + "style": "Title", + "text": "The Rules" }, { "style": "Text", @@ -77,19 +93,23 @@ }, { "style": "List", - "text": "The maximum Token Rewards allocated to a claim is determined by the Token Rewards available in the node, the Claim Power associated with the claim, or the sum of the Voting Power of all Claim Votes associated with the claim, whichever is smaller." + "text": "The maximum Token Rewards allocated to a claim is determined by the Token Rewards available in the node, the Claim Power associated with the claim, or the sum of the Claim Support Power of all Claim Votes associated with the claim, whichever is smaller.", + "updated": 1630518958930 }, { "style": "List", - "text": "When the sum of Voting Power of all Claim Votes associated with a claim is lesser than the Claim Power of the claim, the claim is not paid in full. The Token Rewards is capped by the total Voting Power of all Claim Votes. In other words, claims are paid up to the amount the Community decides with their Claim Votes." + "text": "When the sum of Claim Support Power of all Claim Votes associated with a claim is lesser than the Claim Power of the claim, the claim is not paid in full. The Token Rewards is capped by the total Claim Support Power of all Claim Votes. In other words, claims are paid up to the amount the Community decides with their Claim Votes.", + "updated": 1630519002556 }, { "style": "List", - "text": "When Token Rewards are enough to pay all claims, then each claim is paid in full, as expected. In more precise, albeit complex terms, when Token Rewards are greater than the sum of Voting Power for any given number of claims, or the sum of Claim Power for any given number of claims, whichever is lesser, each claim gets the Token Reward equal to its Claim Power or equal to the Voting Power of associated Claim Votes, whichever is lesser. " + "text": "When Token Rewards are enough to pay all claims, then each claim is paid in full, as expected. In more precise, albeit complex terms, when Token Rewards are greater than the sum of Claim Support Power for any given number of claims, or the sum of Claim Power for any given number of claims, whichever is lesser, each claim gets the Token Rewards equal to its Claim Power or equal to the Claim Support Power of associated Claim Votes, whichever is lesser.", + "updated": 1630519057866 }, { "style": "List", - "text": "When Token Rewards are NOT enough to pay all claims, an adjustment must be made to pay a fair proportion to each claim, without exceeding the Token Rewards available. In such a case, each claim is reduced in proportion to the amount in which claims exceed the Token Rewards. For example, if the sum of all claims exceeds the Token Reward by 10%, then each claim is reduced by 10%." + "text": "When Token Rewards are NOT enough to pay all claims, an adjustment must be made to pay a fair proportion to each claim, without exceeding the Token Rewards available. In such a case, each claim is reduced in proportion to the amount in which claims exceed the Token Rewards. For example, if the sum of all claims exceeds the Token Rewards by 10%, then each claim is reduced by 10%.", + "updated": 1630519090138 } ] } \ No newline at end of file