Skip to content

ArVerify/arverify-js

Repository files navigation

Version

Installation

  • yarn add arverify
  • npm install arverify

Usage

Getting address information

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);
}

Verifying addresses

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

Releases

No releases published

Packages

No packages published