Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TheLDB/farcaster-rs
🚀 A fast & easy way to interface w/ Farcaster.xyz via Rust 🦀
https://github.com/TheLDB/farcaster-rs
crate farcaster rust
Last synced: 26 days ago
JSON representation
🚀 A fast & easy way to interface w/ Farcaster.xyz via Rust 🦀
- Host: GitHub
- URL: https://github.com/TheLDB/farcaster-rs
- Owner: TheLDB
- License: mit
- Created: 2022-09-23T21:05:01.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-13T18:09:57.000Z (over 1 year ago)
- Last Synced: 2024-11-07T21:47:07.492Z (about 1 month ago)
- Topics: crate, farcaster, rust
- Language: Rust
- Homepage: https://crates.io/crates/farcaster_rs
- Size: 257 KB
- Stars: 57
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-farcaster - TheLDB/farcaster-rs
- awesome-farcaster-dev - `farcaster-rs`
- awesome-farcaster-dev - `farcaster-rs`
README
# Credits
- [MistApproach](https://github.com/MistApproach)
- Tons of various improvements & suggestions to build on top of the crate & prepare it for the hubs launch.# 📜 Documentation
## For extensive documentation, visit our [docs.rs page](https://docs.rs/farcaster-rs/1.0.1/farcaster_rs/)
# 🚀 Getting Started
## Installation
To get started, add the farcaster_rs crate to your `Cargo.toml` file
```toml
farcaster_rs = "1.0.1"
```Once you have the crate installed, you can start using the crate!
## Usage
To connect to and use Farcaster API you need Ethereum provider HTTP endpoint along with mnemonic phrase
or private key of an existing Farcaster account.```rust
use farcaster_rs::{
Farcaster,
Account
};#[tokio::main]
async fn main() -> Result<(), Box> {
// Initialize a new Account with a phrase/private key and an optional key duration (defaults to 1 hour)
let account = Account::from_mnemonic("mnemonic phrase", None).await?;
// Create a Farcaster connection
let farcaster = Farcaster::new("eth node", account).await?;
let casts = farcaster.get_casts_by_username("lndnnft", None, None).await?;
println!("{:#?}", casts);
Ok(())
}
```
# 🙏 Contributing
To start, I appreciate any and all contributions to the farcaster-rs repository!
There are 3 prefered things I'd like if you decide to contribute, however.
## 1. Ensure the issue/contribution is needed
If you spend your time building something, please ensure it's actually wanted/needed, this is best done by using the [Issues](https://github.com/TheLDB/farcaster-rs/issues) tab, and either viewing other discussions, or opening a new issue/discussion
## 2. Create a new branch for your contribution
Once you have validated the contribution, and forked the repo to your own GitHub account, please create a new branch to commit your code onto.
This can be done via the git CLI pretty easily:
```sh
$ git switch -c my_cool_feature
```## 3. Create a detailed pull request, with documentation
I'd like to keep everything documented to make it as easy as possible for people looking to use the crate.
When opening a pull request, please ensure your function/contribution has been properly documented, and include good information about it in the PR. (use common sense)
Thanks so much!