Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Introduce new JS Api #4

Closed
wants to merge 13 commits into from
Closed

Introduce new JS Api #4

wants to merge 13 commits into from

Conversation

kianenigma
Copy link
Collaborator

to fix #2

@kianenigma kianenigma changed the title Kiz new api Introduce new JS Api Feb 14, 2019
@kianenigma
Copy link
Collaborator Author

This does merge and all tests (nodejs / browser) via wasm-pack work but the manual www folder might be broken. Seems like it is not an issue.

@jacogr
Copy link
Contributor

jacogr commented Feb 15, 2019

I think the breakages is probably related to this #5

@kianenigma
Copy link
Collaborator Author

@jacogr good point this will INDEED break some things but it is not even merged yet. I assume you are using the version in npmjs, right?

@jacogr
Copy link
Contributor

jacogr commented Feb 15, 2019

More-or-less. I use a heavily modified version from npmjs. So use that as the base and then apply my fixes/cleanups to the wrappers.

@kianenigma
Copy link
Collaborator Author

This is now ready to be pulled but an ideal scenario is to have the new version of the original schnorrkel published to fix this:
https://github.com/paritytech/schnorrkel-js/pull/4/files#diff-75009d71fc672c2f26529de8c1281c18R13

# var wasm = get_wasm()
# // this line is a gamble...
# setTimeout(() => wasm = get_wasm(), 500)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The caller needs to wait for the actual promise result to ensure it has been added.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed but then the export functions will be broken (export can only be used in the top level code.). Webpack's async import() function should be a proper fix for this I believe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will defintaly not merge this branch until at least this ugly thing is gone but it is good to have it pushed in here so that it can be tested without the need to place this horrble piece of code in npm :D

@kianenigma kianenigma added the wontfix This will not be worked on label Mar 13, 2019
@kianenigma kianenigma closed this Mar 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API change: Helper functions to combine/merge keys
2 participants