Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Installation

Relay is published as @0xhq/relay and ships as ESM.

Make sure your project declares "type": "module" or uses a bundler that understands .ts/.mjs outputs.

Add the package

pnpm
pnpm add @0xhq/relay

Verify your toolchain

  • TypeScript projects should keep moduleResolution set to node16/nodenext so the exported .ts entry points resolve correctly.
  • Frameworks (Next.js, Astro, etc.) usually support ESM bundles out of the box, but confirm the build output can resolve .ts sources from node_modules.
  • Relay has no runtime peer dependencies beyond React (if you use useRelay in components), but you will need to polyfill fetch or crypto in environments that lack them (e.g., older Node.js versions).