fix: update legacy CDP wallet provider references in docs and generator#1099
Open
yashhzd wants to merge 2 commits intocoinbase:mainfrom
Open
fix: update legacy CDP wallet provider references in docs and generator#1099yashhzd wants to merge 2 commits intocoinbase:mainfrom
yashhzd wants to merge 2 commits intocoinbase:mainfrom
Conversation
🟡 Heimdall Review Status
|
…ent exports The generator prompted users to pick from a stale list of wallet providers (`CdpWalletProvider`, `EthAccountWalletProvider`, `PrivyEvmDelegatedWalletProvider`) that no longer exist, and was missing the current ones (`CdpEvmWalletProvider`, `CdpSmartWalletProvider`, `PrivyEvmDelegatedEmbeddedWalletProvider`, `CdpSolanaWalletProvider`, `ZeroDevWalletProvider`). Scaffolding a new action provider with any of the stale values produced code that imported symbols the package no longer exports. Update `WALLET_PROVIDERS_BY_PROTOCOL` to reflect the current exports and add a test that fails if the generator ever drifts from `src/wallet-providers` again.
The docs, issue template, and Python contributing guide still referenced wallet providers that were removed or renamed during the CDP Wallet API v2 migration (`CdpWalletProvider`, `SmartWalletProvider`/`CDPSmartWalletProvider`, `EthAccountWalletProvider`, `CdpV2SolanaWalletProvider`, `PrivyEvmDelegatedWalletProvider`, `cdpWalletActionProvider`). New users who copied snippets from these docs hit import errors and confusing config shapes. This sweep: - Updates `typescript/agentkit/README.md` and `python/coinbase-agentkit/README.md` to use `CdpEvmWalletProvider` / `CdpSmartWalletProvider` / `CdpSolanaWalletProvider` with the current `apiKeySecret` + `walletSecret` config surface, and drops the stale `SmartWalletProvider` and `CDPSmartWalletProvider` sections. - Adds the required `cdpWalletSecret` / `CDP_WALLET_SECRET` to the default `AgentKit.from(...)` examples in the TS core README and the Langchain, MCP, and Vercel AI SDK framework-extension READMEs. - Switches Python framework-extension setup instructions from the removed `CDP_API_KEY_PRIVATE` env var to `CDP_API_KEY_SECRET` + `CDP_WALLET_SECRET`. - Fixes the Python contributing guide's action-provider walkthrough so it uses the canonical `Erc721ActionProvider` / `EvmWalletProvider` shape with a `send_transaction` + `wait_for_transaction_receipt` flow instead of the removed `CdpWalletProvider.mint` helper. - Updates the bug-report issue template to reproduce with `CdpEvmWalletProvider` + `walletActionProvider`, and corrects the TypeScript snippet to use `//` comments instead of `#`. - Fixes the Compound action provider README test example to construct `CdpEvmWalletProvider(CdpEvmWalletProviderConfig())`. - Fixes the Across action provider README to refer to `CdpEvmWalletProvider` and the x402 README to import from `@coinbase/agentkit` (was `@coinbase/cdp-agentkit`). - Updates the generator-script README example to use `CdpEvmWalletProvider`.
1ae3717 to
ec2953e
Compare
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.
Description
Across the TypeScript and Python sides of the repo, a number of docs, the bug-report issue template, the Python contributing guide, and the
generate-action-providerscript still referenced wallet providers that were removed or renamed during the CDP Wallet API v2 migration:CdpWalletProvider(nowCdpEvmWalletProvider)SmartWalletProvider/CDPSmartWalletProvider(nowCdpSmartWalletProvider)CdpV2SolanaWalletProvider(nowCdpSolanaWalletProvider)EthAccountWalletProvider(removed)PrivyEvmDelegatedWalletProvider(nowPrivyEvmDelegatedEmbeddedWalletProvider)cdpWalletActionProvider(collapsed intowalletActionProvider)New users copying snippets from these docs hit import errors, config-shape mismatches (missing
walletSecret/CDP_WALLET_SECRET), and an x402 example that imported from@coinbase/cdp-agentkitinstead of@coinbase/agentkit. Thegenerate-action-providerscript was also offering these stale names as prompts, so scaffolding a new action provider with any of them produced code that imported symbols the package no longer exports.This PR is scoped to bringing those references back in line with the current public surface. No runtime source under
typescript/agentkit/src/orcoinbase_agentkit/is modified.What changed
fix(generate-action-provider)EVM_WALLET_PROVIDERS/SVM_WALLET_PROVIDERSentries intypescript/agentkit/scripts/generate-action-provider/constants.tswith the current exports (CdpEvmWalletProvider,CdpSmartWalletProvider,PrivyEvmDelegatedEmbeddedWalletProvider,ZeroDevWalletProvider,CdpSolanaWalletProvider).constants.test.ts, a regression test that imports* as walletProviders from "../../src/wallet-providers"and asserts every provider value surfaced by the generator is an actually-exported symbol. This fails loudly if wallet provider exports and the generator drift apart again.docstypescript/agentkit/README.mdandpython/coinbase-agentkit/README.mdto use the currentCdpEvm/CdpSmart/CdpSolanaproviders with their currentapiKeySecret+walletSecretconfig surface. Drop the obsoleteSmartWalletProviderandCDPSmartWalletProvidersections entirely.cdpWalletSecret/CDP_WALLET_SECRETto the defaultAgentKit.from(...)examples in the core TS README and in the LangChain, Model Context Protocol, and Vercel AI SDK framework-extension READMEs so the happy path actually runs.python/framework-extensions/{autogen,langchain,openai-agents-sdk}/README.md, replace the removedCDP_API_KEY_PRIVATEenv var withCDP_API_KEY_SECRET+CDP_WALLET_SECRET.CONTRIBUTING-PYTHON.mdso it uses the canonicalErc721ActionProvider/EvmWalletProvidershape with asend_transaction+wait_for_transaction_receiptflow instead of the removedCdpWalletProvider.minthelper..github/ISSUE_TEMPLATE/bug-report.ymlto reproduce withCdpEvmWalletProvider+walletActionProvider, and correct the TypeScript snippet to use//comments instead of#.python/coinbase-agentkit/coinbase_agentkit/action_providers/compound/README.md) to constructCdpEvmWalletProvider(CdpEvmWalletProviderConfig()).CdpEvmWalletProvider, the x402 README to import from@coinbase/agentkit, and the generator-script README example to useCdpEvmWalletProvider.Tests
pnpm exec jest scripts/generate-action-provider/constants.test.tsintypescript/agentkit:pnpm exec eslint -c .eslintrc.json scripts/generate-action-provider/constants.ts scripts/generate-action-provider/constants.test.ts— clean.pnpm exec prettier -c .prettierrc --checkon every touched.mdand.tsfile — all files use Prettier code style.pnpm exec tsc --noEmitintypescript/agentkit— no errors.This PR does not change any action provider behavior or any runtime code paths exposed by the published packages, so there is no chatbot repro to attach. The generator-script change is covered by the new unit test, and the rest is documentation.
Checklist
No changeset / towncrier fragment is included: the changes are documentation plus a fix to
typescript/agentkit/scripts/, which is not part of the published npm package (package.jsonfilesis["dist"]), so none of the published artifacts change.