All Projects β†’ sagivo β†’ Accept Bitcoin

sagivo / Accept Bitcoin

Licence: apache-2.0
Accept bitcoin payments using Node.js

Programming Languages

coffeescript
4710 projects

Projects that are alternatives of or similar to Accept Bitcoin

Binance Trader
πŸ’° Cryptocurrency Trading Bot for Binance (Experimental)
Stars: ✭ 2,128 (+1318.67%)
Mutual labels:  bitcoin
Coinbasepro Csharp
The unofficial .NET/C# client library for the Coinbase Pro/GDAX API
Stars: ✭ 143 (-4.67%)
Mutual labels:  bitcoin
Ebtc
eBitcoin (eBTC) is an ERC20 token. Its primary utility is to provide an easy & fast payment solution. Its edge over other tokens is that it is capable of sending up to 255 payments in a single transaction.
Stars: ✭ 149 (-0.67%)
Mutual labels:  bitcoin
Peatiocryptoexchange
An open-source Crypto-Currency exchange. Peatio v3.0 Coming Soon !
Stars: ✭ 141 (-6%)
Mutual labels:  bitcoin
Arcbit Ios
arcbit - iOS bitcoin wallet http://arcbit.io
Stars: ✭ 142 (-5.33%)
Mutual labels:  bitcoin
Trezor Suite
🍬 Trezor Suite Monorepo
Stars: ✭ 144 (-4%)
Mutual labels:  bitcoin
Multicurrencywallet
Bitcoin, Ethereum, ERC20 crypto wallets with Atomic Swap exchange. Release announce: https://twitter.com/SwapOnlineTeam/status/1321844352369500160
Stars: ✭ 136 (-9.33%)
Mutual labels:  bitcoin
Coinx
Buy, sell, and find the best prices for crypto-currencies from multiple markets.
Stars: ✭ 150 (+0%)
Mutual labels:  bitcoin
Bitcoin Bubble Index
A visualization analysis tool for price bubble of Bitcoin, including basic price information, 60-days accumulative increase, hot keywords index, and bubble index.
Stars: ✭ 143 (-4.67%)
Mutual labels:  bitcoin
Spruned
A Bitcoin-without-Blockchain client w/ RPC that can provide any block or transaction
Stars: ✭ 149 (-0.67%)
Mutual labels:  bitcoin
My Token
πŸ“ˆTrack token prices of your favorite exchanges in terminal!
Stars: ✭ 141 (-6%)
Mutual labels:  bitcoin
Coinpusher
πŸ“ˆ real-time cryptocurrency chart prediction based on neuronal-networks
Stars: ✭ 141 (-6%)
Mutual labels:  bitcoin
Spec
[OLD!] RGB Protocol specifications for Bitcoin-based digital assets
Stars: ✭ 145 (-3.33%)
Mutual labels:  bitcoin
Blockchainbooks.github.io
Blockchain Books
Stars: ✭ 139 (-7.33%)
Mutual labels:  bitcoin
Awesome Token Sale
Curated list of token sale resources / ICO resources
Stars: ✭ 149 (-0.67%)
Mutual labels:  bitcoin
Awesome Bitcoin Cash
A curated list of awesome things related to Bitcoin Cash. Contribute yourself:
Stars: ✭ 136 (-9.33%)
Mutual labels:  bitcoin
Opentimestamps Server
OpenTimestamps server component
Stars: ✭ 143 (-4.67%)
Mutual labels:  bitcoin
Tradzqai
Trading environnement for RL agents, backtesting and training.
Stars: ✭ 150 (+0%)
Mutual labels:  bitcoin
Okcoin Client
OKCoin API Wrapper in Java.
Stars: ✭ 149 (-0.67%)
Mutual labels:  bitcoin
Gitbook Summary
A command line tool to generate a summary.md for Gitbook
Stars: ✭ 145 (-3.33%)
Mutual labels:  bitcoin

Accept Bitcoin accept-bitcoin

Finally a developer-friendly tool to simply accept bitcoins in your site.

  • Lite and fast, built on top of bitcore.
  • No need to install local bitcoin node RPC client. We use blockr API instead.
  • No need to install any wallet client.
  • Create ad-hoc address to accept bitcoins and transfer incomes to your offline account.
  • Easy configurations.

Get Started

Simply install via npm:

npm install accept-bitcoin

Load AC and you're ready to go!

var acceptBitcoin = require('accept-bitcoin');
var ac = new acceptBitcoin('YOUR_BITCOIN_ADDRESS');

Motivation

Accepting bitcoins online can be complex to program and require you to install a bitcoin RPC client in order to read and write to the blockchain. This client require a lot of resources (in terms of CPU, networking and storage).
Most of the users are using a wallet to store their bitcoins. This wallet is a simple way to secure your public and private key. For security reasons you better save this wallet offline in a "cold storage".
More about the motivation behind this project at my blog post.

Example

You can override the default settings on creating

Examples are provided here

var settings = {network: 'live'}
var acceptBitcoin = require('accept-bitcoin');
var ac = new acceptBitcoin('YOUR_BITCOIN_ADDRESS', settings);
key = ac.generateAddress({alertWhenHasBalance: true});
console.log("Hello buyer! please pay to: " + key.address());
key.on('hasBalance', function(amount){
  console.log("thanks for paying me " + amount); //do stuff
  key.transferBalanceToMyAccount(function(err, d){
    if (d.status === 'success') console.log("Cool, the bitcoins are in my private account!");
  });
});

Settings

You can override the default settings:

name type default value comment
payToAddress string - Your bitcoin adress you wish to transfer incomes to.
network string test choose your bitcoin RPC env. values are: test and livemore info here
password string - choose your random password to encrypt generated keys.
storePath string ./keys.txt path to store a file containing all the ad-hoc generated keys.
encryptPrivateKey bool false in case you want the stored keys to be encrypted (using password).
payReminderToAddress string payToAddress In case transfer amount is smaller than income and fees.
includeUnconfirmed bool false include unconfirmed transactions when checking for unspent incomes
checkTransactionEvery int 1000 * 60 * 2 (2 minutes) how often (in millisecond) to ping the network when checking for transactions.
checkBalanceTimeout int 1000 * 60 * 60 * 2 (2 hours) timeout (in millisecond) when checking balance of an address.
checkUnspentTimeout int 1000 * 60 * 60 * 2 (2 hours) timeout (in millisecond) when checking unspent transactions of an address.
minimumConfirmations int 6 minimum confirmations needed in order to trigger hasBalance event.
txFee float 0.0001 fee (in bitcoin) for transferring amount from ad hoc address to your address.

Key class

This class is responsible for creating new bitcoin addresses, storing them and transferring funds between them. Some key functions are:
storeKey(wk) - store your key in a local file. Can be encrypted.
checkBalance()- check and notify you when an address has minimum balance. payTo(payToAddress, options, callback) - transfer all balance of this address to another address.

Encrypt class

Contains helpers to encrypt and decrypt strings. Used for storing your keys data locally.

Contribute

Please do. Fork it, star it, share it and add your code to the project. Help others.
All the src code is written in coffeescript and is under src. There's a tool that convert it automatically to js each time you change a file and put it under lib folder. Simply run cake build for that.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].