Add support for Privy embedded wallets with delegation - #618
Merged
CarsonRoscoe merged 15 commits intoMar 28, 2025
Conversation
✅ Heimdall Review Status
|
CarsonRoscoe
marked this pull request as ready for review
March 27, 2025 18:06
CarsonRoscoe
force-pushed
the
feat/privy-evm-delegated-embedded-wallet-provider
branch
from
March 27, 2025 22:42
7952a38 to
e1b0a67
Compare
* chore: implement privy delegated wallet provider for evm * chore: rename provider to be evm specific * add unused func to fix inheritance error * chore: add tests for privy evm embedded wallet provider * update readme and changeset * fix onchain spelling * chore: Changed the parameter structure to accept a single config object with address and add example * chore: export privy client from shared privy class * chore: fix native assets transfer * uncomment analytics event * remove logs and use viem's Adress type * use viem's Hex type * lookup chain ID using global NETWORK_ID_TO_CHAIN_ID * remove unused chainid mapping fnc * fix(wallet-providers): Fix type casting in PrivyWalletProvider * remove unnecessary comments * delete lock files * chore: remove logs * chore: await response from privy provider variant * chore: rename spelling to privyEvmDelegatedEmbeddedWalletProvider * udpate chatbot example to use new naming and add env.local file
… to the correct provider
…is merged, and add to privyWalletProvider tests
CarsonRoscoe
force-pushed
the
feat/privy-evm-delegated-embedded-wallet-provider
branch
from
March 28, 2025 14:51
e1b0a67 to
fc2fa73
Compare
CarsonRoscoe
force-pushed
the
feat/privy-evm-delegated-embedded-wallet-provider
branch
from
March 28, 2025 15:51
7f299d3 to
0a2f2b5
Compare
0xRAG
reviewed
Mar 28, 2025
0xRAG
reviewed
Mar 28, 2025
0xRAG
reviewed
Mar 28, 2025
0xRAG
reviewed
Mar 28, 2025
0xRAG
reviewed
Mar 28, 2025
0xRAG
reviewed
Mar 28, 2025
0xRAG
reviewed
Mar 28, 2025
CarsonRoscoe
force-pushed
the
feat/privy-evm-delegated-embedded-wallet-provider
branch
from
March 28, 2025 19:34
6a40b6e to
774fbb4
Compare
CarsonRoscoe
deleted the
feat/privy-evm-delegated-embedded-wallet-provider
branch
March 28, 2025 20:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a continuation of #583
Description
This PR adds support for Privy's embedded wallets with delegation to AgentKit. It introduces a new wallet provider,
PrivyEvmEmbeddedWalletProvider, that allows AgentKit to use wallets which have been delegated transaction signing authority through Privy's embedded wallet system. This enables autonomous agents to perform onchain actions on behalf of users.The implementation:
PrivyEvmEmbeddedWalletProviderclass that extendsEvmWalletProviderPrivyWalletProviderfactory to support embedded wallets via a newwalletTypeoptionCurrently our UI uses Privy's embedded wallet for delegation to agents, but Coinbase's agent kit only supports Privy's server wallet. This change makes the two systems compatible, allowing agents to properly execute transactions with delegated embedded wallets.
Tests
See original authors tests here: #583
Below are my own tests in addition to the above:
Checklist
A couple of things to include in your PR for completeness: