Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Wallet Generation Code for JCC 2014 Presentation.
// Bitcoin in Depth: A Cryptographycal Journey
// JCC 2014
//Importo librerías
var bitcoin = require('bitcoinjs-lib');
var colors = require('colors');
//Creo el par clave pública/privada usando
//criptografía asimétrica, particularmente Curva Elíptica
var key = bitcoin.ECKey.makeRandom();
console.log('');
//Muestro la llave privada por pantalla
console.log("Clave privada: "+key.toWIF().red);
//Muestro la dirección pública asociada
//que voy a usar en caso de querer recibir Bitcoin
console.log("Billetera pública: "+key.pub.getAddress().toString().green)
console.log('');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment