Files
hub-monorepo/packages/hub-nodejs
Bob 47f5e7d41d Fixed typos and improved clarity in documentation (#2455)
Changes made:

typos - types ( Correcting a typo to the intended word)
LocalACcount - LocalAccount (Fixing the capitalization error to match
the proper format)



<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on correcting typos in test descriptions and
documentation related to the `getStoreLimit` function and the
`Eip712Signer` class.

### Detailed summary
- Changed the test description from "multiple unit typos" to "multiple
unit types" in `packages/core/src/limits.test.ts`.
- Corrected "LocalACcount" to "LocalAccount" in
`packages/hub-nodejs/docs/signers/ViemLocalEip712Signer.md`.

>  Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
2025-01-08 19:41:43 -08:00
..
2024-10-28 12:26:15 -05:00
2024-10-28 12:26:15 -05:00

@farcaster/hub-nodejs

A lightweight, fast Typescript interface for Farcaster Hubs. Designed to work with Hubble and any other Hub that implements the Farcaster 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, see more examples or get started with the guide below.

Installation

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

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

Quickstart

Fetching Data from Hubs

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.

An OpenAPI spec is provided here.

Contributing

Please see our contributing guidelines before making a pull request.

License

MIT License