# ProofOfIdentityV2

## Function: ProofOfIdentityV2()

> **ProofOfIdentityV2**(`params`): `object`

ProofOfIdentityV2 is a function that fetches and processes various user identity details from a specified smart contract. It utilizes multiple contract methods to retrieve data such as country code, user type, competency rating, primary ID, suspension status, balance, auxiliary accounts, principal account, and maximum allowed auxiliary accounts.

When the required parameters are provided, it enables querying of these contract methods, processes the resulting data, and structures it for easier use in application logic.

### Parameters

#### params

`ProofOfIdentityV2Parameters`

The parameters required to query the contract.

### Returns

`object`

#### data

> **data**: `object` = `poiData`

**data.auxiliaryAccounts**

> **data.auxiliaryAccounts**: `undefined` | readonly \`0x${string}\`\[] = `poiResult.auxiliaryAccounts`

**data.balance**

> **data.balance**: `undefined` | `bigint` = `poiResult.balance`

**data.competencyRating**

> **data.competencyRating**: `undefined` | `bigint` = `poiResult.competencyRating`

**data.countryCode**

> **data.countryCode**: `undefined` | `string` = `poiResult.countryCode`

**data.expiry**

> **data.expiry**: `undefined` | `bigint` = `poiResult.expiry`

**data.isAuxiliaryMaxedOut**

> **data.isAuxiliaryMaxedOut**: `undefined` | `boolean` = `poiResult.isAuxiliaryMaxedOut`

**data.isSuspended**

> **data.isSuspended**: `undefined` | `boolean` | `0n`

**data.primaryID**

> **data.primaryID**: `undefined` | readonly \[`boolean`, `bigint`, `bigint`] = `poiResult.primaryID`

**data.principalAccount**

> **data.principalAccount**: `undefined` | \`0x${string}\` = `poiResult.principalAccount`

**data.userType**

> **data.userType**: `undefined` | `bigint` = `poiResult.userType`

#### error

> **error**: `null` | `ReadContractsErrorType`

#### isError

> **isError**: `boolean`

#### isLoading

> **isLoading**: `boolean`

#### isPending

> **isPending**: `boolean`

#### isRefetching

> **isRefetching**: `boolean`

#### refetch()

> **refetch**: (`options`?) => `Promise`<`QueryObserverResult`<{ `auxiliaryAccounts`: `undefined` | readonly \`0x${string}\`\[]; `balance`: `undefined` | `bigint`; `competencyRating`: `undefined` | `bigint`; `countryCode`: `undefined` | `string`; `expiry`: `undefined` | `bigint`; `isAuxiliaryMaxedOut`: `boolean`; `isSuspended`: `undefined` | `boolean`; `primaryID`: `undefined` | readonly \[`boolean`, `bigint`, `bigint`]; `principalAccount`: `undefined` | \`0x${string}\`; `userType`: `undefined` | `bigint`; }, `ReadContractsErrorType`>>

**Parameters**

**options?**

`RefetchOptions`

**Returns**

`Promise`<`QueryObserverResult`<{ `auxiliaryAccounts`: `undefined` | readonly \`0x${string}\`\[]; `balance`: `undefined` | `bigint`; `competencyRating`: `undefined` | `bigint`; `countryCode`: `undefined` | `string`; `expiry`: `undefined` | `bigint`; `isAuxiliaryMaxedOut`: `boolean`; `isSuspended`: `undefined` | `boolean`; `primaryID`: `undefined` | readonly \[`boolean`, `bigint`, `bigint`]; `principalAccount`: `undefined` | \`0x${string}\`; `userType`: `undefined` | `bigint`; }, `ReadContractsErrorType`>>

### Defined in

[packages/wagmi/src/contract/ProofOfIdentityV2.tsx:41](https://github.com/haven1network/haven1-sdk/blob/df6267fec7b75040411529269f9c6a88e9c756ee/packages/wagmi/src/contract/ProofOfIdentityV2.tsx#L41)


---

# 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.haven1.org/build/developer-tools/haven1-sdk/haven1-wagmi-sdk/contract-module/proofofidentityv2.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.
