> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ProviderState

```ts theme={null}
type ProviderState = {
  chainId: number;
  setChainId: (chainId: number) => void;
  chains: readonly [Chain, ...Chain[]];
  user:   | User
     | null;
  setUser: (user: 
     | User
    | null) => void;
};
```

The attributes/methods representing the state of the provider

## Properties

| Property | Type |
| - | - |
| <a id="chainid" /> `chainId` | `number` |
| <a id="setchainid" /> `setChainId` | (`chainId`: `number`) => `void` |
| <a id="chains" /> `chains` | readonly \[`Chain`, `...Chain[]`] |
| <a id="user" /> `user` | \| [`User`](/sdks/cdp-sdks-v2/frontend/@coinbase/cdp-core/Type-Aliases/User) \| `null` |
| <a id="setuser" /> `setUser` | (`user`: \| [`User`](/sdks/cdp-sdks-v2/frontend/@coinbase/cdp-core/Type-Aliases/User) \| `null`) => `void` |
