simple-signer - sign anything, simply
A signature scheme where self-serializable objects can be signed, while building a chain of signature proofs.
Installation
npm install --save simple-signer
Example usage
let s = ; // implements interfaces/Serializable { thisdata = data thistyp = 42} SerializableObjectprototype { return thisdata;} // wrap data with envelope and sign envelope with walletlet zeroHash = 32;let aliceMnemonic = "soup high fat equip protect unusual tag helmet detail erupt hover boss glad crew relief narrow message grid swing tone physical inquiry satisfy habit";let aliceWallet = aliceMnemonic;let contactAlice = 'alice' 'http://cryptocouple.com/'let now = Math;let serializableObject = 'f' 'o' 'o';let envelopeAlice = zeroHash serializableObject;envelopeAlice; // use message to transmit envelope and contact between deviceslet messageAlice = envelopeAlice contactAlice;let messageAliceJson = JSON; // unpack, verify and extract contentslet messageAliceRecovered = sMessage;let verifyAlice = messageAliceRecoveredlet contactAliceRecovered = messageAliceRecovered;
Building
npm run build
Running tests
npm test