Skip to content

feat: refactor @waku/rln to use rln-wasm for credential generation and remove unused RLN logic #2519

@danisharora099

Description

@danisharora099

Description

The current lightweight credential generator in js-waku was implemented as a workaround that bypasses Zerokit (context). However, this implementation is not secure or robust, and it was agreed that Zerokit should be the canonical way to generate RLN credentials.

Additionally, js-waku does not require RLN proof generation or verification. Since it no longer maintains active support for Relay, most entities in @waku/rln are unnecessary for its current scope.

This issue proposes a focused refactor:

  • Use rln-wasm (Zerokit-backed) for credential generation
  • Remove all other RLN logic from @waku/rln

User Story

  • As a Waku SDK developer, I want to generate RLN credentials securely and minimally, so that js-waku remains lightweight while being compatible with the RLN v2 stack.
  • As a downstream application developer, I want to rely on a consistent and secure credential generation mechanism without unnecessary RLN overhead.

Proposed Solution / Feature Design

  • Upgrade Zerokit from 0.8.0 to rln-wasm@^0.2.0
  • Refactor @waku/rln to remove all unused RLN functionality (proof generation, membership state management, etc.)
  • Retain only the credential generation functionality, backed by the updated rln-wasm API

Optional: Diagram or Draft of Design

graph TD
    A[js-waku] -->|uses| B[rln-wasm]
    B -->|wraps| C[generate credentials]

    subgraph Scope_Removed
      D[Proof_Generation]
      E[Verification]
      F[Membership_Management]
    end

    B -.-> D
    B -.-> E
    B -.-> F
Loading

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions