Last active
September 12, 2018 17:38
-
-
Save morloy/bd5cf94dd4ba2d701453fa1f2c182013 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
import OTS from 'javascript-opentimestamps'; | |
import { getOtsFromCertificate, encodeOts } from './helpers.js'; | |
export const stampCertificate = async (certificate: string): Promise<string> => { | |
const ots = getOtsFromCertificate(certificate); | |
await OTS.stamp(ots); | |
return encodeOts(ots); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment