# 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="/files/SccxRLFKRsQm24si5ic2" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.proofi.com/integration/website.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
