doipjs/examples/fetch-key-wkd.js

14 lines
346 B
JavaScript
Raw Permalink Normal View History

2023-07-08 00:17:13 -06:00
import * as doip from '../src/index.js'
2021-11-15 08:16:50 -07:00
const main = async () => {
// Fetch the key using WKD
const key = await doip.keys.fetchWKD("test@doip.rocks")
// Process it to extract the UIDs and their claims
const obj = await doip.keys.process(key)
// Log the claims of the first UID
console.log(obj.users[0].claims)
}
main()