Skip to content

Instantly share code, notes, and snippets.

@morloy
Last active September 12, 2018 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morloy/bd5cf94dd4ba2d701453fa1f2c182013 to your computer and use it in GitHub Desktop.
Save morloy/bd5cf94dd4ba2d701453fa1f2c182013 to your computer and use it in GitHub Desktop.
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