Skip to content

Latest commit

 

History

History
551 lines (384 loc) · 21.1 KB

README.old.md

File metadata and controls

551 lines (384 loc) · 21.1 KB

Introduction

Astroport DEV Journal

Embark on a Cosmic Journey with AstroID & ZenCard System and Astroport.ONE

Are you weary of the constraints of traditional payment systems and concerned about the reliability of your distributed storage solutions? Look no further! Our revolutionary ZenCard QRCode based Payment System and Astroport.ONE v1.0 seamlessly blend cutting-edge blockchain technology with interplanetary storage, offering you a commission-free and secure solution.

Astroport.ONE v1.0: Decentralized Storage Beyond Borders

Astroport.ONE isn't just a distributed storage software; it's a reimagining of data management. Utilizing IPFS and introducing a master boot record (MBR) and allocation table to Tiddlywiki data, Astroport.ONE organizes information with unprecedented precision. In the UPlanet format system, the planet is sliced into 0.01° segments, ensuring locally registered Tiddlers with unique signatures.

As a network engineer and system administrator committed to the Common Good, join us in constructing Astroport.ONE and shaping the future of secure and reliable distributed storage.

Station Extra-Terrestre Astroport.ONE: Where Innovation Meets Tranquility

In the midst of this technological revolution, discover the Station Extra-Terrestre Astroport.ONE. A haven for volunteers striving to live in peace and harmony within a spaceship turned garden, it unveils a new "Jeu de Société" developed by and for the Astronauts of MadeInZion.

Embark on an exploration of "Voeux," wishes funded collaboratively through donations in the Libre currency G1. These wishes encapsulate ideas, plans, explanations, and even mistakes, marking the journey toward their realization.

In this digital game manifesting in real life, your digital identity is in your hands, and a new Internet unfolds, built according to our "Toiles de confiance" (Webs of Trust)!

Join us in this cosmic journey where peace, harmony, and the spirit of exploration reign supreme. Send your love to the Extraordinary Earthlings at https://qo-op.com.

Welcome to a universe where wishes become reality, and the possibilities are boundless.

BASH ENGINE FOR A CRYPTO PLAYGROUND

With this technology, we each become host and access provider and media sovereign.

Astroport ONE propels a digital world of interconnected trust webs.

Astroport.ONE

Each "Astroport.ONE" station is a digital embassy that communicates and synchronizes with its peers. Users can "move their account". The last one used during the day becomes the "official station".

The architecture attached to each public key is deployed in the form of "flower petals" according to the circles of trust Ŋ1 and Ŋ2 and the data flows produced by the derived keys.

N.ONE.2

ASTROBOT "Intelligent contract in BASH" Programs are triggered by "G1Tag" (derived keys) ensures extraction of "G1WordClefs" from "surrounding" Tiddlers.

To trigger the execution of a "personal intelligent contract", simply create a "wish" (Tag=voeu) At this point, if it exists "ASTROBOT/G1Tag.sh" program will publish the data relating to the Tag concerned on a new "personal IPNS derived key", if not a default "json from all with same wish" is created (see RUNTIME/VOEUX.refresh.sh)

INSTALLATION (Linux Mint / Ubuntu / DEBIAN)

Tested on "Linux Mint" (Debian like distro compatible), the hacker way for using & buidling new blockchain services ...

INSTALL COMMAND

