mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Add claim example
This commit is contained in:
parent
cde83b5b90
commit
d5ea56a221
1 changed files with 17 additions and 0 deletions
17
examples/verify-claim.js
Normal file
17
examples/verify-claim.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
const doip = require('../src')
|
||||
|
||||
const main = async () => {
|
||||
// Generate the claim
|
||||
const claim = new doip.Claim("dns:doip.rocks", "3637202523e7c1309ab79e99ef2dc5827b445f4b")
|
||||
|
||||
// Match it to candidate service providers
|
||||
claim.match();
|
||||
|
||||
// Verify the claim
|
||||
await claim.verify();
|
||||
|
||||
// Log the claims of the first UID
|
||||
console.log(claim)
|
||||
}
|
||||
|
||||
main()
|
Loading…
Reference in a new issue