Contract Module

This module provides TypeScript interfaces and types for interacting with blockchain contracts. It includes definitions for various contract parameters and functions, allowing for type-safe contract interactions.

Features

  • TypeScript interfaces for contract parameters.

  • Type-safe function definitions for contract interactions.

  • Support for multiple contract versions.

Usage

Import the necessary interfaces and types from this module to ensure type safety when interacting with blockchain contracts in your application.

Usage Example

import { ProofOfIdentityV2 } from "@haven1/wagmi-sdk/contract";

const { data, isLoading, isError } = ProofOfIdentityV2({
  address: '0xYourAddressHere',
  contractAddress: ProofOfIndentity.address,
  chainId: haven1Testnet.id,
});

if (isLoading) {
  console.log('Loading...');
} else if (isError) {
  console.error('Error fetching data');
} else {
  console.log('User Data:', data);
}

This example demonstrates how to use the ProofOfIdentityV2 function to fetch user identity details from a smart contract. Replace the placeholders with actual addresses.