✨ Announcing Open Monetization Wallet - my GFTW Hackathon project
Tags: gftwhackathon, showdev
Published: 2020-05-21 15:02:34

Hey dev.to! 👋 I'm super excited to announce the first release of [Open Monetization Wallet](https://github.com/signalnerve/openmonetizationwallet) (OMW), a tool I built as part of the [Grant For The Web Hackathon](https://dev.to/devteam/announcing-the-grant-for-the-web-hackathon-on-dev-3kd1). 

OMW makes it easier to accept payments with the Web Monetization API at scale, including support for:

- Custom wallet URLs: own your own ["Payment Pointer"](https://paymentpointers.org/), e.g. `$wallet.signalnerve.com`, instead of `$pay.stronghold.co/abcdef123`
- Change between wallets/providers with no downtime
- Logs of incoming payment requests
- Revenue sharing between multiple wallets, e.g. for multiple team members
- Infinitely scalable with serverless technology
- Free and open-source

![Example Image](https://dev-to-uploads.s3.amazonaws.com/i/eo3h0i1jor9wlr33bv72.png)

If you want to poke around at the interface, I've set up a demo instance - check it out at [omw-demo.signalnerve.workers.dev](https://omw-demo.signalnerve.workers.dev/admin)!

I'm super interested in the Web Monetization standard, and one thing that stuck out to me immediately when reading through the documentation was the opportunity to simplify ["Payment Pointers"](https://paymentpointers.org/). 

If you've signed up for a wallet on Stronghold or other wallet providers, you'll know that the URL is pretty hard to remember, and _non-durable_: if you make a new wallet URL, or switch providers, you'll need to go and update every time you use the wallet URL across your projects. OMW provides a "vanity URL", meaning that you can deploy it somewhere like `$wallet.signalnerve.com`. This means that you can swap out your wallet URL with no downtime and avoid the worst-case scenario: your wallet URL silently failing and missing out on the chance to get paid for your work.

OMW also has support for revenue sharing, so you can add a number of users (for instance, multiple members of your team), and incoming payments will be distributed between your team members' wallets. For instance, you can evenly divide payments between a developer and designer (a 50/50 split), or even weigh the revenue share so that one member gets 90% of the payments, and the other gets 10%. 

All of this happens behind a single vanity URL, so you can change the revenue sharing and number of users without ever leaving the OMW admin interface!

![Defining revenue share](https://dev-to-uploads.s3.amazonaws.com/i/4q5pgai42shykxkzx7e4.png)

I chose to use [Cloudflare Workers](https://workers.dev) for building the first version of OMW, and I'm really happy with the results. OMW is deployed with serverless technology, so if a thousand people who all have the Coil extension visit your site, the wallet will scale gracefully. Workers KV is used as both a JAMstack deployment platform (hosting the Gatsby admin interface) and as a lightweight database, allowing you to store wallet information and even logs about incoming payments without needing to spin up an external database.

_Disclosure: I work as the developer advocate for Cloudflare Workers! Regardless, I still would have picked Workers for this project :)_

I made a quick video to show off the basics of OMW, and you can check the source [on GitHub](https://github.com/signalnerve/openmonetizationwallet) (it's 100% open-source and free) to see how it's built.

{% youtube wbIMUJSp5bY %}

I'm using OMW on [bytesized.xyz](https://www.bytesized.xyz), so if you're using [Coil](https://coil.com) or something similar to pay creators, you should see an indicator that your Coil account is streaming payments to my vanity OMW wallet. I already made two cents during my testing of the site - woo-hoo!

![My first Web Monetization deposit](https://dev-to-uploads.s3.amazonaws.com/i/ou8umqbnpijmkdfhgjgl.png)

<small>My first deposit into my Web Monetization wallet, powered by OMW!</small>

As I mentioned above, OMW is open-source, and I have more things planned for the project over the next few weeks. Check out the issue tracker if you're interested in contributing, and if you want to run it yourself, [the README on GitHub](https://github.com/signalnerve/openmonetizationwallet) has everything you need to get up and running.

Expect the ride between pre-release (< 1.0.0) to be a little bumpy, as I'll be working on making it easier to deploy the project without needing to install dependencies locally, and the way that the project is set up is bound to change slightly.

Thanks to the dev.to team for this awesome hackathon, and I'm looking forward to seeing everyone else's projects. Happy coding!

_Update: thanks to everyone who's been checking out this project! Sharing some of my favorite tweets about it below:_

{% twitter 1263867746644828166 %}
{% twitter 1263839786336268288 %}

---

_This section fills out the template for a GFTW Hackathon submission – it's copy-pasted from the above blog post_

## What I built

OMW makes it easier to accept payments with the Web Monetization API at scale, including support for:

- Custom wallet URLs: own your own ["Payment Pointer"](https://paymentpointers.org/), e.g. `$wallet.signalnerve.com`, instead of `$pay.stronghold.co/abcdef123`
- Change between wallets/providers with no downtime
- Logs of incoming payment requests
- Revenue sharing between multiple wallets, e.g. for multiple team members
- Infinitely scalable with serverless technology
- Free and open-source

### Submission Category: 

Foundational technology

## Demo

{% youtube wbIMUJSp5bY %}

https://omw-demo.signalnerve.workers.dev/admin/

## Link to Code

{% github signalnerve/openmonetizationwallet %}


## How I built it 

I chose to use [Cloudflare Workers](https://workers.dev) for building the first version of OMW, and I'm really happy with the results. OMW is deployed with serverless technology, so if a thousand people who all have the Coil extension visit your site, the wallet will scale gracefully. Workers KV is used as both a JAMstack deployment platform (hosting the Gatsby admin interface) and as a lightweight database, allowing you to store wallet information and even logs about incoming payments without needing to spin up an external database.

Technology used:

- Cloudflare Workers
- Workers KV
- Gatsby
- GitHub Actions
- Tailwind UI

## Additional Resources/Info 

(see repo link and demo video above!)