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

Commit

Permalink
Additions and mods for 1handle support
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Jun 19, 2019
1 parent cd403c9 commit 2c9000e
Showing 1 changed file with 39 additions and 23 deletions.
62 changes: 39 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<img src="https://github.com/tonicpow/embed/blob/master/images/tonicpow-logo.png" height="100">

View a [Tonic in action](https://tonicpow.com/?affiliate=$tonicpow). Checkout the [Tonic protocol](https://github.com/tonicpow/embed/blob/master/PROTOCOL.md).
View a [Tonic in action](https://tonicpow.com/?affiliate=$tonicpow). Checkout the [Tonic protocol](/PROTOCOL.md).

[![last commit](https://img.shields.io/github/last-commit/tonicpow/embed.svg?style=flat)](https://github.com/tonicpow/embed/commits/master)
[![version](https://img.shields.io/github/release-pre/tonicpow/embed.svg?style=flat)](https://github.com/tonicpow/embed/releases)
Expand All @@ -9,14 +9,14 @@ View a [Tonic in action](https://tonicpow.com/?affiliate=$tonicpow). Checkout th
[![app health](https://img.shields.io/website-up-down-green-red/https/faucet.allaboard.cash.svg?label=status)](https://tonicpow.com/?affiliate=$tonicpow)

## Table of Contents
- [Installation](https://github.com/tonicpow/embed#installation)
- [Documentation](https://github.com/tonicpow/embed#documentation)
- [Examples](https://github.com/tonicpow/embed#examples)
- [Code Standards](https://github.com/tonicpow/embed#code-standards)
- [Usage](https://github.com/tonicpow/embed#usage)
- [Maintainers](https://github.com/tonicpow/embed#maintainers)
- [Contributing](https://github.com/tonicpow/embed#contributing)
- [License](https://github.com/tonicpow/embed#license)
- [Installation](#installation)
- [Documentation](#documentation)
- [Examples](#examples)
- [Code Standards](#code-standards)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)

## Installation
1. Add the script to your site.
Expand All @@ -29,10 +29,15 @@ View a [Tonic in action](https://tonicpow.com/?affiliate=$tonicpow). Checkout th
<div class="tonic" data-address="YOUR_ADDRESS"></div>
```

_(Optional)_ Use your [$handcash](https://handcash.io/) handle in place of your wallet address
_(Optional)_ Use your [$handcash](https://handcash.io/?affiliate=$tonicpow) handle in place of your wallet address
```html
<div class="tonic" data-handcash="$your-handle"></div>
```
```

_(Optional)_ Use your [RelayX 1handle](https://relayx.io/?affiliate=$tonicpow) in place of your wallet address
```html
<div class="tonic" data-relayx="1your-handle"></div>
```

## Building
```bash
Expand All @@ -43,14 +48,15 @@ $ npm run build
## Documentation
Checkout our nifty [Tonic generator](https://tonicpow.com/?affiliate=$tonicpow).

This Tonic embed works in relation to the [Tonic protocol](https://github.com/tonicpow/embed/blob/master/PROTOCOL.md).
This Tonic embed works in relation to the [Tonic protocol](/PROTOCOL.md).

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

|Attribute |Example |Supported |Description |
|:---|:---|:---|:---|
|data-address|1BrwAE...|**Yes**|Your bitcoin sv wallet address.|
|data-handcash|$tonicpow|**Yes**|Your $handcash handle. Used in place of data-address. |
|data-relayx|1tonicpow|**Yes**|Your 1handle from RelayX. 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|_No yet_|Set the currency rate (bsv or usd)|
Expand All @@ -61,31 +67,41 @@ Required attributes are one of the following: `data-address` or `data-handcash`
|data-funding|true|_No yet_|Toggle funding campaigns, default is true (on)|

#### Handcash Support
This Tonic embed script converts [$handcash](https://handcash.io/) handles to wallet addresses on-the-fly when loading.
You can supply a [$handcash](https://handcash.io/) handle via `data-handcash` or wallet address via `data-address`.
This Tonic embed script converts [$handcash](https://handcash.io/?affiliate=$tonicpow) handles to wallet addresses on-the-fly when loading.
You can supply a [$handcash](https://handcash.io/?affiliate=$tonicpow) handle via `data-handcash`.

#### RelayX 1handle Support
This Tonic embed script converts [RelayX 1handles](https://relayx.io/?affiliate=$tonicpow) to wallet addresses on-the-fly when loading.
You can supply a [1handle](https://relayx.io/?affiliate=$tonicpow) handle via `data-relayx`.


#### Bitcoin Sticker Protocol Support
Using the [bitcoin sticker protocol](https://sticker.planaria.network/), this embed forwards the address or transaction of
the current page for future use. (IE: tips, likes, etc)
Using the [bitcoin sticker protocol](https://sticker.planaria.network/?affiliate=$tonicpow), 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=$your-handle` the embed will process your [$handcash](https://handcash.io/) handle and store it associated to all ads on the page.
If you don't have [$handcash](https://handcash.io/) you can provide your [bsv wallet address](https://en.bitcoin.it/wiki/Address) `?affiliate=1BrwAE2qg6qBaB2n...`.
If you share any url and append `?affiliate=$your-handle` or `?affiliate=1your-handle` the embed will process your handle and store it associated to all ads on the page.

If you don't have a [$handcash](https://handcash.io/?affiliate=$tonicpow) handle or a [1handle](https://relayx.io/?affiliate=$tonicpow) you can provide your [bsv wallet address](https://en.bitcoin.it/wiki/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](https://tonicpow.com/?affiliate=$tonicpow) and [more examples here](https://github.com/tonicpow/embed/blob/master/example.html)
View the [interactive live demo ads](https://tonicpow.com/?affiliate=$tonicpow) and [more examples here](/example.html)

#### Affiliate
Replace `$your-handle` with your [$handcash](https://handcash.io/) handle or [bsv wallet address](https://en.bitcoin.it/wiki/Address) and share!
Receive a payment if an Ad is purchased using your affiliate link. Any website that uses [TonicPow](https://tonicpow.com/?affiliate=$tonicpow) supports the [$handcash](https://handcash.io/) affiliate functionality.
Replace `$your-handle` with your [$handcash](https://handcash.io/?affiliate=$tonicpow) handle or your [1handle](https://relayx.io/?affiliate=$tonicpow) or [bsv wallet address](https://en.bitcoin.it/wiki/Address) and share!
Receive a payment if an Ad is purchased using your affiliate link. Any website that uses [TonicPow](https://tonicpow.com/?affiliate=$tonicpow) supports the [$handcash](https://handcash.io/?affiliate=$tonicpow) affiliate functionality.
```
https://tonicpow.com/?affiliate=$your-handle
https://some-website.com/?affiliate=$your-handle
https://some-website.com/?affiliate=$your-handle
https://some-website.com/?affiliate=1your-handle
https://some-website.com/?affiliate=1BrwAE2qg6qBaB2n...
```
Expand All @@ -94,7 +110,7 @@ https://some-website.com/?affiliate=1BrwAE2qg6qBaB2n...
- Always use the language's best practices!

## Usage
- Setup your own Tonic using the [Tonic generator](https://tonicpow.com/?affiliate=$tonicpow) or [above installation](https://github.com/tonicpow/embed#installation).
- Setup your own Tonic using the [Tonic generator](https://tonicpow.com/?affiliate=$tonicpow) or [above installation](#installation).

## Maintainers
[Attila](https://github.com/attilaaf?affiliate=$attila) - [Satchmo](https://github.com/rohenaz?affiliate=$satchmo) - [MrZ](https://github.com/mrz1836?affiliate=$mr-z)
Expand Down

0 comments on commit 2c9000e

Please sign in to comment.