mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-23 06:59:29 -07:00
886 B
886 B
Quick start
Installation
Install using Yarn:
yarn add doipjs
Install using NPM:
npm install --save doipjs
Usage (Node.js)
Basic example:
const doip = require('doip')
const verifyIdentity = async (url, fp) => {
console.log(await doip.verify(url, fp))
}
verifyIdentity('dns:doip.rocks', '9f0048ac0b23301e1f77e994909f6bd6f80f485d')
This snippet works en will verify the doip.rocks as linked to Yarmo's cryptographic key using the dns service provider.
Usage (browser)
Basic example:
<script src="https://cdn.jsdelivr.net/npm/keyoxide@0.3.0/dist/doip.min.js"></script>
const verifyIdentity = async (url, fp) => {
console.log(await doip.verify(url, fp))
}
verifyIdentity('dns:doip.rocks', '9f0048ac0b23301e1f77e994909f6bd6f80f485d')