Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: DrSeuss on January 19, 2017, 03:55:46 PM



Title: [Bitcoin-JS] Accepting/Sending BTC via Website. - Help? Pointers?
Post by: DrSeuss on January 19, 2017, 03:55:46 PM
What's up guys.  ;)

I'm a developer and currently got a neat little idea for a website on my mind.
To get everything done I need to be able to accept and send bitcoins via my website.
I googled and found the https://github.com/bitcoinjs/bitcoinjs-lib (https://github.com/bitcoinjs/bitcoinjs-lib) which caught my attention.

Now the problem is that I find it hard to find get all the information I need in order to be able to code what I want.
There are a few basic examples but I don't seem to find any kind of documentation or such, so it's hard for me to understand what exactly to do.

I don't really need much, just creating adresses & accepting/sending bitcoins like for example done on this website
https://satoshimines.com/ (https://satoshimines.com/) (It's so fast and smooth, that's what I really love about it)

Can anyone give me a few pointers or such?
I really want to learn how to code this.  :)
Thanks for every bit of help.  ;)

Cheerz,
Seuss  :D


Title: Re: [Bitcoin-JS] Accepting/Sending BTC via Website. - Help? Pointers?
Post by: coinableS on January 20, 2017, 06:15:20 AM
BitcoinJS is a library that makes it easier to do bitcoin stuff in nodeJS like the hashing algorithms and dependent crypto libraries. If you're just starting out it will be a bit of a journey before you can build what you are asking.

If you're just looking to get your feet wet:

https://medium.com/@orweinberger/how-to-create-a-raw-transaction-using-bitcoinjs-lib-1347a502a3a#.btd28j2mn

https://www.youtube.com/watch?v=UhuglfOCgk0 I made a introductory video tutorial on creating addresses with BitcoinJS

If it seems like too much, you'll want to try a wallet API(blocktrail.com, blockchain.info, block.io, blockcypher), but most wallet API providers don't like to host sites like satoshimines.


Title: Re: [Bitcoin-JS] Accepting/Sending BTC via Website. - Help? Pointers?
Post by: Jet Cash on January 20, 2017, 01:43:26 PM
I'm using CMS to develop websites now. It makes things much easier, and the websites are reactive without much effort on my part. It's this reactive bit that could involve you in a fair bit of work. Both Drupal and Wordpress have a selection of modules already coded. You just plug them into your installation.

This doesn't answer your question, but it may free up some of your time to expand the sites.


Title: Re: [Bitcoin-JS] Accepting/Sending BTC via Website. - Help? Pointers?
Post by: esotericizm on January 23, 2017, 06:31:38 AM
The easy way is that you generate a privkey/pubkey. Show the client the  public address and then use a setinterval on the client to query a block explorer API for any transactions to that address.

I've found bitcore to have  better documentation than bitcoin-js and it sounds like you may benefit from their playground.

https://bitcore.io/playground/#/units