29 Jul '14, 1am

BitcoinJS

$ npm install -g bitcoinjs-lib Compile for browser $ npm -g install bitcoinjs-lib browserify uglify-js $ browserify -r bitcoinjs-lib -s Bitcoin | uglifyjs > bitcoinjs.min.js Examples Generating a Bitcoin address: key = Bitcoin.ECKey.makeRandom() // Print your private key (in WIF format) console.log(key.toWIF()) // => 8c112cf628362ecf4d482f68af2dbb50c8a2cb90d226215de925417aa9336a48 // Print your public key (toString defaults to a Bitcoin address) console.log(key.pub.getAddress().toString()) // => 14bZ7YWde4KdRb5YN7GYkToz3EHVCvRxkF Creating a Transaction tx = new Bitcoin.Transaction() // Add the input (who is paying) of the form [previous transaction hash, index of the output to use] tx.addInput("aa94ab02c182214f090e99a0d57021caffd0f195a81c24602b1028b130b63e31", 0) // Add the output (who to pay to) of the form [payee's address, amount in satoshis] tx.addOutput("1Gokm82v6Dmtw...

Full article: http://bitcoinjs.org/

Tweets

money.js 0.2.0: This is a JavaScript library fo...

webscripts.softpedia.com 29 Jul '14, 9pm

This is a JavaScript library for real-time currency conversion and exchange rate calculation Supports transformations from...