đī¸ useZigchain
The useZigchain hook returns the ChainContext, which provides a comprehensive set of tools and methods to interact with wallets, connect to the ZIGChain blockchain, and perform transactions.
đī¸ useZigchainClient
The useZigchainClient hook provides access to the initialized ZIGChain client (Client instance). This client allows you to interact directly with the ZIGChain blockchain by performing queries, transactions, and other chain-specific actions.
đī¸ useTx
The useTx hook allows you to execute transactions on the ZIGChain blockchain, handling signing, broadcasting, and error handling. It leverages the useZigchain hook to get access to the signing client and other necessary utilities for transaction management.
đī¸ useQuery
The useQuery hook provides a general-purpose way to manage asynchronous data fetching and handle loading, error, and data states. It is highly versatile and can be used with any asynchronous query, including calls to the ZIGChain client for blockchain data.
đī¸ useBalances
The useBalances hook fetches and returns the token balances for a specified ZIGChain address. It retrieves additional metadata for each token, providing enriched information for display in applications.
đī¸ usePools
The usePools hook fetches a paginated list of pools from the ZIGChain blockchain and enriches each pool with metadata for the tokens involved in the pool. This hook is especially useful for applications that need to display pool data with detailed token information.
đī¸ usePoolId
The usePoolId hook retrieves the pool ID associated with two specified tokens on the ZIGChain blockchain. This is useful for applications that need to access a specific liquidity pool or trading pair by token.
đī¸ useTokenMetadata
The useTokenMetadata hook retrieves metadata for tokens on the ZIGChain blockchain, including additional data such as descriptions, symbols, URIs, and other details. This metadata is useful for displaying enriched information about each token.
đī¸ useTokenTableData
The useTokenTableData hook retrieves paginated token data from the ZIGChain blockchain and enriches it with metadata. This hook is particularly useful for displaying token information in a table format, with additional details such as description, symbol, and social links.
đī¸ useAddChain
The useAddChain hook allows developers to add the ZIGChain network (either mainnet or testnet) to compatible wallets such as Keplr or Leap. If the wallet is not installed, the hook provides an installation URL for user guidance.
đī¸ useCreateToken
The useCreateToken hook is a custom hook designed to simplify the process of creating a new token on the ZIGChain network. This hook allows you to specify essential details for token creation, including name, ticker, max supply, metadata URI, and other custom data fields. It encapsulates multiple transaction messages (denomination creation, metadata setting, and token minting) into a single interface, making it easy to set up new tokens.