Providers¶
erpc.providers ¶
eRPC provider shortcut dataclasses.
Provider shortcuts let you add well-known RPC providers with minimal
configuration — typically just an API key. Each provider maps to the
eRPC ProviderConfig YAML schema with vendor and settings.
Examples:
>>> from erpc.providers import AlchemyProvider
>>> provider = AlchemyProvider(api_key="your-key")
>>> provider.to_dict()
{'vendor': 'alchemy', 'settings': {'apiKey': 'your-key'}}
Provider
dataclass
¶
Bases: ABC
Base class for eRPC provider shortcuts.
All providers serialize to a dictionary matching the eRPC
ProviderConfig Go struct: vendor, settings, and
optional network filters.
Attributes:
| Name | Type | Description |
|---|---|---|
only_networks |
list[str]
|
Restrict provider to these networks (e.g. |
ignore_networks |
list[str]
|
Exclude these networks from the provider. |
Source code in erpc/providers.py
to_dict ¶
Serialize to an eRPC-compatible provider config dictionary.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary with |
dict[str, Any]
|
|
Examples:
Source code in erpc/providers.py
AlchemyProvider
dataclass
¶
Bases: Provider
Alchemy RPC provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
Alchemy API key. |
Examples:
Source code in erpc/providers.py
InfuraProvider
dataclass
¶
Bases: Provider
Infura RPC provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
Infura API key. |
Examples:
Source code in erpc/providers.py
DrpcProvider
dataclass
¶
Bases: Provider
dRPC provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
dRPC API key. |
Examples:
Source code in erpc/providers.py
BlastAPIProvider
dataclass
¶
Bases: Provider
BlastAPI provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
BlastAPI key. |
Examples:
>>> BlastAPIProvider(api_key="demo").to_dict()
{'vendor': 'blastapi', 'settings': {'apiKey': 'demo'}}
Source code in erpc/providers.py
DwellirProvider
dataclass
¶
Bases: Provider
Dwellir provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
Dwellir API key. |
Source code in erpc/providers.py
ConduitProvider
dataclass
¶
Bases: Provider
Conduit provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
Conduit API key. |
Source code in erpc/providers.py
ChainstackProvider
dataclass
¶
Bases: Provider
Chainstack provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
Chainstack API key. |
Source code in erpc/providers.py
OnFinalityProvider
dataclass
¶
Bases: Provider
OnFinality provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
OnFinality API key. |
Source code in erpc/providers.py
TenderlyProvider
dataclass
¶
Bases: Provider
Tenderly provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
Tenderly API key. |
Source code in erpc/providers.py
BlockPiProvider
dataclass
¶
Bases: Provider
BlockPi provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
BlockPi API key. |
Source code in erpc/providers.py
AnkrProvider
dataclass
¶
Bases: Provider
Ankr provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
Ankr API key. |
Source code in erpc/providers.py
QuickNodeProvider
dataclass
¶
Bases: Provider
QuickNode provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
QuickNode API key. |
Source code in erpc/providers.py
RouteMeshProvider
dataclass
¶
Bases: Provider
RouteMesh provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
api_key |
str
|
RouteMesh API key. |
Source code in erpc/providers.py
ThirdwebProvider
dataclass
¶
Bases: Provider
Thirdweb provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
client_id |
str
|
Thirdweb client ID. |
Examples:
>>> ThirdwebProvider(client_id="my-id").to_dict()
{'vendor': 'thirdweb', 'settings': {'clientId': 'my-id'}}
Source code in erpc/providers.py
EnvioProvider
dataclass
¶
Bases: Provider
Envio HyperRPC provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
endpoint |
str
|
Envio RPC endpoint URL. |
Examples:
>>> EnvioProvider(endpoint="https://rpc.hypersync.xyz").to_dict()
{'vendor': 'envio', 'settings': {'endpoint': 'https://rpc.hypersync.xyz'}}
Source code in erpc/providers.py
PimlicoProvider
dataclass
¶
Bases: Provider
Pimlico account-abstraction provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
endpoint |
str
|
Pimlico RPC endpoint URL. |
Source code in erpc/providers.py
EtherspotProvider
dataclass
¶
Bases: Provider
Etherspot account-abstraction provider shortcut.
Attributes:
| Name | Type | Description |
|---|---|---|
endpoint |
str
|
Etherspot RPC endpoint URL. |
Source code in erpc/providers.py
SuperchainProvider
dataclass
¶
Bases: Provider
Superchain registry provider shortcut.
Adds all chains from the Optimism superchain registry. No credentials required.
Examples:
Source code in erpc/providers.py
RepositoryProvider
dataclass
¶
Bases: Provider
Public endpoint repository provider.
Automatically adds public RPC endpoints for 2,000+ EVM chains from a remote JSON repository.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
str | None
|
Custom repository URL. |
Examples:
>>> RepositoryProvider().to_dict()
{'vendor': 'repository'}
>>> RepositoryProvider(url="https://custom.repo/endpoints.json").to_dict()
{'vendor': 'repository', 'settings': {'url': 'https://custom.repo/endpoints.json'}}