code: def get_unspents(self):
          
          self.unspents[:] = list(map(
              lambda u: u.set_type('p2pkh' if self.is_compressed() else
                                   'p2pkh-uncompressed'),
              NetworkAPI.get_unspent(self.address)
          ))
          if self.segwit_address:
              self.unspents += list(map(
                  lambda u: u.set_type('np2wkh'),
                  NetworkAPI.get_unspent(self.segwit_address)
              ))
          self.balance = sum(unspent.amount for unspent in self.unspents)
          return self.unspents
docs: Fetches all available unspent transaction outputs.
  
          :rtype: ``list`` of :class:`~bit.network.meta.Unspent`