Open duggaraju opened 9 months ago
Right now I can call manifest.save_from_memory() to sign from web assembly. However it takes Signer trait. But since implementation in javascript (remote or webcrypto) return promises it would be hard to implement the same. If we had a similar function that takes AsyncSigner then it can be fully implemented in web assembly. In general to avoid confusion and duplication, might be better to converge on a single AsyncSigner trait everywhere.
We have clients that cannot use async. Two APIs will likely remain for the foreseeable future.
Oh. I see. If so can we use the async_generic trait so there is both async and sync support for functions like Manifest.embed_from_memory() and Manifest::embed_to_stream and the corresponding store functions. Right now, the macro is used inconsistently.
Yes, we are working on consolidating that code so there is as little code duplication as possible.
AsyncSigner can be used everywhere and avoid two different sets of APIs?