blowfishxyz / blocklist

Javascript library to use Blowfish blocklists locally
https://blowfish.xyz/
MIT License
11 stars 0 forks source link

feat: pass just recent domains to scanDomains instead of whole blocklist object #5

Closed sevazhidkov closed 1 year ago

sevazhidkov commented 1 year ago

I've made a blunder while designing the API — scanDomains only needs recent from the blocklist object, but I've made it accept whole DomainBlocklist as an argument.

Don from Phantom asked for an option to just send the recent:

Is there any reason to pass in the bloomFilter: {url: "", hash: "" } as part of the scanDomain method? Would it be possible to just pass in the recent, bloomFilter and domain?

Luckily, since we don't have any more clients yet, we can easily switch this API.

Fixes NIP-1078.