Skip to content

Commit

Permalink
🍱 Add contracts locally in place of a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
puria committed Oct 8, 2019
1 parent 4fd1087 commit 9b00c69
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 2 deletions.
9 changes: 9 additions & 0 deletions app/coconut_contracts/aggregate_petition_signature.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Scenario coconut: aggregate petition signature
Given that I have a valid 'petition signature'
and I have a valid 'petition'
and I have a valid 'verifiers'
When the petition signature is not a duplicate
and the petition signature is just one more
and I add the signature to the petition
Then print the 'petition'
and print the 'verifiers'
7 changes: 7 additions & 0 deletions app/coconut_contracts/aggregate_signature.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Scenario coconut: aggregate signature
Given that I am known as 'Alice'
and I have my valid 'credential keypair'
and I have a valid 'credential signature'
When I create the credentials
Then print my 'credentials'
and print my 'credential keypair'
9 changes: 9 additions & 0 deletions app/coconut_contracts/approve_petition.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Scenario coconut: approve petition
Given that I have a valid 'verifier' from 'MadHatter'
and I have a valid 'credential proof'
and I have a valid 'petition'
When I aggregate the verifiers
and I verify the credential proof
and I verify the new petition to be empty
Then print the 'petition'
and print the 'verifiers'
5 changes: 5 additions & 0 deletions app/coconut_contracts/count_petition.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Scenario coconut: count petition
Given that I have a valid 'petition'
and I have a valid 'petition tally'
When I count the petition results
Then print the 'results'
9 changes: 9 additions & 0 deletions app/coconut_contracts/create_petition.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Scenario coconut: create petition
Given that I am known as 'Alice'
and I have my valid 'credential keypair'
and I have my valid 'credentials'
and I have a valid 'verifier' from 'MadHatter'
When I aggregate the verifiers
and I create the credential proof
and I create the petition 'poll'
Then print all data
8 changes: 8 additions & 0 deletions app/coconut_contracts/create_proof.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Scenario coconut: create proof
Given that I am known as 'Alice'
and I have my valid 'credential keypair'
and I have a valid 'verifier' from 'MadHatter'
and I have my valid 'credentials'
When I aggregate the verifiers
and I create the credential proof
Then print the 'credential proof'
5 changes: 5 additions & 0 deletions app/coconut_contracts/create_request.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Scenario coconut: create request
Given that I am known as 'Alice'
and I have my valid 'credential keypair'
When I create the credential request
Then print my 'credential request'
4 changes: 4 additions & 0 deletions app/coconut_contracts/credential_keygen.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Scenario coconut: credential keygen
Given that I am known as 'Alice'
When I create the credential keypair
Then print my 'credential keypair'
4 changes: 4 additions & 0 deletions app/coconut_contracts/issuer_keygen.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Scenario coconut: issuer keygen
Given that I am known as 'MadHatter'
When I create the issuer keypair
Then print my 'issuer keypair'
7 changes: 7 additions & 0 deletions app/coconut_contracts/issuer_sign.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Scenario coconut: issuer sign
Given that I am known as 'MadHatter'
and I have my valid 'issuer keypair'
and I have a valid 'credential request'
When I create the credential signature
Then print the 'credential signature'
and print the 'verifier'
4 changes: 4 additions & 0 deletions app/coconut_contracts/publish_verifier.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Scenario coconut: publish verifier
Given that I am known as 'MadHatter'
and I have my valid 'verifier'
Then print my 'verifier'
8 changes: 8 additions & 0 deletions app/coconut_contracts/sign_petition.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Scenario coconut: sign petition
Given I am 'Alice'
and I have my valid 'credential keypair'
and I have a valid 'credentials'
and I have a valid 'verifier' from 'MadHatter'
When I aggregate the verifiers
and I create the petition signature 'poll'
Then print the 'petition signature'
6 changes: 6 additions & 0 deletions app/coconut_contracts/tally_petition.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Scenario coconut: tally petition
Given that I am 'Alice'
and I have my valid 'credential keypair'
and I have a valid 'petition'
When I create a petition tally
Then print all data
6 changes: 6 additions & 0 deletions app/coconut_contracts/verify_proof.zen
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Scenario coconut: verify proof
Given that I have a valid 'verifier' from 'MadHatter'
and I have a valid 'credential proof'
When I aggregate the verifiers
and I verify the credential proof
Then print 'Success' 'OK' as 'string'
2 changes: 1 addition & 1 deletion app/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ uid = issuer_identifier
keypair = /app/app/ci_keypair.keys


contracts_path = /app/app/contracts/src
contracts_path = /app/app/coconut_contracts


secret = 615872afdb35a291f56166d63399d0fa1f2a37415b24206fb051dbce294afc5c
Expand Down
2 changes: 1 addition & 1 deletion app/test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
debug = true
uid = issuer_identifier
keypair = /home/travis/build/DECODEproject/credential-issuer/tests/ci_keypair.keys
contracts_path = /home/travis/build/DECODEproject/Zenroom/test/zencode_coconut
contracts_path = /home/travis/build/DECODEproject/credential-issuer/app/coconut_contracts
secret = 615872afdb35a291f56166d63399d0fa1f2a37415b24206fb051dbce294afc5c

ALGORITHM = HS256
Expand Down

0 comments on commit 9b00c69

Please sign in to comment.