-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add tendermint-light-client-js crate #812
Conversation
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Result can be used with wasm-bindgen. See https://rustwasm.github.io/docs/wasm-bindgen/reference/types/result.html. I never used it though. |
I'm quite happy to leave it as-is, if that works for you @webmaster128. The result comes through as per the example in the README. It's just a little weird with all the different naming conventions, but it works 😁 |
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good to me! Great job @thanethomson!
The one things we may still want to doo, is add a unit test which calls the exported verify
function with some JsValue
s.
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Cool! @romac I've now added two basic tests of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Could you also please fix the warnings in light-client-js/src/utils.rs
with an #[allow(dead_code)]
on set_panic_hook
?
Signed-off-by: Thane Thomson <[email protected]>
Signed-off-by: Thane Thomson <[email protected]>
Done 😁 |
Closes #463
The vast majority of this PR was taken from #671 with very few changes (thanks @romac for breaking ground there!). I basically added a UI to allow for quick/easy tweaking of the inputs
, and will be looking at defining a custom data structure to provide a result back to JavaScript as opposed to serializing Rust'sResult
type (TBD).EDIT: I'll leave the
verify
function parameters and return types as-is for now. We can always look at finding better ways of expressing the types in later versions.📖 Example README