-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(ethereum): 📖 update documentation with new statements
- Loading branch information
1 parent
7f6bb2a
commit fe0964e
Showing
6 changed files
with
62 additions
and
54 deletions.
There are no files selected for viewing
50 changes: 27 additions & 23 deletions
50
docs/examples/zencode_cookbook/ethereum/signature_array.data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
{ | ||
"addresses": [ | ||
"0x2B8070975AF995Ef7eb949AE28ee7706B9039504", | ||
"0x3028806AC293B5aC9b863B685c73813626311DaD", | ||
"0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a" | ||
], | ||
"signatures": [ | ||
{ | ||
"r": "ed8f36c71989f8660e8f5d4adbfd8f1c0288cca90d3a5330b7bf735d71ab52fe", | ||
"s": "7ba0a7827dc4ba707431f1c10babd389f658f8e208b89390a9be3c097579a2ff", | ||
"v": "27" | ||
}, | ||
{ | ||
"r": "40d305373c648bb6b2bbadebe02ada256a9d0b3d3c37367c0a2795e367b22f73", | ||
"s": "72e40dfc3497927764d1585783d058e4367bb4d24d2107777d7aa4ddcb6593c7", | ||
"v": "27" | ||
}, | ||
{ | ||
"r": "9e07477c31db612e8c99a950385162373ff41a5b8941470b1aeba43b76c53570", | ||
"s": "05fce6615567dc1944cc02fbed86202b09d92d79fbade425af0d74c328d8f6ae", | ||
"v": "28" | ||
} | ||
], | ||
"signed-string": "I love the Beatles, all but 3" | ||
"addresses_signatures": [ | ||
{ | ||
"address": "0x2B8070975AF995Ef7eb949AE28ee7706B9039504", | ||
"signature": { | ||
"r": "ed8f36c71989f8660e8f5d4adbfd8f1c0288cca90d3a5330b7bf735d71ab52fe", | ||
"s": "7ba0a7827dc4ba707431f1c10babd389f658f8e208b89390a9be3c097579a2ff", | ||
"v": "27" | ||
} | ||
}, | ||
{ | ||
"address": "0x3028806AC293B5aC9b863B685c73813626311DaD", | ||
"signature": { | ||
"r": "40d305373c648bb6b2bbadebe02ada256a9d0b3d3c37367c0a2795e367b22f73", | ||
"s": "72e40dfc3497927764d1585783d058e4367bb4d24d2107777d7aa4ddcb6593c7", | ||
"v": "27" | ||
} | ||
}, | ||
{ | ||
"address": "0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a", | ||
"signature": { | ||
"r": "9e07477c31db612e8c99a950385162373ff41a5b8941470b1aeba43b76c53570", | ||
"s": "05fce6615567dc1944cc02fbed86202b09d92d79fbade425af0d74c328d8f6ae", | ||
"v": "28" | ||
} | ||
} | ||
], | ||
"signed_string": "I love the Beatles, all but 3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
Scenario ethereum: verify sig | ||
Given I have a 'ethereum address array' named 'addresses' | ||
Given I have a 'ethereum signature array' named 'signatures' | ||
Given I have a 'string' named 'signed-string' | ||
Given I have a 'ethereum address signature pair array' named 'addresses_signatures' | ||
Given I have a 'string' named 'signed_string' | ||
|
||
When I verify the 'signed-string' has an array of ethereum signatures in 'signatures' by 'addresses' | ||
When I verify the ethereum address signature pair array 'addresses_signatures' of 'signed_string' | ||
|
||
Then print the string 'ok' |
46 changes: 26 additions & 20 deletions
46
docs/examples/zencode_cookbook/ethereum/verification_result.data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
{ | ||
"addresses": [ | ||
"0x2B8070975AF995Ef7eb949AE28ee7706B9039504", | ||
"0x3028806AC293B5aC9b863B685c73813626311DaD", | ||
"0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a", | ||
"0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a" | ||
], | ||
"signatures": [ | ||
"addresses_signatures": [ | ||
{ | ||
"r": "ed8f36c71989f8660e8f5d4adbfd8f1c0288cca90d3a5330b7bf735d71ab52fe", | ||
"s": "7ba0a7827dc4ba707431f1c10babd389f658f8e208b89390a9be3c097579a2ff", | ||
"v": "27" | ||
"address": "0x2B8070975AF995Ef7eb949AE28ee7706B9039504", | ||
"signature": { | ||
"r": "ed8f36c71989f8660e8f5d4adbfd8f1c0288cca90d3a5330b7bf735d71ab52fe", | ||
"s": "7ba0a7827dc4ba707431f1c10babd389f658f8e208b89390a9be3c097579a2ff", | ||
"v": "27" | ||
} | ||
}, | ||
{ | ||
"r": "40d305373c648bb6b2bbadebe02ada256a9d0b3d3c37367c0a2795e367b22f73", | ||
"s": "72e40dfc3497927764d1585783d058e4367bb4d24d2107777d7aa4ddcb6593c7", | ||
"v": "27" | ||
"address": "0x3028806AC293B5aC9b863B685c73813626311DaD", | ||
"signature": { | ||
"r": "40d305373c648bb6b2bbadebe02ada256a9d0b3d3c37367c0a2795e367b22f73", | ||
"s": "72e40dfc3497927764d1585783d058e4367bb4d24d2107777d7aa4ddcb6593c7", | ||
"v": "27" | ||
} | ||
}, | ||
{ | ||
"r": "9e07477c31db612e8c99a950385162373ff41a5b8941470b1aeba43b76c53570", | ||
"s": "05fce6615567dc1944cc02fbed86202b09d92d79fbade425af0d74c328d8f6ae", | ||
"v": "28" | ||
"address": "0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a", | ||
"signature": { | ||
"r": "9e07477c31db612e8c99a950385162373ff41a5b8941470b1aeba43b76c53570", | ||
"s": "05fce6615567dc1944cc02fbed86202b09d92d79fbade425af0d74c328d8f6ae", | ||
"v": "28" | ||
} | ||
}, | ||
{ | ||
"r": "9e07477c31db612e8c99a950385162373ff41a5b8941470b1aeba43b76c53570", | ||
"s": "05fce6615567dc1944cc02fbed86202b09d92d79fbade425af0d74c328d8f6ae", | ||
"v": "27" | ||
"address": "0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a", | ||
"signature": { | ||
"r": "9e07477c31db612e8c99a950385162373ff41a5b8941470b1aeba43b76c53570", | ||
"s": "05fce6615567dc1944cc02fbed86202b09d92d79fbade425af0d74c328d8f6ae", | ||
"v": "27" | ||
} | ||
} | ||
], | ||
"signed-string": "I love the Beatles, all but 3" | ||
"signed_string": "I love the Beatles, all but 3" | ||
} |
2 changes: 1 addition & 1 deletion
2
docs/examples/zencode_cookbook/ethereum/verification_result.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"verification_result":[{"address":"0x2B8070975AF995Ef7eb949AE28ee7706B9039504","status":"verified"},{"address":"0x3028806AC293B5aC9b863B685c73813626311DaD","status":"verified"},{"address":"0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a","status":"verified"},{"address":"0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a","status":"not verified"}]} | ||
{"result_array":[{"address":"0x2B8070975AF995Ef7eb949AE28ee7706B9039504","status":"verified"},{"address":"0x3028806AC293B5aC9b863B685c73813626311DaD","status":"verified"},{"address":"0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a","status":"verified"},{"address":"0xe1C2F1ACb2758c4D88EDb84e0306A0a96682E62a","status":"not verified"}]} |
9 changes: 4 additions & 5 deletions
9
docs/examples/zencode_cookbook/ethereum/verification_result.zen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
Scenario ethereum: verify sig | ||
Given I have a 'ethereum address array' named 'addresses' | ||
Given I have a 'ethereum signature array' named 'signatures' | ||
Given I have a 'string' named 'signed-string' | ||
Given I have a 'ethereum address signature pair array' named 'addresses_signatures' | ||
Given I have a 'string' named 'signed_string' | ||
|
||
When I create the verification result verifying the 'signed-string' has an array of ethereum signatures in 'signatures' by 'addresses' | ||
When I use the ethereum address signature pair array 'addresses_signatures' to create the result array of 'signed_string' | ||
|
||
Then print the 'verification result' | ||
Then print the 'result_array' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters