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”.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
provider | Provider | Ethers provider to get network from |
Returns
Section titled “Returns”Promise resolving to validated FilecoinNetworkType
Throws
Section titled “Throws”Error if the network is not supported