Files
hub-monorepo/packages/hub-nodejs
planetBoy 43b89fd1f5 replace castWithEmojiLinkAttachmnent - castWithEmojiLinkAttachment index.ts (#2451)
I reviewed the entire repository, no more typos found in docs. 
Hope this helps streamline the project!
Best regards,
Bilogweb3


<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on correcting a typo in the variable name from
`castWithEmojiLinkAttachmnent` to `castWithEmojiLinkAttachment` in the
`packages/hub-nodejs/examples/write-data/index.ts` file, ensuring
consistency and clarity in the code.

### Detailed summary
- Changed variable name from `castWithEmojiLinkAttachmnent` to
`castWithEmojiLinkAttachment` for consistency.
- Updated the corresponding push to `castResults` to reflect the
corrected variable name.

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

<!-- end pr-codex -->
2025-01-08 19:45:24 -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