Class: SignerProviderUtils
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
Name | Type |
---|---|
signerOrProvider | SignerOrProvider |
chainId | number |
Returns
Promise
<void
>
Defined in
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
Name | Type |
---|---|
signerOrProvider | SignerOrProvider |
Returns
undefined
| Provider
Defined in
src/lib/dataEntities/signerOrProvider.ts:24
signerHasProvider
Static
signerHasProvider(signer
): signer is Signer & Object
Check if the signer has a connected provider
Parameters
Name | Type |
---|---|
signer | Signer |
Returns
signer is Signer & Object