Crates.io | jesse |
lib.rs | jesse |
version | 0.2.3 |
source | src |
created_at | 2024-11-04 04:57:00.591452 |
updated_at | 2024-12-01 11:29:07.851889 |
description | Register and add signers to the farcaster network easily |
homepage | |
repository | https://github.com/0x330a-public/jesse |
max_upload_size | |
id | 1434556 |
size | 33,179 |
We need to cook
Your agents need to be posting to a sufficiently decentralized network
What are you doing reading this, get your pets/friends/companions/agents online NOW
A rust library with minimal dependencies outside of something you can run entirely yourself or reliably use for free
Let people onboard to farcaster using only an ed25519 SigningKey and an alloy TxSigner, or sign externally using the EIP-712 typed hashes generated from this library and submit the transactions on behalf of the signing account.
Use fatline-rs to provide direct hub access after you sign up to make posts and query the network from your own hub.
Check out an example of how this library can be used in action
The basic flow for signing up your own ethereum signer and adding a key would be something like:
async fn main() -> Result<()> {
// get our ed25519 signing keys
let ed25519_key = SigningKey::generate(&mut OsRng);
let ed25519_pub = VerifyingKey::from(&ed25519_key);
let pub_key_bytes = ed25519_pub.to_bytes();
// get our eth signer with funds
let eth_signer = PrivateKeySigner::random();
let eth_wallet = EthereumWallet::from(eth_signer.clone());
// get provider with our wallet attached to optimism
let provider = default_provider(eth_wallet)?;
let eth_address = eth_signer.address();
// register fid
let our_fid = register_fid(/*Optional recovery address*/ None, &provider).await?;
// add ed25519 key
add_key(eth_address, pub_key_bytes, ð_signer, &provider).await?;
// ... post or do something else
Ok(())
}