Skip to content
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

feat!: BlockEncoder optional promise for encode/decode #305

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mabels
Copy link

@mabels mabels commented Jul 30, 2024

  Enable the BlockEncoder to use promise API in encode/decode methods.
  Why we need that:
    https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
  To enable the promise to encode/decode a breaking change to 
  createUnsafe is required.
  The existing signature of createUnsafe can not pass a promise.
  Therefore the tests need to change.
  For me, measuring the blast radius of the change is impossible.
  If the blast radius is too big then there is still the possibility to
  create a new method createUnsafeAsync and throw an error
  in the createUnsafe if the decode sends a promise.

      methods.
      Why we need that:
        https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto
      To enable the async a breaking change to createUnsafe is
      required.
      The existing signature is not able to pass a promise.
      Therefore the tests need to change.
      For me, measuring the blast radius of the change is impossible.
      If the blast radius is too big then there is still the possibility to
      create a new method createUnsafeAsync and throw an error
      in the createUnsafe if the decode sends a promise.
@mabels mabels changed the title enable the BlockEncoder to use promise API in encode/decode methods feat: enable the BlockEncoder to use promise API in encode/decode methods Jul 30, 2024
@mabels mabels changed the title feat: enable the BlockEncoder to use promise API in encode/decode methods feat: BlockEncoder optional promise for encode/decode Jul 30, 2024
package.json Outdated Show resolved Hide resolved
@rvagg
Copy link
Member

rvagg commented Jul 30, 2024

alternate form of #282

@Gozala are you interested on engaging in these? you had some ideas about async usage at one point but I don't remember where that went

@achingbrain achingbrain changed the title feat: BlockEncoder optional promise for encode/decode feat!: BlockEncoder optional promise for encode/decode Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants