Skip to main content

Module: dataEntities/signerOrProvider

SignerProviderUtils

Utility functions for signer/provider union types

Methods

checkNetworkMatches()

static checkNetworkMatches(signerOrProvider, chainId): Promise< void >

Checks that the signer/provider that's provider matches the chain id Throws if not.

Parameters
ParameterTypeDescription
signerOrProviderSignerOrProvider
chainIdnumber
Returns

Promise\< void >

Source

arbitrum-sdk/src/lib/dataEntities/signerOrProvider.ts:56


getProvider()

static getProvider(signerOrProvider): undefined | Provider

If signerOrProvider is a provider then return itself. If signerOrProvider is a signer then return signer.provider

Parameters
ParameterTypeDescription
signerOrProviderSignerOrProvider
Returns

undefined | Provider

Source

arbitrum-sdk/src/lib/dataEntities/signerOrProvider.ts:24


signerHasProvider()

static signerHasProvider(signer): signer is Signer & Object

Check if the signer has a connected provider

Parameters
ParameterTypeDescription
signerSigner
Returns

signer is Signer & Object

Source

arbitrum-sdk/src/lib/dataEntities/signerOrProvider.ts:44