• Converts a network name to a CAIP chain id.

    If no mapping is found, returns the CAIP chain id for LedgerId.LOCAL_NODE.

    Parameters

    • networkName: string

      The network name (string) to be converted

    Returns string

    A string representing the CAIP chain id for the provided network name

    Example

    const previewnetChainId = networkNameToCAIPChainId('previewnet')
    console.log(previewnetChainId) // HederaChainId.Previewnet
    const devnetChainId = networkNameToCAIPChainId('devnet')
    console.log(devnetChainId) // HederaChainId.Devnet

Generated using TypeDoc