MCPcopy Create free account
hub / github.com/TheLDB/farcaster-rs

github.com/TheLDB/farcaster-rs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
159 symbols 222 edges 79 files 52 documented · 33% updated 3y agov0.1.0-pre.3 · 2022-10-02★ 581 open issues

Browse by type

Functions 65 Types & classes 94
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img alt="farcaster-rs" align="center" src="https://raw.githubusercontent.com/TheLDB/farcaster-rs/main/assets/banner.png" />
<h1 align="center">farcaster-rs</h1>
 <h3 align="center">🚀 A simple & easy way to interface with <a href="https://farcaster.xyz">Farcaster</a> via <span style="color: #dea584;">Rust 🦀</span></h3>

Author: Landon Boles

    <a href="https://github.com/TheLDB" style="padding-right: 5px;">GitHub</a>

|

    <a href="https://perl.xyz/profile/lndnnft" style="padding-right: 5px; padding-left: 5px;">Farcaster</a>

|

    <a href="https://twitter.com/landon_xyz" style="padding-left: 5px; padding-right: 5px;">Bird App</a>

Credits

  • 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

🚀 Getting Started

Installation

To get started, add the farcaster_rs crate to your Cargo.toml file

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.

use farcaster_rs::{
  Farcaster,
  Account
};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  // 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 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:

$ 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!

Core symbols most depended-on inside this repo

browse all functions →

Shape

Class 94
Method 64
Function 1

Languages

Rust100%

Modules by API surface

src/types/casts/casts.rs14 symbols
src/registry/mod.rs13 symbols
src/types/casts/published_cast.rs10 symbols
src/types/notifications/notifications.rs8 symbols
src/account/mod.rs7 symbols
src/types/user/user.rs5 symbols
src/types/reactions/liked_casts.rs4 symbols
src/types/reactions/liked_cast.rs4 symbols
src/types/follows/followers.rs4 symbols
src/types/assets/user_collections.rs4 symbols
src/types/assets/collection_owners.rs4 symbols
src/verifications/get_verifications.rs3 symbols

For agents

$ claude mcp add farcaster-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page