Revshare.js 💸

Find on NPM or Unpkg.
Created by Kewbish.



Here's how to get started.

Revshare.js works with the proposed Web Monetization API.


Step 1. Add Revshare.js

Add a script tag in your head, referencing either the script in the node_modules dist folder, or the unpkg CDN.

<script src="https://unpkg.com/@kewbish/revshare"></script>

Step 2. Add a <rev-share> element

Add a rev-share tag. Required is a pointers attribute, which will include a JSON-formatted mapping of wallet to percentage pointer

<rev-share pointers='[{"$bob.wallet": 50, "$alice.wallet": 50}]'>
    ...
</rev-share>

Step 3. Sit back, and relax.

Revshare.js will take care of adding, updating, and removing payment pointers. It's based on the probablistic rev-share model outlined on the Web Monetization page.



See more

See the complete docs on the project GitHub. Alternatively, see the repository on GitHub.

This was developed by Kewbish for the Dev.to GFTW Hackathon.