Coin Community SDK
@coin-communities/sdk is a typed TypeScript client for the Coin Communities API.
The HTTP client is generated directly from the OpenAPI schema, so types always stay in
lockstep with the server.
What it covers
- Communities — fetch a community by token address; read, post, like, reply to, and report messages; upload media; list members; subscribe to realtime events via WebSocket.
- Feed — browse the cross-community activity feed (authenticated or public).
- Users — Twitter OAuth sign-in, profile management, wallet linking (EVM + Solana), and in-platform follow graph.
- Business — register a business account, manage API keys and allowed origins, register callback (webhook) URLs, invite team members, and read audit logs.
Runtime targets
The package ships three runtime entries plus an optional React Query layer. Your bundler/runtime resolves the right entry automatically via conditional exports.
| Runtime | Conditional entry | Explicit import |
|---|---|---|
| Browser (React) | browser | @coin-communities/sdk/react |
| React Native | react-native | @coin-communities/sdk/react-native |
| Node.js | node / default | @coin-communities/sdk/node |
For React apps, @coin-communities/sdk/react-query ships pre-baked useQuery /
useMutation hooks, a stable queryKeys factory, and the useCommunityEvents realtime
hook — see the React Query page.
Authentication
Two schemes are in use:
- API key (
x-api-keyheader) — required for all community, user, and feed operations, including the*/publicread endpoints. Create a key in the business dashboard after registering a business account. - Bearer JWT — required for business management endpoints (API keys, members, callbacks,
logs) and for user-scoped writes. Obtained by calling
api.login()(business) or completing the Twitter OAuth flow (user).
Only GET /health and GET /ping are open — every other endpoint needs an API key.
Next steps
- Quickstart — install, configure, and make your first call.
- SDK Reference — every operation grouped by domain.
- React Query — hooks and
queryKeysfor React apps.