bash <(wget -qO- https://raw.githubusercontent.com/papiche/Astroport.ONE/master/install.sh)

TODO: MORE MODULAR INSTALL. CREATE adventure explaining it

DRAGONS WOT

Once you install Astroport.ONE...

If all has gone well, you should find these processes running...

/usr/local/bin/ipfs daemon --enable-pubsub-experiment --enable-namesys-pubsub
/bin/bash /home/fred/.zen/G1BILLET/G1BILLETS.sh daemon
 \_ /bin/bash /home/fred/.zen/G1BILLET/G1BILLETS.sh daemon
   \_ nc -l -p 33101 -q 1
/bin/bash /home/fred/.zen/Astroport.ONE/12345.sh
 \_ /bin/bash /home/fred/.zen/Astroport.ONE/12345.sh
   \_ nc -l -p 1234 -q 1
/bin/bash /home/fred/.zen/Astroport.ONE/_12345.sh
 \_ nc -l -p 12345 -q 1

Become Official REGIONAL Station

DESKTOP

After installation, you should have 3 new shortcuts on your desktop

  • Astroport", which opens your station portal: http://astroport.localhost:1234
  • REC" allows you to save your files on IPFS and publish their Capusle in your TW.
  • G1BILLET" lets you create ZenCards and other useful QRCodes

NB : If you use "Nemo" as file manager. You can "ipfs add" any file (with no space in file name) by right click it.

TODO : detect OS and FILE MANAGER to adapt desktop linking and right clic action

How to manage your "Astroport"!

You need to create a "PLAYER". It is defined by email, salt, pepper, lat, lon and PASS

~/.zen/Astroport.ONE/command.sh

Browse available functions

A Station can host multiple "PLAYERs and TiddlyWikis".


"BASH API" : "♥BOX"

Once your Astroport Station is started:

  • port 1234 publishes API (REPONSE PORT TCP 45780 45781 ( up to ... 45790 )
  • port 12345 publishes MAP(*) (ESSAIM MAP - BOOSTRAP / STATIONS)
  • port 33101 publishes G1BILLETS (REPLY TCP PORT 33102)
  • port 8080, 4001 and 5001 are IPFS gateway ports.

List of ports to activate.

To add your Station to our swarm, enter the IP of your BOX in the file ``~/.zen/♥Box ````.

exemple

frd@scorpio:~ $ cat ~/.zen/♥Box
86.210.184.173

⚠ API ASTROPORT = NETCAT SYSTEM ⚠

Astroport doesn't need a web server to work. We use the simplest network tool, netcat. Operation gives access to an "API BASH" (classified by the same name as the first GET parameter received in the API directory).

Requests are made in HTTP GET on port 1234, with the response PORT in the loaded page. Perform a regexp on "url=ADRESSE:PORT" or (♥‿‿♥) to find out which.

Here are some examples of how to do it.

ANSWER PORT RECOVERY API : (♥‿‿♥)

CLI (BASH)

    # OPEN ASTROPORT HOME PAGE
    curl -so ~/.zen/tmp/${MOATS}/astro.port "http://astroport.localhost:1234/?salt=0&pepper=0&g1pub=_URL_&email=${EMAIL}"

    # GREP NEXT PORT IN PAGE CODE
    TELETUBE=$(cat ~/.zen/tmp/${MOATS}/astro.port | grep "(♥‿‿♥)" | cut -d ':' -f 2 | cut -d '/' -f 3)
    TELEPORT=$(cat ~/.zen/tmp/${MOATS}/astro.port | grep "(♥‿‿♥)" | cut -d ':' -f 3 | cut -d '"' -f 1)

                sleep 30

    # ACCESS TO FINAL RESULT
    curl -so ~/.zen/tmp/${MOATS}/astro.rep "http://$TELETUBE:$TELEPORT"

JS

Exemple :

var myURL = 'http://astroport.localhost:1234/?' + query;
async function fetchAstroport(myURL) {
      try {

         let one = await fetch(myURL); // Gets a promise
         var doc =  await one.text();
         var regex = /url='([^']+)/i; // Get response PORT
         var redirectURL = doc.match(regex)[1]

         console.log(redirectURL)

        setTimeout(function() {
                // let two = await fetch(redirectURL);
                // document.mydiv.innerHTML = await two.text(); // Replaces body with response
                window.open( redirectURL, "AstroTab");
        }, 5000);

      } catch (err) {
        console.log('Fetch error:' + err); // Error handling
      }
    }

USE "astro.js"

    <script src="https://ipfs.asycn.io/ipfs/Qmae5v9zydax9u6C9ceDijURu5PYdd5avmv4NkenCw7RFv/astro.js"></script>

➤ SALT API

/?salt=${SALT}&pepper=${PEPPER}&${APPNAME}=${WHAT}&${OBJ}=${VAL}...

Créer (ou téléporter) un PLAYER TW : OFFICIAL <3BOX :

GET /?salt=${SALT}&pepper=${PEPPER}&g1pub=${URLENCODEDURL}&email=${PLAYER}
Parameter Type Description
salt string Required. Your passphrase one token
pepper string Required. Your passphrase two token
g1pub string Required. Your prefered URL to copy video from
email email Required. Your email token

LOGOUT PLAYER (remove IPNS keys from Station)

GET /?salt=${SALT}&pepper=${PEPPER}&logout=${PLAYER}
Parameter Type Description
salt string Required. Your passphrase one token
pepper string Required. Your passphrase two token
logout string Required. Your email token

LOGIN PLAYER (Activate IPNS keys on Station)

GET /?salt=${SALT}&pepper=${PEPPER}&login=${PLAYER}
Parameter Type Description
salt string Required. Your passphrase one token
pepper string Required. Your passphrase two token
login string Required. Your email token

Définir le niveau ★ accordé à un "g1friend"

GET /?salt=${SALT}&pepper=${PEPPER}&friend=${G1PUB}&stars=${1:5}
Parameter Type Description
salt string Required. Your passphrase one token
pepper string Required. Your passphrase two token
friend string Required. G1PUB token of friend
stars number Required. Number between 1 to 5

Lire Messagerie de la base "GChange"

GET /?salt=${SALT}&pepper=${PEPPER}&messaging=on
Parameter Type Description
salt string Required. Your passphrase one token
pepper string Required. Your passphrase two token
messaging string Required. (on=json) output type

Conversion vers adresse IPNS

GET /?salt=${SALT}&pepper=${PEPPER}&getipns=on
Parameter Type Description
salt string Required. Your passphrase one token
pepper string Required. Your passphrase two token
getipns string Required on

AppName=testcraft : Enregistrer JSON

GET /?salt=${SALT}&pepper=${PEPPER}&testcraft=json&nodeid=_&dataid=$QRHASH
Parameter Type Description
salt string Required. Your passphrase one token
pepper string Required. Your passphrase two token
testcraft string Required AppNAME subcommand
${OBJ} ${VAL} depends on App

This IPFS object transfer needs that the client is using well configured WebRTC/IPFS relays Look for example in www/upload_to_astroport.html

    '/dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star',
    '/dns4/wrtc-star2.sjc.dwebops.pub/tcp/443/wss/p2p-webrtc-star'

Redirections

  • vers Gchange

/?salt=${SALT}&pepper=${PEPPER}&g1pub=on

  • vers TW

/?salt=${SALT}&pepper=${PEPPER}&g1pub=astro

Déclencher un Payement de Ğ1 à une G1PUB

GET /?salt=${SALT}&pepper=${PEPPER}&pay=1&g1pub=DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech
Parameter Type Description
salt string Required. Your passphrase one token
pepper string Required. Your passphrase two token
pay integer Required G1 AMOUNT
g1pub G1PUB Required destination "wallet key"

➤ PLAYER (works only on LAN Station)

/?player=${PLAYER}&${APPNAME}=${WHAT}&${OBJ}=${VAL}...

Exporter Tiddlers.json depuis son TW selon valeur des "tags" ( ici TAG=G1CopierYoutube)

GET /?player=${PLAYER}&moa=json&tag=G1CopierYoutube
Parameter Type Description
player string Required. Your EMAIL token
moa string Required APP = output format
tag ${VAL} TW filtering default G1CopierYoutube

