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

Last updated