text: var crypto = require("./crypto.js")
  var constants = require("../constants.js")
  var slots = require("../time/slots.js")
  var options = require('../options')
  
  function createVote(keyList, secret, secondSecret) {
  	var keys = crypto.getKeys(secret);
  
  	var transaction = {
  		type: 3,
  		amount: 0,
  		fee: constants.fees.vote,
  		recipientId: null,
  		senderPublicKey: keys.publicKey,
  		timestamp: slots.getTime() - options.get('clientDriftSeconds'),
  		asset: {
  			vote: {
  				votes: keyList
  			}
  		}
  	};
  
  	crypto.sign(transaction, keys);
  
  	if (secondSecret) {
  		var secondKeys = crypto.getKeys(secondSecret);
  		crypto.secondSign(transaction, secondKeys);
  	}
  
  	transaction.id = crypto.getId(transaction);
  
  	return transaction;
  }
  
  module.exports = {
  	createVote: createVote
  }
  