Skip to content

Commit

Permalink
[Fix] Fix SDK RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
iamalwaysuncomfortable authored Jan 4, 2024
2 parents 8edd0c5 + eaeffdc commit d9cc20b
Show file tree
Hide file tree
Showing 5 changed files with 542 additions and 326 deletions.
4 changes: 2 additions & 2 deletions sdk/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
'python': ('https://docs.python.org/3', None)
}

autoapi_dirs = ['../../']
autoapi_file_patterns = ['aleo.pyi']
autoapi_dirs = ['./', '../../python/aleo']
autoapi_file_patterns = ['__init__.pyi']
autoapi_generate_api_docs = True
autoapi_add_toctree_entry = False
autoapi_keep_files = False
Expand Down
14 changes: 14 additions & 0 deletions sdk/docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ Working with accounts
>>> same_account = aleo.Account.from_private_key(private_key)
>>> assert account == same_account

Encrypted key materials
************************************

.. doctest::

>>> ciphertext = aleo.Ciphertext.from_string(
... "ciphertext1qvqt0sp0pp49gjeh50alfalt7ug3g8y7ha6\
... cl3jkavcsnz8d0y9jwr27taxfrwd5kly8lah53qure3vxav\
... 6zxr7txattdvscv0kf3vcuqv9cmzj32znx4uwxdawcj3273\
... zhgm8qwpxqczlctuvjvc596mgsqjxwz37f")
>>> decrypted = aleo.Encryptor.decrypt_private_key_with_secret(ciphertext, "qwe123")
>>> account = aleo.Account.from_private_key(decrypted)
>>> str(account)
'aleo1w58eg85ckl76c0pzzf4mdg2y39t9t7jfvp9u2fvnj2a2t8aquqpqrlycqt'

Working with signatures
***********************
Expand Down
Loading

0 comments on commit d9cc20b

Please sign in to comment.