# Nibgate · Viem Reference ## Viem Reference - [Viem Integration Reference](https://docs.nibgate.xyz/viem-reference/pages/introduction.md): Source-linked reference for the Viem utilities and client configuration used around Nibgate’s payment and access flows. This is a focused companion to the Nibgate integration guides, not an official Viem documentation site. - [Integration Context](https://docs.nibgate.xyz/viem-reference/pages/integration.md): This reference lives alongside Nibgate’s payment and access documentation because Viem is a real dependency in those paths. It is not a renamed copy of Nibgate’s own API reference. - [Verification Boundaries](https://docs.nibgate.xyz/viem-reference/pages/verification.md): The committed vendor inputs are exact selected files from the pinned public Viem commit. The generator reads their TypeScript AST and associated upstream documentation. Validation checks file hashes, the installed npm version, source equality between npm and the pinned files, all 24 public exports, local links, anchor… - [createPublicClient](https://docs.nibgate.xyz/viem-reference/pages/api/createpublicclient.md): A Public Client is an interface to "public" JSON-RPC API methods such as retrieving block numbers, transactions, reading from smart contracts, etc through Public Actions. - [createWalletClient](https://docs.nibgate.xyz/viem-reference/pages/api/createwalletclient.md): A Wallet Client is an interface to interact with Ethereum Account(s) and provides the ability to retrieve accounts, execute transactions, sign messages, etc through Wallet Actions. - [custom](https://docs.nibgate.xyz/viem-reference/pages/api/custom.md): The custom Transport accepts an EIP-1193 request function as a parameter. This transport is useful for integrating with injected wallets, wallets that provide an EIP-1193 provider (eg. WalletConnect or Coinbase SDK), or even providing your own custom request function. - [fallback](https://docs.nibgate.xyz/viem-reference/pages/api/fallback.md): The fallback Transport consumes multiple Transports. If a Transport request fails, it will fall back to the next one in the list. - [http](https://docs.nibgate.xyz/viem-reference/pages/api/http.md): The http Transport connects to a JSON-RPC API via HTTP. - [decodeAbiParameters](https://docs.nibgate.xyz/viem-reference/pages/api/decodeabiparameters.md): Decodes ABI encoded data using the ABI specification, given a set of ABI parameters (inputs/outputs) and the encoded ABI data. - [decodeEventLog](https://docs.nibgate.xyz/viem-reference/pages/api/decodeeventlog.md): Decodes ABI encoded event topics & data. - [decodeFunctionData](https://docs.nibgate.xyz/viem-reference/pages/api/decodefunctiondata.md): Decodes ABI encoded data (4 byte selector & arguments) into a function name and arguments. - [encodeAbiParameters](https://docs.nibgate.xyz/viem-reference/pages/api/encodeabiparameters.md): Generates ABI encoded data. - [encodeFunctionData](https://docs.nibgate.xyz/viem-reference/pages/api/encodefunctiondata.md): Encodes the function name and parameters into an ABI encoded value (4 byte selector & arguments). - [getAddress](https://docs.nibgate.xyz/viem-reference/pages/api/getaddress.md): Converts an address into an address that is checksum encoded. - [getContractAddress](https://docs.nibgate.xyz/viem-reference/pages/api/getcontractaddress.md): Retrieves a contract address. - [isAddress](https://docs.nibgate.xyz/viem-reference/pages/api/isaddress.md): Checks if the address is valid. - [isAddressEqual](https://docs.nibgate.xyz/viem-reference/pages/api/isaddressequal.md): Checks if the given addresses (checksummed) are equal. - [stringToBytes](https://docs.nibgate.xyz/viem-reference/pages/api/stringtobytes.md): Encodes a string, hex value, number or boolean to a byte array. - [toHex](https://docs.nibgate.xyz/viem-reference/pages/api/tohex.md): Encodes a string, number, boolean or byte array to a hex value. - [keccak256](https://docs.nibgate.xyz/viem-reference/pages/api/keccak256.md): Calculates the Keccak256 hash of a byte array. - [hashMessage](https://docs.nibgate.xyz/viem-reference/pages/api/hashmessage.md): Hashes a message in EIP-191 format. - [hashTypedData](https://docs.nibgate.xyz/viem-reference/pages/api/hashtypeddata.md): Calculates an Ethereum-specific hash in EIP-712 format: keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)). - [recoverMessageAddress](https://docs.nibgate.xyz/viem-reference/pages/api/recovermessageaddress.md): Recovers the signing address from a message & signature. - [formatEther](https://docs.nibgate.xyz/viem-reference/pages/api/formatether.md): Converts numerical wei to a string representation of ether. - [formatUnits](https://docs.nibgate.xyz/viem-reference/pages/api/formatunits.md): Divides a number by a given exponent of base 10, and formats it into a string representation of the number. - [parseEther](https://docs.nibgate.xyz/viem-reference/pages/api/parseether.md): Converts a string representation of ether to numerical wei. - [parseUnits](https://docs.nibgate.xyz/viem-reference/pages/api/parseunits.md): Multiplies a string representation of a number by a given exponent of base 10.