⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 0 additions & 2 deletions CONTRIBUTING-TYPESCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ EVM:

- [CdpEvmWalletProvider](https://github.com/coinbase/agentkit/blob/master/typescript/agentkit/src/wallet-providers/cdpEvmWalletProvider.ts)
- [CdpSmartWalletProvider](https://github.com/coinbase/agentkit/blob/master/typescript/agentkit/src/wallet-providers/cdpSmartWalletProvider.ts)
- [LegacyCdpWalletProvider](https://github.com/coinbase/agentkit/blob/master/typescript/agentkit/src/wallet-providers/legacyCdpWalletProvider.ts)
- [LegacyCdpSmartWalletProvider](https://github.com/coinbase/agentkit/blob/master/typescript/agentkit/src/wallet-providers/legacyCdpSmartWalletProvider.ts)
- [ViemWalletProvider](https://github.com/coinbase/agentkit/blob/master/typescript/agentkit/src/wallet-providers/viemWalletProvider.ts)
- [ZeroDevWalletProvider](https://github.com/coinbase/agentkit/blob/master/typescript/agentkit/src/wallet-providers/zeroDevWalletProvider.ts)
- [PrivyEvmWalletProvider](https://github.com/coinbase/agentkit/blob/master/typescript/agentkit/src/wallet-providers/privyEvmWalletProvider.ts)
Expand Down
5 changes: 5 additions & 0 deletions typescript/.changeset/poor-mirrors-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@coinbase/agentkit": minor
---

Deprecated legacy cdp-wallet
101 changes: 0 additions & 101 deletions typescript/agentkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ AgentKit is a framework for easily enabling AI agents to take actions onchain. I
- [Environment Variables](#environment-variables-1)
- [Exporting Smart Wallet Information](#exporting-smart-wallet-information)
- [Key Differences from Regular Wallets](#key-differences-from-regular-wallets)
- [LegacyCdpWalletProvider](#legacycdpwalletprovider)
- [Network Configuration](#network-configuration)
- [Configuring from an existing CDP API Wallet](#configuring-from-an-existing-cdp-api-wallet)
- [Configuring from a mnemonic phrase](#configuring-from-a-mnemonic-phrase)
- [Exporting a wallet](#exporting-a-wallet-1)
- [Importing a wallet from `WalletData` JSON string](#importing-a-wallet-from-walletdata-json-string)
- [Configuring LegacyCdpWalletProvider gas parameters](#configuring-legacycdpwalletprovider-gas-parameters)
- [ViemWalletProvider](#viemwalletprovider)
- [Configuring ViemWalletProvider gas parameters](#configuring-viemwalletprovider-gas-parameters)
- [PrivyWalletProvider](#privywalletprovider)
Expand Down Expand Up @@ -1092,100 +1085,6 @@ const walletData = await walletProvider.exportWallet();
4. **Batch Operations**: Multiple operations can be bundled into a single user operation
5. **Base Networks Only**: Currently limited to base-sepolia and base-mainnet

### LegacyCdpWalletProvider

The `LegacyCdpWalletProvider` is a wallet provider that uses the Coinbase Developer Platform (CDP) [v1 Wallet API](https://docs.cdp.coinbase.com/wallet-api/v1/introduction/welcome).

#### Network Configuration

The `LegacyCdpWalletProvider` can be configured to use a specific network by passing the `networkId` parameter to the `configureWithWallet` method. The `networkId` is the ID of the network you want to use. You can find a list of [supported networks on the CDP API docs](https://docs.cdp.coinbase.com/cdp-apis/docs/networks).

```typescript
import { LegacyCdpWalletProvider } from "@coinbase/agentkit";

const walletProvider = await CdpWalletProvider.configureWithWallet({
apiKeyId: "CDP API KEY NAME",
apiKeyPrivate: "CDP API KEY SECRET",
networkId: "base-mainnet",
});
```

#### Configuring from an existing CDP API Wallet

If you already have a CDP API Wallet, you can configure the `LegacyCdpWalletProvider` by passing the `wallet` parameter to the `configureWithWallet` method.

```typescript
import { LegacyCdpWalletProvider } from "@coinbase/agentkit";
import { Wallet } from "@coinbase/coinbase-sdk";
const walletProvider = await LegacyCdpWalletProvider.configureWithWallet({
wallet,
apiKeyId: "CDP API KEY NAME",
apiKeyPrivate: "CDP API KEY SECRET",
});
```

#### Configuring from a mnemonic phrase

The `LegacyCdpWalletProvider` can be configured from a mnemonic phrase by passing the `mnemonicPhrase` and `networkId` parameters to the `configureWithWallet` method. If `networkId` is not defined, the `LegacyCdpWalletProvider` will fall back to the env var `NETWORK_ID`, and if that is not defined, it will default to `base-sepolia`.

```typescript
import { LegacyCdpWalletProvider } from "@coinbase/agentkit";

const walletProvider = await LegacyCdpWalletProvider.configureWithWallet({
mnemonicPhrase: "MNEMONIC PHRASE",
networkId: "base-sepolia",
});
```

#### Exporting a wallet

The `LegacyCdpWalletProvider` can export a wallet by calling the `exportWallet` method.

```typescript
import { LegacyCdpWalletProvider } from "@coinbase/agentkit";

const walletProvider = await LegacyCdpWalletProvider.configureWithWallet({
mnemonicPhrase: "MNEMONIC PHRASE",
networkId: "base-sepolia",
});

const walletData = await walletProvider.exportWallet();
```

#### Importing a wallet from `WalletData` JSON string

The `LegacyCdpWalletProvider` can import a wallet from a `WalletData` JSON string by passing the `cdpWalletData` parameter to the `configureWithWallet` method.

```typescript
import { LegacyCdpWalletProvider } from "@coinbase/agentkit";

const walletProvider = await LegacyCdpWalletProvider.configureWithWallet({
cdpWalletData: "WALLET DATA JSON STRING",
apiKeyId: "CDP API KEY NAME",
apiKeyPrivate: "CDP API KEY SECRET",
});
```

#### Configuring LegacyCdpWalletProvider gas parameters

The `LegacyCdpWalletProvider` also exposes parameters for effecting the gas calculations.

```typescript
import { LegacyCdpWalletProvider } from "@coinbase/agentkit";

const walletProvider = await LegacyCdpWalletProvider.configureWithWallet({
cdpWalletData: "WALLET DATA JSON STRING",
apiKeyId: "CDP API KEY NAME",
apiKeyPrivate: "CDP API KEY SECRET",
gas: {
gasLimitMultiplier: 2.0, // Adjusts gas limit estimation
feePerGasMultiplier: 2.0, // Adjusts max fee per gas
},
});
```

**Note**: Gas parameters only impact the `walletProvider.sendTransaction` behavior. Actions that do not rely on direct transaction calls, such as `deploy_token`, `deploy_contract`, and `native_transfer`, remain unaffected.

### ViemWalletProvider

The `ViemWalletProvider` is a wallet provider that uses the [Viem library](https://viem.sh/docs/getting-started). It is useful for interacting with any EVM-compatible chain.
Expand Down
2 changes: 0 additions & 2 deletions typescript/agentkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
"@alloralabs/allora-sdk": "^0.1.0",
"@base-org/account": "^2.2.0",
"@coinbase/cdp-sdk": "^1.38.0",
"@coinbase/coinbase-sdk": "^0.20.0",
"@coinbase/x402": "^2.1.0",
"@ensofinance/sdk": "^2.0.6",
"@jup-ag/api": "^6.0.39",
"@privy-io/public-api": "2.18.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from "./constants";
import { RegisterBasenameSchema } from "./schemas";
import { EvmWalletProvider } from "../../wallet-providers";
import { Coinbase } from "@coinbase/coinbase-sdk";

const MOCK_AMOUNT = "0.123";
const MOCK_BASENAME = "test-basename";
Expand Down Expand Up @@ -42,7 +41,7 @@ describe("Register Basename Action", () => {
/**
* This is the default network.
*/
const NETWORK_ID = Coinbase.networks.BaseMainnet;
const NETWORK_ID = "base-mainnet";

/**
* This is a 40 character hexadecimal string that requires lowercase alpha characters.
Expand All @@ -65,7 +64,7 @@ describe("Register Basename Action", () => {
mockWallet.waitForTransactionReceipt.mockResolvedValue({});
});

it(`should Successfully respond with ${MOCK_BASENAME}.base.eth for network: ${Coinbase.networks.BaseMainnet}`, async () => {
it(`should Successfully respond with ${MOCK_BASENAME}.base.eth for network: base-mainnet`, async () => {
const args = {
amount: MOCK_AMOUNT,
basename: MOCK_BASENAME,
Expand All @@ -75,7 +74,7 @@ describe("Register Basename Action", () => {

mockWallet.getNetwork.mockReturnValue({
protocolFamily: "evm",
networkId: Coinbase.networks.BaseMainnet,
networkId: "base-mainnet",
});

const response = await actionProvider.register(mockWallet, args);
Expand Down
60 changes: 0 additions & 60 deletions typescript/agentkit/src/action-providers/cdp-legacy/README.md

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading