A Svelte store for listening to changes to Web Monetization.
npm install -D svelte-store-webmonetization
import webmon from 'svelte-store-webmonetization';
{#if $webmon.monetized}
<h1>Premium Content Unlocked</h1>
{/if}
Web Monetization: {JSON.stringify($webmon)}
This assumes that you have a payment pointer setup on your app.html
:
<meta name="monetization" content="$ilp.uphold.com/fWWxqr4H9rHa" />
For more information see Web Monetization.
This plugin is released under the MIT License.