├── dependencies.md ├── pyxpub.db ├── pyxpub.sh ├── react ├── favicon.ico ├── asset-manifest.json ├── manifest.json ├── index.html ├── service-worker.js └── static │ └── css │ ├── main.681d9f5a.css │ ├── main.c225d4a2.css │ ├── main.681d9f5a.css.map │ └── main.c225d4a2.css.map ├── setup.sh ├── docs ├── README.md └── index.html ├── static └── js │ ├── script.js │ └── jquery.min.js ├── examples └── jquery │ ├── index.html │ └── script.js ├── views └── qr.html ├── requirements.txt ├── mtbottle.py ├── mtwsgi.py ├── raspbian.sh ├── exchangerate.py ├── verify_tx.py ├── README.md ├── xpub.py └── LICENSE /dependencies.md: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | 3 | * python 3.6 4 | -------------------------------------------------------------------------------- /pyxpub.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acidsploit/pyxpub/HEAD/pyxpub.db -------------------------------------------------------------------------------- /pyxpub.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source env/bin/activate 4 | python ./xpub.py 5 | -------------------------------------------------------------------------------- /react/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acidsploit/pyxpub/HEAD/react/favicon.ico -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | virtualenv -p python3 env 4 | source env/bin/activate 5 | pip install -r requirements.txt 6 | touch key.list 7 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Pyxpyb - Private Payment Gateway 2 | [https://acidsploit.github.io/pyxpub/](https://acidsploit.github.io/pyxpub/) 3 | 4 | 5 | -------------------------------------------------------------------------------- /static/js/script.js: -------------------------------------------------------------------------------- 1 | function copyToClipboard(element) { 2 | var $temp = $(""); 3 | $("body").append($temp); 4 | $temp.val($(element).text()).select(); 5 | document.execCommand("copy"); 6 | $temp.remove(); 7 | } 8 | -------------------------------------------------------------------------------- /react/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "static/css/main.681d9f5a.css", 3 | "main.css.map": "static/css/main.681d9f5a.css.map", 4 | "main.js": "static/js/main.f8130d6b.js", 5 | "main.js.map": "static/js/main.f8130d6b.js.map" 6 | } -------------------------------------------------------------------------------- /examples/jquery/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |{copy}
16 |{addr}
17 |{label}
18 | 19 | 20 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | alembic==1.0.7 2 | banal==0.4.2 3 | base58==1.0.3 4 | bottle==0.12.16 5 | cashaddress==1.0.5 6 | certifi==2018.11.29 7 | chardet==3.0.4 8 | dataset==1.1.2 9 | Django==2.1.7 10 | idna==2.8 11 | image==1.5.27 12 | jaraco.functools==2.0 13 | Mako==1.0.7 14 | MarkupSafe==1.1.0 15 | more-itertools==6.0.0 16 | normality==1.0.0 17 | parse==1.11.1 18 | Paste==3.0.6 19 | Pillow==5.4.1 20 | pip==19.0.2 21 | portend==2.3 22 | pycoin==0.80 23 | PyICU==2.2 24 | python-dateutil==2.8.0 25 | python-editor==1.0.4 26 | pytz==2018.9 27 | qrcode==6.1 28 | requests==2.21.0 29 | setuptools==40.8.0 30 | six==1.12.0 31 | SQLAlchemy==1.2.18 32 | stuf==0.9.16 33 | tempora==1.14 34 | urllib3==1.24.1 35 | wheel==0.33.0 36 | -------------------------------------------------------------------------------- /mtbottle.py: -------------------------------------------------------------------------------- 1 | '''Multithreading Bottle server adapter.''' 2 | 3 | import bottle 4 | import mtwsgi 5 | 6 | class MTServer(bottle.ServerAdapter): 7 | def run(self, handler): 8 | thread_count = self.options.pop('thread_count', None) 9 | server = mtwsgi.make_server(self.host, self.port, handler, thread_count, **self.options) 10 | server.serve_forever() 11 | 12 | 13 | 14 | if __name__ == '__main__': 15 | import bottle 16 | import time 17 | 18 | app = bottle.Bottle() 19 | 20 | @app.route('/') 21 | def foo(): 22 | time.sleep(2) 23 | return 'hello, world!\n' 24 | 25 | app.run(server=MTServer, host='0.0.0.0', port=8080, thread_count=3) 26 | 27 | # or: 28 | # httpd = mtwsgi.make_server('0.0.0.0', 8080, app, 3) 29 | # httpd.serve_forever() 30 | 31 | -------------------------------------------------------------------------------- /react/index.html: -------------------------------------------------------------------------------- 1 |Pyxpyb - Private Payment Gateway
9 | 10 |12 | Pyxpub is a simple self-hosted webapp that generates unique payment requests for Bitcoin Cash. It can do this as a simple webpage with a Bitcoin Cash address and corresponding QR code or as a JSON request. It can be accessed directly, be embedded in a webpage through an iframe, or you can do JSON requests through the API. All generated Bitcoin Cash addresses are derived from a pre-defined (Electron Cash) xpub key. 13 |
14 |
28 | curl 'http://localhost:8080/payment?amount=0.0023&label=SHOP:1Wed2B44'
29 |
30 | {
31 | "payment": {
32 | "amount": "0.0023",
33 | "addr": "bitcoincash:qpej4uw429m9m0wawcphw9v4sch2ymd6qsqh7jx9gl",
34 | "legacy_addr": "1BVx9uf5UGJDt1eMqjut8qh1K4mmEeDSFQ",
35 | "label": "SHOP:1Wed2B44",
36 | "qr_img": "/qr?addr=bitcoincash:qpej4uw429m9m0wawcphw9v4sch2ymd6qsqh7jx9gl&amount=0.0023&label=SHOP:1Wed2B44",
37 | "payment_uri": "bitcoincash:qpej4uw429m9m0wawcphw9v4sch2ymd6qsqh7jx9gl?amount=0.0023&message=SHOP:1Wed2B44"
38 | }
39 | }
40 |
41 |
42 | <iframe width=100% height=450px scrolling="no" frameborder=0 src="https://donate.devzero.be"></iframe>
45 |
46 |
47 | With amount & label parameters
48 | <iframe width=100% height=470px scrolling="no" frameborder=0 src="https://donate.devzero.be/?amount=0.0123&label=MESG456"></iframe>
49 |
50 |