Skip to content

getFilecoinNetworkType

function getFilecoinNetworkType(provider): Promise<FilecoinNetworkType>;

Defined in: packages/synapse-sdk/src/utils/network.ts:20

Extract and validate FilecoinNetworkType from an ethers Provider

Uses chainId for network detection since the actual network name from ethers will be something like “Filecoin Calibration Testnet” rather than just “calibration”.

ParameterTypeDescription
providerProviderEthers provider to get network from

Promise<FilecoinNetworkType>

Promise resolving to validated FilecoinNetworkType

Error if the network is not supported