This is a drop-in embeddable javascript widget that allows Stacks apps to accept Bitcoin Lightning on their websites via https://lnswap.org API.
- Host website includes the widget js on a static html page.
- Host website triggers the swap widget by including required parameter e.g. user's address, swap amount etc.
- User follows the instructions to pay with Bitcoin Lightning.
- Swap is completed trustlessly, user does contract call on Stacks with a payment on Lightning.
You can view a live demo on mainnet at https://widget.lnswap.org
Documentation on how the widget can be embedded and triggered can be found at https://docs.lnswap.org
$ npm install
$ npm run start
$ ./node_modules/.bin/webpack --config webpack.config.js
$ Jest
- Set
mocknetURL
andapiURL
insrc/config.js
to gitpod or other dummy values.
- This widget is based on https://github.com/bjgrosse/simple-embeddable-react-widget
- This work is initially funded by Stacks foundation with a grant.
- LNSwap development is supported by Trust Machines.