Skip to content

Sinatra API endpoint for Bitcoin, Dogecoin (or any other cryptocurrency) donate/tipping buttons

Notifications You must be signed in to change notification settings

jeremymouton/cointipper-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoinTipper server

CoinTipper server api based on jQuery.CoinTipper, written with Sinatra.

This version supports any coin.

Hosted version

The code is hosted on Heroku, so you can use the widget in an embed code.

https://cointipper.herokuapp.com

You can create a button by using the following url scheme:

https://cointipper.herokuapp.com/type/currency/iso/address/label

Live examples:

https://cointipper.herokuapp.com/tip/bitcoin/BTC/1G967MwCf6XsMufpot3wHzbYnU3d2RevD5/CoinTipper https://cointipper.herokuapp.com/donate/dogecoin/DOGE/DAxYkK3nGQPasscKYmbMswQJoV3h8y4aEW/CoinTipper https://cointipper.herokuapp.com/donate/kittehcoin/MEOW/KTxtYiB28YV5pBgy5GRwdFqWDx9RERVRNv/CoinTipper

The buttons are generated using the 5 parameters in the url (/type/currency/iso/address/label). No trailing '/', and all params are required (in that order).

Use the url in an embedded code

<embed src="https://cointipper.herokuapp.com/tip/bitcoin/BTC/1GMwCf6XsMufpot3wHzbYnU3d2RevD5/CoinTipper-Donation-Jar" height="38" width="150">

Copy/paste this where you want your button to appear, and replace the parameters with your own.

Spaces in the label

For spaces in the "label" parameter, use a dash ("-"):

.../CoinTipper-Donation-Jar

Any coin can theoretically work with it, just pass in its name, ISO and Address - users' local Wallets will recognize the url generated by the widget.

Setup from repo

  1. Clone the repo.
  2. ~ cd into the repo.
  3. bundle install.
  4. ~ rackup -p 4567.

About

Sinatra API endpoint for Bitcoin, Dogecoin (or any other cryptocurrency) donate/tipping buttons

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published