Skip to main content

@morph-l2/sdkDocs


@morph-l2/sdk / toSignerOrProvider

Function: toSignerOrProvider()

toSignerOrProvider(signerOrProvider): Provider | Signer

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

Parameters

signerOrProvider: SignerOrProviderLike

SignerOrProviderLike to turn into a Signer or Provider.

Returns

Provider | Signer

Input as a Signer or Provider.

Source

src/utils/coercion.ts:25