1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
//! # farcaster-rs
//! A Rust crate to interact with the [Farcaster](https://farcaster.xyz) smart contracrts & merkle APIs
//!
//! # Quickstart
//! To get started with the farcaster-rs crate, this should serve as a simple example of how to use it
//!
//! ```no_run
//! use farcaster_rs::{
//! Account,
//! Farcaster
//! };
//! use std::error::Error;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn Error>> {
//! // Initialize a new Account w/ your key and an optional token duration (milliseconds)
//! let account: Account = Account::from_mnemonic("super top secret phrase", None).await?;
//!
//! // Connect to an ETH node
//! let farcaster: Farcaster = Farcaster::new("node url", account).await?;
//!
//! // Get Dan Romero's Casts with his Username, while specifying a limit, and a cursor
//! let casts = farcaster.get_casts_by_username("dwr", Some(5), None).await?;
//!
//! println!("{:#?}", casts);
//!
//! Ok(())
//! }
//! ```
//! Quick explanation of all folders/modules in farcaster-rs
//!
//!
//! ## If you're looking for authentication
//! It's best to look in the [Account Struct](./types/account/struct.Account.html)
//!
//! ## If you're looking for most protocol-related functions
//! It's best to look in the [Farcaster Struct](./struct.Farcaster.html)
//!
//! ## If you're looking to convert stuff like Username -> FID, FID -> Address, etc....
//! It's best to look in the [Registry Struct](./types/registry/struct.Registry.html)
//!
//! ---------------
//! ## `account`
//! The account module handles authentication w/ the Farcaster Merkle APIs. Generating tokens, revoking tokens, etc....
//! View documentation [here](./account/index.html)
//!
//! ## `api`
//! The API module has room for growth, but for now holds some reqwest wrappers to make my life easier
//! View documentation [here](./api/index.html)
//!
//! ## `assets`
//! The assets module holds functions to get NFT collection related data.
//! View documentation [here](./assets/index.html)
//!
//! ## `casts`
//! The casts module holds functions related to casts on Farcaster. Getting casts, publishing casts, etc...
//! View documentation [here](./casts/index.html)
//!
//! ## `follows`
//! The follows module holds function related to followers and following. Follow users, unfollow, view followers, etc..
//! View documentation [here](./follows/index.html)
//!
//! ## `misc`
//! The misc module holds functions that don't entirely have a place. The only one for now is API Health
//! View documentation [here](./misc/index.html)
//!
//! ## `notifications`
//! The notifications module holds functions relating to notifications, which right now allows you to fetch notifications
//! //! View documentation [here](./notifications/index.html)
//!
//! ## `reactions`
//! The reactions module allows you to view and modify your reactions. Like, recast, list likes/recasts, etc...
//! View documentation [here](./reactions/index.html)
//!
//! ## `registry`
//! The registry module holds important functions most importantly relating to getting users.
//! - Convert addres/username to FID, get users via FID, etc......
//! View documentation [here](./registry/index.html)
//! ## `users`
//! The users module holds functions relating to users on Farcaster. Get users, get custody adress', etc...
//! //! View documentation [here](./users/index.html)
//!
//! ## `verifications`
//! The verifications module holds functions relating to cryptographic proofs such as getting verified address'
//! //! View documentation [here](./verifications/index.html)
pub use Account;
pub use Registry;
use Error;
/// The Farcaster type that holds the keys to the castle - so to speak :)