public Optional<BigInteger> getV() {
    BigInteger v = transactionWithMetadata.getTransaction().getV();
    return Optional.ofNullable(
        v == null
                && (transactionWithMetadata.getTransaction().getType().getEthSerializedType()
                    < TransactionType.BLOB.getEthSerializedType())
            ? transactionWithMetadata.getTransaction().getYParity()
            : v);
  }
Retrieves the V component of the transaction's signature.

<p>If the transaction type is less than the BLOB transaction type and V is null, it returns the
Y parity of the transaction. Otherwise, it returns V.

@return an Optional containing a BigInteger object representing the V component of the
    transaction's signature, or an Optional containing the Y parity of the transaction if V is
    null and the transaction type is less than the BLOB transaction type.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/graphql/internal/pojoadapter/TransactionAdapter.java