code: func TrivialBase58DecodingAlphabet(str string, alphabet *Alphabet) ([]byte, error) {
  	zero := alphabet.encode[0]
  
  	var zcount int
  	for i := 0; i < len(str) && str[i] == zero; i++ {
  		zcount++
  	}
  	leading := make([]byte, zcount)
  
  	var padChar rune = -1
  	src := []byte(str)
  	j := 0
  	for ; j < len(src) && src[j] == byte(padChar); j++ {
  	}
  
  	n := new(big.Int)
  	for i := range src[j:] {
  		c := alphabet.decode[src[i]]
  		if c == -1 {
  			return nil, fmt.Errorf("illegal base58 data at input index: %d", i)
  		}
  		n.Mul(n, bn58)
  		n.Add(n, big.NewInt(int64(c)))
  	}
  	return append(leading, n.Bytes()...), nil
  }
docs: // TrivialBase58DecodingAlphabet decodes the base58 encoded bytes
  // (inefficiently) using the given b58 alphabet.