a16z / helios

A fast, secure, and portable light client for Ethereum
MIT License
1.81k stars 274 forks source link

feat: expose wait_synced with helios-ts #301

Closed rdvorkin closed 10 months ago

rdvorkin commented 10 months ago

When interacting with helios via helios-ts wasm, expose the function wait_synced (or similar) to know when the provider is ready to use. Currently using the provider before it completed syncing will result Error: out of sync

ncitron commented 10 months ago

Yep this is definitely a good idea. Should be a pretty easy add. I can take a stab at it in the next few days unless anyone else is interested in picking it up.