Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 2.14 KB

README.md

File metadata and controls

76 lines (49 loc) · 2.14 KB

Payjoin

Welcome to the Python language bindings for the Payjoin Dev Kit! Let's get you up and running with some smooth transactions and a sprinkle of fun.

Install from PyPI

Grab the latest release with a simple:

pip install payjoin

Running Unit Tests

Follow these steps to clone the repository and run the unit tests:

git clone https://github.com/LtbLightning/payjoin-ffi.git
cd python

# Install dependencies
pip install --requirement requirements.txt
pip install python-bitcoinlib

# Build the wheel
python setup.py bdist_wheel --verbose

# Force reinstall payjoin
pip install ./dist/payjoin-<version>.whl --force-reinstall

# Run unit tests
python -m unittest --verbose test/payjoin_unit_test.py

Running the Integration Test

Before diving into the integration test, you'll need to set up Bitcoin Core on the regtest network. If you don't have Bitcoin Core installed locally, check out this installation guide. Alternatively, you can use Nigiri Bitcoin, a tool designed to streamline the process of running local instances of Bitcoin and Liquid networks for development and testing. Follow the instructions here to install it on your machine.

Now, proceed with the integration test:

git clone https://github.com/LtbLightning/payjoin-ffi.git
cd python

# Install dependencies
pip install --requirement requirements.txt
pip install python-bitcoinlib

# Build the wheel
python setup.py bdist_wheel --verbose

# Force reinstall payjoin
pip install ./dist/payjoin-<version>.whl --force-reinstall

# Run the integration test
python -m unittest --verbose test/payjoin_integration_test.py

Building the Package

# Install dependencies
pip install --requirement requirements.txt

# Generate the bindings (use the script appropriate for your platform)
bash ./scripts/generate_macos.sh

# Build the wheel
python setup.py --verbose bdist_wheel

We hope everything worked smoothly! Now go forth test, and may your test results be as reliable as the Bitcoin blockchain itself! ₿🔒🤝