A Python SDK for CodeChain.
Not prepared
- Use
Black
_ to autoformat your code. This should be done for you as a gitpre-commit
_ hook.
- Clone your GitHub fork locally:
- Add the main repository as a remote to update later:
- Create a virtualenv using pipenv:
$ make init
- Install the pre-commit hooks:
$ pre-commit install --install-hooks
- Install the dependency using pipenv
- In the test environment
$ pipenv install [package] --dev
- In the production
$ pip3 install [package]
and specify it to the setup.py
- lock the dependency
$ pipenv lock
$ make test
Python implementation of crypto functions and classes used in CodeChain.
-
sign_schnorr
-
verify_schnorr
-
recover_schnorr
-
sign_ecdsa
-
verify_ecdsa
-
recover_ecdsa
-
blake256, blake256_with_key, blake160, blake160_with_key, blake128, blake128_with_key
-
ripemd160
-
get_public_from_private
-
generate_private_key
codechain-rpc is a Python module that calls RPC to a CodeChain node.
You can find the RPC list in this link.
Python functions and classes for CodeChain's primitives.
- to_hex
- get_account_id_from_private
- get_account_id_from_public
- to_locale_string
- H128, H160, H256, H512
- U64, U128, U256
- AssetAddres
- PlatformAddress
codechain-keystore is a private key management module. It saves CodeChain's asset transfer address safely in a disk. If you want to manage CodeChain keys using python, you should use this.
We use a JSON file to save an encrypted private key. You can find the file in ./keystore.db
.