code: function decode(str) {
    const [hrp, data] = deserialize(str);
  
    if (data.length === 0 || data.length > 65)
      throw new Error('Invalid bech32 data length.');
  
    if (data[0] > 16)
      throw new Error('Invalid bech32 version.');
  
    const version = data[0];
    const output = data;
    const hash = convert(data, output, 5, 8, -1, 1);
  
    if (hash.length < 2 || hash.length > 40)
      throw new Error('Invalid bech32 data length.');
  
    return new AddrResult(hrp, version, hash);
  }
docs: Deserialize data from bech32 address.
  @param {String} str
  @returns {Object}