Giter Club home page Giter Club logo

farcaster-rs's Introduction

farcaster-rs

farcaster-rs

๐Ÿš€ A simple & easy way to interface with Farcaster via Rust ๐Ÿฆ€

Author: Landon Boles




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!

farcaster-rs's People

Contributors

mistapproach avatar theldb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.