Bitcoin Forum
May 10, 2024, 05:46:44 AM *
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.

1715320004
Hero Member
*
Offline Offline

Posts: 1715320004

View Profile Personal Message (Offline)

Ignore
1715320004
Reply with quote  #2

1715320004
Report to moderator
1715320004
Hero Member
*
Offline Offline

Posts: 1715320004

View Profile Personal Message (Offline)

Ignore
1715320004
Reply with quote  #2

1715320004
Report to moderator
1715320004
Hero Member
*
Offline Offline

Posts: 1715320004

View Profile Personal Message (Offline)

Ignore
1715320004
Reply with quote  #2

1715320004
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715320004
Hero Member
*
Offline Offline

Posts: 1715320004

View Profile Personal Message (Offline)

Ignore
1715320004
Reply with quote  #2

1715320004
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!