mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2025-01-09 22:29:28 -07:00
27 lines
760 B
Markdown
27 lines
760 B
Markdown
# Quick start (Node.js)
|
|
|
|
Basic example:
|
|
|
|
```javascript
|
|
const doip = require('doip')
|
|
|
|
const verifyIdentity = async (url, fp) => {
|
|
const claim = new doip.Claim(url, fp)
|
|
claim.match()
|
|
await claim.verify()
|
|
console.log(claim.result)
|
|
}
|
|
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.
|
|
|
|
## Twitter account verification
|
|
|
|
By default, Twitter accounts verification has to be enabled by either having a
|
|
Twitter developer account or providing a Nitter instance domain.
|
|
|
|
Please refer to the
|
|
[API documentation](/#/api?id=claimsverifyuri-fingerprint-opts).
|