Infernet
SDK
Reference
Payments
IVerifier

IVerifier

Git Source (opens in a new tab)

Basic interface for verifier contracts to: (1) expose verification fees and Wallet address, (2) expose function to begin proof verification journey

Functions

getWallet

Gets verifier contract's associated Wallet address

Does not necessarily have to conform to the exact Wallet spec. since this address does not need to authorize the coordinator for spend

function getWallet() external view returns (address);

Returns

NameTypeDescription
<none>addressWallet address to receive proof verification payment

isSupportedToken

Checks if token is accepted payment method by verifier contract

function isSupportedToken(address token) external view returns (bool);

Parameters

NameTypeDescription
tokenaddresstoken address

Returns

NameTypeDescription
<none>booltrue if token is supported, else false

fee

Gets proving fee denominated in token

Function isSupportedToken is called first

function fee(address token) external view returns (uint256);

Parameters

NameTypeDescription
tokenaddresstoken address

Returns

NameTypeDescription
<none>uint256proving fee denominated in token

requestProofVerification

Request proof verification from verification contract

Verifier contract has to call verifyProof on coordinator after a proof verification request

By this point, verifier contract has been paid for proof verification

function requestProofVerification(uint32 subscriptionId, uint32 interval, address node, bytes calldata proof)
    external;

Parameters

NameTypeDescription
subscriptionIduint32subscription ID
intervaluint32subscription response interval
nodeaddressresponse submitting node
proofbytesprovided response proof bytes

receive

Enforce ETH deposits to IVerifier-implementing contract

A verifier may still choose to not support ETH by returning false for isSupportedToken(address(0))

receive() external payable;