yarn add arverify
npm install arverify
import { getVerification } from "arverify";
const address = "...";
const verification = await getVerification(address);
// returns an object containing:
// verified: Boolean
// txID: String | undefined
// icon: String
// percentage: number
Basic-Example:
const address = "...";
const verification = await getVerification(address);
// to check if an address is verified you can use
if (verification.verified) {
console.log("Address is verified");
console.log("Verification tx:", verification.txID);
console.log("Trust score is:", verification.percentage);
}
Note: Only execute the verify()
function when you have the users consents.
import { verify } from "arverify";
const address = "...";
const returnUri = "https://your-application.com";
// optional: pass in your own address to be eligible to receive
// ARVERIFY Tokens as a reward
const referral = "[your address]";
const uri = verify(address, returnUri, referral);
// redirect the user to this uri