Bitcoin Forum
September 24, 2018, 02:55:53 AM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Using the blockchain.info Node.js API  (Read 1589 times)
saddambitcoin
Legendary
*
Offline Offline

Activity: 1612
Merit: 1000



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.

1537757753
Hero Member
*
Offline Offline

Posts: 1537757753

View Profile Personal Message (Offline)

Ignore
1537757753
Reply with quote  #2

1537757753
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537757753
Hero Member
*
Offline Offline

Posts: 1537757753

View Profile Personal Message (Offline)

Ignore
1537757753
Reply with quote  #2

1537757753
Report to moderator
1537757753
Hero Member
*
Offline Offline

Posts: 1537757753

View Profile Personal Message (Offline)

Ignore
1537757753
Reply with quote  #2

1537757753
Report to moderator
saddambitcoin
Legendary
*
Offline Offline

Activity: 1612
Merit: 1000



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.




COINVOTE Trying to do some stuff
ashour
Sr. Member
****
Offline Offline

Activity: 476
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.

COINVOTE Trying to do some stuff
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!