code: func (f *wsClientFilter) addAddress(a btcutil.Address) {
  	switch a := a.(type) {
  	case *btcutil.AddressPubKeyHash:
  		f.pubKeyHashes[*a.Hash160()] = struct{}{}
  		return
  	case *btcutil.AddressScriptHash:
  		f.scriptHashes[*a.Hash160()] = struct{}{}
  		return
  	case *btcutil.AddressPubKey:
  		serializedPubKey := a.ScriptAddress()
  		switch len(serializedPubKey) {
  		case 33: // compressed
  			var compressedPubKey [33]byte
  			copy(compressedPubKey[:], serializedPubKey)
  			f.compressedPubKeys[compressedPubKey] = struct{}{}
  			return
  		case 65: // uncompressed
  			var uncompressedPubKey [65]byte
  			copy(uncompressedPubKey[:], serializedPubKey)
  			f.uncompressedPubKeys[uncompressedPubKey] = struct{}{}
  			return
  		}
  	}
  
  	f.otherAddresses[a.EncodeAddress()] = struct{}{}
  }
docs: // addAddress adds an address to a wsClientFilter, treating it correctly based
  // on the type of address passed as an argument.
  //
  // NOTE: This extension was ported from github.com/decred/dcrd