aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README58
-rw-r--r--SUPPORT16
-rw-r--r--api/config.js3
-rwxr-xr-xapi/index.js7
-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/ak61
-rwxr-xr-xbin/ak-cjdns12
-rwxr-xr-xbin/ak-clean7
-rwxr-xr-xbin/ak-coin11
-rwxr-xr-xbin/ak-config11
-rwxr-xr-xbin/ak-fs13
-rwxr-xr-xbin/ak-get-balances22
-rwxr-xr-xbin/ak-gpg19
-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-pkg14
-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-zchain14
-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_config11
-rwxr-xr-xlib/_ak_datetime (renamed from lib/_ak_utils)1
-rwxr-xr-xlib/_ak_fm6
-rwxr-xr-xlib/_ak_fs57
-rwxr-xr-xlib/_ak_gpg45
-rwxr-xr-xlib/_ak_hash_exchange8
-rwxr-xr-xlib/_ak_html5
-rwxr-xr-xlib/_ak_ipfs22
-rwxr-xr-xlib/_ak_irc10
-rwxr-xr-xlib/_ak_lib_load32
-rwxr-xr-xlib/_ak_log44
-rwxr-xr-xlib/_ak_maintainance5
-rwxr-xr-xlib/_ak_network15
-rwxr-xr-xlib/_ak_network_cjdns5
-rwxr-xr-xlib/_ak_network_incoming103
-rwxr-xr-xlib/_ak_network_ipfs11
-rwxr-xr-xlib/_ak_network_stellar9
-rwxr-xr-xlib/_ak_network_utils6
-rwxr-xr-xlib/_ak_network_yggdrasil21
-rwxr-xr-xlib/_ak_node8
-rwxr-xr-xlib/_ak_ns372
-rwxr-xr-xlib/_ak_pkg66
-rwxr-xr-xlib/_ak_sblock6
-rwxr-xr-xlib/_ak_schain2
-rwxr-xr-xlib/_ak_script27
-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
123 files changed, 3697 insertions, 1123 deletions
diff --git a/README b/README
index 7323655..3c67b98 100644
--- a/README
+++ b/README
@@ -6,6 +6,9 @@ Arching Kaos Tools
> Hint: Find the "Script usage" section for sum up of the scripts
+> Disclaimer: Any use of "AI" tools upon this repository, is STRICTLY forbidden.
+> This affects all commits and branches.
+
Introduction
------------
Tools that help to create a blockchain called `zchain` by preparing small JSON
@@ -74,6 +77,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 +108,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 +118,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 +175,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 +241,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 +401,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/SUPPORT b/SUPPORT
new file mode 100644
index 0000000..f653a67
--- /dev/null
+++ b/SUPPORT
@@ -0,0 +1,16 @@
+SUPPORT
+-------
+
+1. Chat support
+---------------
+Support and guidance can be provided via the #arching-kaos channel in IRC. You
+can join via the Libera.chat IRC network.
+
+2. Bug reporting
+----------------
+You can use the github page to report issues.
+
+3. Pull requests
+----------------
+Anyone is free to send a pull request via github. The PR will be reviewed,
+discussed and eventually merged into the project if seems useful.
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..6fd2066 100755
--- a/api/index.js
+++ b/api/index.js
@@ -1,6 +1,9 @@
const http = require("node:http");
+// Route functions
const welcomeMessage = require("./routes/default/index.js");
+const getAKNSKey = require("./routes/getAKNSKey/index.js");
+const getAKNSKeyFromBase = require("./routes/get