Skip to content

Commit

Permalink
chore: rename typescript files and folders
Browse files Browse the repository at this point in the history
  • Loading branch information
0xRAG committed Jan 31, 2025
1 parent 516c3e3 commit 75ab4a9
Show file tree
Hide file tree
Showing 81 changed files with 66 additions and 66 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { z } from "zod";
import { WalletProvider } from "../wallet_providers/wallet_provider";
import { WalletProvider } from "../wallet-providers/walletProvider";
import { sendAnalyticsEvent } from "../analytics";

import "reflect-metadata";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from "zod";
import { WalletProvider } from "../wallet_providers/wallet_provider";
import { WalletProvider } from "../wallet-providers/walletProvider";
import { Network } from "../network";
import { StoredActionMetadata, ACTION_DECORATOR_KEY } from "./action_decorator";
import { StoredActionMetadata, ACTION_DECORATOR_KEY } from "./actionDecorator";

/**
* Action is the interface for all actions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
L2_RESOLVER_ADDRESS_TESTNET,
} from "./constants";
import { RegisterBasenameSchema } from "./schemas";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";
import { Coinbase } from "@coinbase/coinbase-sdk";

const MOCK_AMOUNT = "0.123";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { encodeFunctionData, Hex, namehash, parseEther } from "viem";
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { CreateAction } from "../action_decorator";
import { CreateAction } from "../actionDecorator";
import {
L2_RESOLVER_ADDRESS_MAINNET,
L2_RESOLVER_ADDRESS_TESTNET,
Expand All @@ -13,7 +13,7 @@ import {
REGISTRAR_ABI,
} from "./constants";
import { RegisterBasenameSchema } from "./schemas";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";

/**
* Action provider for registering Basenames.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CdpWalletProvider } from "../../wallet_providers";
import { CdpWalletProvider } from "../../wallet-providers";
import { CdpActionProvider } from "./cdpActionProvider";
import { AddressReputationSchema, DeployNftSchema, RequestFaucetFundsSchema } from "./schemas";
import { SmartContract } from "@coinbase/coinbase-sdk";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ExternalAddress } from "@coinbase/coinbase-sdk";
import { z } from "zod";

import { CreateAction } from "../action_decorator";
import { ActionProvider } from "../action_provider";
import { CreateAction } from "../actionDecorator";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { CdpWalletProvider } from "../../wallet_providers";
import { CdpWalletProvider } from "../../wallet-providers";

import { SolidityVersions } from "./constants";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { erc20ActionProvider } from "./erc20ActionProvider";
import { TransferSchema } from "./schemas";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";
import { encodeFunctionData, Hex } from "viem";
import { abi } from "./constants";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { CreateAction } from "../action_decorator";
import { CreateAction } from "../actionDecorator";
import { GetBalanceSchema, TransferSchema } from "./schemas";
import { abi } from "./constants";
import { encodeFunctionData, Hex } from "viem";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";

/**
* ERC20ActionProvider is an action provider for ERC20 tokens.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { encodeFunctionData } from "viem";
import { erc721ActionProvider } from "./erc721ActionProvider";
import { ERC721_ABI } from "./constants";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";

describe("ERC721 Action Provider", () => {
const MOCK_ADDRESS = "0xe6b2af36b3bb8d47206a129ff11d5a2de2a63c83";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { EvmWalletProvider } from "../../wallet_providers";
import { CreateAction } from "../action_decorator";
import { ActionProvider } from "../actionProvider";
import { EvmWalletProvider } from "../../wallet-providers";
import { CreateAction } from "../actionDecorator";
import { GetBalanceSchema, MintSchema, TransferSchema } from "./schemas";
import { ERC721_ABI } from "./constants";
import { encodeFunctionData, Hex } from "viem";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { CreateAction } from "../action_decorator";
import { CreateAction } from "../actionDecorator";
import { FarcasterAccountDetailsSchema, FarcasterPostCastSchema } from "./schemas";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from "./action_decorator";
export * from "./action_provider";
export * from "./actionDecorator";
export * from "./actionProvider";

export * from "./pyth";
export * from "./cdp";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { encodeFunctionData, parseEther } from "viem";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";
import { approve } from "../../utils";
import { MorphoActionProvider } from "./morphoActionProvider";
import { METAMORPHO_ABI } from "./constants";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { z } from "zod";
import { Decimal } from "decimal.js";
import { encodeFunctionData, parseEther } from "viem";

import { ActionProvider } from "../action_provider";
import { EvmWalletProvider } from "../../wallet_providers";
import { CreateAction } from "../action_decorator";
import { ActionProvider } from "../actionProvider";
import { EvmWalletProvider } from "../../wallet-providers";
import { CreateAction } from "../actionDecorator";
import { approve } from "../../utils";
import { METAMORPHO_ABI } from "./constants";
import { DepositSchema, WithdrawSchema } from "./schemas";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./pythActionProvider";
export * from "./schemas";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { CreateAction } from "../action_decorator";
import { ActionProvider } from "../actionProvider";
import { CreateAction } from "../actionDecorator";
import { PythFetchPriceFeedIDSchema, PythFetchPriceSchema } from "./schemas";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { CreateAction } from "../action_decorator";
import { ActionProvider } from "../actionProvider";
import { CreateAction } from "../actionDecorator";
import { TwitterApi, TwitterApiTokens } from "twitter-api-v2";
import { Network } from "../../network";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WalletProvider } from "../../wallet_providers/wallet_provider";
import { WalletProvider } from "../../wallet-providers/walletProvider";
import { walletActionProvider } from "./walletActionProvider";

describe("Wallet Action Provider", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Decimal } from "decimal.js";
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { WalletProvider } from "../../wallet_providers/wallet_provider";
import { CreateAction } from "../action_decorator";
import { ActionProvider } from "../actionProvider";
import { WalletProvider } from "../../wallet-providers/walletProvider";
import { CreateAction } from "../actionDecorator";
import { Network } from "../../network";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { WrapEthSchema } from "./schemas";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";
import { encodeFunctionData } from "viem";
import { WETH_ABI, WETH_ADDRESS } from "./constants";
import { wethActionProvider } from "./wethActionProvider";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { CreateAction } from "../action_decorator";
import { CreateAction } from "../actionDecorator";
import { WrapEthSchema } from "./schemas";
import { WETH_ABI, WETH_ADDRESS } from "./constants";
import { encodeFunctionData, Hex } from "viem";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";

/**
* WethActionProvider is an action provider for WETH.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { formatEther, getAddress } from "viem";
import { EvmWalletProvider } from "../../../wallet_providers";
import { EvmWalletProvider } from "../../../wallet-providers";
import { ADDRESSES, WOW_ABI } from "../constants";
import { UNISWAP_QUOTER_ABI, UNISWAP_V3_ABI } from "./constants";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";
import { WOW_ABI } from "./constants";
import { getHasGraduated, getUniswapQuote } from "./uniswap/utils";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { encodeFunctionData } from "viem";
import { EvmWalletProvider } from "../../wallet_providers";
import { EvmWalletProvider } from "../../wallet-providers";
import { WowActionProvider } from "./wowActionProvider";
import { WOW_ABI, WOW_FACTORY_ABI, GENERIC_TOKEN_METADATA_URI } from "./constants";
import { getBuyQuote, getSellQuote } from "./utils";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from "zod";
import { ActionProvider } from "../action_provider";
import { EvmWalletProvider } from "../../wallet_providers";
import { CreateAction } from "../action_decorator";
import { ActionProvider } from "../actionProvider";
import { EvmWalletProvider } from "../../wallet-providers";
import { CreateAction } from "../actionDecorator";
import { Network } from "../../network";
import {
SUPPORTED_NETWORKS,
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions cdp-agentkit-core/typescript/src/agentkit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { WalletProvider, CdpWalletProvider } from "./wallet_providers";
import { Action, ActionProvider } from "./action_providers";
import { WalletProvider, CdpWalletProvider } from "./wallet-providers";
import { Action, ActionProvider } from "./action-providers";

/**
* Configuration options for AgentKit
Expand Down
4 changes: 2 additions & 2 deletions cdp-agentkit-core/typescript/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Export CDP AgentKit
export { AgentKit } from "./agentkit";

export * from "./wallet_providers";
export * from "./action_providers";
export * from "./wallet-providers";
export * from "./action-providers";
2 changes: 1 addition & 1 deletion cdp-agentkit-core/typescript/src/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { encodeFunctionData } from "viem";
import { EvmWalletProvider } from "./wallet_providers";
import { EvmWalletProvider } from "./wallet-providers";
import { approve } from "./utils";

const MOCK_TOKEN_ADDRESS = "0x1234567890123456789012345678901234567890";
Expand Down
2 changes: 1 addition & 1 deletion cdp-agentkit-core/typescript/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { encodeFunctionData } from "viem";
import { EvmWalletProvider } from "./wallet_providers";
import { EvmWalletProvider } from "./wallet-providers";

const ERC20_ABI = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable @typescript-eslint/no-unused-vars */

import { ReadContractParameters, ReadContractReturnType, TransactionRequest } from "viem";
import { EvmWalletProvider } from "./evm_wallet_provider";
import { EvmWalletProvider } from "./evmWalletProvider";
import { Network } from "../network";
import {
Coinbase,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// TODO: Improve type safety
/* eslint-disable @typescript-eslint/no-explicit-any */

import { WalletProvider } from "./wallet_provider";
import { WalletProvider } from "./walletProvider";
import { TransactionRequest, ReadContractParameters, ReadContractReturnType } from "viem";

/**
Expand Down
4 changes: 4 additions & 0 deletions cdp-agentkit-core/typescript/src/wallet-providers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from "./walletProvider";
export * from "./evmWalletProvider";
export * from "./viemWalletProvider";
export * from "./cdpWalletProvider";
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ReadContractParameters,
ReadContractReturnType,
} from "viem";
import { EvmWalletProvider } from "./evm_wallet_provider";
import { EvmWalletProvider } from "./evmWalletProvider";
import { Network } from "../network";
import { CHAIN_ID_TO_NETWORK_ID } from "../network/network";

Expand Down
4 changes: 0 additions & 4 deletions cdp-agentkit-core/typescript/src/wallet_providers/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StructuredToolInterface, BaseToolkit as Toolkit } from "@langchain/core/tools";
import { FARCASTER_ACTIONS, FarcasterAgentkit } from "@coinbase/cdp-agentkit-core";
import { FarcasterTool } from "./farcaster_tool";
import { FarcasterTool } from "./farcasterTool";

/**
* Farcaster Toolkit.
Expand Down
4 changes: 2 additions & 2 deletions farcaster-langchain/typescript/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Export Farcaster tool
export { FarcasterTool } from "./farcaster_tool";
export { FarcasterTool } from "./farcasterTool";

// Export Farcaster toolkit
export { FarcasterToolkit } from "./farcaster_toolkit";
export { FarcasterToolkit } from "./farcasterToolkit";
4 changes: 2 additions & 2 deletions twitter-langchain/typescript/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Export Twitter (X) tool
export { TwitterTool } from "./twitter_tool";
export { TwitterTool } from "./twitterTool";

// Export Twitter (X) toolkit
export { TwitterToolkit } from "./twitter_toolkit";
export { TwitterToolkit } from "./twitterToolkit";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StructuredToolInterface, BaseToolkit as Toolkit } from "@langchain/core/tools";
import { TWITTER_ACTIONS, TwitterAgentkit } from "@coinbase/cdp-agentkit-core";
import { TwitterTool } from "./twitter_tool";
import { TwitterTool } from "./twitterTool";

/**
* Twitter (X) Toolkit.
Expand Down

0 comments on commit 75ab4a9

Please sign in to comment.