# Website

The actual verification process will happen through your smart contract. However some logic must be done by the website that connects to the web3 (Metamask, etc) wallet.

## Is known?

To prevent executing calls that can't be processed and wasting users' gas fees, the website should check if the wallet is known by the identity provider.

{% hint style="info" %}
Each identity provider will deploy a smart contract on each network they support. During the beta, proofi.com is the only available provider. It has published the following contracts:

```
ethereum = "0x11B42Ca67d52Ef145b5b84Ba042a1859C8aeb376"
goerli = "0xbBA38836dca7173a4B66D24E48dd0993b0d9Bf17"
```

Other networks can be supported on request. Please send an email to <support@proofi.com>.
{% endhint %}

Get the user's wallet address from the web3 wallet and call the `isKnown()` function on the contract. This is an external view function, calling it doesn't cost any gas.

```javascript
const provider = new ethers.providers.Web3Provider(window.ethereum, "any");
const address = await provider.getSigner().getAddress();
const identityProviderContract = new ethers.Contract("0xbBA38836dca7173a4B66D24E48dd0993b0d9Bf17", abi, provider);

if (await identityProviderContract.isKnown(address)) {
  mint();
} else {
  redirectToProofi();
}
```

If the `isKnown()` function returns true, continue with the call to the smart contract. If the address is not known, the user should be redirected to Proofi.

## Redirection to Proofi

Users that have never gone through a KYC process with one of the identity providers should be redirected to Proofi.

They will be led through a simple and streamlined procedure, after which they are redirected back to your website.

```javascript
window.location.href = `https://app.proofi.com/accounts/participate?redirectUrl=
${encodeURIComponent(window.location.href)}&network=testnet`;
```

The `redirectUrl` parameter is set to the current page. Once the user is finished, they will be sent back to the specific page he/she left from.

## Example

Krazy Kobe is a demo project where NFTs can only be minted by approved wallet owners.

Have a look at the [JavaScript code](https://github.com/ltonetwork/krazy-kobe-nft/tree/main/website) of the website in the repository.

<figure><img src="https://3463812628-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe7NvGKMiIOZ5Dva58TkU%2Fuploads%2F75u9mv5457m5ny1PRQNs%2F214448083-d48cb8f7-acd1-479b-ab66-7167a2368677.png?alt=media&#x26;token=2e720ad3-574c-4efc-a1d4-1c876d872c9f" alt=""><figcaption></figcaption></figure>
