zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit eb26c121dc463b85fe9175022072d486daf0a6a4
parent 080a34b09ed9a00f8d6c615b60b36d8d3244889d
Author: srfsh <dev@srf.sh>
Date:   Tue, 19 Jul 2022 01:12:10 +0300

Merge branch 'srfsh/gql-sign' of github.com:dyne/zenflows into srfsh/gql-sign

Diffstat:
Atest/api/simple.sh | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/test/api/simple.sh b/test/api/simple.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# simple shell script to test the api + +conf="rngseed=hex:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + +# eddsa public key will always be: Lotmt4Of+Ca93Jxfvqz4I+gXCJkAVA0tcaFczuyxZNs= +zenroom -c $conf -z ../../zencode/keygen.zen | tee keyring.json | jq . + +query='hello world! this should be a $mutation' + +cat <<EOF > query.json +{"graphql": "$(echo $query | base64)"} +EOF +zenroom -c $conf -z ../../zencode/sign_graphql.zen -a query.json -k keyring.json | tee signed_query.json | jq . + +echo "Body: $query" +echo "Header: `awk -F'"' '/eddsa_signature/ {print $4}' signed_query.json`" + +# TODO: continue