How to send Bitcoins with node js

0 votes
I am trying to make a web app where if I push on a button, it will send some bitcoins from my bitcoin wallet (A) to another peer's bitcoin wallet (B). I've figured out how to make a raw bitcoin transaction like this:

var bitcoin = require('bitcoinjs-lib'); var keyPair = bitcoin.ECPair.fromWIF('****************************'); var tx = new bitcoin.TransactionBuilder(); tx.addInput('****************************', 0); tx.addOutput('****************************', 546); tx.sign(0, keyPair); console.log(tx.build().toHex()); generatedhash = tx.build().toHex();
Jul 20, 2018 in Blockchain by sabby
• 4,370 points
3,688 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Blockchain

+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
1,985 views
0 votes
1 answer

How to create tokens in smart contracts from node.js?

Any modification to the Ethereum Blockchain will ...READ MORE

answered Jun 27, 2018 in Blockchain by Shashank
• 10,400 points
1,956 views
0 votes
1 answer

How to send bitcoins to multiple recipients at once?

To send bitcoins to multiple recipients, you ...READ MORE

answered Aug 1, 2018 in Blockchain by slayer
• 29,370 points
1,063 views
0 votes
1 answer

How to add https security for Node js?

You need to add the key and cert to the createServer function. const options ...READ MORE

answered Aug 10, 2018 in Blockchain by digger
• 26,740 points
1,153 views
0 votes
1 answer
0 votes
1 answer

How to proceed after connecting with hardcoded node?

I am assuming that by hardcoded nodes ...READ MORE

answered Aug 28, 2018 in Blockchain by Perry
• 17,100 points
1,284 views
0 votes
1 answer

blockchain.info api_code is missing

Check the blockchain api. it should be $Blockchain ...READ MORE

answered Aug 22, 2018 in Blockchain by slayer
• 29,370 points
1,542 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP