You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: replace legacy CDP wallet provider references across docs
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`.
@@ -123,6 +126,11 @@ class CdpWalletActionProvider(ActionProvider[CdpWalletProvider]):
123
126
Now we need to implement the actual function that the AI will call when using your action. Actions are defined using the `@create_action` decorator. The function receives as input the wallet provider that the Agent has access to, along with the inputs defined in the input schema, and it must return a string. Here's an example of the Mint NFT implementation:
124
127
125
128
```python
129
+
from eth_typing import HexStr
130
+
from web3 import Web3
131
+
132
+
from coinbase_agentkit import EvmWalletProvider, create_action
133
+
126
134
@create_action(
127
135
name="mint",
128
136
description="""
@@ -132,20 +140,27 @@ Do not use the contract address as the destination address. If you are unsure of
returnf"Error minting NFT{args['contract_address']} to {args['destination']}:{e!s}"
144
159
145
-
returnf"Minted NFT to address {args['destination']}.\nTransaction hash: {nft_contract.transaction.transaction_hash}\nTransaction link: {nft_contract.transaction.transaction_link}"
160
+
returnf"Successfully minted NFT {args['contract_address']} to {args['destination']}"
146
161
```
147
162
148
-
Notice the return value contains useful information for the user, such as the transaction hash and link. It's important to include this information in the return value so that the user can easily see the result of the action.
163
+
Notice the return value contains useful information for the user about the result of the action. When possible, include details such as transaction hashes so the user can inspect what happened onchain.
149
164
150
165
This class is then exported out of [python/coinbase-agentkit/coinbase_agentkit/\_\_init\_\_.py](https://github.com/coinbase/agentkit/blob/master/python/coinbase-agentkit/coinbase_agentkit/__init__.py) so that it is consumable by users of the `coinbase-agentkit` package.
If no wallet or action providers are specified, the agent will use the `CdpWalletProvider` and `WalletActionProvider` action provider by default.
58
+
If no wallet or action providers are specified, the agent will use the `CdpEvmWalletProvider` and `WalletActionProvider` action provider by default. Make sure `CDP_API_KEY_ID`, `CDP_API_KEY_SECRET`, and `CDP_WALLET_SECRET` are set in your environment if you rely on this default.
60
59
61
60
```python
62
-
from coinbase_agentkit import AgentKit, AgentKitConfig
The `CdpSolanaWalletProvider` is a wallet provider that uses the Coinbase Developer Platform (CDP) API for Solana networks. It supports SOL transfers and message signing on Solana mainnet, devnet, and testnet.
0 commit comments