This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bitcore = require("bitcore-lib"); | |
var Buffer = require("buffer").Buffer; | |
var value = new Buffer.from("test", "utf8"); | |
var hash = bitcore.crypto.Hash.sha256(value); | |
// Compressed Key (nu skool) | |
var bn = bitcore.crypto.BN.fromBuffer(hash); | |
var privateKey = new bitcore.PrivateKey(bn); |