code: func (f *wsClientFilter) existsAddress(a btcutil.Address) bool {
  	switch a := a.(type) {
  	case *btcutil.AddressPubKeyHash:
  		_, ok := f.pubKeyHashes[*a.Hash160()]
  		return ok
  	case *btcutil.AddressScriptHash:
  		_, ok := f.scriptHashes[*a.Hash160()]
  		return ok
  	case *btcutil.AddressPubKey:
  		serializedPubKey := a.ScriptAddress()
  		switch len(serializedPubKey) {
  		case 33: // compressed
  			var compressedPubKey [33]byte
  			copy(compressedPubKey[:], serializedPubKey)
  			_, ok := f.compressedPubKeys[compressedPubKey]
  			if !ok {
  				_, ok = f.pubKeyHashes[*a.AddressPubKeyHash().Hash160()]
  			}
  			return ok
  		case 65: // uncompressed
  			var uncompressedPubKey [65]byte
  			copy(uncompressedPubKey[:], serializedPubKey)
  			_, ok := f.uncompressedPubKeys[uncompressedPubKey]
  			if !ok {
  				_, ok = f.pubKeyHashes[*a.AddressPubKeyHash().Hash160()]
  			}
  			return ok
  		}
  	}
  
  	_, ok := f.otherAddresses[a.EncodeAddress()]
  	return ok
  }
docs: // existsAddress returns true if the passed address has been added to the
  // wsClientFilter.
  //
  // NOTE: This extension was ported from github.com/decred/dcrd