code: public static Script createInputScript(@Nullable TransactionSignature signature) {
          byte[] sigBytes = signature != null ? signature.encodeToBitcoin() : new byte[]{};
          return new ScriptBuilder().data(sigBytes).build();
      }
docs: Creates a scriptSig that can redeem a P2PK output.
  If given signature is null, incomplete scriptSig will be created with OP_0 instead of signature