Skip to content

getNetwork

function getNetwork(networkPrefix: NetworkPrefix): Network;

Defined in: packages/iso-filecoin/src/utils.js:56

Get network from prefix

Parameters

ParameterType
networkPrefixNetworkPrefix

Returns

Network

Example

import {
function getNetwork(networkPrefix: NetworkPrefix): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network

Get network from prefix

@paramnetworkPrefix

@returns

@example

import { getNetwork } from 'iso-filecoin/utils'
const network = getNetwork('f')
// => 'mainnet'

getNetwork
} from 'iso-filecoin/utils'
const
const network: Network
network
=
function getNetwork(networkPrefix: NetworkPrefix): import("/opt/buildhome/repo/packages/iso-filecoin/dist/src/types").Network

Get network from prefix

@paramnetworkPrefix

@returns

@example

import { getNetwork } from 'iso-filecoin/utils'
const network = getNetwork('f')
// => 'mainnet'

getNetwork
('f')
// => 'mainnet'