Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ STARKNET_RPC_URL=
# Intiface Configuration
INTIFACE_WEBSOCKET_URL=ws://localhost:12345

# Farcaster
FARCASTER_HUB_URL=
FARCASTER_FID=
FARCASTER_PRIVATE_KEY=
# Farcaster Neynar Configuration
FARCASTER_FID= # the FID associated with the account your are sending casts from
FARCASTER_NEYNAR_API_KEY= # Neynar API key: https://neynar.com/
FARCASTER_NEYNAR_SIGNER_UUID= # signer for the account you are sending casts from. create a signer here: https://dev.neynar.com/app

# Coinbase
COINBASE_COMMERCE_KEY= # from coinbase developer portal
Expand Down
1 change: 1 addition & 0 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@ai16z/client-auto": "workspace:*",
"@ai16z/client-direct": "workspace:*",
"@ai16z/client-discord": "workspace:*",
"@ai16z/client-farcaster": "workspace:*",

Copy link
Copy Markdown
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.

"@ai16z/client-telegram": "workspace:*",
"@ai16z/client-twitter": "workspace:*",
"@ai16z/eliza": "workspace:*",
Expand Down
7 changes: 7 additions & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { DirectClientInterface } from "@ai16z/client-direct";
import { DiscordClientInterface } from "@ai16z/client-discord";
import { TelegramClientInterface } from "@ai16z/client-telegram";
import { TwitterClientInterface } from "@ai16z/client-twitter";
import { FarcasterAgentClient } from "@ai16z/client-farcaster";
import {
AgentRuntime,
CacheManager,
Expand Down Expand Up @@ -322,6 +323,12 @@ export async function initializeClients(
clients.push(twitterClients);
}

if (clientTypes.includes("farcaster")) {
const farcasterClients = new FarcasterAgentClient(runtime);
farcasterClients.start();
clients.push(farcasterClients);
}

if (character.plugins?.length > 0) {
for (const plugin of character.plugins) {
if (plugin.clients) {
Expand Down
10 changes: 4 additions & 6 deletions packages/client-farcaster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
"types": "dist/index.d.ts",
"dependencies": {
"@ai16z/eliza": "workspace:*",
"@farcaster/hub-nodejs": "0.12.7",
"viem": "2.21.53"
"@neynar/nodejs-sdk": "^2.0.3"
},
"devDependencies": {
"tsup": "8.3.5"
"tsup": "^8.3.5"
},
"scripts": {
"build": "tsup --format esm --dts",
"dev": "tsup --format esm --dts --watch"
},
"peerDependencies": {}
"dev": "tsup --watch"

Copy link
Copy Markdown
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.

}
}
Loading