Skip to content

Commit

Permalink
chore: Prepare 0.1.2 AgentKit.js Release
Browse files Browse the repository at this point in the history
  • Loading branch information
John-peterson-coinbase committed Feb 7, 2025
1 parent 691e4f9 commit e73058d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
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

0 comments on commit e73058d

Please sign in to comment.