aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README17
-rwxr-xr-xapi/index.js1
-rw-r--r--api/lib/akLogMessage/index.js4
-rw-r--r--api/lib/checkIfAllowedIP/index.js5
-rw-r--r--api/lib/storeIncomingIP/index.js4
-rw-r--r--api/routes/announceZBlock/index.js4
-rw-r--r--api/routes/announceZChain/index.js4
-rw-r--r--api/routes/default/index.js5
-rw-r--r--api/routes/getChunk/index.js5
-rw-r--r--api/routes/getIPFSHash/index.js23
-rw-r--r--api/routes/getInnerIPFSContent/index.js4
-rw-r--r--api/routes/getLeaf/index.js4
-rw-r--r--api/routes/getMap/index.js5
-rw-r--r--api/routes/getNodeInfo/index.js4
-rw-r--r--api/routes/getPeers/index.js4
-rw-r--r--api/routes/getRemoteNodeInfo/index.js8
-rw-r--r--api/routes/getRemotePeers/index.js7
-rw-r--r--api/routes/getSBlock/index.js8
-rw-r--r--api/routes/getZChain/index.js5
-rw-r--r--api/routes/showEntriesFile/index.js6
-rw-r--r--api/routes/showNSEntriesFile/index.js6
-rw-r--r--api/validators/ZblockValidator/index.js4
-rw-r--r--api/validators/ZchainValidator/index.js5
-rwxr-xr-xbin/ak7
-rwxr-xr-xbin/ak-cjdns7
-rwxr-xr-xbin/ak-clean3
-rwxr-xr-xbin/ak-coin7
-rwxr-xr-xbin/ak-config7
-rwxr-xr-xbin/ak-fs7
-rwxr-xr-xbin/ak-get-balances17
-rwxr-xr-xbin/ak-gpg7
-rwxr-xr-xbin/ak-ipfs7
-rwxr-xr-xbin/ak-ipfs-starter5
-rwxr-xr-xbin/ak-irc7
-rwxr-xr-xbin/ak-log6
-rwxr-xr-xbin/ak-maintainance7
-rwxr-xr-xbin/ak-mempool5
-rwxr-xr-xbin/ak-mine7
-rwxr-xr-xbin/ak-network7
-rwxr-xr-xbin/ak-node-info7
-rwxr-xr-xbin/ak-ns61
-rwxr-xr-xbin/ak-pkg9
-rwxr-xr-xbin/ak-profile13
-rwxr-xr-xbin/ak-sblock7
-rwxr-xr-xbin/ak-schain7
-rwxr-xr-xbin/ak-settings7
-rwxr-xr-xbin/ak-sh7
-rwxr-xr-xbin/ak-startup7
-rwxr-xr-xbin/ak-template5
-rwxr-xr-xbin/ak-transactions13
-rwxr-xr-xbin/ak-wallet9
-rwxr-xr-xbin/ak-yggdrasil7
-rwxr-xr-xbin/ak-zblock7
-rwxr-xr-xbin/ak-zchain9
-rw-r--r--c_implementation/Makefile.am72
-rwxr-xr-xc_implementation/build_tree/ak_fs_build.sh17
-rw-r--r--c_implementation/configure.ac3
-rw-r--r--c_implementation/include/libakdatetime.h14
-rw-r--r--c_implementation/include/libakfs.h347
-rw-r--r--c_implementation/include/libaklog.h23
-rw-r--r--c_implementation/include/libaksettings.h7
-rw-r--r--c_implementation/src/ak_datetime.c70
-rw-r--r--c_implementation/src/ak_fs.c383
-rw-r--r--c_implementation/src/ak_fs_defuse.c98
-rw-r--r--c_implementation/src/ak_fs_main.c51
-rw-r--r--c_implementation/src/ak_fs_map_v3.c213
-rw-r--r--c_implementation/src/ak_fs_map_v4.c8
-rw-r--r--c_implementation/src/ak_fs_maps_v3.c98
-rw-r--r--c_implementation/src/ak_fs_mt.c52
-rw-r--r--c_implementation/src/ak_fs_sha512sum.c221
-rw-r--r--c_implementation/src/ak_log.c246
-rw-r--r--c_implementation/src/ak_log_main.c32
-rw-r--r--c_implementation/src/ak_logcatter.c (renamed from c_implementation/src/aklogcatter.c)1
-rw-r--r--c_implementation/src/ak_settings.c (renamed from c_implementation/src/aksettings.c)42
-rw-r--r--c_implementation/src/ak_utils.c (renamed from c_implementation/src/akutils.c)0
-rw-r--r--c_implementation/src/akfs.c349
-rw-r--r--c_implementation/src/aklog.c287
-rw-r--r--c_implementation/tests/test_akfs.c210
-rw-r--r--c_implementation/tests/test_akfs_mkdir.c20
-rw-r--r--c_implementation/tests/test_aklog.c36
-rw-r--r--c_implementation/tests/test_aklogwrite.c2
-rw-r--r--c_implementation/tests/test_aksettings.c75
-rw-r--r--c_implementation/tests/test_aksettings_read.c2
-rw-r--r--c_implementation/tests/test_sha512_string.c8
-rwxr-xr-xlib/_ak_checks4
-rwxr-xr-xlib/_ak_cjdns7
-rwxr-xr-xlib/_ak_coin2
-rwxr-xr-xlib/_ak_config4
-rwxr-xr-xlib/_ak_datetime (renamed from lib/_ak_utils)1
-rwxr-xr-xlib/_ak_fm6
-rwxr-xr-xlib/_ak_fs7
-rwxr-xr-xlib/_ak_gpg20
-rwxr-xr-xlib/_ak_hash_exchange8
-rwxr-xr-xlib/_ak_html5
-rwxr-xr-xlib/_ak_ipfs6
-rwxr-xr-xlib/_ak_irc10
-rwxr-xr-xlib/_ak_lib_load32
-rwxr-xr-xlib/_ak_log9
-rwxr-xr-xlib/_ak_maintainance5
-rwxr-xr-xlib/_ak_network15
-rwxr-xr-xlib/_ak_network_cjdns5
-rwxr-xr-xlib/_ak_network_incoming11
-rwxr-xr-xlib/_ak_network_ipfs11
-rwxr-xr-xlib/_ak_network_stellar9
-rwxr-xr-xlib/_ak_network_utils6
-rwxr-xr-xlib/_ak_network_yggdrasil7
-rwxr-xr-xlib/_ak_node6
-rwxr-xr-xlib/_ak_ns202
-rwxr-xr-xlib/_ak_pkg66
-rwxr-xr-xlib/_ak_sblock6
-rwxr-xr-xlib/_ak_schain2
-rwxr-xr-xlib/_ak_script5
-rwxr-xr-xlib/_ak_settings9
-rwxr-xr-xlib/_ak_sh6
-rwxr-xr-xlib/_ak_smfiles5
-rwxr-xr-xlib/_ak_wallet2
-rwxr-xr-xlib/_ak_yggdrasil8
-rwxr-xr-xlib/_ak_zblock17
-rwxr-xr-xlib/_ak_zchain15
119 files changed, 2957 insertions, 999 deletions
diff --git a/README b/README
index 7323655..522dd74 100644
--- a/README
+++ b/README
@@ -393,3 +393,20 @@ $ ak pkg --help
# --uninstall Uninstalls a module selected from a menu
#
```
+
+Donations
+---------
+While this project is developed with enthusiasm and it uses the spare time of
+the only developer that is coding for it, donations would help allocating more
+time on the project instead of the developer looking for different occupations
+to support their life and project.
+
+If you do appreciate the project's goals and the developers efforts towards it,
+take your time and consider donating some satoshis to the developer via BTC at
+the following address
+
+```
+bc1q70rgp65t7acfgpwp74m7vdz0g4eduxm6a43gd8
+```
+
+Thank you!
diff --git a/api/index.js b/api/index.js
index f5cf8c8..f2ca713 100755
--- a/api/index.js
+++ b/api/index.js
@@ -59,6 +59,7 @@ function getRoutes(req, res)
case 'peers': getPeers(req, res); break;
case 'node_info': getNodeInfo(req, res); break;
case 'ipfs_hash': getIPFSHash(req, res); break;
+ case 'ipfs': getIPFSHash(req, res); break;
case 'zlatest': getZlatest(req, res); break;
case 'sblock': getSblock(req, res); break;
case 'slatest': getSlatest(req, res); break;
diff --git a/api/lib/akLogMessage/index.js b/api/lib/akLogMessage/index.js
index 6dfb8f2..59a1300 100644
--- a/api/lib/akLogMessage/index.js
+++ b/api/lib/akLogMessage/index.js
@@ -1,7 +1,8 @@
const { spawn } = require('child_process');
const config = require('../../config')
-module.exports = (type, message) => {
+function akLogMessage(type, message)
+{
const command = spawn(
"ak-log",
["-m", "ak-daemon", type, message]
@@ -26,3 +27,4 @@ module.exports = (type, message) => {
console.log(`child process exited with code ${code}`);
});
};
+module.exports = akLogMessage;
diff --git a/api/lib/checkIfAllowedIP/index.js b/api/lib/checkIfAllowedIP/index.js
index d9693d9..2e50418 100644
--- a/api/lib/checkIfAllowedIP/index.js
+++ b/api/lib/checkIfAllowedIP/index.js
@@ -1,8 +1,9 @@
-
-module.exports = (address) => {
+function checkIfAllowedIP(address)
+{
var test_cjdns = /^fc[0-9a-z]{1,2}:([0-9a-z]{1,4}:){1,6}[0-9a-z]{1,4}/
var test_yggdrasil = /^2[0-9a-z]{1,2}:([0-9a-z]{1,4}:){1,6}[0-9a-z]{1,4}/
var test_yggdrasil_sub = /^3[0-9a-z]{1,2}:([0-9a-z]{1,4}:){1,6}[0-9a-z]{1,4}/
return (test_cjdns.test(address) || test_yggdrasil.test(address) || test_yggdrasil_sub.test(address)) ? true : false;
};
+module.exports = checkIfAllowedIP;
diff --git a/api/lib/storeIncomingIP/index.js b/api/lib/storeIncomingIP/index.js
index c45def6..72273d0 100644
--- a/api/lib/storeIncomingIP/index.js
+++ b/api/lib/storeIncomingIP/index.js
@@ -1,6 +1,8 @@
const fs = require("node:fs");
const config = require("../../config");
-module.exports = (ip_address) => {
+function storeIncomingIP(ip_address)
+{
fs.appendFileSync(`${config.peersDir}/incomingRequests`, `${ip_address}\n`);
}
+module.exports = storeIncomingIP;
diff --git a/api/routes/announceZBlock/index.js b/api/routes/announceZBlock/index.js
index 254e1dc..dc1467a 100644
--- a/api/routes/announceZBlock/index.js
+++ b/api/routes/announceZBlock/index.js
@@ -13,7 +13,8 @@
*
*/
const getvalidity = require('../../validators/ZblockValidator')
-module.exports = (req, res) => {
+function announceZBlock(req, res)
+{
console.log(req);
if ( (req.body.zblock) && typeof req.body.zblock === "string" && req.body.zblock.length === 46 ){
let zblock = req.body.zblock;
@@ -27,3 +28,4 @@ module.exports = (req, res) => {
res.send({error:"Invalid data"});
}
}
+module.exports = announceZBlock;
diff --git a/api/routes/announceZChain/index.js b/api/routes/announceZChain/index.js
index 0261aa4..ca23a72 100644
--- a/api/routes/announceZChain/index.js
+++ b/