Skip to content

fullstack-development/zk-mixuper-admin

Repository files navigation

Admin tools for zk-mixuper

Local development with IDE

First time setup

  1. Pin python version to Python 3.11.2: If you don't have pyenv install it with this guide. Then run:
pyenv install -v 3.11.2
pyenv local 3.11.2
  1. Create virtual environment:
python -m venv ./venv
  1. Activate virtual environment:
source venv/bin/activate
  1. Install the project dependencies:
pip install -r requirements.txt

Activation (after you've done first time setup only activation is necessary)

Do only 3. step from setup.

Deactivation

deactivate

Prepare environment

Copy template:

cp template.env .env

And modify variables there

Pycardano off-chain mixer

There are two main entry points to main functionality of this lib:

  1. A class for starting new mixer.
  2. A class for using already created mixer.

Other functionality includes a helper to mint NFTs; and also a owner script implementation. OwnerScript exists just to query owner wallet for a UTxO to reference during mixer NFT (protocol token) mint.

Mixer script compilation & other preparations

First mixer owner should create an mixer, so he needs to generate a pair of keys for his wallet. Also he needs to compile mixer script, therefore he first needs to prepare script parameters. It is done with this runner:

python print_mixer_start_params.py

It will generate and print important parameters which should be saved for later use. First, they are used as a mixer script parameter MixerConfig.

After that owner needs to copy printed parameters and consult on-chain deposit readme and withdraw readme.

Printed parameters are supplied to minting policy. Then, to know minting policy id run:

python print_minting_policy_hash.py

This will provided another parameter for on-chain scripts, to compile them.

Mixer related transactions

Starting mixer

Owner wallet needs to run:

python run_mint.py
python run_start.py
python run_deploy_deposit.py
python run_deploy_withdraw.py
python update_configuration.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages