Skip to content

Instantly share code, notes, and snippets.

@gsgalloway
Created September 27, 2022 17:57
Show Gist options
  • Save gsgalloway/49145dab5224d6ecbd545e905d1c88bb to your computer and use it in GitHub Desktop.
Save gsgalloway/49145dab5224d6ecbd545e905d1c88bb to your computer and use it in GitHub Desktop.
import { Farcaster, publishCast } from '@standard-crypto/farcaster-js';
import { AlchemyProvider } from "@ethersproject/providers";
import { Wallet } from "ethers";
async function main() {
const provider = new AlchemyProvider("goerli")
const wallet = Wallet.fromMnemonic("words words words")
const farcaster = new Farcaster(provider);
const latestPost = await farcaster.getLatestActivityForUser("gavi");
await publishCast(wallet, provider, "another reply to myself", latestPost);
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment