doipjs/docs/quickstart-browser.md

22 lines
600 B
Markdown
Raw Permalink Normal View History

2020-11-06 10:35:28 -07:00
# Quick start (browser)
Basic example:
```javascript
const verifyIdentity = async (url, fp) => {
2020-12-11 02:59:27 -07:00
console.log(await doip.claims.verify(url, fp))
2020-11-06 10:35:28 -07:00
}
verifyIdentity('dns:doip.rocks', '9f0048ac0b23301e1f77e994909f6bd6f80f485d')
```
This snippet works en will verify the [doip.rocks](https://doip.rocks) domain as
linked to Yarmo's cryptographic key using the [dns](serviceproviders/dns.md)
service provider.
2020-12-09 18:03:27 -07:00
2020-12-11 02:59:27 -07:00
Please note you need to include the
2020-12-09 18:03:27 -07:00
[openpgpjs](https://github.com/openpgpjs/openpgpjs) library:
```html
<script src="https://cdn.jsdelivr.net/npm/openpgp/dist/openpgp.min.js"></script>
```