-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Chain | ||
===== | ||
Blockchain is in fact what stored in ``Storage``. But handling operations like | ||
traversing the chain and verifying blocks is not the idea of desiging storage. | ||
To make some higher level operations and make a unified source of truth, | ||
``Chain`` class is placed between storage and higher level class that do the | ||
main job. | ||
|
||
.. autoclass:: pyzantium.Chain | ||
:members: |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
API Reference | ||
============= | ||
|
||
Api reference of pyzantium is presented here | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
storage.rst | ||
chain.rst | ||
verify.rst |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Storage | ||
======= | ||
|
||
.. automodule:: pyzantium.storage | ||
|
||
.. autoclass:: pyzantium.storage.Storage | ||
.. autoclass:: pyzantium.storage.DiskStorage |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Verifying | ||
========= | ||
An important concept in blockchain is the authority of data that are stored in | ||
the blocks. Common scheme to verify authority of data in blockchain is using | ||
Elliptic Curve Cryptography (ECC), but other types of authority checking schemes | ||
are applicable. | ||
|
||
Verifying authority in pyzantium is implemented using an interface called | ||
``Verifier``. currently ECC is implemented using Cryptography package. you can | ||
add your own scheme of verifying by sublassing ``Verifier`` and implemente | ||
``verify`` method to return ``True`` when data authority is approved and return | ||
``Flase`` otherwise. | ||
|
||
.. autoclass:: pyzantium.verify.Verifier | ||
:members: | ||
|
||
Elliptic curve verification is implementation using ``ECCVerifier`` class: | ||
|
||
.. autoclass:: pyzantium.verify.ECCVerifier | ||
|
||
Someone may don't need verification at all. So using ``VoidVerifier`` is the answer: | ||
|
||
.. autoclass:: pyzantium.verify.VoidVerifier |
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