• Converts an EIP chain id to a LedgerId object.

    If no mapping is found, returns LedgerId.LOCAL_NODE.

    Parameters

    • chainId: number

      The EIP chain ID (number) to be converted

    Returns LedgerId

    A LedgerId corresponding to the provided chain ID

    Example

    const localnodeLedgerId = EIPChainIdToLedgerId(298)
    console.log(localnodeLedgerId) // LedgerId.LOCAL_NODE
    const mainnetLedgerId = EIPChainIdToLedgerId(295)
    console.log(mainnetLedgerId) // LedgerId.MAINNET

Generated using TypeDoc