x 7c5390c899 contract/money: Implement Money::BurnV1 function 5 bulan lalu
..
src 7c5390c899 contract/money: Implement Money::BurnV1 function 5 bulan lalu
.gitignore 91cbe8375a sdk/python: chore clippy and .gitignore cleanup 1 tahun lalu
Cargo.toml d18de935ac sdk/python: Update to latest pyo3 7 bulan lalu
Makefile bda805e5ff sdk/python: Remove obsolete message in Makefile. 3 tahun lalu
README.md 988455f79b sdk/python: Perform full code cleanup and make everything work. 3 tahun lalu
pyproject.toml 073b83320c src/sdk/python: create python bindings for transaction, contract, contract function call parameters with the aim of decoding darkfid txs from python scripts 9 bulan lalu

README.md

darkfi-sdk-py

Python bindings for some parts of the darkfi-sdk and the zkvm.

Build and install

  1. Install maturin via your package manager or from source.
  2. Run make to build the wheel
  3. (Optional) Run pip install --user
  4. Development

    For a development version you can use a venv:

    $ python3 -m venv venv
    $ source venv/bin/activate
    (venv) $ make dev
    

    Usage

    $ python
    >>> import darkfi_sdk
    >>> from darkfi_sdk.pasta import Fp
    >>> a = Fp.from_u64(42)
    >>> b = Fp.from_u64(69)
    >>> a + b == Fp.from_u64(111)
    

    Randomness

    Note that the random methods take randomness from the OS on the Rust side.