doipjs/docs/quickstart-browser.md
Yarmo Mackenbach 69df55d014 Fix docs
2020-12-11 10:59:27 +01:00

600 B

Quick start (browser)

Basic example:

const verifyIdentity = async (url, fp) => {
  console.log(await doip.claims.verify(url, fp))
}
verifyIdentity('dns:doip.rocks', '9f0048ac0b23301e1f77e994909f6bd6f80f485d')

This snippet works en will verify the doip.rocks domain as linked to Yarmo's cryptographic key using the dns service provider.

Please note you need to include the openpgpjs library:

<script src="https://cdn.jsdelivr.net/npm/openpgp/dist/openpgp.min.js"></script>