x402-chainlink
    Preparing search index...

    Function parseEVMNetwork

    • Parse a CAIP-2 EVM network identifier into its components

      Parameters

      • caip2: string

        CAIP-2 network identifier (e.g., "eip155:8453")

      Returns { chainId: number; namespace: "eip155"; reference: NetworkReference }

      Object with namespace ("eip155") and chainId

      Error if not a valid EVM CAIP-2 identifier

      const { namespace, chainId } = parseEVMNetwork('eip155:8453');
      console.log(namespace); // 'eip155'
      console.log(chainId); // 8453