# @farcaster/hub-nodejs

> A lightweight, fast Typescript interface for Farcaster Hubs. Designed to work with [Hubble](https://github.com/farcasterxyz/hubble/) and any other Hub that implements the [Farcaster protocol](https://github.com/farcasterxyz/protocol).

Latest version **0.18.0** (published 2026-10-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @farcaster/hub-nodejs
pnpm add @farcaster/hub-nodejs
yarn add @farcaster/hub-nodejs
bun add @farcaster/hub-nodejs
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.18.0 |
| Published | 2026-10-25 |
| First published | 2023-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.6 MB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 829 |
| Maintainers | sds, topocount_neynar, mcilroyc-neynar, grinio, shreyas_chorge, bob-neynar, neynar_matthew, varunsrin, daddeo, tybook-neynar, manan-neynar |

## Links

- npm: https://www.npmjs.com/package/@farcaster/hub-nodejs
- Repository: https://github.com/farcasterxyz/hub-monorepo
- Homepage: https://github.com/farcasterxyz/hub-monorepo#readme
- Issues: https://github.com/farcasterxyz/hub-monorepo/issues
- npm.io page: https://npm.io/package/@farcaster/hub-nodejs

## Dependencies (4)

- [neverthrow](https://npm.io/package/neverthrow.md) ^6.0.0
- [@grpc/grpc-js](https://npm.io/package/@grpc/grpc-js.md) ~1.11.1
- [@noble/hashes](https://npm.io/package/@noble/hashes.md) ^1.3.0
- [@farcaster/core](https://npm.io/package/@farcaster/core.md) 0.21.0

## Recent versions

- 0.18.0 (latest) — 2026-10-25
- 0.17.0 — 2026-07-29
- 0.16.0 — 2026-05-21
- 0.15.11 — 2026-05-06
- 0.15.10 — 2026-02-04
- 0.15.9 — 2025-10-13
- 0.15.8 — 2025-09-30
- 0.15.7 — 2025-09-15
- 0.15.6 — 2025-08-29
- 0.15.5 — 2025-07-21
- 0.15.4 — 2025-07-12
- 0.15.3 — 2025-07-10
- 0.15.2 — 2025-07-07
- 0.15.1 — 2025-06-25
- 0.15.0 — 2025-06-23
- … 87 more at https://npm.io/package/@farcaster/hub-nodejs/versions

## README

# @farcaster/hub-nodejs

A lightweight, fast Typescript interface for Farcaster Hubs. Designed to work with [Hubble](https://github.com/farcasterxyz/hubble/) and any other Hub that implements the [Farcaster protocol](https://github.com/farcasterxyz/protocol).

## Features

- Call any Hub endpoint from a NodeJS environment.
- Serializes and deserializes Farcaster protobufs into Javascript objects.
- Has helpers to create and sign Farcaster messages.
- Written entirely in TypeScript, with strict types for safety.

Read the [documentation](https://github.com/farcasterxyz/hubble/tree/main/packages/hub-nodejs/docs), see more [examples](https://github.com/farcasterxyz/hubble/tree/main/packages/hub-nodejs/examples) or get started with the guide below.

## Installation

Install @farcaster/hub-nodejs with the package manager of your choice

```bash
npm install @farcaster/hub-nodejs
yarn add @farcaster/hub-nodejs
pnpm install @farcaster/hub-nodejs
```

## Quickstart

### Fetching Data from Hubs

```typescript
import { getSSLHubRpcClient } from '@farcaster/hub-nodejs';

client.$.waitForReady(Date.now() + 5000, async (e) => {
  if (e) {
    console.error(`Failed to connect to ${hubRpcEndpoint}:`, e);
    process.exit(1);
  } else {
    console.log(`Connected to ${hubRpcEndpoint}`);
    const castsResult = await client.getCastsByFid({ fid: 8928 });
    castsResult.map((casts) => casts.messages.map((cast) => console.log(cast.data?.castAddBody?.text)));
    client.close();
  }
});
```

## Documentation

The HTTP API endpoints are [documented here](https://docs.farcaster.xyz/reference/hubble/httpapi/httpapi).

An OpenAPI spec is provided [here](./spec.yaml).

## Contributing

Please see our [contributing guidelines](https://github.com/farcasterxyz/hubble/blob/main/CONTRIBUTING.md) before making a pull request.

## License

MIT License

---
_Source: https://npm.io/package/@farcaster/hub-nodejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
