- 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
- Create virtual environment:
python -m venv ./venv
- Activate virtual environment:
source venv/bin/activate
- Install the project dependencies:
pip install -r requirements.txt
Do only 3. step from setup.
deactivate
Copy template:
cp template.env .env
And modify variables there
There are two main entry points to main functionality of this lib:
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.
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.
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