🧰@haven1/wagmi-sdk

The @haven1/wagmi-sdk package is the best way to interact with the Haven1 blockchain when using Wagmi in your React project. This package simplifies adding the Haven1 blockchain to your Wagmi setup

Key Features

1. Chain Constants for Wagmi

  • Easily integrate the Haven1 blockchain into your project by using predefined chain constants in the Wagmi data type.

  • Automatically configure the Haven1 chain in your Wagmi client setup without needing manual configuration.

2. Pre-Made React Hooks

  • Connected Hooks: Ready-to-use React hooks that connect to Haven1 smart contracts via Wagmi, making it easy to fetch user data, developer fees, and other blockchain-related information.

  • Smart Contract Integration: Directly interact with Haven1 smart contracts, such as querying user information or retrieving developer fees, with minimal code.

3. Wagmi-Wrapped Hooks

  • Pre-configured hooks that combine multiple standard Wagmi hooks into one, reducing boilerplate code.

  • These wrapped hooks offer more powerful functionalities, providing a higher level of abstraction while keeping things simple and efficient.

4. Blockchain Utilities

  • BigNumber Utilities: Includes helpful utilities for working with large numbers, such as BigNumber manipulation and formatting, essential for handling blockchain values like token balances and transaction amounts.

  • Other useful functions for blockchain interactions, such as converting values, handling gas estimation, and more.

Installation

Add the @haven1/wagmi-sdk package to your project:

npm install @haven1/wagmi-sdk

Namespaces

  • DevnetToken

  • TestnetToken

Type Aliases

  • AccountStatusId

  • Token

  • UseWatchOptions

  • WagmiHookReturnType

Variables

  • ACCOUNT_STATUS_ID

  • H1

  • H1_BLOCKTIME

  • haven1Devnet

  • haven1Testnet

Functions

  • AccountManager

  • bigintFromDecimals

  • bigIntMax

  • formatBigint

  • NativeAppFee

  • ProofOfIdentity

  • ProofOfIdentityV2

  • useBalance

  • useContractWrite

  • useWatch

Last updated