Open larskluge opened 6 years ago
As an idea, a hacked, ugly version (for Promise usage only): https://github.com/larskluge/y-ipfs-connector/commit/0496b8bece3cec5c83b8cf2402ff57e533742465
@larskluge Looks cool!
Could we also support, at the same time, providing a synchronous version of encode
? (I think you could do than by wrapping encode
with a promise...)
Good thinking, I like wrapping encode
into a promise, makes the code path straight forward. If I find some time soon, I'll do a PR. Cheers!
It would be great to allow async processing of encoding and decoding of messages. For example openpgpjs encrypts and decrypts data asynchronously. The connector would need to allow to pass in async encode/decode functions via options.