aboutsummaryrefslogtreecommitdiff
path: root/src/js/environment-setup.js
blob: b1eede8025c15dbf796390509c568903d73ea8c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/* Arching Kaos Setup
 *
 * Kaotisk Hund - 2024
 *
 * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
 *
 */
var mixtapeIds = new Array;
export function addMixtapeID(zblockIPFSHash)
{
    mixtapeIds.push('mixtape-player-'+zblockIPFSHash);
}

var mixtapes = new Array;
export function setMixtape(zblockIPFSHash, json)
{
    mixtapes[zblockIPFSHash] = json;
}
export function getMixtapes()
{
    return mixtapes;
}

var sortedMixtapes = new Array;
var zchainsFound = 0;
var foundHolders = new Array;
var gpglist = new Array;
var stellarNetworkConfiguredAddresses = 0;
var stellarParticipants = 0;

var participants = new Array;
export function getParticipants()
{
    return participants;
}

export function stellarParticipantInfo(participant, info)
{
    participants[participant] = info;
}

export function getStellarNetworkConfiguredAddresses()
{
    return stellarNetworkConfiguredAddresses;
}

export function increaseStellarNetworkConfiguredAddresses()
{
    stellarNetworkConfiguredAddresses += 1;
}

export function getFoundHolders()
{
    return foundHolders;
}

export function addToFoundHolders(holder)
{
    foundHolders.push(holder);
}

export function getStellarParticipants()
{
    return stellarParticipants;
}

export function setStellarParticipants(i)
{
    stellarParticipants = i;
}

export function increaseStellarParticipants()
{
    stellarParticipants++;
}

var stellarParticipantsScanned = 0;

export function getStellarParticipantsScanned()
{
    return stellarParticipantsScanned;
}
export function setStellarParticipantsScanned(i)
{
    stellarParticipantsScanned = i;
}

var zchainLoadingStatus = new Array;
export function setZchainLoadingStatus(zchain, status)
{
    zchainLoadingStatus[zchain] = status;
}
export function getZchainLoadingStatus(zchain)
{
    return zchainLoadingStatus[zchain];
}
export function getZchainLoadingStatuses()
{
    return zchainLoadingStatus;
}

var zchains = new Array;
var references = new Array;
export function getReferences()
{
    return references;
}

export function getReference(zblock)
{
    return references[zblock];
}

export function setReference(zblock, data)
{
    references[zblock] = data;
}

var fullZblocks = new Array;
export function getFullZblock(zblockIPFSHash)
{
    return fullZblocks[zblockIPFSHash];
}

export function getFullZblocks()
{
    return fullZblocks;
}

export function setFullZblock(zblockIPFSHash, data)
{
    fullZblocks[zblockIPFSHash] = data;
}

var zblocks = new Array;
export function getZblocks()
{
    return zblocks;
}

export function getZblock(group)
{
    return zblocks[group];
}

export function setZblock(group, zblockIPFSHash)
{
    if ( zblocks[group] === undefined )
    {
        zblocks[group] = new Array;
    }
    zblocks[group].push(zblockIPFSHash);
}

var blocks = new Array;
var data = new Array;

export function setData(hash, json)
{
    data[hash] = json;
}

var nodeInfo = new Array;




/*
 * We select our basic placeholders.
 *
 * Placeholders are mostly 'div' with specified id and we use them here
 * to append data on specific places in the page.
 *
 */

/*
 * Get addresses that trust the asset
 * Limit is 200 addresses cause horizon API limitations.
 *
 * Returns div DOM elements for each found address, embedding
 * the address both in innerHTML and in id of the div.
 */
var lastPage = '';

var stellar_connection_status = 0;

// @license-end