{"id":25716318,"url":"https://github.com/interledgerjs/ilp-wm-provider","last_synced_at":"2025-05-05T20:45:40.600Z","repository":{"id":67177264,"uuid":"149188363","full_name":"interledgerjs/ilp-wm-provider","owner":"interledgerjs","description":"Personal Web Monetization provider using Moneyd","archived":false,"fork":false,"pushed_at":"2018-09-18T00:02:17.000Z","size":766,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T23:31:34.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interledgerjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-17T21:09:26.000Z","updated_at":"2021-08-28T23:50:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"dbee6fd3-175f-4e26-80bd-e39b4f467c8f","html_url":"https://github.com/interledgerjs/ilp-wm-provider","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Filp-wm-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Filp-wm-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Filp-wm-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Filp-wm-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledgerjs","download_url":"https://codeload.github.com/interledgerjs/ilp-wm-provider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252574464,"owners_count":21770407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-25T14:52:58.963Z","updated_at":"2025-05-05T20:45:40.594Z","avatar_url":"https://github.com/interledgerjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ILP Web Monetization Provider\n\u003e Enable Web Monetization using your own Interledger connection\n\n_This tool is intended for experienced users, because it requires a knowledge of the\ncommand line and Interledger tools like Moneyd._\n\n**Warning: Use this at your own risk! This software will automatically send micropayments to sites that you visit, which could cost you money! Don't fund your wallet with more than you're willing to risk.**\n\nThis repo allows you to use Web Monetization without a Coil subscription. It does\nthis by implementing [the standard for a Web Monetization\nprovider](https://github.com/interledger/rfcs/blob/master/0028-web-monetization/0028-web-monetization.md#web-monetization-handler-api)\nand running all of the infrastructure on your local machine. For ILP\nconnectivity it uses [moneyd](https://github.com/interledgerjs/moneyd).\n\nThe reason this code is being released is to allow people an alternative to Coil\nif they want to use their own funds directly instead of paying a subscription, and\nto serve as an example of how to implement a Web Monetization handler.\n\n`ilp-wm-provider` differs from a Coil subscription in a few key ways:\n\n1. Rather than paying a flat rate to Coil, you pay directly to the site out of\npocket.\n\n2. This requires the use of Moneyd on your machine, which currently means you\nneed an XRP wallet. It also requires that an additional `ilp-wm-provider`\nprocess is run.\n\n3. Coil's servers are not touched in the process of payment. Only the public\nInterledger infrastructure is used.\n\n4. There is no chrome extension for this Web Monetization provider. Just like\nCoil, it can work without an extension. Make sure you don't have the Coil\nextension installed, because it will register itself over this handler.\n\n## Setup\n\n### Prerequisites\n\n- Node.js version 8 or higher.\n- [Moneyd should be installed and running on the livenet](https://medium.com/interledger-blog/joining-the-live-ilp-network-eab123a73665)\n\n### Clone `ilp-wm-provider`\n\n```sh\ngit clone https://github.com/sharafian/ilp-wm-provider.git\ncd ilp-wm-provider\nnpm install\nnpm run build\n```\n\n### Generate Certs\n\nWM providers must run over HTTPS. However, `ilp-wm-provider` runs locally.\nThis means that you'll need a self-signed certificate.\n\n```sh\n# Generate root ssl cert.  When it asks you to generate a password remember\n# what you put; you'll need it to sign your cert.  You can enter 'Example' on\n# any of the other questions where it prompts you\nopenssl genrsa -des3 -out ./cert/rootCA.key 2048\nopenssl req -x509 -new -nodes -key ./cert/rootCA.key -sha256 -days 1024 -out ./cert/rootCA.pem\n\n# Generate domain ssl cert\nopenssl req -new -sha256 -nodes -out ./cert/server.csr -newkey rsa:2048 -keyout ./cert/server.key -config \u003c( cat ./cert/server.csr.cnf )\nopenssl x509 -req -in ./cert/server.csr -CA ./cert/rootCA.pem -CAkey ./cert/rootCA.key -CAcreateserial -out ./cert/server.crt -days 500 -sha256 -extfile ./cert/v3.ext\n```\n\n### Trust Certs\n\nNow you have to add your certificate authority to your browser so you can use\nit on websites. These instructions are for google chrome, but there exist similar\noptions on any other browser that can be found with some googling.\n\nFirst, open the \"Advanced\" settings in google chrome on\n[`chrome://settings`](chrome://settings).\n\n![chrome settings](./docs/show_advanced.png)\n\nNext, go to \"Manage Certificates.\"\n\n![manage certs](./docs/manage_certs.png)\n\nOnce you're there, go to the \"Authorities\" tab and click \"Import.\"\n\n![import cert](./docs/authorities.png)\n\nNavigate to the `rootCA.pem` file in the `cert` folder in this repository.\n\n![select pem](./docs/select_ca.png)\n\nSelect \"Trust this certificate for identifying websites,\" and then confirm by\nhitting \"OK.\"\n\n![trust ca](./docs/trust_ca.png)\n\nNow your server will be able to run SSL locally!\n\n### Start the Provider\n\nNow you can run your provider with:\n\n```sh\nnpm start\n```\n\nNavigate to [https://localhost:7771](https://localhost:7771) and click \"Register Handler.\" Once you confirm, you'll be able to use Web Monetization!\n\n## Environment Variables\n\n- `WEB_PORT` - Which port to run the webserver on (default `7771`)\n\n- `WS_PORT` - Which port to run the BTP server on (default `7772`)\n\n- `MONEYD_URI` - The uri to connect to for moneyd access (default `btp+ws://localhost:7768`)\n\n- `THROUGHPUT` - Throughput in units/second. These are the same units as your\n  moneyd. The default value is `100`, which would be 100 drops/second on\nmoneyd-uplink-xrp.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledgerjs%2Filp-wm-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledgerjs%2Filp-wm-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledgerjs%2Filp-wm-provider/lists"}