api/transactions.js
function getAccountTx(api, options, callback) {
  var params = {
    account: options.account,
    ledger_index_min: options.ledger_index_min || options.ledger_index || -1,
    ledger_index_max: options.ledger_index_max || options.ledger_index || -1,
    limit: options.limit || DEFAULT_RESULTS_PER_PAGE,
    forward: options.earliestFirst,
    marker: options.marker
  };
  if (options.binary) {
    params.binary = true;
  }
  api.remote.requestAccountTx(params, function(error, account_tx_results) {
    if (error) {
      return callback(error);
    }
    var transactions = [];
    account_tx_results.transactions.forEach(function(tx_entry) {
      if (!tx_entry.validated) {
        return;
      }
      var tx = tx_entry.tx;
      tx.meta = tx_entry.meta;
      tx.validated = tx_entry.validated;
      transactions.push(tx);
    });
    callback(null, {
      transactions: transactions,
      marker: account_tx_results.marker
    });
  });
}
function getAccountTx(api, options, callback) {
  var params = {
    account: options.account,
    ledger_index_min: options.ledger_index_min || options.ledger_index || -1,
    ledger_index_max: options.ledger_index_max || options.ledger_index || -1,
    limit: options.limit || DEFAULT_RESULTS_PER_PAGE,
    forward: options.earliestFirst,
    marker: options.marker
  };
  if (options.binary) {
    params.binary = true;
  }
  api.remote.requestAccountTx(params, function(error, account_tx_results) {
    if (error) {
      return callback(error);
    }
    var transactions = [];
    account_tx_results.transactions.forEach(function(tx_entry) {
      if (!tx_entry.validated) {
        return;
      }
      var tx = tx_entry.tx;
      tx.meta = tx_entry.meta;
      tx.validated = tx_entry.validated;
      transactions.push(tx);
    });
    callback(null, {
      transactions: transactions,
      marker: account_tx_results.marker
    });
  });
}
function getAccountTx ( api , options , callback ) { var params = { account : options . account , ledger_index_min : options . ledger_index_min || options . ledger_index || - 1 , ledger_index_max : options . ledger_index_max || options . ledger_index || - 1 , limit : options . limit || DEFAULT_RESULTS_PER_PAGE , forward : options . earliestFirst , marker : options . marker } ; if ( options . binary ) { params . binary = true ; } api . remote . requestAccountTx ( params , function ( error , account_tx_results ) { if ( error ) { return callback ( error ) ; } var transactions = [ ] ; account_tx_results . transactions . forEach ( function ( tx_entry ) { if ( ! tx_entry . validated ) { return ; } var tx = tx_entry . tx ; tx . meta = tx_entry . meta ; tx . validated = tx_entry . validated ; transactions . push ( tx ) ; } ) ; callback ( null , { transactions : transactions , marker : account_tx_results . marker } ) ; } ) ; }
Wrapper around the standard ripple-lib requestAccountTx function

@param {Remote} remote
@param {RippleAddress} options.account
@param {Number} [-1] options.ledger_index_min
@param {Number} [-1] options.ledger_index_max
@param {Boolean} [false] options.earliestFirst
@param {Boolean} [false] options.binary
@param {opaque value} options.marker
@param {Function} callback

@callback
@param {Error} error
@param {Array of transactions in JSON format} response.transactions
@param {opaque value} response.marker
Wrapper around the standard ripple - lib requestAccountTx function