<commit_before>const config = require('config');
const bcoin = require('bcoin').set(config.get('network'));
const Wallet = require('./Wallet');
const BTCCommiter = require('./BTCCommiter');
const co = require('co');

class Helpers {

  /**
   * Does the SPV Sync and finds Wallet Balance
   * @param {WalletDB} walletdb
   * @param {Wallet} dvgWallet - Wallet of Diavgeia
   * @returns {SPVNode}
   */

  static runSPV(walletdb, dvgWallet) {
    var spv = new bcoin.spvnode({
      prefix : Wallet.getWalletLocation(),
      network : config.get('network'),
      location : Wallet.getWalletLocation(),
      db : 'leveldb'
    });

    spv.ensure()
    .then(() => spv.open())
    .then(()=> {

      var address = dvgWallet.getAddress('base58');
      var xpub = dvgWallet.master.key.toPublic().xpubkey();
      console.log('Wallet Address', address);
      console.log('Xpub',xpub,'\n');

      spv.pool.watchAddress(dvgWallet.getAddress());
<commit_msg>Update Helpers jsdoc<commit_after>const config = require('config');
const bcoin = require('bcoin').set(config.get('network'));
const Wallet = require('./Wallet');
const BTCCommiter = require('./BTCCommiter');
const co = require('co');


/**
 * Helper functions organized in this class
 */

class Helpers {


  /**
   * Does the SPV Sync and finds Wallet Balance
   * @param {WalletDB} walletdb
   * @param {Wallet} dvgWallet - Wallet of Diavgeia
   * @returns {SPVNode}
   */

  static runSPV(walletdb, dvgWallet) {
    var spv = new bcoin.spvnode({
      prefix : Wallet.getWalletLocation(),
      network : config.get('network'),
      location : Wallet.getWalletLocation(),
      db : 'leveldb'
    });

    spv.ensure()
    .then(() => spv.open())
    .then(()=> {

      var address = dvgWallet.getAddress('base58');
      var xpub = dvgWallet.master.key.toPublic().xpubkey();
      console.log('Wallet Address', address);
      console.log('Xpub',xpub,'\n');

      spv.pool.watchAddress(dvgWallet.getAddress());

{'fraction_non_alphanumeric': 0.16396761133603238, 'fraction_numerical': 0.0020242914979757085, 'mean_word_length': 3.3642384105960264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7033492', 'n_tokens_mistral': 649, 'n_tokens_neox': 660, 'n_words': 140}