The Interledger Community 🌱

Michiel de Jong
Michiel de Jong

Posted on

Web Monetization on Solid

My mid-level project is aimed at adding web monetization to Solid, and it's not the only one! At https://github.com/solid/webmonetization you can read more about how the four (soon to be 5!) Solid-related grantees work together to develop a standardized way to monetize content on Solid.

Payment Pointers in Solid OS

A first thing I developed is a way to link from a Solid WebID to a payment pointer. The standard bare profile editor that comes with node-solid-server now has an extra field where the user can specify their payment pointer. This code is merged and deployed live at both solidcommunity.net and inrupt.net:
Solid OS dialog for specifying your payment pointer

The value you enter is stored in RDF using the http://paymentpointers.org/ns#PaymentPointer predicate, and all html views on the pod become web monetized:

Predicate in RDF and Coil browser extension

A pull request is open to make some basic information appear in html at the RDF predicate URL.

Vanity payment pointers in node-solid-server

As a bit of a gimmick, I also added a /.well-known/pay route to node-solid-server (the software running on both solidcommunity.net and inrupt.net):

$ curl -I https://solid-crud-tests-example-1.solidcommunity.net/.well-known/pay
HTTP/1.1 302 Found
X-Powered-By: solid-server/5.6.6
[...]
Location: https://pp.example.com/.well-known/pay
Enter fullscreen mode Exit fullscreen mode

Web Monetization in Solid apps

As I mentioned, we also coordinated some meetings with the other Solid-related grantees, leading to an agreement that we will all use the same predicate as the one I built into Solid OS. That way, when you configure your payment pointer in your pod using Solid OS, and then post content on for instance Understory or Darcy (social networks that use Solid for user data hosting), the html page people see when reading your post, will have a meta tag with your payment pointer in it.

Understory Garden

For Understory the predicate initially used a different predicate, but it was recently aligned with Solid OS.

Darcy Social

For Darcy Social, it will be possible to monetise content using this PR, although unfortunately this has not been merged and deployed yet.

Stay tuned for more goodies in my next grant report!

Top comments (0)