Skip to content

Make RPC & OpenApi Serializer / Deserializer async #1654

Description

@KingSora

Describe the feature

For simple serialization / deserilization (like e.g. for dates) the serializer API is enough. For more complex serialization like e.g. serializing crypto public keys, the entire webcrypto api is async.

An example for serializing a public key to a jwk (json web key):

const keyPair = await crypto.subtle.generateKey(
  {
    name: 'RSA-OAEP',
    modulusLength: 4096,
    publicExponent: new Uint8Array([1, 0, 1]),
    hash: 'SHA-256',
  },
  true,
  ['encrypt', 'decrypt'],
)
const serialized = await crypto.subtle.exportKey('jwk', keyPair.publicKey)

This can't be done with the current API. Willing to make a PR!

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions