• Converts a LedgerId object to an EIP chain id.

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

    Parameters

    • ledgerId: LedgerId

      The LedgerId object to be converted

    Returns number

    A number representing the EIP chain id for the provided LedgerId

    Example

    const previewnetChainId = ledgerIdToEIPChainId(LedgerId.PREVIEWNET)
    console.log(previewnetChainId) // 297
    const testnetChainId = ledgerIdToEIPChainId(LedgerId.TESTNET)
    console.log(testnetChainId) // 296

Generated using TypeDoc