2023-11-06-09-22 UTC+1 We have liftoff on Federation! POC worked, Successful federation of claim submitted to Alice federated to Bob, retrieved from Bob and verified using his service parameters

by pdxjohnny
GNU/Linux ◆ xterm-256color ◆ bash 171 views

rm -f ~/Documents/fediverse/scitt_federation_bob/{bovine.sqlite3,config.toml,context_cache.sqlite,federate_created_entries_socket} && rm -f ~/Documents/fediverse/scitt_federation_alice/{bovine.sqlite3,config.toml,context_cache.sqlite,federate_created_entries_socket}
scitt-emulator server     --workspace ${HOME}/Documents/fediverse/scitt_federation_bob/workspace_bob/ --tree-alg CCF --port 6000     --middleware scitt_emulator.federation_activitypub_bovine:SCITTFederationActivityPubBovine     --middleware-config-path ${HOME}/Documents/fediverse/scitt_federation_bob/config.json &
scitt-emulator server     --workspace ${HOME}/Documents/fediverse/scitt_federation_alice/workspace_alice/ --tree-alg CCF --port 7000     --middleware scitt_emulator.federation_activitypub_bovine:SCITTFederationActivityPubBovine     --middleware-config-path ${HOME}/Documents/fediverse/scitt_federation_alice/config.json --log debug &
set -x
clear; echo -e "Demo of SCITT Federation\nCreate a claim in Alice's instance, federated to Bob\nRetrieve claim from Bob and verify using his service parameters"
rm claim*
sleep 1
scitt-emulator client create-claim --issuer did:web:example.com --content-type application/json --payload '{"sun": "yellow"}' --out claim.cose && scitt-emulator client submit-claim --url https://scitt.alice.chadig.com --claim claim.cose --out claim.receipt.cbor
sleep 1
scitt-emulator client create-claim --issuer did:web:example.com --content-type application/json --payload '{"sun": "yellow"}' --out claim.cose && scitt-emulator client submit-claim --url https://scitt.alice.chadig.com --claim claim.cose --out claim.receipt.cbor 2>&1 | tee >(grep Entry\ ID: | awk '{print $NF}' > entry_id.txt)
sleep 1
cat entry_id.txt
sleep 7
scitt-emulator client retrieve-claim --entry-id $(cat entry_id.txt) --url https://scitt.bob.chadig.com --out claim.federated.alice.to.bob
sleep 1
scitt-emulator client retrieve-receipt --entry-id $(cat entry_id.txt) --url https://scitt.bob.chadig.com --out claim.federated.alice.to.bob.receipt
sleep 1
scitt-emulator client verify-receipt --claim claim.federated.alice.to.bob --receipt claim.federated.alice.to.bob.receipt --service-parameters ~/Documents/fediverse/scitt_federation_bob/workspace_bob/service_parameters.json
sleep 1
echo 'Successful federation of claim submitted to Alice federated to Bob, retreived from Bob and verified using his service parameters'
sleep 10