private void importPublicKey(final JsonNode publicKeyJson) {
    if (publicKeyJson.getNodeType() != JsonNodeType.STRING) {
      throw new IllegalArgumentException(
          "Invalid key json of type: " + publicKeyJson.getNodeType());
    }
    final String publicKeyText = publicKeyJson.asText();

    try {
      final SECPPublicKey publicKey =
          SIGNATURE_ALGORITHM.get().createPublicKey(Bytes.fromHexString(publicKeyText));

      if (!SIGNATURE_ALGORITHM.get().isValidPublicKey(publicKey)) {
        throw new IllegalArgumentException(
            publicKeyText
                + " is not a valid public key for elliptic curve "
                + SIGNATURE_ALGORITHM.get().getCurveName());
      }

      writeKeypair(publicKey, null);
      LOG.info("Public key imported from configuration.({})", publicKey.toString());
    } catch (final IOException e) {
      LOG.error("An error occurred while trying to import node public key.", e);
    }
  }
Imports a single public key.

@param publicKeyJson The public key.
app/src/main/java/org/hyperledger/besu/cli/subcommands/operator/GenerateBlockchainConfig.java