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

# JsonRpcApiProviderOptions

```ts theme={null}
type JsonRpcApiProviderOptions: {
  "batchMaxCount": number;
  "batchMaxSize": number;
  "batchStallTime": number;
  "cacheTimeout": number;
  "shardPaths": ShardPaths | ShardPaths[] | false;
  "shardPorts": ShardPorts | ShardPorts[] | false;
  "shards": Shard[] | Shard[][] | false;
  "staticNetwork": null | Network | boolean;
  "usePathing": boolean;
};
```

Options for configuring a [**JsonRpcApiProvider**](/sdk/content/classes/JsonRpcApiProvider). Much of this is targeted towards
sub-classes, which often will not expose any of these options to their consumers.

**`polling`** - use the polling strategy is used immediately for events; otherwise, attempt to use filters and fall
back onto polling (default: `false`)

**`staticNetwork`** - do not request chain ID on requests to validate the underlying chain has not changed (default:
`null`)

This should **ONLY** be used if it is **certain** that the network cannot change, such as when using INFURA (since
the URL dictates the network). If the network is assumed static and it does change, this can have tragic
consequences. For example, this **CANNOT** be used with MetaMask, since the used can select a new network from the
drop-down at any time.

**`batchStallTime`** - how long (ms) to aggregate requests into a single batch. `0` indicates batching will only
encompass the current event loop. If `batchMaxCount = 1`, this is ignored. (default: `10`)

**`batchMaxSize`** - target maximum size (bytes) to allow per batch request (default: 1Mb)

**`batchMaxCount`** - maximum number of requests to allow in a batch. If `batchMaxCount = 1`, then batching is
disabled. (default: `100`)

**`cacheTimeout`** - passed as AbstractProviderOptions | **AbstractProviderOptions**.

## Type declaration

### batchMaxCount?

```ts theme={null}
optional batchMaxCount: number;
```

### batchMaxSize?

```ts theme={null}
optional batchMaxSize: number;
```

### batchStallTime?

```ts theme={null}
optional batchStallTime: number;
```

### cacheTimeout?

```ts theme={null}
optional cacheTimeout: number;
```

### shardPaths?

```ts theme={null}
optional shardPaths: ShardPaths | ShardPaths[] | false;
```

### shardPorts?

```ts theme={null}
optional shardPorts: ShardPorts | ShardPorts[] | false;
```

### shards?

```ts theme={null}
optional shards: Shard[] | Shard[][] | false;
```

### staticNetwork?

```ts theme={null}
optional staticNetwork: null | Network | boolean;
```

### usePathing?

```ts theme={null}
optional usePathing: boolean;
```

## Source

[providers/provider-jsonrpc.ts:210](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider-jsonrpc.ts#L210)
