SimpleNanoSignatureJs is a simple nano signature tool for node Js
Installation : you need blakejs
npm install blakejs
and download SimpleNanoSignature.js, nacl.js and config.json
or
download the full github repository
you can edit config.json
{
"nacl": "Path to nacljs",
"blakejs": "Path to blakejs"
}
Usage :
const sign = require('./SimpleNanoSignature');
const hash = "AE87C717236320099C9910648832B4B75A1A35C1A505C34248809DCA0C66DCC5"; //data to sign
const privateKey = "A88C4CC79B5E63687DAEB2E58C3A7F9CE13D81F731C37AF30F21E426475EF70E"; //must be an ed25519 based private key
let signature = sign.signBlock(hash, privateKey); //returns the HEX signature
console.log(signature);
//expected output is "2A53258319D6C1AE3461550156B6ED54C08B03C965394E87E0A3716699F2872C63B607CD9B1D6EABBD5CF9FFC3413D1DF60D57283CE19108AC2A21E6A72C3E0D"
Fully based on the work of anarkrypto
Tweet nacl forked by anarkrypto here
Donation for anarkrypto : nano_3kc8wwut3u8g1kwa6x4drkzu346bdbyqzsn14tmabrpeobn8igksfqkzajbb