Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sbellem committed Jun 22, 2017
1 parent 7a5a4a5 commit 858f93a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 38 deletions.
20 changes: 20 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Examples
========

Preimage Sha 256
----------------

.. code-block:: python
>>> from cryptoconditions import PreimageSha256
>>> secret = b'Beware! Trying to understand crypto can lead to knowledge intoxications.'
>>> fulfillment = PreimageSha256(preimage=secret)
>>> fulfillment.condition_uri
'ni:///sha-256;xumt48hVcQEXuUx2p2GqVgO4mpq9O_FIYmjb258CkZM?fpt=preimage-sha-256&cost=72'
>>> fulfillment.condition_binary
b'\xa0%\x80 \xc6\xe9\xad\xe3\xc8Uq\x01\x17\xb9Lv\xa7a\xaaV\x03\xb8\x9a\x9a\xbd;\xf1Hbh\xdb\xdb\x9f\x02\x91\x93\x81\x01H'
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Contents:
:maxdepth: 1

installation
examples
libref


Expand Down
68 changes: 30 additions & 38 deletions docs/libref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,59 +34,51 @@ Base Modules
.. automodule:: cryptoconditions.exceptions


Types Modules
=============
Schemas Modules
===============

``base_sha256``
---------------
.. automodule:: cryptoconditions.types.base_sha256
``condition``
-------------
.. automodule:: cryptoconditions.schemas.condition

``fulfillment``
---------------
.. automodule:: cryptoconditions.schemas.fulfillment

``ed25519``
-----------
.. automodule:: cryptoconditions.types.ed25519
:special-members: __init__
``fingerprint``
---------------
.. automodule:: cryptoconditions.schemas.fingerprint

``inverted_threshold_sha256``
-----------------------------
.. automodule:: cryptoconditions.types.inverted_threshold_sha256
:special-members: __init__

Types Modules
=============

``sha256``
----------
.. automodule:: cryptoconditions.types.sha256
``base_sha256``
---------------
.. automodule:: cryptoconditions.types.base_sha256


``threshold_sha256``
--------------------
.. automodule:: cryptoconditions.types.threshold_sha256
``preimage``
------------
.. automodule:: cryptoconditions.types.preimage


``timeout``
-----------
.. automodule:: cryptoconditions.types.timeout
``prefix``
------------
.. automodule:: cryptoconditions.types.prefix


Lib Modules
===========
``threshold``
-------------
.. automodule:: cryptoconditions.types.threshold

``hasher``
----------
.. automodule:: cryptoconditions.lib.hasher
:special-members: __init__

``predictor``
``rsa``
-------------
.. automodule:: cryptoconditions.lib.predictor
:special-members: __init__
.. automodule:: cryptoconditions.types.rsa

``reader``
----------
.. automodule:: cryptoconditions.lib.reader
:special-members: __init__

``writer``
----------
.. automodule:: cryptoconditions.lib.writer
``ed25519``
-----------
.. automodule:: cryptoconditions.types.ed25519
:special-members: __init__

0 comments on commit 858f93a

Please sign in to comment.