forked from interfacerproject/zenflows-crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
verify_graphql.zen
29 lines (24 loc) · 1022 Bytes
/
verify_graphql.zen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Scenario eddsa: verify the signature of a graph query
Given I have a 'base64' named 'gql'
Given I have a 'base64' named 'eddsa signature'
Given I have a 'base58' named 'eddsa public key'
# check that the graph query is reentrant
# When I create the count of char '{' found in 'graphql'
# and I rename 'count' to 'open'
# and I create the count of char '}' found in 'graphql'
# and I remove 'count'
# and I remove 'open'
# When I create the count of char '(' found in 'graphql'
# and I rename 'count' to 'open'
# and I create the count of char ')' found in 'graphql'
# and I remove 'count'
# and I remove 'open'
# When I create the count of char '[' found in 'graphql'
# and I rename 'count' to 'open'
# and I create the count of char ']' found in 'graphql'
# and I verify 'count' is equal to 'open'
# Fix Apollo's mingling with query string
When I remove spaces in 'gql'
and I remove newlines in 'gql'
When I verify the 'gql' has a eddsa signature in 'eddsa signature' by 'eddsa public key'
Then print the string '1'