polytope-labs / hyperbridge

Hyperbridge is a hyperscalable coprocessor for verifiable, cross-chain interoperability
https://docs.hyperbridge.network/
Apache License 2.0
107 stars 33 forks source link

Make hyperclient compatible with nodejs #256

Closed seunlanlege closed 2 months ago

seunlanlege commented 2 months ago

Previously we only published the hyperclient library for bundlers, this PR ensures that we support not just bundlers but nodejs and web targets as well.

Replaced fluvio-wasm-timer with the nodejs compatible wasmtimer crate. Minor gotcha for nodejs users, under the hood, the hyperclient library uses the global Websocket object which wasn't added to nodejs until v22 or later. https://nodejs.org/en/blog/announcements/v22-release-announce#websocket