CAN BE EXTENDED

➤ AMZQR : Create a QRCode with "amzqr"

GET /?amzqr=${URLENCODEDSTRING}&logo=${IMAGE}
Parameter Type Description
amzqr string Required the qrcode string
logo string Required ./images/${IMAGE}.png

check available "logo.png" in ./images

➤ UPLANET : Create Umap, AstroID & ZenCard for PLAYER (email)

GET /?uplanet=${PLAYER}&zlat=${LAT}&zlon=${LON}&g1pub=${PASS}
Parameter Type Description
uplanet email Required Your EMAIL token
zlat decimal Required LATITUDE with 2 decimals digits
zlon decimal Required LONGITUDE with 2 decimals digits
g1pub string Facultative choose Umap AstroID PASS

Create à Umap key (LAT/LON), then a PLAYER TW with GPS as Umap IPNS reference This API is used by OSM2IPFS code.

➤ QRCODE (API SandBox)

GET /?qrcode=${G1PUB} | ${ASTRONAUTENS} | ${PGP_ASTROID_STRING}
Parameter Type Description
qrcode string Required. Your G1PUB or ASTRONAUTENS or PGP_ASTROID token

Look for details & extend as you like in ~/.zen/Astroport.ONE/API/QRCODE.sh

The Art of key derivation, chaining & use

In order to make (a little) clear how we use cryptography,

We choose to use "NaCl" (secret1 / secret) 2 key generation, so it is easy to understand Web3 mechanism.

(SECRET1/SECRET2) mixing

  • If PLAYER key is (SECRET1 / SECRET2) and G1PUB and EMAIL + TW
    • feed key (SECRET1 / SECRET2 G1PUB)
    • wishes keys are (SECRET2 / WishName EMAIL)
      • sub-wishes are (EMAIL / G1WishName G1PUB)
        • wish-billets are (EMAIL_dice_words / G1WishName G1PUB)

This way PLAYER TW capable of retrieving and never loose its data. It is writen into IPFS... So recreate the key anywhere makes you get your data from friends you shared it with.

Cross (G1PUB) keys

Between PlayerA (AG1PUB) & PlayerB (BG1PUB) obvious communication channel keys are existing :

(AG1PUB / AG1PUB) - A knock on the door (AG1PUB / BG1PUB) - From A to B channel (BG1PUB / AG1PUB) - From B to A channel (BG1PUB / BG1PUB) - B knock on the door

We can use this to implement protocols, for exemple : To ollow PlayerA / PlayerB to become friends

A write a KNOCK.AG1PUB file + signature using (BG1PUB / BG1PUB) keygen IPNS key, Then B reply with the same KNOCK at (AG1PUB / AG1PUB) address

A/B - B/A keys can be used as bidirectionnal encrypted data channels.

In a well formed IPFS swarm, we could even send video... Check code in /tools/streaming/

(LON / LAT) keys

NaCl keys can be initiated with GPS Geoloc and receive shared informations. Using the same A/B swapping method, any A place have also a communication channel with B place ;)

(COUNTRY / ZIP) keys

For a town key, we could use country code + ZIP code, ... etc Many public application can be easily addressed like that

As these keys are discoverable, the channel can be hijacked by anyone. So ASTROBOT while applying ScuttleButt replications will ".chain.ts" data and check for protocol respect.

Data can't be lost, but protocol chain can be break ! In case of some annoyance, we can monitor IPFS protocol to identify which IPFSNODEID key is acting badly and apply reaction based on DEFCON level (look into astrXbian code)

MAILJET & GPS

In order for "Boostrap Station" to send emails to PLAYERs, we use mailjet service.

## CREDENTIALS FILE
~/.zen/MJ_APIKEY
# IS USED BY
~/.zen/Astroport.ONE/tools/mailjet.sh

Boostrap location is specified in ~/.zen/GPS

cat ~/.zen/GPS
48.87039, 2.31673

LOW RESSOURCE STATION CAN ACTIVATE LOW MODE (disable ipfs daemon)

~/.zen/Astroport.ONE/tools/cron_VRFY.sh LOW

sudo systemctl restart astroport.service
sudo systemctl restart g1billet.service

STATION : Show Station PLAYER's G1 investments levels

GET /?qrcode=station

STATION MAP & PLAYER DATA PROPAGATION

Chaque Station collecte et publie sur sa clef "self" (/ipns/$IPFSNODEID) les liens vers le cache de l'ensemble de l'essaim http://localhost:12345 renvoi un json

{
    "created" : "202304111854481040",
    "hostname" : "kitty.localhost",
    "myIP" : "192.168.1.14",
    "ipfsnodeid" : "12D3KooWK1ACupF7RD3MNvkBFU9Z6fX11pKRAR99WDzEUiYp5t8j",
    "astroport" : "http://192.168.1.14:1234",
    "g1station" : "http://ipfs.localhost:8080/ipns/12D3KooWK1ACupF7RD3MNvkBFU9Z6fX11pKRAR99WDzEUiYp5t8j",
    "g1swarm" : "http://ipfs.localhost:8080/ipns/k51qzi5uqu5djv0qz9wkl8i94opzm62csh56mnp9zove8i543e4vv4cy9gvr1o"
}

Parameter Description
created date de creation du document
hostname nom de la station
myIP adresse IP de la station
ipfsnodeid Clef publique, balise de la station
astroport Lien vers l'API de la station
g1station Lien vers la carte PLAYER de la Station
g1swarm Lien vers la carte des cartes des Stations de l'essaim

Afin de propager la carte chaque station lors de son raffraichissement de cache envoi aux Boostrap une requête pour upload (/ipns/${IPFSNODEID})

STATION MAP UPSYNC : http://$nodeip:12345/?${GNODEID}=${IPFSNODEID}

20H12

Chaque jour, les ASTROBOTs captent les ⭐ (tiddler 'email') de leurs PLAYERs puis exécutent le protocole de synchronisation Ŋ1

20H12.sh

Ils analysent les données et extraient des flux json selon les G1Voeu présent dans chaque TW.

Le niveau informationnel de confiance exploré permet de proposer des alertes issues du niveau Ŋ2.

EXEMPLE DE FLUX TW :

TW FEEDS

IPFS : UN STOCKAGE INALTERABLE ET INTELLIGENT

[

"The Barefoot Architect" de Johan Van Lengen.

Lignes de commandes

ipfs ls Qme6a6RscGHTg4e1XsRrpRoNbfA6yojC6XNCBrS8nPSEox/
ipfs cat QmbfVUAyX6hsxTMAZY7MhvUmB3AkfLS7KqWihjGfu327yG > /tmp/vdoc.pub_the-barefoot-architect.pdf && xdg-open /tmp/vdoc.pub_the-barefoot-architect.pdf

Après un passage par ajouter_media.sh

Les données sont stockées dans des Tiddlers

Foret Enchantée - PROJET ASTROPORT.pdf

https://ipfs.copylaradio.com/ipfs/QmUtGpGeMZvwp47ftqebVmoFWCmvroy5wEtWsKvWvDWJpR


SIMULATIONS LOOPY

Simulateur Astronaute/Voeux

Essaim Astroport.ONE

Stargazers over time

Stargazers over time

CREDITS

This "digital art" structure is a selection of some of the most valuable Free & OpenSource Software I ever had in my hand. Credits is going to all the kindness and care provided to make valuable and secure software available for all

Do you know G1 ? The best crypto coin you could ever dream about...

Thanks for contributions on Swarm BUDGET

IPFS Ecosystem Directory Submission Form

https://airtable.com/appLWiIrg9SQaEtEq/shrjwvk9pAeAk0Ci7