Skip to content
Merged
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: 2 additions & 0 deletions typescript/agentkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- Added `alchemyTokenPricesActionProvider` to fetch token prices from Alchemy.
- Added `token_prices_by_symbol` action to fetch token prices by symbol.
- Added `token_prices_by_address` action to fetch token prices by network and address pairs.
- Added `moonwellActionProvider` to interact with Moonwell protocol on Base
- Added `agentkit` source + source version tag to CDP API correlation header

### Fixed

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { version } from "../../../package.json";
import { Coinbase, ExternalAddress } from "@coinbase/coinbase-sdk";
import { z } from "zod";

import { CreateAction } from "../actionDecorator";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { CdpProviderConfig, EvmWalletProvider } from "../../wallet-providers";

import { AddressReputationSchema, RequestFaucetFundsSchema } from "./schemas";

/**
Expand All @@ -23,7 +22,12 @@ export class CdpApiActionProvider extends ActionProvider<EvmWalletProvider> {
super("cdp_api", []);

if (config.apiKeyName && config.apiKeyPrivateKey) {
Coinbase.configure({ apiKeyName: config.apiKeyName, privateKey: config.apiKeyPrivateKey });
Coinbase.configure({
apiKeyName: config.apiKeyName,
privateKey: config.apiKeyPrivateKey,
source: "agentkit",
sourceVersion: version,
});
} else {
Coinbase.configureFromJson();
}
Expand Down
1 change: 1 addition & 0 deletions typescript/agentkit/src/action-providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ export * from "./twitter";
export * from "./wallet";
export * from "./customActionProvider";
export * from "./alchemy";
export * from "./moonwell";
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ It takes:
Important notes:
- Make sure to use the exact amount provided. Do not convert units for assets for this action.
- Please use a token address (example 0x4200000000000000000000000000000000000006) for the tokenAddress field.
- This tool handles token approval. If requested to mint on Moonwell, do not use any other actions to approve tokens.
`,
schema: MintSchema,
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { version } from "../../package.json";
import { Decimal } from "decimal.js";
import {
createPublicClient,
Expand Down Expand Up @@ -119,7 +120,12 @@ export class CdpWalletProvider extends EvmWalletProvider {
config: ConfigureCdpAgentkitWithWalletOptions = {},
): Promise<CdpWalletProvider> {
if (config.apiKeyName && config.apiKeyPrivateKey) {
Coinbase.configure({ apiKeyName: config.apiKeyName, privateKey: config.apiKeyPrivateKey });
Coinbase.configure({
apiKeyName: config.apiKeyName,
privateKey: config.apiKeyPrivateKey,
source: "agentkit",
sourceVersion: version,
});
} else {
Coinbase.configureFromJson();
}
Expand Down