Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Latest commit

 

History

History
107 lines (84 loc) · 5.82 KB

widget.md

File metadata and controls

107 lines (84 loc) · 5.82 KB

Installation

  1. Add the script to your site.
<script src="https://tonicpow.com/tonic.js"></script>
  1. Replace data-address with your BSV address and place the tag wherever it will be displayed.
<div class="tonic" data-address="YOUR_ADDRESS"></div>

(Optional) Use your RelayX 1handle in place of your wallet address

<div class="tonic" data-relayx="1your-handle"></div>

(Optional) Use your Paymail address in place of your wallet address

<div class="tonic" data-paymail="[email protected]"></div>

(Optional) Use your Handcash 2.0 Handle in place of your wallet address

<div class="tonic" data-handcash="$tonicpow"></div>

Documentation

Checkout our nifty Tonic generator.

This Tonic embed works in relation to the Tonic protocol.

Required attributes are one of the following: data-address or data-handcash or data-relayx

Attribute Example Supported Description
data-address 1BrwAE... Yes Your bitcoin sv wallet address.
data-relayx 1tonicpow Yes Your RelayX 1handle. Used in place of data-address.
data-paymail [email protected] Yes Your paymail address. Used in place of data-address.
data-handcash $tonicpow Yes Your handcash handle. Used in place of data-address.
data-unit-id embed-1 Yes To show multiple units on one page, set each to a unique identifier of your choice.
data-rate 546 Yes Set the rate of sats per block. The default is 546.
data-currency bsv Not yet Set the currency rate (bsv or usd)
data-width 300 Yes Set a custom width. The default is 300px. Minimum is 160x
data-height 250 Yes Set a custom height. The default and minimum is 250px; There is an additional 22px footer.
data-image https://... Yes Default image url if no ad is present
data-url https://... Yes Default click url if no ad is present
data-link-color #FFF Yes Change the link color via CSS value (#007bff)
data-funding true Not yet Toggle funding campaigns, default is true (on)

Handcash Support (Deprecated)

This feature has been deprecated by handcash. We support new handcash handles that have related paymail addresses.

RelayX 1handle Support

This Tonic embed script converts RelayX 1handles to wallet addresses on-the-fly when loading. You can supply a 1handle handle via data-relayx.

Paymail Address Support

This Tonic embed script converts paymail addresses to wallet addresses on-the-fly when loading via the polynym library and api.

Supported Browsers

TonicPow supports all commonly used browsers. Below is a list of popular browsers and their minimum supported version. If we're missing a browser, suggest one via an issue.

Browser Platform Min Version
Android Mobile 67.0
Bottle Desktop 0.1
Brave Desktop 55.0
Chrome Desktop 55.0
Chrome Mobile 74.0
Edge Desktop 17.0
Firefox Desktop 52.0
Firefox Mobile 67.0
IE Desktop ---
Opera Desktop 42.0
Opera Mobile ---
Safari Desktop 10.1
Safari Mobile 10.3

Bitcoin Sticker Protocol Support

Using the bitcoin sticker protocol, it ensures that any embed that is missing a data-address will use sticker address.

In the future this will be used for tipping, likes, sharing, etc.

Affiliates

If you share any url and append ?affiliate=1your-handle or [email protected] the embed will process your handle/address and store it associated to all ads on the page.

If you don't have a 1handle you can provide your paymail address [email protected] or a bsv wallet address ?affiliate=1BrwAE2qg6qBaB2n....

The affiliate/publisher relationship is stored in user's local session for future visits.

Examples

Demo Tonics

View the interactive live demo ads and more examples here

Affiliate

Replace 1your-handle with your 1handle or use a paymail address or bsv wallet address and share! Receive a payment if an Ad is purchased using your affiliate link. Any website that uses TonicPow supports the 1handle and paymail address affiliate functionality.

https://some-website.com/?affiliate=1your-handle  

https://some-website.com/[email protected]

https://some-website.com/?affiliate=1BrwAE2qg6qBaB2n...