svelte-store-webmonetization Svelte Themes

Svelte Store Webmonetization

Svelte Store Web Monetization

A Svelte store for listening to changes to Web Monetization.

Usage

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)}

Setup Web Monetization

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.

See Also

License

This plugin is released under the MIT License.

Top categories

Loading Svelte Themes