Skip to content

[Task] Wasm Bindings Improvements  #669

Open
@HenriqueNogara

Description

@HenriqueNogara

Description

Remove exposure of Ed25519.sign, remove Storage Send/Sync ties to the wasm feature, and make keyDel in typescript compatible with the Rust code. Refactor the Storage trait to return better errors, and simplify its API.

Motivation

  1. Users should be able to sign data without relying on our code.
  2. We might need the Storage trait not to be Send/Sync for other bindings (e.g Python) as well, so we should not tie its bounds to the wasm feature.
  3. Js implementation of MemStore keyDel slightly differs from the Rust code regarding idempotency.
  4. identity_account::types::signature::Signature::pkey is not used in the Rust code.
  5. Storage::set_password is no longer needed.
  6. Improve error feedback. See: Add Wasm Account Storage interface #597 (comment)

To-do list

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • The feature or fix is implemented in Rust and across all bindings whereas possible.
  • The feature or fix has sufficient testing coverage
  • All tests and examples build and run locally as expected
  • Every piece of code has been document according to the documentation guidelines.
  • If conceptual documentation (mdbook) and examples highlighting the feature exist, they are properly updated.
  • If the feature is not currently documented, a documentation task Issue has been opened to address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or improvement to an existing featureWasmRelated to Wasm bindings. Becomes part of the Wasm changelog

    Type

    No type

    Projects

    Status

    Product Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions