Skip to main content

@morph-l2/sdkDocs


@morph-l2/sdk / toProvider

Function: toProvider()

toProvider(provider): Provider

Converts a ProviderLike into a Provider. Assumes that if the input is a string then it is a JSON-RPC url.

Parameters

provider: ProviderLike

ProviderLike to turn into a Provider.

Returns

Provider

Input as a Provider.

Source

src/utils/coercion.ts:46