basileus-agentkit-plugin 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # basileus-agentkit-plugin
2
+
3
+ [Coinbase AgentKit](https://github.com/coinbase/agentkit) plugin for [Basileus](https://github.com/RezaRahemtola/ETHDenver-2026) — build autonomous onchain agents with [Aleph Cloud](https://aleph.cloud), x402 payment tracking, and predefined action providers.
4
+
5
+ ## Features
6
+
7
+ - **Aleph Publisher** — publish agent activity (reasoning, tool calls, transactions) to Aleph Cloud for full transparency
8
+ - **x402 Tracker** — intercept HTTP 402 payments and track transaction hashes
9
+ - **Agent Loop** — BlockRun AI tool-calling loop with auto conversion of AgentKit actions to BlockRun tools.
10
+ - **Summarizer** — summarize agent phases into short, human-readable activity logs
11
+ - **Wallet** — create an AgentKit wallet with Basileus' ERC-8021 builder code attribution
12
+ - **Compound Actions** — fixed Compound Finance action provider (supply, withdraw, portfolio)
13
+ - **Aleph Actions** — VPS computing costs information, balance tracking and swaps action provider for built-in self-funding of computing costs
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install basileus-agentkit-plugin
19
+ ```
20
+
21
+ Peer dependencies (install alongside):
22
+
23
+ ```bash
24
+ npm install @blockrun/llm @coinbase/agentkit viem
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ```ts
30
+ import {
31
+ AlephPublisher,
32
+ installX402Tracker,
33
+ actionsToTools,
34
+ runAgentLoop,
35
+ createLLMClient,
36
+ createAgentWallet,
37
+ } from "basileus-agentkit-plugin";
38
+ ```
39
+
40
+ ### Sub-path imports
41
+
42
+ ```ts
43
+ // Individual modules
44
+ import { AlephPublisher } from "basileus-agentkit-plugin/aleph";
45
+ import { installX402Tracker } from "basileus-agentkit-plugin/x402";
46
+ import { runAgentLoop } from "basileus-agentkit-plugin/agent-loop";
47
+ import { actionsToTools } from "basileus-agentkit-plugin/tools";
48
+ import { summarizePhase } from "basileus-agentkit-plugin/summarizer";
49
+ import { createAgentWallet } from "basileus-agentkit-plugin/wallet";
50
+
51
+ // Action providers
52
+ import { createAlephActionProvider } from "basileus-agentkit-plugin/actions/aleph";
53
+ import { compoundFixedProvider } from "basileus-agentkit-plugin/actions/compound";
54
+ ```
55
+
56
+ ### Quick start
57
+
58
+ ```ts
59
+ import { createAgentWallet, AlephPublisher, actionsToTools, runAgentLoop, createLLMClient, installX402Tracker, drainX402TxHashes } from "basileus-agentkit-plugin";
60
+ import { createAlephActionProvider } from "basileus-agentkit-plugin/actions/aleph";
61
+ import { compoundFixedProvider } from "basileus-agentkit-plugin/actions/compound";
62
+
63
+ // 1. Wallet
64
+ const wallet = await createAgentWallet(process.env.PRIVATE_KEY!, "base");
65
+
66
+ // 2. x402 tracking
67
+ installX402Tracker();
68
+
69
+ // 3. Action providers → tools
70
+ const providers = [compoundFixedProvider, createAlephActionProvider()];
71
+ const { tools, executeTool } = actionsToTools(providers, wallet);
72
+
73
+ // 4. Aleph publisher
74
+ const publisher = new AlephPublisher(process.env.PRIVATE_KEY!);
75
+ await publisher.init();
76
+
77
+ // 5. Run agent loop
78
+ const client = createLLMClient(process.env.BLOCKRUN_API_KEY!);
79
+ const result = await runAgentLoop(client, "What is my Compound portfolio?", tools, "You are a DeFi agent.", [], executeTool);
80
+
81
+ // 6. Publish activity
82
+ const txHashes = drainX402TxHashes();
83
+ await publisher.publish({ phase: "portfolio-check", response: result.response, toolExecutions: result.toolExecutions, txHashes });
84
+ ```
85
+
86
+ ## License
87
+
88
+ MIT
89
+
90
+ <div align="center">
91
+ <h2>Made with ❤️ by</h2>
92
+ <a href="https://github.com/RezaRahemtola">
93
+ <img src="https://github.com/RezaRahemtola.png?size=85" width=85/>
94
+ <br>
95
+ <span>Reza Rahemtola</span>
96
+ </a>
97
+ </div>
package/package.json CHANGED
@@ -1,12 +1,33 @@
1
1
  {
2
2
  "name": "basileus-agentkit-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
+ "description": "Coinbase AgentKit plugin for Basileus — build autonomous onchain agents with Aleph Cloud, x402 payment tracking, and predefined action providers",
4
5
  "type": "module",
6
+ "license": "MIT",
7
+ "author": "Basileus",
8
+ "homepage": "https://github.com/RezaRahemtola/ETHDenver-2026/tree/main/basileus-agentkit-plugin#readme",
5
9
  "repository": {
6
10
  "type": "git",
7
11
  "url": "https://github.com/RezaRahemtola/ETHDenver-2026",
8
12
  "directory": "basileus-agentkit-plugin"
9
13
  },
14
+ "bugs": {
15
+ "url": "https://github.com/RezaRahemtola/ETHDenver-2026/issues"
16
+ },
17
+ "keywords": [
18
+ "agentkit",
19
+ "coinbase",
20
+ "base",
21
+ "blockchain",
22
+ "agent",
23
+ "aleph",
24
+ "x402",
25
+ "basileus"
26
+ ],
27
+ "files": [
28
+ "dist",
29
+ "README.md"
30
+ ],
10
31
  "main": "./dist/index.js",
11
32
  "types": "./dist/index.d.ts",
12
33
  "exports": {
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- v24
package/.prettierrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": false,
4
- "trailingComma": "all",
5
- "printWidth": 100,
6
- "tabWidth": 2
7
- }
package/eslint.config.js DELETED
@@ -1,26 +0,0 @@
1
- import tseslint from "@typescript-eslint/eslint-plugin";
2
- import tsparser from "@typescript-eslint/parser";
3
-
4
- export default [
5
- {
6
- files: ["src/**/*.ts"],
7
- languageOptions: {
8
- parser: tsparser,
9
- parserOptions: {
10
- ecmaVersion: "latest",
11
- sourceType: "module",
12
- },
13
- },
14
- plugins: {
15
- "@typescript-eslint": tseslint,
16
- },
17
- rules: {
18
- ...tseslint.configs.recommended.rules,
19
- "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
20
- "@typescript-eslint/no-explicit-any": "warn",
21
- },
22
- },
23
- {
24
- ignores: ["dist/"],
25
- },
26
- ];
@@ -1,145 +0,0 @@
1
- import { z } from "zod";
2
- import {
3
- customActionProvider,
4
- EvmWalletProvider,
5
- SuperfluidQueryActionProvider,
6
- } from "@coinbase/agentkit";
7
- import { createPublicClient, formatUnits, http, parseEther, encodeFunctionData } from "viem";
8
- import { base } from "viem/chains";
9
- import {
10
- ALEPH_ADDRESS,
11
- WETH_ADDRESS,
12
- UNISWAP_ROUTER,
13
- UNISWAP_ALEPH_POOL,
14
- uniswapV3PoolAbi,
15
- uniswapRouterAbi,
16
- } from "./constants.js";
17
-
18
- const balanceOfAbi = [
19
- {
20
- inputs: [{ name: "account", type: "address" }],
21
- name: "balanceOf",
22
- outputs: [{ name: "", type: "uint256" }],
23
- stateMutability: "view",
24
- type: "function",
25
- },
26
- ] as const;
27
-
28
- export function createAlephActionProvider(rpcUrl?: string) {
29
- const publicClient = createPublicClient({
30
- chain: base,
31
- transport: http(rpcUrl),
32
- });
33
-
34
- return customActionProvider<EvmWalletProvider>([
35
- {
36
- name: "get_aleph_info",
37
- description:
38
- "Get your current ALEPH balance, hourly consumption rate, estimated hours of compute left, ETH balance, and ALEPH/ETH price. Use this to decide whether you need to buy more ALEPH.",
39
- schema: z.object({}),
40
- invoke: async (walletProvider: EvmWalletProvider, _args: unknown) => {
41
- try {
42
- const address = walletProvider.getAddress() as `0x${string}`;
43
-
44
- const sfQuery = new SuperfluidQueryActionProvider();
45
- const streamsResult = await sfQuery.queryStreams(walletProvider);
46
-
47
- let alephPerHour = 0;
48
- try {
49
- const jsonStr = streamsResult.replace("Current outflows are ", "");
50
- const outflows = JSON.parse(jsonStr) as Array<{
51
- currentFlowRate: string;
52
- token: { symbol: string };
53
- receiver: { id: string };
54
- }>;
55
- const alephOutflows = outflows.filter((o) =>
56
- o.token.symbol.toLowerCase().includes("aleph"),
57
- );
58
- const totalFlowRate = alephOutflows.reduce(
59
- (sum, o) => sum + BigInt(o.currentFlowRate),
60
- 0n,
61
- );
62
- alephPerHour = parseFloat(formatUnits(totalFlowRate * 3600n, 18));
63
- } catch {
64
- // No outflows or parse error
65
- }
66
-
67
- const rawBalance = await publicClient.readContract({
68
- address: ALEPH_ADDRESS,
69
- abi: balanceOfAbi,
70
- functionName: "balanceOf",
71
- args: [address],
72
- });
73
- const alephBalance = parseFloat(formatUnits(rawBalance, 18));
74
-
75
- let hoursLeft = 1000000;
76
- if (alephPerHour > 0) {
77
- hoursLeft = Math.round(alephBalance / alephPerHour);
78
- }
79
-
80
- const ethBalanceWei = await publicClient.getBalance({ address });
81
- const ethBalance = parseFloat(formatUnits(ethBalanceWei, 18));
82
-
83
- const slot0 = await publicClient.readContract({
84
- address: UNISWAP_ALEPH_POOL,
85
- abi: uniswapV3PoolAbi,
86
- functionName: "slot0",
87
- });
88
- const sqrtPriceX96 = slot0[0];
89
- const price = Number(sqrtPriceX96) / 2 ** 96;
90
- const alephPerEth = price * price;
91
-
92
- return JSON.stringify({
93
- aleph_balance: Math.round(alephBalance * 1000) / 1000,
94
- aleph_consumed_per_hour: Math.round(alephPerHour * 1000) / 1000,
95
- hours_left_until_death: hoursLeft,
96
- eth_balance: Math.round(ethBalance * 10000) / 10000,
97
- aleph_per_eth: Math.round(alephPerEth * 100) / 100,
98
- });
99
- } catch (err) {
100
- return `Error getting ALEPH info: ${err instanceof Error ? err.message : String(err)}`;
101
- }
102
- },
103
- },
104
- {
105
- name: "swap_eth_to_aleph",
106
- description:
107
- "Swap ETH to ALEPH via Uniswap V3 to pay for your computing. Provide the amount of ETH to swap.",
108
- schema: z.object({
109
- ethAmount: z.string().describe("Amount of ETH to swap, e.g. '0.01'"),
110
- }),
111
- invoke: async (walletProvider: EvmWalletProvider, args: { ethAmount: string }) => {
112
- try {
113
- const amountInWei = parseEther(args.ethAmount);
114
- const address = walletProvider.getAddress() as `0x${string}`;
115
-
116
- const data = encodeFunctionData({
117
- abi: uniswapRouterAbi,
118
- functionName: "exactInputSingle",
119
- args: [
120
- {
121
- tokenIn: WETH_ADDRESS,
122
- tokenOut: ALEPH_ADDRESS,
123
- fee: 10000,
124
- recipient: address,
125
- amountIn: amountInWei,
126
- amountOutMinimum: 0n,
127
- sqrtPriceLimitX96: 0n,
128
- },
129
- ],
130
- });
131
-
132
- const txHash = await walletProvider.sendTransaction({
133
- to: UNISWAP_ROUTER,
134
- data,
135
- value: amountInWei,
136
- });
137
-
138
- return `Swap transaction sent. Hash: ${txHash}`;
139
- } catch (err) {
140
- return `Error swapping ETH to ALEPH: ${err instanceof Error ? err.message : String(err)}`;
141
- }
142
- },
143
- },
144
- ]);
145
- }
@@ -1,166 +0,0 @@
1
- /**
2
- * Fixed Compound action provider — local copy with base asset fixes.
3
- *
4
- * Fixes from upstream @coinbase/agentkit:
5
- * - get_portfolio: reads base asset supply via Comet.balanceOf() (was missing)
6
- * - withdraw: for base asset (USDC), checks balanceOf instead of collateralBalanceOf
7
- *
8
- * Uses customActionProvider (no decorators) so tsx/esbuild can run it.
9
- * TODO: Remove this directory once agentkit merges the fix.
10
- */
11
- import { encodeFunctionData, formatUnits, parseUnits, erc20Abi } from "viem";
12
- import { customActionProvider, EvmWalletProvider } from "@coinbase/agentkit";
13
- import { COMET_ABI } from "./constants.js";
14
- import {
15
- CompoundSupplySchema,
16
- CompoundWithdrawSchema,
17
- CompoundPortfolioSchema,
18
- } from "./schemas.js";
19
- import {
20
- getBaseAssetBalance,
21
- getCollateralBalance,
22
- getHealthRatio,
23
- getHealthRatioAfterWithdraw,
24
- getTokenBalance,
25
- getTokenDecimals,
26
- getTokenSymbol,
27
- getPortfolioDetailsMarkdown,
28
- getCometAddress,
29
- getAssetAddress,
30
- getBaseTokenAddress,
31
- } from "./utils.js";
32
-
33
- async function approve(
34
- wallet: EvmWalletProvider,
35
- tokenAddress: string,
36
- spenderAddress: string,
37
- amount: bigint,
38
- ): Promise<string> {
39
- try {
40
- const data = encodeFunctionData({
41
- abi: erc20Abi,
42
- functionName: "approve",
43
- args: [spenderAddress as `0x${string}`, amount],
44
- });
45
- const txHash = await wallet.sendTransaction({
46
- to: tokenAddress as `0x${string}`,
47
- data,
48
- });
49
- await wallet.waitForTransactionReceipt(txHash);
50
- return `Successfully approved ${spenderAddress} to spend ${amount} tokens`;
51
- } catch (error) {
52
- return `Error approving tokens: ${error}`;
53
- }
54
- }
55
-
56
- export const compoundFixedProvider = customActionProvider<EvmWalletProvider>([
57
- {
58
- name: "compound_supply",
59
- description:
60
- "Supply assets to Compound. assetId: 'weth', 'cbeth', 'cbbtc', 'wsteth', or 'usdc'. amount: human-readable.",
61
- schema: CompoundSupplySchema,
62
- invoke: async (wallet, args) => {
63
- try {
64
- const network = wallet.getNetwork();
65
- const cometAddress = getCometAddress(network);
66
- const tokenAddress = getAssetAddress(network, args.assetId);
67
-
68
- const decimals = await getTokenDecimals(wallet, tokenAddress);
69
- const amountAtomic = parseUnits(args.amount, decimals);
70
-
71
- const walletBalance = await getTokenBalance(wallet, tokenAddress);
72
- if (walletBalance < amountAtomic) {
73
- const humanBalance = formatUnits(walletBalance, decimals);
74
- return `Error: Insufficient balance. You have ${humanBalance}, but trying to supply ${args.amount}`;
75
- }
76
-
77
- const approvalResult = await approve(wallet, tokenAddress, cometAddress, amountAtomic);
78
- if (approvalResult.startsWith("Error")) {
79
- return `Error approving token: ${approvalResult}`;
80
- }
81
-
82
- const data = encodeFunctionData({
83
- abi: COMET_ABI,
84
- functionName: "supply",
85
- args: [tokenAddress, amountAtomic],
86
- });
87
- const txHash = await wallet.sendTransaction({ to: cometAddress, data });
88
- await wallet.waitForTransactionReceipt(txHash);
89
-
90
- const sym = await getTokenSymbol(wallet, tokenAddress);
91
- return `Supplied ${args.amount} ${sym} to Compound.\nTransaction hash: ${txHash}`;
92
- } catch (err) {
93
- return `Error supplying to Compound: ${err instanceof Error ? err.message : err}`;
94
- }
95
- },
96
- },
97
- {
98
- name: "compound_withdraw",
99
- description:
100
- "Withdraw assets from Compound. assetId: 'weth', 'cbeth', 'cbbtc', 'wsteth', or 'usdc'. amount: human-readable.",
101
- schema: CompoundWithdrawSchema,
102
- invoke: async (wallet, args) => {
103
- try {
104
- const cometAddress = getCometAddress(wallet.getNetwork());
105
- const tokenAddress = getAssetAddress(wallet.getNetwork(), args.assetId);
106
-
107
- const decimals = await getTokenDecimals(wallet, tokenAddress);
108
- const amountAtomic = parseUnits(args.amount, decimals);
109
-
110
- const baseTokenAddress = await getBaseTokenAddress(wallet, cometAddress);
111
- const isBaseAsset = tokenAddress.toLowerCase() === baseTokenAddress.toLowerCase();
112
-
113
- if (isBaseAsset) {
114
- const baseBalance = await getBaseAssetBalance(wallet, cometAddress);
115
- if (amountAtomic > baseBalance) {
116
- return `Error: Insufficient balance. Trying to withdraw ${args.amount}, but only have ${formatUnits(baseBalance, decimals)} supplied`;
117
- }
118
- } else {
119
- const collateralBalance = await getCollateralBalance(wallet, cometAddress, tokenAddress);
120
- if (amountAtomic > collateralBalance) {
121
- return `Error: Insufficient balance. Trying to withdraw ${args.amount}, but only have ${formatUnits(collateralBalance, decimals)} supplied`;
122
- }
123
-
124
- const projectedHealth = await getHealthRatioAfterWithdraw(
125
- wallet,
126
- cometAddress,
127
- tokenAddress,
128
- amountAtomic,
129
- );
130
- if (projectedHealth.lessThan(1)) {
131
- return `Error: Withdrawing ${args.amount} would result in unhealthy position. Health ratio would be ${projectedHealth.toFixed(2)}`;
132
- }
133
- }
134
-
135
- const data = encodeFunctionData({
136
- abi: COMET_ABI,
137
- functionName: "withdraw",
138
- args: [tokenAddress, amountAtomic],
139
- });
140
- const txHash = await wallet.sendTransaction({ to: cometAddress, data });
141
- await wallet.waitForTransactionReceipt(txHash);
142
-
143
- const sym = await getTokenSymbol(wallet, tokenAddress);
144
- const health = await getHealthRatio(wallet, cometAddress);
145
- return `Withdrawn ${args.amount} ${sym} from Compound.\nTransaction hash: ${txHash}\nHealth ratio: ${health.toFixed(2)}`;
146
- } catch (err) {
147
- return `Error withdrawing from Compound: ${err instanceof Error ? err.message : err}`;
148
- }
149
- },
150
- },
151
- {
152
- name: "compound_get_portfolio",
153
- description:
154
- "Get Compound portfolio: base asset supply (earns APY), collateral balances, borrow positions.",
155
- schema: CompoundPortfolioSchema,
156
- // NOTE: must have 2 params so customActionProvider passes wallet as first arg
157
- invoke: async (wallet, _args) => {
158
- try {
159
- const cometAddress = getCometAddress(wallet.getNetwork());
160
- return await getPortfolioDetailsMarkdown(wallet, cometAddress);
161
- } catch (err) {
162
- return `Error getting portfolio: ${err instanceof Error ? err.message : err}`;
163
- }
164
- },
165
- },
166
- ]);
@@ -1,140 +0,0 @@
1
- import { type Address } from "viem";
2
- import { erc20Abi as ERC20_ABI } from "viem";
3
-
4
- export const SUPPORTED_NETWORKS = ["base-mainnet", "base-sepolia"];
5
-
6
- export const COMET_ADDRESSES: Record<string, Address> = {
7
- "base-mainnet": "0xb125E6687d4313864e53df431d5425969c15Eb2F",
8
- "base-sepolia": "0x571621Ce60Cebb0c1D442B5afb38B1663C6Bf017",
9
- };
10
-
11
- export const ASSET_ADDRESSES: Record<string, Record<string, Address>> = {
12
- "base-mainnet": {
13
- weth: "0x4200000000000000000000000000000000000006",
14
- cbeth: "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22",
15
- cbbtc: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
16
- wsteth: "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452",
17
- usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
18
- },
19
- "base-sepolia": {
20
- weth: "0x4200000000000000000000000000000000000006",
21
- usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
22
- wsteth: "0x774eD9EDB0C5202dF9A86183804b5D9E99dC6CA3",
23
- },
24
- };
25
-
26
- export { ERC20_ABI };
27
-
28
- export const COMET_ABI = [
29
- {
30
- inputs: [
31
- { internalType: "address", name: "asset", type: "address" },
32
- { internalType: "uint256", name: "amount", type: "uint256" },
33
- ],
34
- name: "supply",
35
- outputs: [],
36
- stateMutability: "nonpayable",
37
- type: "function",
38
- },
39
- {
40
- inputs: [
41
- { internalType: "address", name: "asset", type: "address" },
42
- { internalType: "uint256", name: "amount", type: "uint256" },
43
- ],
44
- name: "withdraw",
45
- outputs: [],
46
- stateMutability: "nonpayable",
47
- type: "function",
48
- },
49
- {
50
- inputs: [{ internalType: "address", name: "priceFeed", type: "address" }],
51
- name: "getPrice",
52
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
53
- stateMutability: "view",
54
- type: "function",
55
- },
56
- {
57
- inputs: [{ internalType: "address", name: "account", type: "address" }],
58
- name: "borrowBalanceOf",
59
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
60
- stateMutability: "view",
61
- type: "function",
62
- },
63
- {
64
- inputs: [],
65
- name: "numAssets",
66
- outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
67
- stateMutability: "view",
68
- type: "function",
69
- },
70
- {
71
- inputs: [{ internalType: "uint8", name: "i", type: "uint8" }],
72
- name: "getAssetInfo",
73
- outputs: [
74
- {
75
- components: [
76
- { internalType: "uint8", name: "offset", type: "uint8" },
77
- { internalType: "address", name: "asset", type: "address" },
78
- { internalType: "address", name: "priceFeed", type: "address" },
79
- { internalType: "uint64", name: "scale", type: "uint64" },
80
- { internalType: "uint64", name: "borrowCollateralFactor", type: "uint64" },
81
- { internalType: "uint64", name: "liquidateCollateralFactor", type: "uint64" },
82
- { internalType: "uint64", name: "liquidationFactor", type: "uint64" },
83
- { internalType: "uint128", name: "supplyCap", type: "uint128" },
84
- ],
85
- internalType: "struct CometCore.AssetInfo",
86
- name: "",
87
- type: "tuple",
88
- },
89
- ],
90
- stateMutability: "view",
91
- type: "function",
92
- },
93
- {
94
- inputs: [],
95
- name: "baseToken",
96
- outputs: [{ internalType: "address", name: "", type: "address" }],
97
- stateMutability: "view",
98
- type: "function",
99
- },
100
- {
101
- inputs: [],
102
- name: "baseTokenPriceFeed",
103
- outputs: [{ internalType: "address", name: "", type: "address" }],
104
- stateMutability: "view",
105
- type: "function",
106
- },
107
- {
108
- inputs: [
109
- { internalType: "address", name: "account", type: "address" },
110
- { internalType: "address", name: "asset", type: "address" },
111
- ],
112
- name: "collateralBalanceOf",
113
- outputs: [{ internalType: "uint128", name: "balance", type: "uint128" }],
114
- stateMutability: "view",
115
- type: "function",
116
- },
117
- {
118
- inputs: [{ internalType: "address", name: "account", type: "address" }],
119
- name: "balanceOf",
120
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
121
- stateMutability: "view",
122
- type: "function",
123
- },
124
- ] as const;
125
-
126
- export const PRICE_FEED_ABI = [
127
- {
128
- inputs: [],
129
- name: "latestRoundData",
130
- outputs: [
131
- { name: "roundId", type: "uint80" },
132
- { name: "answer", type: "int256" },
133
- { name: "startedAt", type: "uint256" },
134
- { name: "updatedAt", type: "uint256" },
135
- { name: "answeredInRound", type: "uint80" },
136
- ],
137
- stateMutability: "view",
138
- type: "function",
139
- },
140
- ] as const;
@@ -1 +0,0 @@
1
- export { compoundFixedProvider } from "./compoundActionProvider.js";
@@ -1,45 +0,0 @@
1
- import { z } from "zod";
2
-
3
- export const CompoundSupplySchema = z
4
- .object({
5
- assetId: z.enum(["weth", "cbeth", "cbbtc", "wsteth", "usdc"]).describe("The asset to supply"),
6
- amount: z
7
- .string()
8
- .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value")
9
- .describe("The amount of tokens to supply in human-readable format"),
10
- })
11
- .describe("Input schema for Compound supply action");
12
-
13
- export const CompoundWithdrawSchema = z
14
- .object({
15
- assetId: z.enum(["weth", "cbeth", "cbbtc", "wsteth", "usdc"]).describe("The asset to withdraw"),
16
- amount: z
17
- .string()
18
- .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value")
19
- .describe("The amount of tokens to withdraw in human-readable format"),
20
- })
21
- .describe("Input schema for Compound withdraw action");
22
-
23
- export const CompoundBorrowSchema = z
24
- .object({
25
- assetId: z.enum(["weth", "usdc"]).describe("The asset to borrow"),
26
- amount: z
27
- .string()
28
- .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value")
29
- .describe("The amount of base tokens to borrow in human-readable format"),
30
- })
31
- .describe("Input schema for Compound borrow action");
32
-
33
- export const CompoundRepaySchema = z
34
- .object({
35
- assetId: z.enum(["weth", "usdc"]).describe("The asset to repay"),
36
- amount: z
37
- .string()
38
- .regex(/^\d+(\.\d+)?$/, "Must be a valid integer or decimal value")
39
- .describe("The amount of tokens to repay in human-readable format"),
40
- })
41
- .describe("Input schema for Compound repay action");
42
-
43
- export const CompoundPortfolioSchema = z
44
- .object({})
45
- .describe("Input schema for Compound get portfolio action");