aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README55
-rw-r--r--api/config.js3
-rwxr-xr-xapi/index.js5
-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/getAKNSKey/index.js75
-rw-r--r--api/routes/getAKNSKeyFromBase/index.js91
-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/ak15
-rwxr-xr-xbin/ak-cjdns12
-rwxr-xr-xbin/ak-clean7
-rwxr-xr-xbin/ak-coin11
-rwxr-xr-xbin/ak-config11
-rwxr-xr-xbin/ak-fs11
-rwxr-xr-xbin/ak-get-balances22
-rwxr-xr-xbin/ak-gpg16
-rwxr-xr-xbin/ak-ipfs12
-rwxr-xr-xbin/ak-ipfs-starter5
-rwxr-xr-xbin/ak-irc12
-rwxr-xr-xbin/ak-log11
-rwxr-xr-xbin/ak-maintainance12
-rwxr-xr-xbin/ak-mempool5
-rwxr-xr-xbin/ak-mine12
-rwxr-xr-xbin/ak-network12
-rwxr-xr-xbin/ak-node-info11
-rwxr-xr-xbin/ak-ns73
-rwxr-xr-xbin/ak-pkg12
-rwxr-xr-xbin/ak-profile18
-rwxr-xr-xbin/ak-sblock12
-rwxr-xr-xbin/ak-schain12
-rwxr-xr-xbin/ak-settings12
-rwxr-xr-xbin/ak-sh11
-rwxr-xr-xbin/ak-startup12
-rwxr-xr-xbin/ak-template10
-rwxr-xr-xbin/ak-transactions13
-rwxr-xr-xbin/ak-wallet14
-rwxr-xr-xbin/ak-yggdrasil12
-rwxr-xr-xbin/ak-zblock12
-rwxr-xr-xbin/ak-zchain12
-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_checks3
-rwxr-xr-xlib/_ak_cjdns5
-rwxr-xr-xlib/_ak_config10
-rwxr-xr-xlib/_ak_datetime (renamed from lib/_ak_utils)3
-rwxr-xr-xlib/_ak_fm4
-rwxr-xr-xlib/_ak_fs13
-rwxr-xr-xlib/_ak_gpg43
-rwxr-xr-xlib/_ak_hash_exchange6
-rwxr-xr-xlib/_ak_html3
-rwxr-xr-xlib/_ak_ipfs20
-rwxr-xr-xlib/_ak_irc8
-rwxr-xr-xlib/_ak_lib_load32
-rwxr-xr-xlib/_ak_log29
-rwxr-xr-xlib/_ak_maintainance3
-rwxr-xr-xlib/_ak_network13
-rwxr-xr-xlib/_ak_network_cjdns3
-rwxr-xr-xlib/_ak_network_incoming101
-rwxr-xr-xlib/_ak_network_ipfs9
-rwxr-xr-xlib/_ak_network_stellar7
-rwxr-xr-xlib/_ak_network_utils5
-rwxr-xr-xlib/_ak_network_yggdrasil19
-rwxr-xr-xlib/_ak_node6
-rwxr-xr-xlib/_ak_ns364
-rwxr-xr-xlib/_ak_pkg12
-rwxr-xr-xlib/_ak_sblock4
-rwxr-xr-xlib/_ak_script27
-rwxr-xr-xlib/_ak_settings7
-rwxr-xr-xlib/_ak_sh4
-rwxr-xr-xlib/_ak_smfiles3
-rwxr-xr-xlib/_ak_yggdrasil6
-rwxr-xr-xlib/_ak_zblock15
-rwxr-xr-xlib/_ak_zchain11
119 files changed, 3460 insertions, 1110 deletions
diff --git a/README b/README
index 7323655..0129622 100644
--- a/README
+++ b/README
@@ -74,6 +74,7 @@ programs used are:
- curl (v7.79.1)
- git (v2.34.1)
- which (v2.21)
+- rlwrap (v0.46.2)
- jq (v1.6)
- nodejs (v16+)
- npm (v9.5.0)
@@ -104,6 +105,9 @@ git pull
Uninstall
---------
+> WARNING: It will REMOVE the whole $HOME/.arching-kaos directory but your GPG
+> keyring. Proceed with caution! Back up if you want to.
+
Navigate to your cloned repository and execute the following command:
```
@@ -111,8 +115,6 @@ Navigate to your cloned repository and execute the following command:
```
This will output an archive with your aknet-gpg-keyring to your $HOME folder.
-It will NOT remove your IPFS repository, neither is going to clean it.
-
Podman (or Docker)
------------------
There is a ContainerFile that you can use to build an image which you can then
@@ -170,6 +172,8 @@ Utilities
- ak-network # Network Tools (connect to, scan for, dump peers)
- ak-node-info # Returns IPFS CID or IPNS key for your online config
- ak-pkg # Package manager
+ - ak-fs # File system
+ - ak-ns # Name system
- ak-sblock # sblock tools
- ak-schain # schain tools
- ak-zblock # zblock tools
@@ -234,6 +238,7 @@ Libraries
- lib/_ak_settings
- lib/_ak_gpg
- lib/_ak_fs
+ - lib/_ak_ns
- lib/_ak_pkg
- lib/_ak_zblock
- lib/_ak_log
@@ -393,3 +398,49 @@ $ ak pkg --help
# --uninstall Uninstalls a module selected from a menu
#
```
+
+NS tools
+--------
+ - ak-ns
+
+```bash
+$ ak ns --help
+# ak-ns - Name system
+# ===================
+#
+# AKNS is a name system for Arching Kaos
+#
+# Usage:
+#
+# -h, --help Prints this help message
+# -c, --create <name> Creates a new key-pair with name
+# -l, --list List names
+# -ll, --list-long List names with keys
+# -rn, --resolve-name <name> Resolves value from name
+# -rk, --resolve-key <key> Resolves value from key
+# -p, --publish <key> <value> Publishes value to key
+# -pn, --publish2name <name> <value> Publishes value to name
+# -pz, --publish-zchain Publishes zchain
+# -pc, --publish-config Publishes config
+# -ek, --encode-key <key> Encodes a key to Base64
+# -dk, --decode-key <base64 key> Decodes a key from Base64
+#
+ns command finished
+```
+
+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/config.js b/api/config.js
index 3fe7c0d..82f90b8 100644
--- a/api/config.js
+++ b/api/config.js
@@ -25,6 +25,7 @@ const config = {
chunksDir: env.AK_CHUNKSDIR,
leafsDir: env.AK_LEAFSDIR,
mapsDir: env.AK_MAPSDIR,
- printDebug: env.AK_DEBUG
+ printDebug: env.AK_DEBUG,
+ akNSDir: `${env.AK_WORKDIR}/akns`
}
module.exports = config;
diff --git a/api/index.js b/api/index.js
index f5cf8c8..f22d448 100755
--- a/api/index.js
+++ b/api/index.js
@@ -1,6 +1,8 @@
const http = require("node:http");
const welcomeMessage = require("./routes/default/index.js");
+const getAKNSKey = require("./routes/getAKNSKey/index.js");
+const getAKNSKeyFromBase = require("./routes/getAKNSKeyFromBase/index.js");
const getNodeInfo = require('./routes/getNodeInfo/index.js');
const getPeers = require('./routes/getPeers/index.js');
const getIPFSHash = require('./routes/getIPFSHash/index.js');
@@ -59,6 +61,7 @@ function getRoutes(req, res)
case 'peers': getPeers(req, res); break;
case 'node_info': getNodeInfo(req, res); break;