
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
@farcaster/hub-web
Advanced tools
A fast and easy REST-like interface to work with 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).
A fast and easy REST-like interface to work with Farcaster Hubs. Designed to work with Hubble and any other Hub that implements the Farcaster protocol.
The examples in this package use axios to make HTTP requests, but you can use any library. It is also useful to install the @farcaster/core library which has several helper methods that are useful while working with Farcaster messages.
yarn add axios @farcaster/core
yarn add -D @types/axios
The HTTP API endpoints are documented here.
import axios from "axios";
const fid = 2;
const server = "http://nemes.farcaster.xyz:2281";
try {
const response = await axios.get(`${server}/v1/castsByFid?fid=${fid}`);
console.log(`API Returned HTTP status ${response.status}`);
console.log(`The first cast's text is ${response.messages[0].data.castAddBody.text}`);
} catch (e) {
// Handle errors
console.log(response);
}
const getFnameFromFid = async (
fid: number,
client: HubRpcClient
): HubAsyncResult<string> => {
const result = await client.getUserData({
fid: fid,
userDataType: UserDataType.FNAME,
});
return result.map((message) => {
if (isUserDataAddMessage(message)) {
return message.data.userDataBody.value;
} else {
return '';
}
});
};
There are several examples in the examples/ folder. To run the examples, please look at the individual README files in the examples directory. Most examples can be run by
yarn install
yarn start
grpc-web was an older way of proxying to the grpc API from web environments. This has been deprecated and is no longer supported. You can read the original grpc-web documentation and examples here.
Please see our contributing guidelines before making a pull request.
MIT License
FAQs
A fast and easy REST-like interface to work with 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).
We found that @farcaster/hub-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.