@coinbase/agentkit 0.1.2 → 0.2.0

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.
Files changed (40) hide show
  1. package/README.md +319 -5
  2. package/dist/action-providers/erc20/schemas.d.ts +2 -2
  3. package/dist/action-providers/index.d.ts +8 -7
  4. package/dist/action-providers/index.js +8 -7
  5. package/dist/action-providers/morpho/schemas.d.ts +4 -4
  6. package/dist/action-providers/spl/index.d.ts +1 -0
  7. package/dist/action-providers/spl/index.js +17 -0
  8. package/dist/action-providers/spl/schemas.d.ts +17 -0
  9. package/dist/action-providers/spl/schemas.js +14 -0
  10. package/dist/action-providers/spl/splActionProvider.d.ts +37 -0
  11. package/dist/action-providers/spl/splActionProvider.js +112 -0
  12. package/dist/action-providers/spl/splActionProvider.test.d.ts +1 -0
  13. package/dist/action-providers/spl/splActionProvider.test.js +206 -0
  14. package/dist/action-providers/wallet/walletActionProvider.d.ts +1 -1
  15. package/dist/action-providers/wallet/walletActionProvider.js +31 -18
  16. package/dist/action-providers/wallet/walletActionProvider.test.js +101 -23
  17. package/dist/network/index.d.ts +2 -1
  18. package/dist/network/index.js +2 -1
  19. package/dist/network/network.d.ts +7 -0
  20. package/dist/network/network.js +46 -1
  21. package/dist/network/svm.d.ts +14 -0
  22. package/dist/network/svm.js +33 -0
  23. package/dist/utils.d.ts +11 -0
  24. package/dist/utils.js +14 -0
  25. package/dist/wallet-providers/cdpWalletProvider.d.ts +13 -0
  26. package/dist/wallet-providers/cdpWalletProvider.js +14 -7
  27. package/dist/wallet-providers/index.d.ts +3 -0
  28. package/dist/wallet-providers/index.js +3 -0
  29. package/dist/wallet-providers/privyWalletProvider.d.ts +70 -0
  30. package/dist/wallet-providers/privyWalletProvider.js +139 -0
  31. package/dist/wallet-providers/solanaKeypairWalletProvider.d.ts +143 -0
  32. package/dist/wallet-providers/solanaKeypairWalletProvider.js +280 -0
  33. package/dist/wallet-providers/solanaKeypairWalletProvider.test.d.ts +1 -0
  34. package/dist/wallet-providers/solanaKeypairWalletProvider.test.js +24 -0
  35. package/dist/wallet-providers/svmWalletProvider.d.ts +56 -0
  36. package/dist/wallet-providers/svmWalletProvider.js +13 -0
  37. package/dist/wallet-providers/viemWalletProvider.d.ts +15 -1
  38. package/dist/wallet-providers/viemWalletProvider.js +22 -3
  39. package/dist/wallet-providers/walletProvider.d.ts +1 -1
  40. package/package.json +4 -1
