#!/bin/bash PROGRAM="$(basename $0)" time_started=$(date -u +%s.%N) ss=$(echo $time_started | cut -d '.' -f 1) nss=$(echo $time_started | cut -d '.' -f 2) # Check if there are enough arguments if [ $# -lt 1 ] then echo "Error: Not enough arguments provided" echo "Give a zblock's IPFS CID v0 as an argument" exit 1 fi if [ -n "$1" ] then TEST="$(echo -n "$1" | grep -v '^Qm[A-Za-z0-9]\{44\}$')" if [ -n "$TEST" ] then echo not ok exit 1 fi fi arg="$(mktemp)" ak-enter -l 1 "$1" | jq '.[]' > $arg ( \ # Create HTML document echo "" echo "" echo "
" echo ""
echo " 📦 ZBLOCK" echo " | "
echo " "
echo " "
echo " "
echo " $zblock" echo "$(ak-ipfs-cat $zblock | jq)" echo " | "
echo "
"
echo " 📦 BLOCK" echo " | "
echo " "
echo " "
echo " "
echo " $block" echo "$(ak-ipfs-cat $block | jq)" echo " | "
echo "
"
echo " 🔏 BLOCK SIGNATURE" echo " | "
echo " "
echo " "
echo " "
echo " $block_signature" echo "$(ak-ipfs-cat $block_signature)" echo " | "
echo "
"
echo " ⌚ TIMESTAMP" echo " | "
echo " "
echo " $timestamp " echo " | "
echo "
"
echo " 🔌 MODULE" echo " | "
echo " "
echo " $module " echo " | "
echo "
"
echo " 🪧 ACTION" echo " | "
echo " "
echo " $action " echo " | "
echo "
"
echo " 🔑 GPG" echo " | "
echo " "
echo " "
echo " "
echo " $gpg" echo "$(ak-ipfs-cat $gpg)" echo " | "
echo "
"
echo " 📦 PREVIOUS" echo " | "
echo " " echo ' 🔗 '$previous'' echo " | " echo "
"
echo " 📦 DATA" echo " | "
echo " "
echo " "
echo " "
echo " $data" echo "$datablock" echo " | "
echo "
"
echo " 🔏 DATA_SIGNATURE" echo " | "
echo " "
echo " "
echo " "
echo " $detach" echo "$(ak-ipfs-cat $detach)" echo " | "
echo "
"
echo " 📄 ipfs" echo " | "
echo " " echo ' '🔗 $(echo $datablock | jq -r '.ipfs')'' echo " | " echo "
"
echo " 🔏 detach" echo " | "
echo " "
echo " "
echo " "
echo " $(echo $datablock | jq -r '.detach')" echo "$(ak-ipfs-cat $(echo $datablock | jq -r '.detach'))" echo " | "
echo "
📃 Rendered ZBLOCK" echo "
$(cat $arg | jq)" fi time_ended=$(date -u +%s.%N) se=$(echo $time_ended | cut -d '.' -f 1) nse=$(echo $time_ended | cut -d '.' -f 2) echo "