> ## Documentation Index
> Fetch the complete documentation index at: https://nexus.whatsgood.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Chains

> Learn how to configure chains and use them in Nexus

## Using built-in chains

Nexus ships with a handful of built-in chains. These can be accessed via the `CHAIN` constant.

```typescript theme={null}
import {
  NodeProvider,
  CHAIN,
} from "@whatsgood/nexus";

const alchemyNodeProvider = new NodeProvider({
  name: "llama-rpc",
  chain: CHAIN.ETHEREUM_MAINNET,
  url: "https://eth.llamarpc.com",
});

```

## Adding custom chains

If your target chain is not supported by Nexus, you can add it as a custom chain. When creating a chain, you need to provide a `name`, `chainId`, and `blockTime`. These values are then used to identify access, and fine-tune caching and other features.

```typescript theme={null}
import {
  NodeProvider,
  CHAIN,
} from "@whatsgood/nexus";

export const ETHEREUM_SEPOLIA = new Chain({
  name: "Ethereum Sepolia",
  chainId: 11155111,
  blockTime: 60,
});

const alchemyNodeProvider = new NodeProvider({
  name: "alchemy",
  chain: ETHEREUM_SEPOLIA,
  url: process.env.ALCHEMY_URL,
});

```
