Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Bloom filter to verify balance #45

Open
rllola opened this issue Jan 9, 2017 · 2 comments
Open

Using Bloom filter to verify balance #45

rllola opened this issue Jan 9, 2017 · 2 comments

Comments

@rllola
Copy link

rllola commented Jan 9, 2017

Hello,

I would like to use webcoin and more particularly the Bloom filter. I am having a hard time to understand how it works. So simple use case : I would like to verify how much there is on a address. How can I do this, do I still need to sync all the headers ?

Thanks,

@mappum
Copy link
Owner

mappum commented Jan 12, 2017

Yes, you will need to sync all the headers after adding your data (the
public key hash associated with your addresses) to the Bloom filter. If you
know that your key was generated at a certain time, you only need to sync
starting at when they key was made, since you know there won't be any
transactions before that.

I'll build a simple module for this and put it on npm when I get some time. I'll try to make the API look something like this:

let scanner = scan({
    address: 'some address',
    dateCreated: 1484180397934, // some date
    node: node
})
scanner.on('balance', function (e) {
    console.log('balance changed:', e.balance)
})

@arshbot
Copy link

arshbot commented May 7, 2018

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants