Created
October 30, 2017 16:29
-
-
Save feulf/f0945fe6f77f3d0a77dffca6636dd267 to your computer and use it in GitHub Desktop.
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
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) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using the javascript library at https://github.com/opentimestamps/javascript-opentimestamps.
I've tried the examples at README.md and the one in the examples/ folder: