Bitcoin Forum
May 02, 2024, 09:15:14 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Using the blockchain.info Node.js API  (Read 1678 times)
saddambitcoin (OP)
Legendary
*
Offline Offline

Activity: 1610
Merit: 1004



View Profile
September 13, 2015, 02:19:41 AM
 #1

I'm trying to use the Blockchain.info Receive module documented here:
https://github.com/blockchain/api-v1-client-node/blob/master/docs/Receive.md

I can get the create method working properly, but I'm not exactly sure how to setup the receive.listen method to listen for the callback.

Namely, this point here:

Code:
server: http server (object, required)

what do i put in the server parameter, the address of my server? or the callback url that i specified when creating the forwarding address?


Any advice would be appreciated, thanks.

1714684514
Hero Member
*
Offline Offline

Posts: 1714684514

View Profile Personal Message (Offline)

Ignore
1714684514
Reply with quote  #2

1714684514
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714684514
Hero Member
*
Offline Offline

Posts: 1714684514

View Profile Personal Message (Offline)

Ignore
1714684514
Reply with quote  #2

1714684514
Report to moderator
saddambitcoin (OP)
Legendary
*
Offline Offline

Activity: 1610
Merit: 1004



View Profile
September 13, 2015, 02:27:56 AM
 #2

wait, i think i figured it out...i need to do something like this?

Code:
var http = require('http');

var server = http.createServer();

then pass that into the receive.listen...


stuff0577
Full Member
***
Offline Offline

Activity: 138
Merit: 100

More stuff will come.


View Profile WWW
September 13, 2015, 05:16:01 AM
 #3

wait, i think i figured it out...i need to do something like this?

Code:
var http = require('http');

var server = http.createServer();

then pass that into the receive.listen...



That code use to create your server. You must include this firsts

var receive = new blockchain.Receive([options,] callbackURL);

then use the receive variable on what you want to do.




DAILAI Peer-to-peer micro transport services
ashour
Sr. Member
****
Offline Offline

Activity: 490
Merit: 250


View Profile
September 13, 2015, 06:13:36 PM
 #4

As far as I know the blockchain.info API only allows https requests so you have to change it into https for http
stuff0577
Full Member
***
Offline Offline

Activity: 138
Merit: 100

More stuff will come.


View Profile WWW
September 14, 2015, 06:36:40 AM
 #5

As far as I know the blockchain.info API only allows https requests so you have to change it into https for http

It does work for both http and https. defends on what you use.

DAILAI Peer-to-peer micro transport services
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!