package/README.md CHANGED
@@ -8,22 +8,32 @@ AgentKit is a framework for easily enabling AI agents to take actions onchain. I
8
8
  - [Getting Started](#getting-started)
9
9
  - [Installation](#installation)
10
10
  - [Usage](#usage)
11
- - [Create an AgentKit instance](##create-an-agentkit-instance-if-no-wallet-or-action-providers-are-specified-the-agent-will-use-the-cdpwalletprovider-and-walletprovider-action-provider)
11
+ - [Create an AgentKit instance](#create-an-agentkit-instance)
12
12
  - [Create an AgentKit instance with a specified wallet provider](#create-an-agentkit-instance-with-a-specified-wallet-provider)
13
13
  - [Create an AgentKit instance with a specified action providers](#create-an-agentkit-instance-with-a-specified-action-providers)
14
14
  - [Use the agent's actions with a framework extension. For example, using LangChain + OpenAI](#use-the-agents-actions-with-a-framework-extension-for-example-using-langchain--openai)
15
+ - [Action Providers](#action-providers)
15
16
  - [Creating an Action Provider](#creating-an-action-provider)
16
17
  - [Adding Actions to your Action Provider](#adding-actions-to-your-action-provider)
17
18
  - [Adding Actions to your Action Provider that use a Wallet Provider](#adding-actions-to-your-action-provider-that-use-a-wallet-provider)
18
19
  - [Adding an Action Provider to your AgentKit instance](#adding-an-action-provider-to-your-agentkit-instance)
19
- - [Wallet Providers](#wallet-providers)
20
+ - [EVM Wallet Providers](#evm-wallet-providers)
20
21
  - [CdpWalletProvider](#cdpwalletprovider)
21
22
  - [Network Configuration](#network-configuration)
22
23
  - [Configuring from an existing CDP API Wallet](#configuring-from-an-existing-cdp-api-wallet)
23
24
  - [Configuring from a mnemonic phrase](#configuring-from-a-mnemonic-phrase)
24
25
  - [Exporting a wallet](#exporting-a-wallet)
25
26
  - [Importing a wallet from WalletData JSON string](#importing-a-wallet-from-walletdata-json-string)
27
+ - [Configuring gas parameters](#configuring-cdpwalletprovider-gas-parameters)
26
28
  - [ViemWalletProvider](#viemwalletprovider)
29
+ - [Configuring gas parameters](#configuring-viemwalletprovider-gas-parameters)
30
+ - [PrivyWalletProvider](#privywalletprovider)
31
+ - [Authorization Keys](#authorization-keys)
32
+ - [Exporting Privy Wallet information](#exporting-privy-wallet-information)
33
+ - [SVM Wallet Providers](#svm-wallet-providers)
34
+ - [SolanaKeypairWalletProvider](#solanakeypairwalletprovider)
35
+ - [Network Configuration](#solana-network-configuration)
36
+ - [RPC URL Configuration](#rpc-url-configuration)
27
37
  - [Contributing](#contributing)
28
38
 
29
39
  ## Getting Started
@@ -49,6 +59,17 @@ const agentKit = await AgentKit.from({
49
59
  });
50
60
  ```
51
61
 
62
+ ### Create an AgentKit instance
63
+
64
+ If no wallet or action provider are specified, the agent will use the `CdpWalletProvider` and `WalletActionProvider` action provider by default.
65
+
66
+ ```typescript
67
+ const agentKit = await AgentKit.from({
68
+ cdpApiKeyName: "CDP API KEY NAME",
69
+ cdpApiKeyPrivate: "CDP API KEY PRIVATE KEY",
70
+ });
71
+ ```
72
+
52
73
  ### Create an AgentKit instance with a specified wallet provider.
53
74
 
54
75
  ```typescript
@@ -109,6 +130,167 @@ const agent = createReactAgent({
109
130
  });
110
131
  ```
111
132
 
133
+ ## Action Providers
134
+ <details>
135
+ <summary><strong>Basename</strong></summary>
136
+ <table width="100%">
137
+ <tr>
138
+ <td width="200"><code>register_basename</code></td>
139
+ <td width="768">Registers a custom .base.eth or .basetest.eth domain name for the wallet address.</td>
140
+ </tr>
141
+ </table>
142
+ </details>
143
+ <details>
144
+ <summary><strong>CDP Wallet</strong></summary>
145
+ <table width="100%">
146
+ <tr>
147
+ <td width="200"><code>deploy_contract</code></td>
148
+ <td width="768">Deploys a custom smart contract using specified Solidity version and constructor arguments.</td>
149
+ </tr>
150
+ <tr>
151
+ <td width="200"><code>deploy_nft</code></td>
152
+ <td width="768">Deploys a standard ERC-721 NFT contract with configurable name, symbol, and metadata URI.</td>
153
+ </tr>
154
+ <tr>
155
+ <td width="200"><code>deploy_token</code></td>
156
+ <td width="768">Deploys a standard ERC-20 token contract with configurable name, symbol, and initial supply.</td>
157
+ </tr>
158
+ <tr>
159
+ <td width="200"><code>trade</code></td>
160
+ <td width="768">Executes a token swap between two assets at current market rates on mainnet networks.</td>
161
+ </tr>
162
+ </table>
163
+ </details>
164
+ <details>
165
+ <summary><strong>ERC20</strong></summary>
166
+ <table width="100%">
167
+ <tr>
168
+ <td width="200"><code>get_balance</code></td>
169
+ <td width="768">Retrieves the token balance for a specified address and ERC-20 contract.</td>
170
+ </tr>
171
+ <tr>
172
+ <td width="200"><code>transfer</code></td>
173
+ <td width="768">Transfers a specified amount of ERC-20 tokens to a destination address.</td>
174
+ </tr>
175
+ </table>
176
+ </details>
177
+ <details>
178
+ <summary><strong>ERC721</strong></summary>
179
+ <table width="100%">
180
+ <tr>
181
+ <td width="200"><code>get_balance</code></td>
182
+ <td width="768">Retrieves the NFT balance for a specified address and ERC-721 contract.</td>
183
+ </tr>
184
+ <tr>
185
+ <td width="200"><code>mint</code></td>
186
+ <td width="768">Creates a new NFT token and assigns it to a specified destination address.</td>
187
+ </tr>
188
+ <tr>
189
+ <td width="200"><code>transfer</code></td>
190
+ <td width="768">Transfers ownership of a specific NFT token to a destination address.</td>
191
+ </tr>
192
+ </table>
193
+ </details>
194
+ <details>
195
+ <summary><strong>Farcaster</strong></summary>
196
+ <table width="100%">
197
+ <tr>
198
+ <td width="200"><code>account_details</code></td>
199
+ <td width="768">Fetches profile information and metadata for the authenticated Farcaster account.</td>
200
+ </tr>
201
+ <tr>
202
+ <td width="200"><code>post_cast</code></td>
203
+ <td width="768">Creates a new cast (message) on Farcaster with up to 280 characters.</td>
204
+ </tr>
205
+ </table>
206
+ </details>
207
+ <details>
208
+ <summary><strong>Morpho</strong></summary>
209
+ <table width="100%">
210
+ <tr>
211
+ <td width="200"><code>deposit</code></td>
212
+ <td width="768">Deposits a specified amount of assets into a designated Morpho Vault.</td>
213
+ </tr>
214
+ <tr>
215
+ <td width="200"><code>withdraw</code></td>
216
+ <td width="768">Withdraws a specified amount of assets from a designated Morpho Vault.</td>
217
+ </tr>
218
+ </table>
219
+ </details>
220
+ <details>
221
+ <summary><strong>Pyth</strong></summary>
222
+ <table width="100%">
223
+ <tr>
224
+ <td width="200"><code>fetch_price</code></td>
225
+ <td width="768">Retrieves current price data from a specified Pyth price feed.</td>
226
+ </tr>
227
+ <tr>
228
+ <td width="200"><code>fetch_price_feed_id</code></td>
229
+ <td width="768">Retrieves the unique price feed identifier for a given token symbol.</td>
230
+ </tr>
231
+ </table>
232
+ </details>
233
+ <details>
234
+ <summary><strong>Twitter</strong></summary>
235
+ <table width="100%">
236
+ <tr>
237
+ <td width="200"><code>account_details</code></td>
238
+ <td width="768">Fetches profile information and metadata for the authenticated Twitter account.</td>
239
+ </tr>
240
+ <tr>
241
+ <td width="200"><code>account_mentions</code></td>
242
+ <td width="768">Retrieves recent mentions and interactions for the authenticated account.</td>
243
+ </tr>
244
+ <tr>
245
+ <td width="200"><code>post_tweet</code></td>
246
+ <td width="768">Creates a new tweet on the authenticated Twitter account.</td>
247
+ </tr>
248
+ <tr>
249
+ <td width="200"><code>post_tweet_reply</code></td>
250
+ <td width="768">Creates a reply to an existing tweet using the tweet's unique identifier.</td>
251
+ </tr>
252
+ </table>
253
+ </details>
254
+ <details>
255
+ <summary><strong>Wallet</strong></summary>
256
+ <table width="100%">
257
+ <tr>
258
+ <td width="200"><code>get_wallet_details</code></td>
259
+ <td width="768">Retrieves wallet address, network info, balances, and provider details.</td>
260
+ </tr>
261
+ <tr>
262
+ <td width="200"><code>native_transfer</code></td>
263
+ <td width="768">Transfers native blockchain tokens (e.g., ETH) to a destination address.</td>
264
+ </tr>
265
+ </table>
266
+ </details>
267
+ <details>
268
+ <summary><strong>WETH</strong></summary>
269
+ <table width="100%">
270
+ <tr>
271
+ <td width="200"><code>wrap_eth</code></td>
272
+ <td width="768">Converts native ETH to Wrapped ETH (WETH) on Base Sepolia or Base Mainnet.</td>
273
+ </tr>
274
+ </table>
275
+ </details>
276
+ <details>
277
+ <summary><strong>WOW</strong></summary>
278
+ <table width="100%">
279
+ <tr>
280
+ <td width="200"><code>buy_token</code></td>
281
+ <td width="768">Purchases WOW tokens from a contract using ETH based on bonding curve pricing.</td>
282
+ </tr>
283
+ <tr>
284
+ <td width="200"><code>create_token</code></td>
285
+ <td width="768">Creates a new WOW memecoin with bonding curve functionality via Zora factory.</td>
286
+ </tr>
287
+ <tr>
288
+ <td width="200"><code>sell_token</code></td>
289
+ <td width="768">Sells WOW tokens back to the contract for ETH based on bonding curve pricing.</td>
290
+ </tr>
291
+ </table>
292
+ </details>
293
+
112
294
  ## Creating an Action Provider
113
295
 
114
296
  Action providers are used to define the actions that an agent can take. They are defined as a class that extends the `ActionProvider` abstract class.
@@ -216,13 +398,14 @@ const agentKit = new AgentKit({
216
398
  });
217
399
  ```
218
400
 
219
- ## Wallet Providers
401
+ ## EVM Wallet Providers
220
402
 
221
403
  Wallet providers give an agent access to a wallet. AgentKit currently supports the following wallet providers:
222
404
 
223
405
  EVM:
224
- - [CdpWalletProvider](./src/wallet-providers/cdpWalletProvider.ts)
225
- - [ViemWalletProvider](./src/wallet-providers/viemWalletProvider.ts)
406
+ - [CdpWalletProvider](https://github.com/coinbase/agentkit/blob/main/typescript/agentkit/src/wallet-providers/cdpWalletProvider.ts)
407
+ - [ViemWalletProvider](https://github.com/coinbase/agentkit/blob/main/typescript/agentkit/src/wallet-providers/viemWalletProvider.ts)
408
+ - [PrivyWalletProvider](https://github.com/coinbase/agentkit/blob/main/typescript/agentkit/src/wallet-providers/privyWalletProvider.ts)
226
409
 
227
410
  ### CdpWalletProvider
228
411
 
@@ -296,6 +479,27 @@ const walletProvider = await CdpWalletProvider.configureWithWallet({
296
479
  });
297
480
  ```
298
481
 
482
+ #### Configuring CdpWalletProvider gas parameters
483
+
484
+ The `CdpWalletProvider` also exposes parameters for effecting the gas calculations.
485
+
486
+ ```typescript
487
+ import { CdpWalletProvider } from "@coinbase/agentkit";
488
+
489
+ const walletProvider = await CdpWalletProvider.configureWithWallet({
490
+ cdpWalletData: "WALLET DATA JSON STRING",
491
+ apiKeyName: "CDP API KEY NAME",
492
+ apiKeyPrivate: "CDP API KEY PRIVATE KEY",
493
+ gas: {
494
+ gasLimitMultiplier: 2.0, // Adjusts gas limit estimation
495
+ feePerGasMultiplier: 2.0, // Adjusts max fee per gas
496
+ }
497
+ });
498
+ ```
499
+
500
+ **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.
501
+
502
+
299
503
  ### ViemWalletProvider
300
504
 
301
505
  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.
@@ -320,6 +524,116 @@ const client = createWalletClient({
320
524
  const walletProvider = new ViemWalletProvider(client);
321
525
  ```
322
526
 
527
+ #### Configuring ViemWalletProvider gas parameters
528
+
529
+ The `ViemWalletProvider` also exposes parameters for effecting the gas calculations.
530
+
531
+ ```typescript
532
+ import { ViemWalletProvider } from "@coinbase/agentkit";
533
+ import { privateKeyToAccount } from "viem/accounts";
534
+ import { baseSepolia } from "viem/chains";
535
+ import { http } from "viem/transports";
536
+ import { createWalletClient } from "viem";
537
+
538
+ const account = privateKeyToAccount(
539
+ "0x4c0883a69102937d6231471b5dbb6208ffd70c02a813d7f2da1c54f2e3be9f38",
540
+ );
541
+
542
+ const client = createWalletClient({
543
+ account,
544
+ chain: baseSepolia,
545
+ transport: http(),
546
+ });
547
+
548
+ const walletProvider = new ViemWalletProvider(client, {
549
+ gasLimitMultiplier: 2.0, // Adjusts gas limit estimation
550
+ feePerGasMultiplier: 2.0, // Adjusts max fee per gas
551
+ });
552
+ ```
553
+
554
+ ### PrivyWalletProvider
555
+
556
+ The `PrivyWalletProvider` is a wallet provider that uses [Privy Server Wallets](https://docs.privy.io/guide/server-wallets/). This implementation extends the `ViemWalletProvider`.
557
+
558
+ ```typescript
559
+ import { PrivyWalletProvider } from "@coinbase/agentkit";
560
+
561
+ // Configure Wallet Provider
562
+ const config = {
563
+ appId: "PRIVY_APP_ID",
564
+ appSecret: "PRIVY_APP_SECRET",
565
+ chainId: "84532", // base-sepolia
566
+ walletId: "PRIVY_WALLET_ID", // optional, otherwise a new wallet will be created
567
+ authorizationPrivateKey: PRIVY_WALLET_AUTHORIZATION_PRIVATE_KEY, // optional, required if your account is using authorization keys
568
+ authorizationKeyId: PRIVY_WALLET_AUTHORIZATION_KEY_ID, // optional, only required to create a new wallet if walletId is not provided
569
+ };
570
+
571
+ const walletProvider = await PrivyWalletProvider.configureWithWallet(config);
572
+ ```
573
+
574
+ #### Authorization Keys
575
+
576
+ Privy offers the option to use authorization keys to secure your server wallets.
577
+
578
+ You can manage authorization keys from your [Privy dashboard](https://dashboard.privy.io/account) or programmatically [using the API](https://docs.privy.io/guide/server-wallets/authorization/signatures).
579
+
580
+ When using authorization keys, you must provide the `authorizationPrivateKey` and `authorizationKeyId` parameters to the `configureWithWallet` method if you are creating a new wallet. Please note that when creating a key, if you enable "Create and modify wallets", you will be required to use that key when creating new wallets via the PrivyWalletProvider.
581
+
582
+ #### Exporting Privy Wallet information
583
+
584
+ The `PrivyWalletProvider` can export wallet information by calling the `exportWallet` method.
585
+
586
+ ```typescript
587
+ const walletData = await walletProvider.exportWallet();
588
+
589
+ // walletData will be in the following format:
590
+ {
591
+ walletId: string;
592
+ authorizationKey: string | undefined;
593
+ chainId: string | undefined;
594
+ }
595
+ ```
596
+
597
+ ## SVM Wallet Providers
598
+
599
+ SVM:
600
+ - [SolanaKeypairWalletProvider](https://github.com/coinbase/agentkit/blob/main/typescript/agentkit/src/wallet-providers/solanaKeypairWalletProvider.ts)
601
+
602
+ ### SolanaKeypairWalletProvider
603
+
604
+ The `SolanaKeypairWalletProvider` is a wallet provider that uses the API [Solana web3.js](https://solana-labs.github.io/solana-web3.js/).
605
+
606
+ #### Solana Network Configuration
607
+
608
+ The `SolanaKeypairWalletProvider` can be configured to use a specific network by passing the `networkId` parameter to the `fromNetwork` method. The `networkId` is the ID of the Solana network you want to use. Valid values are `solana-mainnet`, `solana-devnet` and `solana-testnet`.
609
+
610
+ The default RPC endpoints for each network are as follows:
611
+ - `solana-mainnet`: `https://api.mainnet-beta.solana.com`
612
+ - `solana-devnet`: `https://api.devnet.solana.com`
613
+ - `solana-testnet`: `https://api.testnet.solana.com`
614
+
615
+ ```typescript
616
+ import { SOLANA_NETWORK_ID, SolanaKeypairWalletProvider } from "@coinbase/agentkit";
617
+
618
+ // Configure Solana Keypair Wallet Provider
619
+ const privateKey = process.env.SOLANA_PRIVATE_KEY;
620
+ const network = process.env.NETWORK_ID as SOLANA_NETWORK_ID;
621
+ const walletProvider = await SolanaKeypairWalletProvider.fromNetwork(network, privateKey);
622
+ ```
623
+
624
+ #### RPC URL Configuration
625
+
626
+ The `SolanaKeypairWalletProvider` can be configured to use a specific RPC url by passing the `rpcUrl` parameter to the `fromRpcUrl` method. The `rpcUrl` will determine the network you are using.
627
+
628
+ ```typescript
629
+ import { SOLANA_NETWORK_ID, SolanaKeypairWalletProvider } from "@coinbase/agentkit";
630
+
631
+ // Configure Solana Keypair Wallet Provider
632
+ const privateKey = process.env.SOLANA_PRIVATE_KEY;
633
+ const rpcUrl = process.env.SOLANA_RPC_URL;
634
+ const walletProvider = await SolanaKeypairWalletProvider.fromRpcUrl(network, privateKey);
635
+ ```
636
+
323
637
  ## Contributing
324
638
 
325
639
  See [CONTRIBUTING.md](../../CONTRIBUTING.md) for more information.
@@ -7,12 +7,12 @@ export declare const TransferSchema: z.ZodObject<{
7
7
  contractAddress: z.ZodString;
8
8
  destination: z.ZodString;
9
9
  }, "strip", z.ZodTypeAny, {
10
- amount: bigint;
11
10
  contractAddress: string;
11
+ amount: bigint;
12
12
  destination: string;
13
13
  }, {
14
- amount: bigint;
15
14
  contractAddress: string;
15
+ amount: bigint;
16
16
  destination: string;
17
17
  }>;
18
18
  /**
@@ -1,15 +1,16 @@
1
1
  export * from "./actionDecorator";
2
2
  export * from "./actionProvider";
3
- export * from "./pyth";
3
+ export * from "./customActionProvider";
4
+ export * from "./alchemy";
5
+ export * from "./basename";
4
6
  export * from "./cdp";
5
- export * from "./weth";
6
7
  export * from "./erc20";
7
8
  export * from "./erc721";
8
- export * from "./morpho";
9
- export * from "./basename";
10
9
  export * from "./farcaster";
10
+ export * from "./pyth";
11
+ export * from "./moonwell";
12
+ export * from "./morpho";
13
+ export * from "./spl";
11
14
  export * from "./twitter";
12
15
  export * from "./wallet";
13
- export * from "./customActionProvider";
14
- export * from "./alchemy";
15
- export * from "./moonwell";
16
+ export * from "./weth";
@@ -16,16 +16,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./actionDecorator"), exports);
18
18
  __exportStar(require("./actionProvider"), exports);
19
- __exportStar(require("./pyth"), exports);
19
+ __exportStar(require("./customActionProvider"), exports);
20
+ __exportStar(require("./alchemy"), exports);
21
+ __exportStar(require("./basename"), exports);
20
22
  __exportStar(require("./cdp"), exports);
21
- __exportStar(require("./weth"), exports);
22
23
  __exportStar(require("./erc20"), exports);
23
24
  __exportStar(require("./erc721"), exports);
24
- __exportStar(require("./morpho"), exports);
25
- __exportStar(require("./basename"), exports);
26
25
  __exportStar(require("./farcaster"), exports);
26
+ __exportStar(require("./pyth"), exports);
27
+ __exportStar(require("./moonwell"), exports);
28
+ __exportStar(require("./morpho"), exports);
29
+ __exportStar(require("./spl"), exports);
27
30
  __exportStar(require("./twitter"), exports);
28
31
  __exportStar(require("./wallet"), exports);
29
- __exportStar(require("./customActionProvider"), exports);
30
- __exportStar(require("./alchemy"), exports);
31
- __exportStar(require("./moonwell"), exports);
32
+ __exportStar(require("./weth"), exports);
@@ -8,13 +8,13 @@ export declare const DepositSchema: z.ZodObject<{
8
8
  tokenAddress: z.ZodString;
9
9
  vaultAddress: z.ZodString;
10
10
  }, "strip", z.ZodTypeAny, {
11
- assets: string;
12
11
  receiver: string;
12
+ assets: string;
13
13
  tokenAddress: string;
14
14
  vaultAddress: string;
15
15
  }, {
16
- assets: string;
17
16
  receiver: string;
17
+ assets: string;
18
18
  tokenAddress: string;
19
19
  vaultAddress: string;
20
20
  }>;
@@ -26,11 +26,11 @@ export declare const WithdrawSchema: z.ZodObject<{
26
26
  assets: z.ZodString;
27
27
  receiver: z.ZodString;
28
28
  }, "strip", z.ZodTypeAny, {
29
- assets: string;
30
29
  receiver: string;
30
+ assets: string;
31
31
  vaultAddress: string;
32
32
  }, {
33
- assets: string;
34
33
  receiver: string;
34
+ assets: string;
35
35
  vaultAddress: string;
36
36
  }>;
@@ -0,0 +1 @@
1
+ export * from "./splActionProvider";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./splActionProvider"), exports);
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Schema for transferring SPL tokens to another address.
4
+ */
5
+ export declare const TransferTokenSchema: z.ZodObject<{
6
+ recipient: z.ZodString;
7
+ mintAddress: z.ZodString;
8
+ amount: z.ZodNumber;
9
+ }, "strip", z.ZodTypeAny, {
10
+ amount: number;
11
+ recipient: string;
12
+ mintAddress: string;
13
+ }, {
14
+ amount: number;
15
+ recipient: string;
16
+ mintAddress: string;
17
+ }>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransferTokenSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Schema for transferring SPL tokens to another address.
7
+ */
8
+ exports.TransferTokenSchema = zod_1.z
9
+ .object({
10
+ recipient: zod_1.z.string().describe("The recipient's Solana address"),
11
+ mintAddress: zod_1.z.string().describe("The SPL token's mint address"),
12
+ amount: zod_1.z.number().positive().describe("Amount of tokens to transfer"),
13
+ })
14
+ .describe("Transfer SPL tokens to another Solana address");
@@ -0,0 +1,37 @@
1
+ import { ActionProvider } from "../actionProvider";
2
+ import { Network } from "../../network";
3
+ import { SvmWalletProvider } from "../../wallet-providers/svmWalletProvider";
4
+ import { z } from "zod";
5
+ import { TransferTokenSchema } from "./schemas";
6
+ /**
7
+ * SplActionProvider serves as a provider for SPL token actions.
8
+ * It provides SPL token transfer functionality.
9
+ */
10
+ export declare class SplActionProvider extends ActionProvider<SvmWalletProvider> {
11
+ /**
12
+ * Creates a new SplActionProvider instance.
13
+ */
14
+ constructor();
15
+ /**
16
+ * Transfer SPL tokens to another address.
17
+ *
18
+ * @param walletProvider - The wallet provider to use for the transfer
19
+ * @param args - Transfer parameters including recipient address, mint address, and amount
20
+ * @returns A message indicating success or failure with transaction details
21
+ */
22
+ transfer(walletProvider: SvmWalletProvider, args: z.infer<typeof TransferTokenSchema>): Promise<string>;
23
+ /**
24
+ * Checks if the action provider supports the given network.
25
+ * Only supports Solana networks.
26
+ *
27
+ * @param network - The network to check support for
28
+ * @returns True if the network is a Solana network
29
+ */
30
+ supportsNetwork(network: Network): boolean;
31
+ }
32
+ /**
33
+ * Factory function to create a new SplActionProvider instance.
34
+ *
35
+ * @returns A new SplActionProvider instance
36
+ */
37
+ export declare const splActionProvider: () => SplActionProvider;