Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: rolik2001 on February 18, 2017, 03:58:24 PM



Title: PLS!! Help me wIth accept bitcoins on node.js
Post by: rolik2001 on February 18, 2017, 03:58:24 PM
I write site on node.js and dont know how to accept bitcoin on node.js. I know about bitpay(problem what maximum is 500 dollars),blockchain.info(problem what i need api key and must wait 2 days for this key), block.io(problem what on free account only 100 address.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: coinableS on February 20, 2017, 05:17:39 AM
I've been working on this nodejs tutorial series for the last few months https://www.youtube.com/playlist?list=PLhWIQKZKupCasXHue7itsB0twiIwQtDV_

Goes from the simple intro Hello World to Express, templating, using bitcore-lib, blocktrail API and deployment. You can generate addresses and accept bitcoin just using a library.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: DannyHamilton on February 20, 2017, 01:32:44 PM
You just want to accept bitcoins?  You don't need to send any bitcoins?

If so, then it is easy.

  • Choose a wallet (examples: MultiBit, Electrum, Bitcoin Core, etc)
  • Install that wallet on a secure computer (NOT on your web server)
  • Generate lots of addresses with the wallet
  • Add those addresses to a database that your webserver can access
  • Create a secure backup of your wallet
  • The webserver can now look up addresses in the database to use

Since you didn't store any private keys in the database, the webserver can only accept bitcoins, it can't send any.
Since you didn't store any private keys in the database, nobody can steal your bitcoins unless they have access to your wallet.
You can generate as many addresses as you like with the wallet, just add the list of generated addresses to your database as you generate them.

When you want to use the bitcoins, you can just use your wallet to send them somewhere.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: rolik2001 on February 21, 2017, 11:30:57 PM
I've been working on this nodejs tutorial series for the last few months https://www.youtube.com/playlist?list=PLhWIQKZKupCasXHue7itsB0twiIwQtDV_

Goes from the simple intro Hello World to Express, templating, using bitcore-lib, blocktrail API and deployment. You can generate addresses and accept bitcoin just using a library.
thanks for this very good guide )))


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: rolik2001 on February 21, 2017, 11:32:45 PM
You just want to accept bitcoins?  You don't need to send any bitcoins?

If so, then it is easy.

  • Choose a wallet (examples: MultiBit, Electrum, Bitcoin Core, etc)
  • Install that wallet on a secure computer (NOT on your web server)
  • Generate lots of addresses with the wallet
  • Add those addresses to a database that your webserver can access
  • Create a secure backup of your wallet
  • The webserver can now look up addresses in the database to use

Since you didn't store any private keys in the database, the webserver can only accept bitcoins, it can't send any.
Since you didn't store any private keys in the database, nobody can steal your bitcoins unless they have access to your wallet.
You can generate as many addresses as you like with the wallet, just add the list of generated addresses to your database as you generate them.

When you want to use the bitcoins, you can just use your wallet to send them somewhere.
yes i can generate in bitcoinjs but problem was in notification socket on blockchain.info is bad because very much transaction and i can lost transaction


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: cypherblock on February 26, 2017, 07:46:37 PM
The proposed solution doesn't give the website any means to verify that coins were received before delivering the goods or services. So you would have to query your node for this.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: rolik2001 on February 28, 2017, 04:34:34 PM
The proposed solution doesn't give the website any means to verify that coins were received before delivering the goods or services. So you would have to query your node for this.
no blocktrail have notification on domain


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: nemgun on February 28, 2017, 06:51:19 PM
Have you checked bitcore ? it may be interesting as it is bitcoin core built on nodejs, then it is up to you to see what to do with it.
This API can be what you are looking for : https://www.blockcypher.com/dev/bitcoin/?javascript#types-of-events
you can create a confirmed tx event using a websocket.
It is the first time i check this API, it is a complete set of tools, take your time and read it carefully. Hope that helps.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: rolik2001 on February 28, 2017, 07:26:09 PM
Have you checked bitcore ? it may be interesting as it is bitcoin core built on nodejs, then it is up to you to see what to do with it.
This API can be what you are looking for : https://www.blockcypher.com/dev/bitcoin/?javascript#types-of-events
you can create a confirmed tx event using a websocket.
It is the first time i check this API, it is a complete set of tools, take your time and read it carefully. Hope that helps.
for start core i need start full node?? on block.io also can receive confirmed payment by websocket


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: nemgun on February 28, 2017, 07:33:46 PM
Have you checked bitcore ? it may be interesting as it is bitcoin core built on nodejs, then it is up to you to see what to do with it.
This API can be what you are looking for : https://www.blockcypher.com/dev/bitcoin/?javascript#types-of-events
you can create a confirmed tx event using a websocket.
It is the first time i check this API, it is a complete set of tools, take your time and read it carefully. Hope that helps.
for start core i need start full node?? on block.io also can receive confirmed payment by websocket

I didn't extended on bitcore, i just know that it is made to be used with nodejs.
For the API, many people there says that block.io is a bad API, and that blockcypher is a good one, personally i am ok with block.io but only in a development environment.
It is up to you.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: hinterlog on February 28, 2017, 10:56:42 PM
I've been working on this nodejs tutorial series for the last few months https://www.youtube.com/playlist?list=PLhWIQKZKupCasXHue7itsB0twiIwQtDV_

Goes from the simple intro Hello World to Express, templating, using bitcore-lib, blocktrail API and deployment. You can generate addresses and accept bitcoin just using a library.

Can you give me more information as to what you are trying to build?


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: Rude Boy on March 01, 2017, 06:19:21 PM
Have you ever checked out bitcoinjs (https://bitcoinjs.org)? Bitcoin core and js example tutorials and scripts might help you.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: rolik2001 on March 01, 2017, 08:04:06 PM
Have you ever checked out bitcoinjs (https://bitcoinjs.org)? Bitcoin core and js example tutorials and scripts might help you.
i try to find web services and i konw about bitcoinjs and core


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: nemgun on March 02, 2017, 08:50:56 AM
Maybe bitcoin-node or node-bitcoin is what you are looking for, as you can query a bitcoin daemon (ad even blockchain.info RPC api) and then send usual methods or even your own methods. It is compliant with SSL and part of bitcoinjs project i guess.
If all these projects doesn't suits you, could you tell us exactly what you are looking for then ? because i think that we talked about the libraries.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: asoltys on March 03, 2017, 07:50:31 PM
You might want to check out https://github.com/bcoin-org/bcoin as well.  You can run it in SPV mode if you don't want to run a full node.


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: skang on March 04, 2017, 01:55:43 PM
You might want to check out https://github.com/bcoin-org/bcoin as well.  You can run it in SPV mode if you don't want to run a full node.

Do not use any APIs and use your local blockchain instead! Bitcore and bcoin both provide you a javascript layer on top of a local bitcoin blockchain running on your system ..


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: rolik2001 on March 05, 2017, 05:14:06 PM
Thanks for all your answer and understand what i can use bitcoinjs and bitcore or blockchain.info how explorer


Title: Re: PLS!! Help me wIth accept bitcoins on node.js
Post by: Rude Boy on March 05, 2017, 05:57:40 PM
Have you ever checked out bitcoinjs (https://bitcoinjs.org)? Bitcoin core and js example tutorials and scripts might help you.
i try to find web services and i konw about bitcoinjs and core

Or This might provide you the full information and setup about bit coin node.js
https://bbvaopen4u.com/en/actualidad/how-create-bitcoin-wallet-open-source-javascript-library