Skip to main content

Class: MultiChainClient

A client to manage providers for different blockchain networks based on chain selectors. Requires a Config object to initialize.

Constructors

new MultiChainClient()

new MultiChainClient(config): MultiChainClient

Creates a MultiChainClient instance.

Parameters

config: Config

Config - The path to the configuration file.

Returns

MultiChainClient

Defined in

config/index.ts:47

Methods

getProvider()

getProvider(chainSelector): Promise<AbstractProvider>

Retrieves the provider for the specified chain selector, ensuring its connection.

Parameters

chainSelector: number

The chain selector number.

Returns

Promise<AbstractProvider>

A promise that resolves to an AbstractProvider.

Throws

Will throw an error if the provider cannot be found or connected.

Defined in

config/index.ts:123