- Generating and public/private key pairs.
- Registering public keys with a PaySwarm Authority.
- Digitally signing and verifying JSON-LD data such as assets and listings.
- Registering assets for sale.
- Registering listings.
- Performing purchases.
- Python (>= 2.5)
- PyCrypto (>= 2.6)
- PyLD (>= 0.1.0)
- argparse (>= 1.2.1)
- urllib3 (>= 1.6)
- ndg-httpsclient (>= 0.3.2)
- pyOpenSSL (>= 0.13)
- pyasn1 (>= 0.1.7)
urllib3 is used by default instead of standard modules due to the Python 2.x
series not supporting SNI. The SNI support in urllib3 requires pyOpenSSL,
ndg-httpsclient, and pyasn1. The code will fallback to using
urllib3 is not available but be aware that SNI support will silently be absent
which can cause confusing errors when fetching network resources.
The easiest installation method is to use
pip install payswarm
To install testing requirements:
pip install -r test-requirements.txt
To configure a PaySwarm client run the following command:
To register a listing:
./payswarm register listings/test.json
To perform a purchase of the listing:
./payswarm purchase listings/test.json
Once you purchase a listing, future purchases of that listing will not charge you any money. You may re-purchase the item by re-registering the asset and listing, which will force a new digital signature on the items, thus allowing you to purchase the newly registered item.
Testing with nose:
Testing with standard
Cleaning up coverage output:
Please see the LICENSE file for full license details.