dependabot[bot] 5fde2b7404
chore(deps-dev): bump vite from 5.4.20 to 5.4.21
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.20 to 5.4.21.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.21/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.21
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-29 12:25:27 +00:00
2025-10-29 17:53:59 +05:30
2025-09-25 21:52:40 +05:30
2025-09-25 21:52:40 +05:30
2025-09-25 21:58:56 +05:30
2025-09-25 21:52:40 +05:30
2025-09-25 21:52:40 +05:30

Opchan

TypeScript libraries for building decentralized, Waku-powered forums.

Packages

  • @opchan/core Core browser library: Waku messaging, local database, identity/ENS & Ordinals resolution, delegation, and forum actions.
  • @opchan/react React provider and hooks on top of @opchan/core.

Install

# core only
npm i @opchan/core

# react integration
npm i @opchan/react @opchan/core react react-dom

Quickstart

React

import React from 'react';
import { createRoot } from 'react-dom/client';
import { OpChanProvider, useForum } from '@opchan/react';

const config = { ordiscanApiKey: 'YOUR_ORDISCAN_API_KEY' };

function NewPostButton({ cellId }: { cellId: string }) {
  const { content, permissions } = useForum();
  return (
    <button
      disabled={!permissions.canPost}
      onClick={() => content.createPost({ cellId, title: 'Hello', content: 'World' })}
    >
      New post
    </button>
  );
}

function App() {
  return (
    <OpChanProvider config={config}>
      <NewPostButton cellId="general" />
    </OpChanProvider>
  );
}

createRoot(document.getElementById('root')!).render(<App />);

More details:

  • React API docs: packages/react/README.md

Development

This is an npm workspace. From the repo root:

# install all deps
npm install

# build all packages
npm run build

# build a specific package
npm run build --workspace=@opchan/core
npm run build --workspace=@opchan/react

# watch mode during development
npm run dev --workspace=@opchan/core
npm run dev --workspace=@opchan/react

# test & lint
npm test
npm run lint

License

MIT

Description
Languages
TypeScript 98.6%
CSS 1%
JavaScript 0.3%
HTML 0.1%