Created
October 30, 2017 16:29
-
-
Save feulf/f0945fe6f77f3d0a77dffca6636dd267 to your computer and use it in GitHub Desktop.
Revisions
-
feulf created this gist
Oct 30, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ const OpenTimestamps = require('javascript-opentimestamps'); var fs = require('fs'); fs.readFile('bitcoin.pdf.ots', 'utf8', (err, contents) => { const fileOts = Buffer.from(contents.toString('utf8')); const detached = OpenTimestamps.DetachedTimestampFile.deserialize(fileOts); const infoResult = OpenTimestamps.info(detached); console.log(infoResult) }); fs.readFile('hello-world.txt.ots', 'utf8', (err, ots) => { const infoResult = OpenTimestamps.info(ots); console.log(infoResult) });