React hooks
WhitehashProvider
Set up Whitehash once, then use it throughout your app.
Usage
tsx
import { WhitehashProvider } from "@whitehash/ui"<WhitehashProvider><App /></WhitehashProvider>
Configuration boundary
WhitehashProvider works without configuration. It selects mainnet, bundled third-party endpoints, default IPFS gateways, and browser-persistent caching. Pass only the values you want to override.
tsx
const config = {mode: "mainnet",resolver: {ipfsGateways: ["https://ipfs.io", "https://dweb.link"],onchfs: { mode: "service-worker" },},tzkt: { "tezos:mainnet": "https://api.tzkt.io" },evm: { rpcs: { "eip155:8453": [process.env.NEXT_PUBLIC_BASE_RPC!] } },}
Live result
mode: mainnet; gateways: 2