0.11.11 • Published 22 hours ago

@farcaster/hub-nodejs v0.11.11

Weekly downloads
-
License
MIT
Repository
github
Last release
22 hours ago

@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

0.11.11

22 hours ago

0.11.10

13 days ago

0.11.9

20 days ago

0.11.8

1 month ago

0.11.7

2 months ago

0.11.6

2 months ago

0.11.5

2 months ago

0.11.4

2 months ago

0.11.2

2 months ago

0.11.3

2 months ago

0.11.1

2 months ago

0.11.0

3 months ago

0.10.24

3 months ago

0.10.22

3 months ago

0.10.23

3 months ago

0.10.21

3 months ago

0.10.20

4 months ago

0.8.4

10 months ago

0.10.9

7 months ago

0.10.18

5 months ago

0.10.19

5 months ago

0.10.14

7 months ago

0.10.1

9 months ago

0.10.15

7 months ago

0.10.2

9 months ago

0.10.16

6 months ago

0.10.3

9 months ago

0.10.17

6 months ago

0.10.4

9 months ago

0.10.10

7 months ago

0.10.5

8 months ago

0.10.11

7 months ago

0.10.6

8 months ago

0.10.12

7 months ago

0.10.7

8 months ago

0.10.13

7 months ago

0.10.8

8 months ago

0.10.0

9 months ago

0.9.0

10 months ago

0.8.3

10 months ago

0.9.1

10 months ago

0.8.2

10 months ago

0.8.1

11 months ago

0.8.0

11 months ago

0.7.4

12 months ago

0.7.3

12 months ago

0.7.2

12 months ago

0.7.1

1 year ago

0.7.0

1 year ago

0.6.3

1 year ago

0.6.2

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago