eliza
eliza copied to clipboard
feat: add plugin social wallets
Relates to:
New plugin for sending TX to social accounts
Risks
Low - this is a new plugin and PR is mainly around adding code in the new /packages/plugin-social-wallets
folder.
Note:
- there are two changes made to the Twitter client, adding a simpler Base client that doesn't auto start and adding avatar to
fetchProfile
- for
handlerCallback
, type void was added as possible return
Background
What does this PR do?
Adds a way to send transactions to someone's social handle. Built to support twitter for now.
Leverages Privy as the account repository and Privy import feature to add users social account. This creates a wallet on behalf of the user that they can claim by logging in with twitter on that Privy instance.
In the future, the data source could be replaced with an onchain social registry that anyone can opt into themselves to link their socials to a wallet, using TEE-verified oauth. With a reserve vault smart contract layer on top of that, this could hold tokens sent to users that haven't signed up yet and then easily be claimed on signup.
What kind of change is this?
Features (non-breaking change which adds functionality)
Why are we doing this? Any context or related work?
To enable agents to send tokens directly to twitter handles without having to know the users wallet address. This could spark entirely new forms of meta games, stories, and economies.
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Where should a reviewer start?
/packages/plugin-social-wallets
Detailed testing steps
Add env values for:
- PRIVY_APP_ID
- PRIVY_APP_SECRET
- EVM_PRIVATE_KEY
- TWITTER_USERNAME
- TWITTER_PASSWORD
- TWITTER_EMAIL
Run sh ./scripts/start.sh
Ask agent send 0.001 ETH to @<twitter_username>
In addition some adjustments may need to be made to plugin-evm that triggers the TX flow. Last time we tested, that plugin was giving us some issues and we had to resolve them to get the plugin to trigger.
Discord username
@djdabs_