Skip to content

Commit c0225dc

Browse files
committed
Update 2025-04 - Calidus Pool Key Query & Signing
Updated SCRIPT - 15_calidusPoolKey.sh - The newly introduced script 15 has now two new functions: * You can now QUERY your pool-id or your calidus-id * You can now simply sign via ed25519 signing method Examples: 15_calidusPoolKey.sh query all ... to get all current calidus key registrations 15_calidusPoolKey.sh query mypool 15_calidusPoolKey.sh query pool1w83ux7vrwafrsuz044knxl9xxtr38q5jj2l3p28fl3g26faqqwg ... to get results for your selected pool 15_calidusPoolKey.sh query mycalidus 15_calidusPoolKey.sh query calidus15xcc3mphdwu8amrx9m6v9v4552pugr2gcsj4m8arjmx3zwc8yf8ng ... to get results for your selected calidus key 15_calidusPoolKey.sh sign myKey "hello world" ... to sign the message-text "hello world" with your calidus key
1 parent 051bd93 commit c0225dc

File tree

3 files changed

+331
-15
lines changed

3 files changed

+331
-15
lines changed

cardano/mainnet/15_calidusPoolKey.sh

Lines changed: 261 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ Usage: $(basename $0) new cli <CalidusKeyName> ... Gene
2828
$(basename $0) genmeta <CalidusKeyName> <PoolNodeName> [nonce]
2929
... Generates the Calidus Pool-Key Registration-Metadata in JSON format. [Option: nonce]
3030
31-
$(basename $0) query <CalidusKeyName|Calidus-ID|Pool-ID> ... Queries the Koios-API for the Calidus-Pool Key or for a CalidusID/Pool-ID in bech format
31+
$(basename $0) query <CalidusKeyName|Calidus-ID|Calidus-PublicKeyHex|Pool-ID|PoolNodeName> or 'all'
32+
... Queries the Koios-API for the Calidus-Pool Key or for a CalidusID/Pool-ID in bech format
33+
Or use the keyword 'all' to get all registered entries
34+
35+
$(basename $0) sign <CalidusKeyName> "text-message-to-sign" ... Sign a "text-message" with the Calidus-Pool-Key (ed25519-mode)
3236
3337
3438
Examples:
@@ -39,6 +43,16 @@ Examples:
3943
$(basename $0) genmeta example mypool
4044
... Generates the Calidus Registration-Metadata for the Calidus-Key example.calidus.vkey and signs it with the mypool.node.skey/hwsfile
4145
46+
$(basename $0) query example
47+
... Searches the API for entries about the example Calidus-Key
48+
49+
$(basename $0) query pool1rdaxrw3722f0x3nx4uam9u9c6dh9qqd2g83r2uyllf53qmmj5uu
50+
... Searches the API for entries about the given Pool-ID
51+
52+
$(basename $0) sign example "hello world"
53+
... Signs the given text-string "hello world" with the example.calidus.skey Key
54+
55+
4256
EOF
4357
}
4458

@@ -208,7 +222,7 @@ case ${1,,} in
208222

