Skip to content

feat: add wasm bindings for Drive verification functions - #2660

Merged
QuantumExplorer merged 16 commits into
v2.1-dev-sdkfrom
featadd-wasm-drive-verify
Jun 25, 2025
Merged

feat: add wasm bindings for Drive verification functions#2660
QuantumExplorer merged 16 commits into
v2.1-dev-sdkfrom
featadd-wasm-drive-verify

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Jun 5, 2025

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

This PR adds WebAssembly (WASM) bindings for various Drive verification functions, enabling JavaScript/TypeScript applications to interact with the Drive verification logic.

What was done?

  • Created the wasm-drive-verify package with bindings for verifying contracts, documents, identities, and tokens.
  • Implemented functions to verify elements, epoch information, upgrade states, and voting functionalities.
  • Added support for different query types and result formats (e.g., Vec and BTreeMap).
  • Included necessary utility functions for parsing and converting data between Rust and JavaScript.

How Has This Been Tested?

The new functionality has been tested using unit tests and integration tests within the WASM environment. The bindings have been verified against expected outcomes for various Drive verification scenarios.

Breaking Changes

None

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • New Features
    • Introduced a new package offering extensive WebAssembly (WASM) bindings for verifying proofs related to contracts, documents, identities, groups, tokens, voting, and system data.
    • Added rich verification functions accessible from JavaScript/TypeScript, supporting multiple result formats including arrays and maps.
    • Included detailed documentation, usage examples, and automated build scripts for the WASM package.
    • Provided specialized verification for single documents, state transitions, token transitions, and voting-related proofs.
    • Implemented comprehensive error handling and data serialization for seamless WASM-JS interoperability.
  • Chores
    • Updated workspace configuration and Dockerfile to incorporate the new WASM package and manage build artifacts.
    • Added notes and tests clarifying limitations of certain verification functions in the WASM context.

Loading
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.

1 participant