@farcaster/hub-web 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/index.d.ts +2857 -536
- package/dist/index.js +263 -15
- package/dist/index.mjs +269 -22
- package/package.json +2 -2
package/README.md
CHANGED
@@ -3,12 +3,14 @@
|
|
3
3
|
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).
|
4
4
|
|
5
5
|
## Features
|
6
|
+
|
6
7
|
- Call any endpoint using a simple HTTP API, including from a browser environment
|
7
8
|
- Responses are plain JSON
|
8
|
-
- Written entirely in Typescript, with strict types for safety.
|
9
|
+
- Written entirely in Typescript, with strict types for safety.
|
9
10
|
|
10
11
|
## Installation
|
11
|
-
|
12
|
+
|
13
|
+
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.
|
12
14
|
|
13
15
|
```bash
|
14
16
|
yarn add axios @farcaster/core
|
@@ -16,9 +18,11 @@ yarn add -D @types/axios
|
|
16
18
|
```
|
17
19
|
|
18
20
|
## Documentation
|
19
|
-
|
21
|
+
|
22
|
+
The HTTP API endpoints are [documented here](https://www.thehubble.xyz/docs/httpapi/httpapi.html).
|
20
23
|
|
21
24
|
### Getting started: fetching casts
|
25
|
+
|
22
26
|
```typescript
|
23
27
|
import axios from "axios";
|
24
28
|
|
@@ -37,6 +41,7 @@ try {
|
|
37
41
|
```
|
38
42
|
|
39
43
|
### Running the examples
|
44
|
+
|
40
45
|
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
|
41
46
|
|
42
47
|
```bash
|
@@ -45,6 +50,7 @@ yarn start
|
|
45
50
|
```
|
46
51
|
|
47
52
|
## grpc-Web
|
53
|
+
|
48
54
|
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](./README.grpcweb.md).
|
49
55
|
|
50
56
|
## Contributing
|