Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: working farcaster client with neynar #570

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sayangel
Copy link

Relates to:

Farcaster client: #300
Modification of open PR: #386

Risks

Low

Background

What does this PR do?

Adds a farcaster-client package so that Eliza agents can post to Farcaster. This PR modifies an existing Farcaster client PR to use Neynar instead of a direct hub. This makes it easier for people to deploy hubs and makes it easier to add additional features in the future using Neynar's APIs for interacting with Farcaster data.

What kind of change is this?

Features (non-breaking change which adds functionality)

Documentation changes needed?

Needs documentation on how to create a signer that can submit messages to Farcaster (via Neynar).

Testing

I have tested this PR by running a local eliza agent that is making posts on Farcaster via the Yoinker account: https://warpcast.com/yoinker

All the accounts in this cast have been created by a local Eliza instance.

Where should a reviewer start?

  • Populate the new Farcaster env variables
  • Add "farcaster" client to your character
  • Run the agent
  • Verify that a cast is made on startup

Detailed testing steps

@rubinovitz
Copy link

Thanks! Neynar is The Way.

@bmgalego
Copy link
Contributor

can you include #386 so it adds my commits too

# Farcaster Neynar Configuration
FARCASTER_FID=
FARCASTER_NEYNAR_SIGNER_UUID=
FARCASTER_NEYNAR_API_KEY=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayangel Add comments for the newly added environment variables (FARCASTER_FID, FARCASTER_NEYNAR_SIGNER_UUID, FARCASTER_NEYNAR_API_KEY) to explain what each variable is used for and any format restrictions. This will help developers understand how to set up these configurations correctly.

@@ -17,6 +17,7 @@
"@ai16z/client-auto": "workspace:*",
"@ai16z/client-direct": "workspace:*",
"@ai16z/client-discord": "workspace:*",
"@ai16z/client-farcaster": "workspace:*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayangel Ensure that you review and update the documentation to reflect this new dependency.

@@ -0,0 +1,19 @@
{
"name": "@ai16z/client-farcaster",
"version": "0.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayangel Review the new package’s version (0.0.1). Consider versioning best practices see semver.org

},
"scripts": {
"build": "tsup --format esm --dts",
"dev": "tsup --watch"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayangel add both the lint and test scripts, refer to other packages to get more details about their implementations.

async stop() {
await Promise.all([this.posts.stop(), this.interactions.stop()]);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayangel Ensure the new client-farcaster package is covered by tests, including unit tests and integration tests, to verify its functionality.

async stop() {
await Promise.all([this.posts.stop(), this.interactions.stop()]);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayangel Update or add relevant documentation, such as the README, with information on the new package and environment variables.

Ensure to add any documentation for developers on how to configure the newly added @ai16z/client-farcaster and related environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants