js-waku/packages/rln/README.md
Arseniy Klempner f2ad23ad43
feat(rln)!: generate contract types, migrate from ethers to viem (#2705)
* feat: use wagmi to generate contract types

* feat: migrate rln from ethers to viem

* fix: remove .gitmodules

* fix: update readme

* fix: refactor to use a single viem client object

* fix: update comments, tsconfig

* feat: remove membership event tracking

* fix: script name in package.json and readme

* fix: only allow linea sepolia

* fix: consolidate viem types, typed window

* fix: use viem to infer type of decoded event

* fix: use js for generate abi script

* feat: generate abi and build rln package as release condition

* fix: check that eth_requestAccounts returns an array

* fix: handle error messages

* fix: use https instead of git for cloning in script

* fix: add warning annotations for contract typings check

* fix: install deps for rln package before building

* fix: use pnpm when installing rln contracts

* fix: use workspace flag to run abi script

* fix: add ref to checkout action

* fix: include pnpm in ci
2025-12-01 17:32:35 -08:00

847 B

@waku/rln

Rate Limiting Nullifier (RLN) implementation for Waku.

Description

This package provides RLN functionality for the Waku protocol, enabling rate-limiting capabilities while preserving privacy.

Installation

npm install @waku/rln

Smart Contract Type Generation

We use wagmi to generate TypeScript bindings for interacting with the RLN smart contracts.

When changes are pushed to the waku-rlnv2-contract repository, run the following script to fetch and build the latest contracts and generate the TypeScript bindings:

npm run setup:contract-abi

Note that we commit/bundle the generated typings, so it's not necessary to run this script unless the contracts are updated.

Usage

import { RLN } from '@waku/rln';

// Usage examples coming soon

License

MIT OR Apache-2.0