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
Parameter | Type | Description |
---|---|---|
signerOrProvider | SignerOrProvider | |
chainId | number |
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
Parameter | Type | Description |
---|---|---|
signerOrProvider | SignerOrProvider |
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
Parameter | Type | Description |
---|---|---|
signer | Signer |
Returns
signer is Signer & Object