diff options
119 files changed, 2957 insertions, 999 deletions
@@ -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/ |