server.js
//Function to convert a base58 string to base 10 integer
Function to convert a base58 string to base 10 integer
Function to convert a base58 string to base 10 integer
function decode(str) {
    var decoded = 0;
    while (str) {
        var index = alphabet.indexOf(str[0]);
        var power = str.length - 1;
        decoded += index * (Math.pow(base, power));
        str = str.substring(1);
    }
    return decoded;
}
function decode ( str ) { var decoded = 0 ; while ( str ) { var index = alphabet . indexOf ( str [ 0 ] ) ; var power = str . length - 1 ; decoded += index * ( Math . pow ( base , power ) ) ; str = str . substring ( 1 ) ; } return decoded ; }
Function to convert a base58 string to base 10 integer
Function to convert a base58 string to base 10 integer