Drafting the Superalgos Network
This commit is contained in:
1 parent
f6cbbd00e9
commit
cc47c888c7
10 files changed
+400
-352
No files matched your search
@@ -0,0 +1,22 @@
|
||||
exports.newClientInterface = function newClientInterface() {
|
||||
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize,
|
||||
run: run
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function run() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
exports.newEvent = function newEvent() {
|
||||
|
||||
let thisObject = {
|
||||
id: undefined,
|
||||
githubUsername: undefined,
|
||||
blockchainAccount: undefined,
|
||||
following: undefined,
|
||||
followers: undefined,
|
||||
followingCount: undefined,
|
||||
followersCount: undefined,
|
||||
tradeCopying: undefined,
|
||||
tradeCopiers: undefined,
|
||||
tradeCopyingCount: undefined,
|
||||
tradeCopiersCount: undefined,
|
||||
ranking: undefined,
|
||||
joined: undefined,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
thisObject.following = new Map()
|
||||
thisObject.followers = new Map()
|
||||
|
||||
thisObject.tradeCopying = new Map()
|
||||
thisObject.tradeCopiersCount = new Map()
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
[
|
||||
{
|
||||
"type": "post",
|
||||
"timestamp": 12343242342,
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
|
||||
},
|
||||
{
|
||||
"type": "reply",
|
||||
"timestamp": 12343242342,
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"hash": "dhaHSkjasdmwhdajSHSJhewshed",
|
||||
"relatedEvent": "daawerewdhkasdSdGHGjdsasd"
|
||||
},
|
||||
{
|
||||
"type": "trade",
|
||||
"timestamp": 12343242342,
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
|
||||
},
|
||||
{
|
||||
"type": "reaction",
|
||||
"timestamp": 12343242342,
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"userProfiles": [
|
||||
{
|
||||
"username": "Luis-Fernando-Molina",
|
||||
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
|
||||
"posts": [
|
||||
{
|
||||
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
|
||||
"replyTo": "a8de78f0-c3e4-4a2a-b7e8-f659073969db"
|
||||
}
|
||||
],
|
||||
"replies": [
|
||||
{
|
||||
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
|
||||
"replyTo": "a8de78f0-c3e4-4a2a-b7e8-f659073969db"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
let usersProfiles = new Map() // Here we will store the user profiles and their statistics.
|
||||
let timeline = [] // A time ordered list of Posts and Trades.
|
||||
let events = new Map()
|
||||
let hashGraph = {}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
exports.newPeerInterface = function newPeerInterface() {
|
||||
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize,
|
||||
run: run
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
|
||||
function run() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
|
||||
"followers": 0,
|
||||
"following": 0,
|
||||
"ranking": 0,
|
||||
"joined": 123423423423,
|
||||
"account": "asd23123aff23q2bcaa21447567"
|
||||
},
|
||||
{
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"id": "a8de78f0-c3e4-4a2a-b7e8-f659073969db",
|
||||
"followers": 0,
|
||||
"following": 0,
|
||||
"ranking": 0,
|
||||
"joined": 123423423423,
|
||||
"account": "asd23123aff23q2bcaa21447567"
|
||||
}
|
||||
]
|
||||
|
||||
// a map by userProfile would be needed.
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"type": "post",
|
||||
"timestamp": 12343242342,
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
|
||||
},
|
||||
{
|
||||
"type": "post",
|
||||
"timestamp": 12343242342,
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"hash": "dhaHSkjasdmwhdajSHSJhewshed",
|
||||
"relatedEvent": "daawerewdhkasdSdGHGjdsasd"
|
||||
},
|
||||
{
|
||||
"type": "trade",
|
||||
"timestamp": 12343242342,
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
|
||||
},
|
||||
{
|
||||
"type": "post",
|
||||
"timestamp": 12343242342,
|
||||
"userProfile": "Luis-Fernando-Molina",
|
||||
"hash": "dhaHSkjasdmwhdajSHSJhewshed"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,36 @@
|
||||
exports.newUserProfile = function newUserProfile() {
|
||||
|
||||
let thisObject = {
|
||||
id: undefined,
|
||||
githubUsername: undefined,
|
||||
blockchainAccount: undefined,
|
||||
following: undefined,
|
||||
followers: undefined,
|
||||
followingCount: undefined,
|
||||
followersCount: undefined,
|
||||
tradeCopying: undefined,
|
||||
tradeCopiers: undefined,
|
||||
tradeCopyingCount: undefined,
|
||||
tradeCopiersCount: undefined,
|
||||
ranking: undefined,
|
||||
joined: undefined,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
thisObject.following = new Map()
|
||||
thisObject.followers = new Map()
|
||||
|
||||
thisObject.tradeCopying = new Map()
|
||||
thisObject.tradeCopiersCount = new Map()
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user