209223
#Output filename for the Calidus-Registration-JSON-Metadata
210224
datestr=$(date +"%y%m%d%H%M%S")
211-
calidusRegistrationFile="$(dirname ${allParameters[2]})/${poolKeyName}_${datestr}.calidus-registration.json"; calidusRegistrationFile=${calidusRegistrationFile/#.\//};
225+
calidusRegistrationFile="$(dirname ${allParameters[2]})/$(basename ${poolKeyName})_${datestr}.calidus-registration.json"; calidusRegistrationFile=${calidusRegistrationFile/#.\//};
212226
if [ -f "${calidusRegistrationFile}" ]; then echo -e "\e[35mError - ${calidusRegistrationFile} already exists, please delete it first if you wanna overwrite it !\e[0m\n"; exit 1; fi
213227

214228
echo -e "\e[0mGenerating the Calidus-Registration-MetadataFile(JSON): \e[32m${calidusRegistrationFile}\e[0m"
@@ -310,8 +324,8 @@ case ${1,,} in
310324

311325
echo -e "\e[0m Pool-ID: \e[94m${poolIdBech}\e[0m"
312326
echo -e "\e[0m Pool-ID-Hex: \e[32m${poolIdHex}\e[0m"
313-
echo -e "\e[0mCalidus Public Key: \e[32m${calidusPublicKey}\e[0m"
314327
echo -e "\e[0m Calidus-ID: \e[94m${calidusIdBech}\e[0m"
328+
echo -e "\e[0m Calidus PublicKey: \e[32m${calidusPublicKey}\e[0m"
315329
echo -e "\e[0m Nonce: \e[32m${nonce}\e[0m"
316330
echo
317331

@@ -396,7 +410,7 @@ case ${1,,} in
396410
#Check about a given nonce
397411
if [[ ${nonce} != "" ]]; then nonceParam="--nonce ${nonce}"; else nonceParam=""; fi
398412
399-
#Read in the Secret key and encrypt it if needed
413+
#Read in the Secret key and decrypt it if needed
400414
skeyJSON=$(read_skeyFILE "${poolKeyName}.node.skey"); if [ $? -ne 0 ]; then echo -e "\e[35m${skeyJSON}\e[0m\n"; exit 1; else echo -e "\e[32mOK\e[0m\n"; fi
401415
402416
#Generate the registration metadata file
@@ -411,8 +425,8 @@ case ${1,,} in
411425
412426
echo -e "\e[0m Pool-ID: \e[94m${poolIdBech}\e[0m"
413427
echo -e "\e[0m Pool-ID-Hex: \e[32m${poolIdHex}\e[0m"
414-
echo -e "\e[0mCalidus Public Key: \e[32m${calidusPublicKey}\e[0m"
415428
echo -e "\e[0m Calidus-ID: \e[94m${calidusIdBech}\e[0m"
429+
echo -e "\e[0m Calidus PublicKey: \e[32m${calidusPublicKey}\e[0m"
416430
echo -e "\e[0m Nonce: \e[32m${nonce}\e[0m"
417431
echo
418432
@@ -439,17 +453,251 @@ case ${1,,} in
439453
### Query the Calidus-VKEY / Calidus-ID / Pool-ID
440454
query )
441455
442-
#Query only possible if not offline mode
443-
if ${offlineMode}; then echo -e "\e[35mYou have to be in ONLINE MODE to do this!\e[0m\n"; exit 1; fi
456+
#Query only possible if not offline mode
457+
if ${offlineMode}; then echo -e "\e[35mYou have to be in ONLINE MODE to do this!\e[0m\n"; exit 1; fi
458+
459+
#Check about input parameters
460+
if [[ ${paramCnt} -ne 2 ]]; then echo -e "\e[35mIncorrect parameter count!\e[0m\n"; showUsage; exit 1; fi
461+
462+
paramValue=${allParameters[1]} #get the parameter behind "query". that can be a calidus public key hex, calidus-pool-key in bech format, a calidus-key.vkey file, a pool-id in bech format or a pool.node.vkey file
463+
464+
#Check if its a Calidus-ID in Bech-Format
465+
if [[ "${paramValue:0:8}" == "calidus1" && ${#paramValue} -eq 61 ]]; then #parameter is most likely a calidus id in bech format
466+
echo -ne "\e[0mCheck if given Calidus Bech-ID\e[32m ${paramValue}\e[0m is valid ..."
467+
calidusIdHex=$(${bech32_bin} 2> /dev/null <<< "${paramValue,,}") #will have returncode 0 if the bech was valid
468+
if [[ $? -ne 0 || ${calidusIdHex:0:2} != "a1" ]]; then echo -e "\n\n\e[91mERROR - \"${paramValue}\" is not a valid Calidus-ID.\e[0m"; exit 1; fi
469+
echo -e "\e[32m OK\e[0m\n"
470+
calidusIdBech=${paramValue,,}
471+
searchType="Calidus ID";
472+
473+
#Check if its a Calidus-ID file with a Bech-ID
474+
elif [[ -f "${paramValue}.calidus.id" ]]; then #parameter is a Calidus ID file, containing a bech32 id
475+
echo -ne "\e[0mReading from Calidus-ID-File\e[32m ${paramValue}.calidus.id\e[0m ..."
476+
calidusIdBech=$(cat "${paramValue}.calidus.id" 2> /dev/null)
477+
if [ $? -ne 0 ]; then echo -e "\n\n\e[91mERROR - Could not read from file \"${paramValue}.calidus.id\"\e[0m"; exit 1; fi
478+
echo -e "\e[32m OK\e[0m"
479+
echo -ne "\e[0mCheck if Calidus Bech-ID\e[32m ${calidusIdBech}\e[0m is valid ..."
480+
calidusIdHex=$(${bech32_bin} 2> /dev/null <<< "${calidusIdBech}") #will have returncode 0 if the bech was valid
481+
if [[ $? -ne 0 || ${calidusIdHex:0:2} != "a1" ]]; then echo -e "\n\n\e[91mERROR - \"${calidusIdBech}\" is not a valid Calidus-ID.\e[0m"; exit 1; fi
482+
echo -e "\e[32m OK\e[0m\n"
483+
calidusIdBech=${calidusIdBech,,}
484+
searchType="Calidus ID";
485+
486+
#Check if its a Calidus-Public-Key-Hex
487+
elif [[ "${paramValue,,}" =~ ^([[:xdigit:]]{64})$ ]]; then
488+
echo -e "\e[0mUsing given Calidus Public-Key hex: \e[32m${paramValue,,}\e[0m\n"
489+
calidusPublicKeyHex="${paramValue,,}"
490+
searchType="Calidus Public-Key";
491+
492+
#Check if its a Calidus-Public-Key-File
493+
elif [[ -f "${paramValue}.calidus.vkey" ]]; then #parameter was the first part of a vkey file
494+
echo -ne "\e[0mConverting the Calidus Vkey-File \e[32m${paramValue}.calidus.vkey\e[0m into the Calidus Public-Key ... "
495+
calidusVkeyCbor=$(jq -r .cborHex < "${paramValue}.calidus.vkey" 2> /dev/stdout)
496+
if [ $? -ne 0 ]; then echo -e "\n\n\e[91mError - ${calidusVkeyCbor}\e[0m\n"; exit 1; fi
497+
calidusPublicKeyHex=$(tail -c +5 <<< ${calidusVkeyCbor} 2> /dev/stdout)
498+
if [ $? -ne 0 ]; then echo -e "\n\n\e[91mError - ${calidusPublicKeyHex}\e[0m\n"; exit 1; fi
499+
echo -e "\e[32m OK\e[0m\n"
500+
searchType="Calidus Public-Key";
501+
502+
#Check if its a Pool-ID in Bech-Format
503+
elif [[ "${paramValue:0:5}" == "pool1" && ${#paramValue} -eq 56 ]]; then #parameter is most likely a bech32-pool-id
504+
echo -ne "\e[0mCheck if given Pool Bech-ID\e[32m ${paramValue}\e[0m is valid ..."
505+
#lets do some further testing by converting the bech32 Pool-ID into a Hex-Pool-ID
506+
poolIdHex=$(${bech32_bin} 2> /dev/null <<< "${paramValue,,}") #will have returncode 0 if the bech was valid
507+
if [ $? -ne 0 ]; then echo -e "\n\n\e[91mERROR - \"${paramValue}\" is not a valid Bech32 Pool-ID.\e[0m"; exit 1; fi
508+
echo -e "\e[32m OK\e[0m\n"
509+
poolIdBech=${paramValue,,}
510+
searchType="Pool ID";
511+
512+
#Check if its a Pool-ID File with the hex Pool-ID
513+
elif [[ -f "${paramValue}.pool.id" ]]; then #parameter is a Pool-ID file, containing the id in hex format
514+
echo -ne "\e[0mReading from Pool_ID-File\e[32m ${paramValue}.pool.id\e[0m ..."
515+
poolIdHex=$(cat "${paramValue}.pool.id" 2> /dev/null)
516+
if [ $? -ne 0 ]; then echo -e "\n\n\e[35mERROR - Could not read from file \"${paramValue}.pool.id\"\e[0m"; exit 1; fi
517+
#check if the content is a valid pool hex
518+
if [[ ! "${poolIdHex,,}" =~ ^([[:xdigit:]]{56})$ ]]; then echo -e "\n\e[91mERROR - Content of Pool-ID File '${paramValue}.pool.id' is not a valid Pool-ID hex!\n\e[0m"; exit 1; fi
519+
#converting the Hex-PoolID into a Bech-PoolID
520+
poolIdBech=$(${bech32_bin} "pool" <<< ${poolIdHex} | tr -d '\n')
521+
checkError "$?"; if [ $? -ne 0 ]; then echo -e "\n\n\e[91mERROR - Could not convert the the Pool-ID File \"${paramValue}.pool.id\" into a Bech Pool-ID.\e[0m\n"; exit 1; fi
522+
echo -e "\e[32m OK\e[0m\n"
523+
searchType="Pool ID";
524+
525+
#Check if its a node Vkey File
526+
elif [ -f "${paramValue}.node.vkey" ]; then #there is a node.vkey file present, try to use this
527+
echo -ne "\e[0mConverting the Pool Vkey-File \e[32m${paramValue}.node.vkey\e[0m into a Pool-ID ... "
528+
nodeVkeyCbor=$(jq -r .cborHex < "${paramValue}.node.vkey" 2> /dev/stdout)
529+
if [ $? -ne 0 ]; then echo -e "\n\n\e[91mError - ${nodeVkeyCbor}\e[0m\n"; exit 1; fi
530+
#Generate the Pool-ID hex
531+
poolIdHex=$(tail -c +5 <<< ${nodeVkeyCbor} | xxd -r -ps | b2sum -l 224 -b | cut -d' ' -f 1)
532+
#check if the content is a valid pool hex
533+
if [[ ! "${poolIdHex,,}" =~ ^([[:xdigit:]]{56})$ ]]; then echo -e "\n\n\e[91mERROR - Could not convert the given Pool Vkey-File \"${paramValue}.node.vkey\" into a Bech Pool-ID.\e[0m\n"; exit 1; fi
534+
#converting the Hex-PoolID into a Bech-PoolID
535+
poolIdBech=$(${bech32_bin} "pool" <<< ${poolIdHex} | tr -d '\n')
536+
checkError "$?"; if [ $? -ne 0 ]; then echo -e "\n\n\e[91mERROR - Could not convert the given Pool Vkey-File \"${paramValue}.node.vkey\" into a Bech Pool-ID.\e[0m\n"; exit 1; fi
537+
echo -e "\e[32mOK\e[0m\n"
538+
searchType="Pool ID";
539+
540+
#Query all entries
541+
elif [[ "${paramValue,,}" == "all" ]]; then #query all entries
542+
echo -e "\e[0mQuery Calidus Pool-Keys: Filter none (\e[94mALL\e[0m)\n"
543+
searchType="ALL"
544+
545+
#Unknown parameter
546+
else
547+
548+
echo -e "\n\e[91mERROR - I don't know what to do with the parameter '${paramValue}'.\n\n\e[0m"; exit 1;
549+
550+
fi #end of different parameters check
551+
552+
#set an additional filter for the koios request depending on the input data
553+
case "${searchType}" in
554+
"Calidus Public-Key") koiosFilter="&calidus_pub_key=eq.${calidusPublicKeyHex}";;
555+
"Calidus ID") koiosFilter="&calidus_id_bech32=eq.${calidusIdBech}";;
556+
"Pool ID") koiosFilter="&pool_id_bech32=eq.${poolIdBech}";;
557+
*) koiosFilter="";;
558+
esac
559+
560+
#set variables for koios request
561+
errorcnt=0
562+
error=-1
563+
564+
showProcessAnimation "Query Calidus Pool-Key Info via Koios: " &
565+
while [[ ${errorcnt} -lt 5 && ${error} -ne 0 ]]; do #try a maximum of 5 times to request the information via koios API
566+
error=0
567+
response=$(curl -sL -m 30 -X GET -w "---spo-scripts---%{http_code}" "${koiosAPI}/pool_calidus_keys?pool_status=eq.registered&order=calidus_nonce.asc${koiosFilter}" -H "${koiosAuthorizationHeader}" -H "Accept: application/json" 2> /dev/null)
568+
if [ $? -ne 0 ]; then error=1; fi;
569+
errorcnt=$(( ${errorcnt} + 1 ))
570+
done
571+
stopProcessAnimation;
572+
if [[ ${error} -ne 0 ]]; then echo -e "\e[91mSORRY - Query of the Koios-API via curl failed, tried 5 times.\e[0m\n"; exit 1; fi; #curl query failed
573+
574+
#Split the response string into JSON content and the HTTP-ResponseCode
575+
if [[ "${response}" =~ (.*)---spo-scripts---([0-9]*)* ]]; then
576+
responseJSON="${BASH_REMATCH[1]}"
577+
responseCode="${BASH_REMATCH[2]}"
578+
else
579+
echo -e "\e[91mSORRY - Query of the Koios-API via curl failed. Could not separate Content and ResponseCode.\e[0m\n"; exit 1; #curl query failed
580+
fi
581+
582+
#Check the responseCode
583+
case ${responseCode} in
584+
"200" ) ;; #all good, continue
585+
* ) echo -e "\e[91mSORRY - HTTP Response code: ${responseCode}\e[0m\n"; exit 1; #exit with a failure and the http response code
586+
esac;
587+
588+
jsonRet=$(jq -r . <<< "${responseJSON}" 2> /dev/null)
589+
if [ $? -ne 0 ]; then echo -e "\e[91mSORRY - Query via Koios-API (${koiosAPI}) failed, not a JSON response.\e[0m\n"; exit 1; fi; #reponse is not a json file
590+
591+
#Get the number of entries and show them all
592+
calidusEntryCount=$(jq -r "length" <<< "${jsonRet}" 2> /dev/null)
593+
if [[ ${calidusEntryCount} -eq 0 ]]; then echo -e "${iconNo} \e[91mNo entries found :-(\e[0m\n"; exit 1; fi;
594+
595+
echo -e "${iconYes} \e[0mFound \e[32m${calidusEntryCount} entry/entries\e[0m for your request :-)\n"
596+
597+
#color the results depending on the requested input
598+
colorCalidusPublicKey="\e[32m"
599+
colorCalidusID="\e[32m"
600+
colorPoolID="\e[32m"
601+
colorHighlight="\e[94m"
602+
case "${searchType}" in
603+
"Calidus Public-Key") colorCalidusPublicKey=${colorHighlight};;
604+
"Calidus ID") colorCalidusID=${colorHighlight};;
605+
"Pool ID"|"ALL") colorPoolID=${colorHighlight};;
606+
esac
607+
608+
#Show all the results
609+
for (( tmpCnt=0; tmpCnt<${calidusEntryCount}; tmpCnt++ ))
610+
do
611+
612+
#get all the values
613+
{ read poolIdBech;
614+
read calidusNonce;
615+
read calidusPublicKeyHex;
616+
read calidusIdBech;
617+
read txHash;
618+
read epochNo;
619+
read blockTime; } <<< $(jq -r ".[${tmpCnt}] | .pool_id_bech32 // \"-\", .calidus_nonce // \"-\", .calidus_pub_key // \"-\", .calidus_id_bech32 // \"-\", .tx_hash // \"-\", .epoch_no // \"-\", .block_time // \"-\"" <<< ${jsonRet} 2> /dev/null)
620+
621+
#show them to the user
622+
echo -e "\e[0m Date: $(date --date=@${blockTime})\e[0m"
623+
echo -e "\e[0m Pool-ID: ${colorPoolID}${poolIdBech}\e[0m"
624+
echo -e "\e[0m Calidus-ID: ${colorCalidusID}${calidusIdBech}\e[0m"
625+
echo -e "\e[0m Calidus PublicKey: ${colorCalidusPublicKey}${calidusPublicKeyHex}\e[0m"
626+
echo -e "\e[0m Calidus Nonce: \e[90m${calidusNonce}\e[0m"
627+
echo -e "\e[0m Epoch: \e[90m${epochNo}\e[0m"
628+
echo -e "\e[0m Tx-Hash: \e[90m${txHash}\e[0m"
629+
echo
444630
445-
#NO QUERY UNTIL WE HAVE A STABLE KOIOS API
446-
echo -e "\e[35mSorry, the query is currently not available yet!\e[0m\n"; exit 1;
631+
done
447632
448-
exit 0;
449-
;;
633+
#Get the number of unique Calidus-Keys
634+
uniqCalidusKeyCount=$(jq -r "[.[].calidus_id_bech32] | unique | length" <<< ${jsonRet} 2> /dev/null)
635+
if [[ ${uniqCalidusKeyCount} -ge 1 && ${calidusEntryCount} -gt 1 ]]; then echo -e "${iconYes} \e[0mStats: \e[32m${uniqCalidusKeyCount} unique\e[0m Calidus Keys for \e[32m${calidusEntryCount} registered\e[0m Pools\n"; fi
636+
;;
637+
638+
639+
### Sign text-data with the Calidus-SKEY
640+
sign )
641+
642+
#Check about input parameters
643+
if [[ ${paramCnt} -ne 3 ]]; then echo -e "\e[35mIncorrect parameter count!\e[0m\n"; showUsage; exit 1; fi
644+
645+
#Calidus Key check
646+
calidusKeyName="$(dirname ${allParameters[1]})/$(basename $(basename ${allParameters[1]} .skey) .calidus)"; calidusKeyName=${calidusKeyName/#.\//};
647+
if ! [[ -f "${calidusKeyName}.calidus.skey" ]]; then echo -e "\e[35mError - ${calidusKeyName}.calidus.skey does not exist, please create the key first using option 'new cli ${calidusKeyName}' !\e[0m\n"; exit 1; fi
648+
649+
#Get the Text Message to sign
650+
messageText="${allParameters[2]}"
651+
652+
echo -e "\e[0mSign a Message-Text with the Calidus-Secret-Key '\e[32m${calidusKeyName}\e[0m'\n"
653+
echo -e "\e[0mMessage-Text to sign: '\e[94m${messageText}\e[0m'\n"
654+
655+
#Check the cardano-signer binary existance and version
656+
if ! exists "${cardanosigner}"; then
657+
#Try the one in the scripts folder
658+
if [[ -f "${scriptDir}/cardano-signer" ]]; then cardanosigner="${scriptDir}/cardano-signer";
659+
else majorError "Path ERROR - Path to the 'cardano-signer' binary is not correct or 'cardano-singer' binaryfile is missing!\nYou can find it here: https://github.com/gitmachtl/cardano-signer/releases\nThis is needed to generate the signed Metadata. Also please check your 00_common.sh or common.inc settings."; exit 1; fi
660+
fi
661+
cardanosignerCheck=$(${cardanosigner} --version 2> /dev/null)
662+
if [[ $? -ne 0 ]]; then echo -e "\e[35mERROR - This script needs a working 'cardano-signer' binary. Please make sure you have it present with with the right path in '00_common.sh' !\e[0m\n\n"; exit 1; fi
663+
cardanosignerVersion=$(echo ${cardanosignerCheck} | cut -d' ' -f 2)
664+
versionCheck "${minCardanoSignerVersion}" "${cardanosignerVersion}"
665+
if [[ $? -ne 0 ]]; then majorError "Version ${cardanosignerVersion} ERROR - Please use a cardano-signer version ${minCardanoSignerVersion} or higher !\nOld versions are not compatible, please upgrade - thx."; exit 1; fi
666+
667+
#Read in the Secret key and decrypt it if needed
668+
skeyJSON=$(read_skeyFILE "${calidusKeyName}.calidus.skey"); if [ $? -ne 0 ]; then echo -e "\e[35m${skeyJSON}\e[0m\n"; exit 1; else echo -e "\e[32mOK\e[0m\n"; fi
669+
670+
#Sign the messageText
671+
echo -e "\e[0mSigning with Cardano-Signer Version: \e[32m${cardanosignerVersion}\e[0m\n";
672+
signerJSON=$(${cardanosigner} sign --data-text "${messageText}" --secret-key <(echo "${skeyJSON}") --json-extended 2> /dev/stdout)
673+
if [ $? -ne 0 ]; then echo -e "\e[35m${signerJSON}\e[0m\n"; exit $?; fi
674+
unset skeyJSON
675+
676+
#Getting the parameters
677+
{ read signature; read calidusPublicKey; } <<< $(jq -rM '.signature // "-", .publicKey // "-"' <<< ${signerJSON} 2> /dev/null)
678+
679+
#Check the returned Signature
680+
if [[ "${signature//[![:xdigit:]]}" != "${signature}" || "${signature}" == "" ]]; then echo -e "\n\e[35mERROR - Could not generate the Signature.\e[0m\n"; exit 1; fi
681+
682+
#Generate the Calidus-ID
683+
calidusIdHex="a1$(echo -n ${calidusPublicKey} | xxd -r -ps | b2sum -l 224 -b | cut -d' ' -f 1)"
684+
#check if the content is a valid hex
685+
if [[ "${calidusIdHex//[![:xdigit:]]}" == "${calidusIdHex}" && ${#calidusIdHex} -eq 58 ]]; then
686+
#converting into the Calidus-ID-Bech
687+
calidusIdBech=$(${bech32_bin} "calidus" <<< ${calidusIdHex} | tr -d '\n')
688+
checkError "$?"; if [ $? -ne 0 ]; then echo -e "\n\e[35mERROR - Could not generate the Calidus-ID.\e[0m\n"; exit 1; fi
689+
fi
690+
691+
#Show the result
692+
echo -e "\e[0m Calidus-ID: \e[94m${calidusIdBech}\e[0m"
693+
echo -e "\e[0m Calidus PublicKey: \e[32m${calidusPublicKey}\e[0m\n"
694+
echo -e "\e[0m \e[4mSignature\e[0m: \e[97m${signature}\e[0m\n"
695+
696+
echo -e "\e[90mIf you need more signing/verification options, please directly use '${cardanosigner}' - thx!\e[0m\n";
697+
;;
450698
451699
452-
* ) showUsage; exit 1;
453-
;;
700+
* ) showUsage; exit 1;
701+
;;
454702
esac
455703

cardano/mainnet/sha256sum_sposcripts.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ c419a6ba2b60619d09fde60b6709ea9d60550048c358ab3773565d2ba7a1b8bd 10_genPolicy.s
3131
06c34796ce4940db95e813044b84662266d9e7d04a8b1d64e2bc2365c92873b9 11b_burnAsset.sh
3232
b98296469ace20768f9be32288745fcc2165736871c3a53af48011bc23f2dbf9 12a_genAssetMeta.sh
3333
d01cf06a7823be3ac7bd7ced774d08f40292e12446db828670dabd9c25db5f2d 12b_checkAssetMetaServer.sh
34-
1edc90a9f52cc23733d5d1956d4a9fd258819c85ed9034a88394ad7d78c58e39 15_calidusPoolKey.sh
34+
a0a4e136e1ae72982791ff271956b102640a6e60bf0ba717f66df50c6df3e006 15_calidusPoolKey.sh
3535
c9a624273f4f0625c5824f284f586f3339b903b948ff50c80419ae174ddb0d27 21a_genDRepKeys.sh
3636
0b6b4de10cbdb7bc224ae31955463d2cfeda9b047d6e741ad23d80ca33160281 21b_regDRepCert.sh
3737
7ea50e0a47cbc57d77e143fe7a647d5e1dbfdeb0b1d8556f9d8a419923438c65 21c_checkDRepOnChain.sh

0 commit comments

Comments
 (0)