chore: add docs for @opchan forum library#257
chore: add docs for @opchan forum library#257danisharora099 wants to merge 4 commits intodevelopfrom
@opchan forum library#257Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| description: Ship decentralized forum experiences over Waku using the OpChan React SDK. | ||
| --- | ||
|
|
||
| `@opchan/react` adds a forum-focused state layer on top of `@opchan/core`, Wagmi, and the Waku network. |
There was a problem hiding this comment.
Can we do a raw non react example too?
fryorcraken
left a comment
There was a problem hiding this comment.
Did you feed that in an LLM see if they can build with it? IT would be the easiest way to test.
|
|
||
| ## Why OpChan on Waku? | ||
|
|
||
| - **Forum-first primitives** – cells, posts, comments, votes, bookmarks, and moderation helpers. |
There was a problem hiding this comment.
The relevance score should be top of the list
| contentTopic: '/opchan/1/messages/proto', | ||
| reliableChannelId: 'opchan-messages', | ||
| }, | ||
| reownProjectId: import.meta.env.VITE_REOWN_PROJECT_ID, |
There was a problem hiding this comment.
is it clarified how this value is passed later?
| | Hook | Purpose | Typical actions | | ||
| | --- | --- | --- | | ||
| | `useAuth()` | Manage sessions, ENS verification, call signs, and delegation | `connect()`, `startAnonymous()`, `delegate('7days')`, `updateProfile()` | | ||
| | `useContent()` | Read/write cells, posts, comments, votes, bookmarks | `createPost()`, `vote()`, `moderate.post()`, `pending.isPending(id)` | | ||
| | `usePermissions()` | Query derived capabilities and friendly denial reasons | `canCreateCell`, `canModerate(cellId)`, `check('canPost')` | | ||
| | `useNetwork()` | Reflect Waku connection status and hydration lifecycle | `isConnected`, `statusMessage`, `refresh()` | | ||
| | `useUserDisplay(address)` | Resolve ENS + call-sign metadata for any address | `displayName`, `ensAvatar`, `verificationStatus` | | ||
| | `useUIState(key, defaultValue, category?)` | Persist UI state to IndexedDB | `[value, setValue]` pair scoped by key | | ||
| | `useEthereumWallet()` / `useClient()` | Advanced access to Wagmi connectors or the raw `OpChanClient` | `signMessage()`, direct database interactions | |
There was a problem hiding this comment.
Can you format the table in MD so it's easier to review?
3440daf to
b487183
Compare
caa2624 to
f66659d
Compare
e77bde4 to
6c1b0c3
Compare
6c1b0c3 to
1f1be7b
Compare
| "build/javascript/message-encryption", | ||
| "build/javascript/use-waku-react", | ||
| "build/javascript/use-waku-create-app", | ||
| "build/javascript/local-dev-env", |
weboko
left a comment
There was a problem hiding this comment.
lgtm except @fryorcraken comments
|
Do we still want to merge these docs, or should we close the PR? |
close, the specs are more important |
No description provided.