zf

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

commit 23bce1533c44be851b3e8ad11d3d5d85a9d9e450
parent c68621867b5ffb2bb6db02686246efd99f87f25e
Author: Jaromil <jaromil@dyne.org>
Date:   Tue, 19 Jul 2022 00:11:10 +0200

simple shell script to sign mutations

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