public Transaction getSignedTransaction(final NonceProvider nonceProvider) {
    final KeyPair keyPair = SIGNATURE_ALGORITHM.get().createKeyPair(privateKey);

    final Address fromAddress = Address.extract(keyPair.getPublicKey());
    final long nonce = nonceProvider.get(fromAddress);
    return Transaction.builder()
        .gasLimit(gasLimit)
        .gasPrice(gasPrice)
        .nonce(nonce)
        .payload(data)
        .value(value)
        .to(to.orElse(null))
        .guessType()
        .signAndBuild(keyPair);
  }
Gets signed transaction.

@param nonceProvider the nonce provider
@return the signed transaction
app/src/main/java/org/hyperledger/besu/chainimport/internal/TransactionData.java