intentkit 0.5.0__py3-none-any.whl → 0.5.2__py3-none-any.whl
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.
Potentially problematic release.
This version of intentkit might be problematic. Click here for more details.
- intentkit/__init__.py +17 -0
- intentkit/abstracts/__init__.py +0 -0
- intentkit/abstracts/agent.py +60 -0
- intentkit/abstracts/api.py +4 -0
- intentkit/abstracts/engine.py +38 -0
- intentkit/abstracts/exception.py +9 -0
- intentkit/abstracts/graph.py +25 -0
- intentkit/abstracts/skill.py +129 -0
- intentkit/abstracts/twitter.py +54 -0
- intentkit/clients/__init__.py +14 -0
- intentkit/clients/cdp.py +53 -0
- intentkit/clients/twitter.py +445 -0
- intentkit/config/__init__.py +0 -0
- intentkit/config/config.py +164 -0
- intentkit/core/__init__.py +0 -0
- intentkit/core/agent.py +191 -0
- intentkit/core/api.py +40 -0
- intentkit/core/client.py +45 -0
- intentkit/core/credit.py +1767 -0
- intentkit/core/engine.py +1018 -0
- intentkit/core/node.py +223 -0
- intentkit/core/prompt.py +58 -0
- intentkit/core/skill.py +124 -0
- intentkit/models/agent.py +1689 -0
- intentkit/models/agent_data.py +810 -0
- intentkit/models/agent_schema.json +733 -0
- intentkit/models/app_setting.py +156 -0
- intentkit/models/base.py +9 -0
- intentkit/models/chat.py +581 -0
- intentkit/models/conversation.py +286 -0
- intentkit/models/credit.py +1406 -0
- intentkit/models/db.py +120 -0
- intentkit/models/db_mig.py +102 -0
- intentkit/models/generator.py +347 -0
- intentkit/models/llm.py +746 -0
- intentkit/models/redis.py +132 -0
- intentkit/models/skill.py +466 -0
- intentkit/models/user.py +243 -0
- intentkit/skills/__init__.py +12 -0
- intentkit/skills/acolyt/__init__.py +83 -0
- intentkit/skills/acolyt/acolyt.jpg +0 -0
- intentkit/skills/acolyt/ask.py +128 -0
- intentkit/skills/acolyt/base.py +28 -0
- intentkit/skills/acolyt/schema.json +89 -0
- intentkit/skills/aixbt/README.md +71 -0
- intentkit/skills/aixbt/__init__.py +73 -0
- intentkit/skills/aixbt/aixbt.jpg +0 -0
- intentkit/skills/aixbt/base.py +21 -0
- intentkit/skills/aixbt/projects.py +153 -0
- intentkit/skills/aixbt/schema.json +99 -0
- intentkit/skills/allora/__init__.py +83 -0
- intentkit/skills/allora/allora.jpeg +0 -0
- intentkit/skills/allora/base.py +28 -0
- intentkit/skills/allora/price.py +130 -0
- intentkit/skills/allora/schema.json +89 -0
- intentkit/skills/base.py +174 -0
- intentkit/skills/carv/README.md +95 -0
- intentkit/skills/carv/__init__.py +121 -0
- intentkit/skills/carv/base.py +183 -0
- intentkit/skills/carv/carv.webp +0 -0
- intentkit/skills/carv/fetch_news.py +92 -0
- intentkit/skills/carv/onchain_query.py +164 -0
- intentkit/skills/carv/schema.json +137 -0
- intentkit/skills/carv/token_info_and_price.py +110 -0
- intentkit/skills/cdp/__init__.py +137 -0
- intentkit/skills/cdp/base.py +21 -0
- intentkit/skills/cdp/cdp.png +0 -0
- intentkit/skills/cdp/get_balance.py +81 -0
- intentkit/skills/cdp/schema.json +473 -0
- intentkit/skills/chainlist/README.md +38 -0
- intentkit/skills/chainlist/__init__.py +54 -0
- intentkit/skills/chainlist/base.py +21 -0
- intentkit/skills/chainlist/chain_lookup.py +208 -0
- intentkit/skills/chainlist/chainlist.png +0 -0
- intentkit/skills/chainlist/schema.json +47 -0
- intentkit/skills/common/__init__.py +82 -0
- intentkit/skills/common/base.py +21 -0
- intentkit/skills/common/common.jpg +0 -0
- intentkit/skills/common/current_time.py +84 -0
- intentkit/skills/common/schema.json +57 -0
- intentkit/skills/cookiefun/README.md +121 -0
- intentkit/skills/cookiefun/__init__.py +78 -0
- intentkit/skills/cookiefun/base.py +41 -0
- intentkit/skills/cookiefun/constants.py +18 -0
- intentkit/skills/cookiefun/cookiefun.png +0 -0
- intentkit/skills/cookiefun/get_account_details.py +171 -0
- intentkit/skills/cookiefun/get_account_feed.py +282 -0
- intentkit/skills/cookiefun/get_account_smart_followers.py +181 -0
- intentkit/skills/cookiefun/get_sectors.py +128 -0
- intentkit/skills/cookiefun/schema.json +155 -0
- intentkit/skills/cookiefun/search_accounts.py +225 -0
- intentkit/skills/cryptocompare/__init__.py +130 -0
- intentkit/skills/cryptocompare/api.py +159 -0
- intentkit/skills/cryptocompare/base.py +303 -0
- intentkit/skills/cryptocompare/cryptocompare.png +0 -0
- intentkit/skills/cryptocompare/fetch_news.py +96 -0
- intentkit/skills/cryptocompare/fetch_price.py +99 -0
- intentkit/skills/cryptocompare/fetch_top_exchanges.py +113 -0
- intentkit/skills/cryptocompare/fetch_top_market_cap.py +109 -0
- intentkit/skills/cryptocompare/fetch_top_volume.py +108 -0
- intentkit/skills/cryptocompare/fetch_trading_signals.py +107 -0
- intentkit/skills/cryptocompare/schema.json +168 -0
- intentkit/skills/cryptopanic/__init__.py +108 -0
- intentkit/skills/cryptopanic/base.py +51 -0
- intentkit/skills/cryptopanic/cryptopanic.png +0 -0
- intentkit/skills/cryptopanic/fetch_crypto_news.py +153 -0
- intentkit/skills/cryptopanic/fetch_crypto_sentiment.py +136 -0
- intentkit/skills/cryptopanic/schema.json +103 -0
- intentkit/skills/dapplooker/README.md +92 -0
- intentkit/skills/dapplooker/__init__.py +83 -0
- intentkit/skills/dapplooker/base.py +26 -0
- intentkit/skills/dapplooker/dapplooker.jpg +0 -0
- intentkit/skills/dapplooker/dapplooker_token_data.py +476 -0
- intentkit/skills/dapplooker/schema.json +91 -0
- intentkit/skills/defillama/__init__.py +323 -0
- intentkit/skills/defillama/api.py +315 -0
- intentkit/skills/defillama/base.py +135 -0
- intentkit/skills/defillama/coins/__init__.py +0 -0
- intentkit/skills/defillama/coins/fetch_batch_historical_prices.py +116 -0
- intentkit/skills/defillama/coins/fetch_block.py +98 -0
- intentkit/skills/defillama/coins/fetch_current_prices.py +105 -0
- intentkit/skills/defillama/coins/fetch_first_price.py +100 -0
- intentkit/skills/defillama/coins/fetch_historical_prices.py +110 -0
- intentkit/skills/defillama/coins/fetch_price_chart.py +109 -0
- intentkit/skills/defillama/coins/fetch_price_percentage.py +93 -0
- intentkit/skills/defillama/config/__init__.py +0 -0
- intentkit/skills/defillama/config/chains.py +433 -0
- intentkit/skills/defillama/defillama.jpeg +0 -0
- intentkit/skills/defillama/fees/__init__.py +0 -0
- intentkit/skills/defillama/fees/fetch_fees_overview.py +130 -0
- intentkit/skills/defillama/schema.json +383 -0
- intentkit/skills/defillama/stablecoins/__init__.py +0 -0
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_chains.py +100 -0
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_charts.py +129 -0
- intentkit/skills/defillama/stablecoins/fetch_stablecoin_prices.py +83 -0
- intentkit/skills/defillama/stablecoins/fetch_stablecoins.py +126 -0
- intentkit/skills/defillama/tests/__init__.py +0 -0
- intentkit/skills/defillama/tests/api_integration.test.py +192 -0
- intentkit/skills/defillama/tests/api_unit.test.py +583 -0
- intentkit/skills/defillama/tvl/__init__.py +0 -0
- intentkit/skills/defillama/tvl/fetch_chain_historical_tvl.py +106 -0
- intentkit/skills/defillama/tvl/fetch_chains.py +107 -0
- intentkit/skills/defillama/tvl/fetch_historical_tvl.py +91 -0
- intentkit/skills/defillama/tvl/fetch_protocol.py +207 -0
- intentkit/skills/defillama/tvl/fetch_protocol_current_tvl.py +93 -0
- intentkit/skills/defillama/tvl/fetch_protocols.py +196 -0
- intentkit/skills/defillama/volumes/__init__.py +0 -0
- intentkit/skills/defillama/volumes/fetch_dex_overview.py +157 -0
- intentkit/skills/defillama/volumes/fetch_dex_summary.py +123 -0
- intentkit/skills/defillama/volumes/fetch_options_overview.py +131 -0
- intentkit/skills/defillama/yields/__init__.py +0 -0
- intentkit/skills/defillama/yields/fetch_pool_chart.py +100 -0
- intentkit/skills/defillama/yields/fetch_pools.py +126 -0
- intentkit/skills/dexscreener/__init__.py +93 -0
- intentkit/skills/dexscreener/base.py +133 -0
- intentkit/skills/dexscreener/dexscreener.png +0 -0
- intentkit/skills/dexscreener/model/__init__.py +0 -0
- intentkit/skills/dexscreener/model/search_token_response.py +82 -0
- intentkit/skills/dexscreener/schema.json +48 -0
- intentkit/skills/dexscreener/search_token.py +321 -0
- intentkit/skills/dune_analytics/__init__.py +103 -0
- intentkit/skills/dune_analytics/base.py +46 -0
- intentkit/skills/dune_analytics/dune.png +0 -0
- intentkit/skills/dune_analytics/fetch_kol_buys.py +128 -0
- intentkit/skills/dune_analytics/fetch_nation_metrics.py +237 -0
- intentkit/skills/dune_analytics/schema.json +99 -0
- intentkit/skills/elfa/README.md +100 -0
- intentkit/skills/elfa/__init__.py +123 -0
- intentkit/skills/elfa/base.py +28 -0
- intentkit/skills/elfa/elfa.jpg +0 -0
- intentkit/skills/elfa/mention.py +504 -0
- intentkit/skills/elfa/schema.json +153 -0
- intentkit/skills/elfa/stats.py +118 -0
- intentkit/skills/elfa/tokens.py +126 -0
- intentkit/skills/enso/README.md +75 -0
- intentkit/skills/enso/__init__.py +114 -0
- intentkit/skills/enso/abi/__init__.py +0 -0
- intentkit/skills/enso/abi/approval.py +279 -0
- intentkit/skills/enso/abi/erc20.py +14 -0
- intentkit/skills/enso/abi/route.py +129 -0
- intentkit/skills/enso/base.py +44 -0
- intentkit/skills/enso/best_yield.py +286 -0
- intentkit/skills/enso/enso.jpg +0 -0
- intentkit/skills/enso/networks.py +105 -0
- intentkit/skills/enso/prices.py +93 -0
- intentkit/skills/enso/route.py +300 -0
- intentkit/skills/enso/schema.json +212 -0
- intentkit/skills/enso/tokens.py +223 -0
- intentkit/skills/enso/wallet.py +381 -0
- intentkit/skills/github/README.md +63 -0
- intentkit/skills/github/__init__.py +54 -0
- intentkit/skills/github/base.py +21 -0
- intentkit/skills/github/github.jpg +0 -0
- intentkit/skills/github/github_search.py +183 -0
- intentkit/skills/github/schema.json +59 -0
- intentkit/skills/heurist/__init__.py +143 -0
- intentkit/skills/heurist/base.py +26 -0
- intentkit/skills/heurist/heurist.png +0 -0
- intentkit/skills/heurist/image_generation_animagine_xl.py +162 -0
- intentkit/skills/heurist/image_generation_arthemy_comics.py +162 -0
- intentkit/skills/heurist/image_generation_arthemy_real.py +162 -0
- intentkit/skills/heurist/image_generation_braindance.py +162 -0
- intentkit/skills/heurist/image_generation_cyber_realistic_xl.py +162 -0
- intentkit/skills/heurist/image_generation_flux_1_dev.py +162 -0
- intentkit/skills/heurist/image_generation_sdxl.py +161 -0
- intentkit/skills/heurist/schema.json +196 -0
- intentkit/skills/lifi/README.md +294 -0
- intentkit/skills/lifi/__init__.py +141 -0
- intentkit/skills/lifi/base.py +21 -0
- intentkit/skills/lifi/lifi.png +0 -0
- intentkit/skills/lifi/schema.json +89 -0
- intentkit/skills/lifi/token_execute.py +472 -0
- intentkit/skills/lifi/token_quote.py +190 -0
- intentkit/skills/lifi/utils.py +656 -0
- intentkit/skills/moralis/README.md +490 -0
- intentkit/skills/moralis/__init__.py +110 -0
- intentkit/skills/moralis/api.py +281 -0
- intentkit/skills/moralis/base.py +55 -0
- intentkit/skills/moralis/fetch_chain_portfolio.py +191 -0
- intentkit/skills/moralis/fetch_nft_portfolio.py +284 -0
- intentkit/skills/moralis/fetch_solana_portfolio.py +331 -0
- intentkit/skills/moralis/fetch_wallet_portfolio.py +301 -0
- intentkit/skills/moralis/moralis.png +0 -0
- intentkit/skills/moralis/schema.json +156 -0
- intentkit/skills/moralis/tests/__init__.py +0 -0
- intentkit/skills/moralis/tests/test_wallet.py +511 -0
- intentkit/skills/nation/__init__.py +62 -0
- intentkit/skills/nation/base.py +31 -0
- intentkit/skills/nation/nation.png +0 -0
- intentkit/skills/nation/nft_check.py +106 -0
- intentkit/skills/nation/schema.json +58 -0
- intentkit/skills/openai/__init__.py +107 -0
- intentkit/skills/openai/base.py +32 -0
- intentkit/skills/openai/dalle_image_generation.py +128 -0
- intentkit/skills/openai/gpt_image_generation.py +152 -0
- intentkit/skills/openai/gpt_image_to_image.py +186 -0
- intentkit/skills/openai/image_to_text.py +126 -0
- intentkit/skills/openai/openai.png +0 -0
- intentkit/skills/openai/schema.json +139 -0
- intentkit/skills/portfolio/README.md +55 -0
- intentkit/skills/portfolio/__init__.py +151 -0
- intentkit/skills/portfolio/base.py +107 -0
- intentkit/skills/portfolio/constants.py +9 -0
- intentkit/skills/portfolio/moralis.png +0 -0
- intentkit/skills/portfolio/schema.json +237 -0
- intentkit/skills/portfolio/token_balances.py +155 -0
- intentkit/skills/portfolio/wallet_approvals.py +102 -0
- intentkit/skills/portfolio/wallet_defi_positions.py +80 -0
- intentkit/skills/portfolio/wallet_history.py +155 -0
- intentkit/skills/portfolio/wallet_net_worth.py +112 -0
- intentkit/skills/portfolio/wallet_nfts.py +139 -0
- intentkit/skills/portfolio/wallet_profitability.py +101 -0
- intentkit/skills/portfolio/wallet_profitability_summary.py +91 -0
- intentkit/skills/portfolio/wallet_stats.py +79 -0
- intentkit/skills/portfolio/wallet_swaps.py +147 -0
- intentkit/skills/skills.toml +103 -0
- intentkit/skills/slack/__init__.py +98 -0
- intentkit/skills/slack/base.py +55 -0
- intentkit/skills/slack/get_channel.py +109 -0
- intentkit/skills/slack/get_message.py +136 -0
- intentkit/skills/slack/schedule_message.py +92 -0
- intentkit/skills/slack/schema.json +135 -0
- intentkit/skills/slack/send_message.py +81 -0
- intentkit/skills/slack/slack.jpg +0 -0
- intentkit/skills/system/__init__.py +90 -0
- intentkit/skills/system/base.py +22 -0
- intentkit/skills/system/read_agent_api_key.py +87 -0
- intentkit/skills/system/regenerate_agent_api_key.py +77 -0
- intentkit/skills/system/schema.json +53 -0
- intentkit/skills/system/system.svg +76 -0
- intentkit/skills/tavily/README.md +86 -0
- intentkit/skills/tavily/__init__.py +91 -0
- intentkit/skills/tavily/base.py +27 -0
- intentkit/skills/tavily/schema.json +119 -0
- intentkit/skills/tavily/tavily.jpg +0 -0
- intentkit/skills/tavily/tavily_extract.py +147 -0
- intentkit/skills/tavily/tavily_search.py +139 -0
- intentkit/skills/token/README.md +89 -0
- intentkit/skills/token/__init__.py +107 -0
- intentkit/skills/token/base.py +154 -0
- intentkit/skills/token/constants.py +9 -0
- intentkit/skills/token/erc20_transfers.py +145 -0
- intentkit/skills/token/moralis.png +0 -0
- intentkit/skills/token/schema.json +141 -0
- intentkit/skills/token/token_analytics.py +81 -0
- intentkit/skills/token/token_price.py +132 -0
- intentkit/skills/token/token_search.py +121 -0
- intentkit/skills/twitter/__init__.py +146 -0
- intentkit/skills/twitter/base.py +68 -0
- intentkit/skills/twitter/follow_user.py +69 -0
- intentkit/skills/twitter/get_mentions.py +124 -0
- intentkit/skills/twitter/get_timeline.py +111 -0
- intentkit/skills/twitter/get_user_by_username.py +84 -0
- intentkit/skills/twitter/get_user_tweets.py +123 -0
- intentkit/skills/twitter/like_tweet.py +65 -0
- intentkit/skills/twitter/post_tweet.py +90 -0
- intentkit/skills/twitter/reply_tweet.py +98 -0
- intentkit/skills/twitter/retweet.py +76 -0
- intentkit/skills/twitter/schema.json +258 -0
- intentkit/skills/twitter/search_tweets.py +115 -0
- intentkit/skills/twitter/twitter.png +0 -0
- intentkit/skills/unrealspeech/__init__.py +55 -0
- intentkit/skills/unrealspeech/base.py +21 -0
- intentkit/skills/unrealspeech/schema.json +100 -0
- intentkit/skills/unrealspeech/text_to_speech.py +177 -0
- intentkit/skills/unrealspeech/unrealspeech.jpg +0 -0
- intentkit/skills/venice_audio/__init__.py +106 -0
- intentkit/skills/venice_audio/base.py +119 -0
- intentkit/skills/venice_audio/input.py +41 -0
- intentkit/skills/venice_audio/schema.json +152 -0
- intentkit/skills/venice_audio/venice_audio.py +240 -0
- intentkit/skills/venice_audio/venice_logo.jpg +0 -0
- intentkit/skills/venice_image/README.md +119 -0
- intentkit/skills/venice_image/__init__.py +154 -0
- intentkit/skills/venice_image/api.py +138 -0
- intentkit/skills/venice_image/base.py +188 -0
- intentkit/skills/venice_image/config.py +35 -0
- intentkit/skills/venice_image/image_enhance/README.md +119 -0
- intentkit/skills/venice_image/image_enhance/__init__.py +0 -0
- intentkit/skills/venice_image/image_enhance/image_enhance.py +80 -0
- intentkit/skills/venice_image/image_enhance/image_enhance_base.py +23 -0
- intentkit/skills/venice_image/image_enhance/image_enhance_input.py +40 -0
- intentkit/skills/venice_image/image_generation/README.md +144 -0
- intentkit/skills/venice_image/image_generation/__init__.py +0 -0
- intentkit/skills/venice_image/image_generation/image_generation_base.py +117 -0
- intentkit/skills/venice_image/image_generation/image_generation_fluently_xl.py +26 -0
- intentkit/skills/venice_image/image_generation/image_generation_flux_dev.py +27 -0
- intentkit/skills/venice_image/image_generation/image_generation_flux_dev_uncensored.py +26 -0
- intentkit/skills/venice_image/image_generation/image_generation_input.py +158 -0
- intentkit/skills/venice_image/image_generation/image_generation_lustify_sdxl.py +26 -0
- intentkit/skills/venice_image/image_generation/image_generation_pony_realism.py +26 -0
- intentkit/skills/venice_image/image_generation/image_generation_stable_diffusion_3_5.py +28 -0
- intentkit/skills/venice_image/image_generation/image_generation_venice_sd35.py +28 -0
- intentkit/skills/venice_image/image_upscale/README.md +111 -0
- intentkit/skills/venice_image/image_upscale/__init__.py +0 -0
- intentkit/skills/venice_image/image_upscale/image_upscale.py +90 -0
- intentkit/skills/venice_image/image_upscale/image_upscale_base.py +23 -0
- intentkit/skills/venice_image/image_upscale/image_upscale_input.py +22 -0
- intentkit/skills/venice_image/image_vision/README.md +112 -0
- intentkit/skills/venice_image/image_vision/__init__.py +0 -0
- intentkit/skills/venice_image/image_vision/image_vision.py +100 -0
- intentkit/skills/venice_image/image_vision/image_vision_base.py +17 -0
- intentkit/skills/venice_image/image_vision/image_vision_input.py +9 -0
- intentkit/skills/venice_image/schema.json +267 -0
- intentkit/skills/venice_image/utils.py +78 -0
- intentkit/skills/venice_image/venice_image.jpg +0 -0
- intentkit/skills/web_scraper/README.md +82 -0
- intentkit/skills/web_scraper/__init__.py +92 -0
- intentkit/skills/web_scraper/base.py +21 -0
- intentkit/skills/web_scraper/langchain.png +0 -0
- intentkit/skills/web_scraper/schema.json +115 -0
- intentkit/skills/web_scraper/scrape_and_index.py +327 -0
- intentkit/utils/__init__.py +1 -0
- intentkit/utils/chain.py +436 -0
- intentkit/utils/error.py +134 -0
- intentkit/utils/logging.py +70 -0
- intentkit/utils/middleware.py +61 -0
- intentkit/utils/random.py +16 -0
- intentkit/utils/s3.py +267 -0
- intentkit/utils/slack_alert.py +79 -0
- intentkit/utils/tx.py +37 -0
- {intentkit-0.5.0.dist-info → intentkit-0.5.2.dist-info}/METADATA +1 -1
- intentkit-0.5.2.dist-info/RECORD +365 -0
- intentkit-0.5.0.dist-info/RECORD +0 -4
- {intentkit-0.5.0.dist-info → intentkit-0.5.2.dist-info}/WHEEL +0 -0
- {intentkit-0.5.0.dist-info → intentkit-0.5.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
# Wallet Portfolio & Blockchain Analysis Skills
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The Wallet Portfolio & Blockchain Analysis Skills module provides comprehensive blockchain wallet analysis and transaction exploration capabilities across EVM-compatible chains (Ethereum, BSC, Polygon, etc.) and Solana. This module integrates with Moralis API to fetch wallet balances, transaction data, block information, NFT holdings, and more.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Multi-chain portfolio analysis
|
|
10
|
+
- Token balances with USD values
|
|
11
|
+
- Transaction history with detailed metadata
|
|
12
|
+
- Transaction exploration and decoding
|
|
13
|
+
- Block data retrieval and analysis
|
|
14
|
+
- NFT holdings with metadata
|
|
15
|
+
- Solana-specific portfolio analysis
|
|
16
|
+
- Token approval monitoring
|
|
17
|
+
|
|
18
|
+
## Setup
|
|
19
|
+
|
|
20
|
+
1. Obtain a Moralis API key from [Moralis](https://moralis.io/)
|
|
21
|
+
2. Configure the module with your API key:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"api_key": "YOUR_MORALIS_API_KEY",
|
|
26
|
+
"states": {
|
|
27
|
+
"fetch_wallet_portfolio": "public",
|
|
28
|
+
"fetch_chain_portfolio": "public",
|
|
29
|
+
"fetch_nft_portfolio": "public",
|
|
30
|
+
"fetch_transaction_history": "public",
|
|
31
|
+
"fetch_solana_portfolio": "public",
|
|
32
|
+
"fetch_transaction_by_hash": "public",
|
|
33
|
+
"fetch_latest_block": "public",
|
|
34
|
+
"fetch_block_by_hash_or_number": "public",
|
|
35
|
+
"fetch_block_by_date": "public"
|
|
36
|
+
},
|
|
37
|
+
"supported_chains": {
|
|
38
|
+
"evm": true,
|
|
39
|
+
"solana": true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Wallet Portfolio Skills
|
|
45
|
+
|
|
46
|
+
### 1. Fetch Wallet Portfolio (`fetch_wallet_portfolio`)
|
|
47
|
+
|
|
48
|
+
Provides a comprehensive overview of a wallet's holdings across multiple chains.
|
|
49
|
+
|
|
50
|
+
#### Sample Prompts:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
What's my portfolio value across all chains for address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e?
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Show me the total value of my crypto holdings for 0x742d35Cc6634C0532925a3b844Bc454e4438f44e across Ethereum and BSC
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Example Response:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
I've analyzed the wallet portfolio for address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e across multiple chains.
|
|
64
|
+
|
|
65
|
+
Portfolio Summary:
|
|
66
|
+
- Total Net Worth: $12,567.82
|
|
67
|
+
- Ethereum: $8,934.21
|
|
68
|
+
- BSC: $2,456.78
|
|
69
|
+
- Polygon: $1,176.83
|
|
70
|
+
|
|
71
|
+
Top Holdings:
|
|
72
|
+
1. ETH (Ethereum): 1.53 ETH ($5,823.45)
|
|
73
|
+
2. USDT (Ethereum): 2,500.00 USDT ($2,500.00)
|
|
74
|
+
3. BNB (BSC): 4.25 BNB ($1,870.25)
|
|
75
|
+
4. MATIC (Polygon): 1,100.00 MATIC ($880.00)
|
|
76
|
+
5. AAVE (Ethereum): 3.45 AAVE ($610.76)
|
|
77
|
+
|
|
78
|
+
Would you like me to provide more details about any specific token or chain?
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 2. Fetch Chain Portfolio (`fetch_chain_portfolio`)
|
|
82
|
+
|
|
83
|
+
Provides detailed information about a wallet's holdings on a specific blockchain.
|
|
84
|
+
|
|
85
|
+
#### Sample Prompts:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
What tokens do I have on Ethereum for address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e?
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Show me my token approvals on BSC for wallet 0x742d35Cc6634C0532925a3b844Bc454e4438f44e
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### Example Response:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
I've analyzed your holdings on Ethereum (Chain ID: 1) for address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e.
|
|
99
|
+
|
|
100
|
+
Portfolio on Ethereum:
|
|
101
|
+
- Total Value: $8,934.21
|
|
102
|
+
|
|
103
|
+
Native Token:
|
|
104
|
+
- ETH: 1.53 ETH ($5,823.45)
|
|
105
|
+
|
|
106
|
+
ERC-20 Tokens:
|
|
107
|
+
1. USDT: 2,500.00 USDT ($2,500.00)
|
|
108
|
+
2. AAVE: 3.45 AAVE ($610.76)
|
|
109
|
+
3. LINK: 0.01 LINK ($0.25)
|
|
110
|
+
|
|
111
|
+
Token Approvals:
|
|
112
|
+
1. USDT approved to Uniswap Router (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D)
|
|
113
|
+
- Unlimited approval (high risk)
|
|
114
|
+
|
|
115
|
+
2. AAVE approved to AAVE lending pool (0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9)
|
|
116
|
+
- Amount: 10 AAVE
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 3. Fetch NFT Portfolio (`fetch_nft_portfolio`)
|
|
120
|
+
|
|
121
|
+
Retrieves NFT holdings for a wallet address across different chains.
|
|
122
|
+
|
|
123
|
+
#### Sample Prompts:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
What NFTs do I own on address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e?
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
Show me my Solana NFTs for wallet 5YNmS1R9nNSCDzb5a7mMJ1dwK9uHeAAF4CYuH1Oss2nS
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
#### Example Response:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
I've found the following NFTs for address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e:
|
|
137
|
+
|
|
138
|
+
Total NFTs: 7 (Ethereum: 4, Polygon: 3)
|
|
139
|
+
|
|
140
|
+
Ethereum NFTs:
|
|
141
|
+
1. CryptoPunk #8291
|
|
142
|
+
- Collection: CryptoPunks
|
|
143
|
+
- Token ID: 8291
|
|
144
|
+
- Contract: 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB
|
|
145
|
+
- Traits: Mohawk, Earring
|
|
146
|
+
- Floor Price: 72.5 ETH
|
|
147
|
+
|
|
148
|
+
2. Bored Ape Yacht Club #2534
|
|
149
|
+
- Collection: Bored Ape Yacht Club
|
|
150
|
+
- Token ID: 2534
|
|
151
|
+
- Contract: 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
|
|
152
|
+
- Traits: Red Fur, 3D Glasses, Hat
|
|
153
|
+
- Floor Price: 38.2 ETH
|
|
154
|
+
|
|
155
|
+
[2 more NFTs...]
|
|
156
|
+
|
|
157
|
+
Polygon NFTs:
|
|
158
|
+
1. Sandbox Land (-12, 40)
|
|
159
|
+
- Collection: Sandbox
|
|
160
|
+
- Token ID: 43215
|
|
161
|
+
- Contract: 0x5CC5B05a8A13E3fBDB0BB9FcCd98D38e50F90c38
|
|
162
|
+
|
|
163
|
+
[2 more NFTs...]
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 4. Fetch Transaction History (`fetch_transaction_history`)
|
|
167
|
+
|
|
168
|
+
Retrieves detailed transaction history for a wallet address with enhanced analytics.
|
|
169
|
+
|
|
170
|
+
#### Sample Prompts:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
Show me the recent transactions for 0x742d35Cc6634C0532925a3b844Bc454e4438f44e
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
What are my latest swaps on Ethereum for wallet 0x742d35Cc6634C0532925a3b844Bc454e4438f44e?
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
#### Example Response:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
Here are the recent transactions for 0x742d35Cc6634C0532925a3b844Bc454e4438f44e on Ethereum:
|
|
184
|
+
|
|
185
|
+
Transaction Statistics:
|
|
186
|
+
- Total Transactions: 156
|
|
187
|
+
- Swaps: 42
|
|
188
|
+
- Transfers: 87
|
|
189
|
+
- Approvals: 12
|
|
190
|
+
- Other: 15
|
|
191
|
+
|
|
192
|
+
Recent Activity:
|
|
193
|
+
1. Swap (2 hours ago)
|
|
194
|
+
- Hash: 0x3a5e...f781
|
|
195
|
+
- Swapped 1,000 USDT for 0.25 ETH on Uniswap
|
|
196
|
+
- Fee: 0.005 ETH ($19.25)
|
|
197
|
+
- Function: swap(uint256,uint256,address[],address)
|
|
198
|
+
|
|
199
|
+
2. Token Transfer (1 day ago)
|
|
200
|
+
- Hash: 0x8f72...d4e3
|
|
201
|
+
- Sent 50 LINK to 0x91B...5a4c
|
|
202
|
+
- Fee: 0.002 ETH ($7.70)
|
|
203
|
+
|
|
204
|
+
3. NFT Purchase (2 days ago)
|
|
205
|
+
- Hash: 0x6c9d...b2a1
|
|
206
|
+
- Bought Bored Ape #2534 for 38.2 ETH
|
|
207
|
+
- Fee: 0.012 ETH ($46.20)
|
|
208
|
+
|
|
209
|
+
4. Approval (3 days ago)
|
|
210
|
+
- Hash: 0x2d7f...a9b3
|
|
211
|
+
- Approved USDT for Uniswap Router
|
|
212
|
+
- Fee: 0.003 ETH ($11.55)
|
|
213
|
+
|
|
214
|
+
5. Deposit (5 days ago)
|
|
215
|
+
- Hash: 0x1e8c...f3d2
|
|
216
|
+
- Received 2,000 USDT from Binance
|
|
217
|
+
- Fee: N/A (you were the recipient)
|
|
218
|
+
|
|
219
|
+
Would you like to see more transactions or filter by a specific type?
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### 5. Fetch Solana Portfolio (`fetch_solana_portfolio`)
|
|
223
|
+
|
|
224
|
+
Provides detailed information about a Solana wallet's holdings.
|
|
225
|
+
|
|
226
|
+
#### Sample Prompts:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
What's in my Solana wallet 5YNmS1R9nNSCDzb5a7mMJ1dwK9uHeAAF4CYuH1Oss2nS?
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
Show me my SOL and SPL tokens for address 5YNmS1R9nNSCDzb5a7mMJ1dwK9uHeAAF4CYuH1Oss2nS
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
#### Example Response:
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
I've analyzed your Solana wallet (5YNmS1R9nNSCDzb5a7mMJ1dwK9uHeAAF4CYuH1Oss2nS):
|
|
240
|
+
|
|
241
|
+
Portfolio Summary:
|
|
242
|
+
- Total Value: $5,342.67
|
|
243
|
+
|
|
244
|
+
Native SOL:
|
|
245
|
+
- Balance: 25.8 SOL ($2,322.00)
|
|
246
|
+
|
|
247
|
+
SPL Tokens:
|
|
248
|
+
1. USDC: 1,500.00 USDC ($1,500.00)
|
|
249
|
+
2. RAY: 120.5 RAY ($960.78)
|
|
250
|
+
3. SRM: 300 SRM ($450.00)
|
|
251
|
+
4. MNGO: 4,500 MNGO ($45.00)
|
|
252
|
+
5. FIDA: 250 FIDA ($62.50)
|
|
253
|
+
6. STEP: 100 STEP ($2.40)
|
|
254
|
+
|
|
255
|
+
NFTs: 3 found (enable include_nfts parameter for details)
|
|
256
|
+
|
|
257
|
+
Associated Token Addresses:
|
|
258
|
+
- USDC: CK8a3uXCLZxmQZ9r7Q9eMEU9UKinLKzQi9VWNtmG9rB
|
|
259
|
+
- RAY: 7pbMGuVdG4rQt7QUjSYWQFEASVcS9eJtt7LUUVfZPsDR
|
|
260
|
+
[more addresses...]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Blockchain Data Skills
|
|
264
|
+
|
|
265
|
+
### 6. Fetch Transaction By Hash (`fetch_transaction_by_hash`)
|
|
266
|
+
|
|
267
|
+
Retrieves detailed information about a specific transaction by its hash.
|
|
268
|
+
|
|
269
|
+
#### Sample Prompts:
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
Show me details for transaction 0xfeda0e8f0d6e54112c28d319c0d303c065d1125c9197bd653682f5fcb0a6c81e
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
What happened in this transaction: 0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed?
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
#### Example Response:
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
Transaction 0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed
|
|
283
|
+
Status: Success
|
|
284
|
+
Type: Transfer
|
|
285
|
+
From: 0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0 (Binance 1)
|
|
286
|
+
To: 0x003dde3494f30d861d063232c6a8c04394b686ff (Binance 2)
|
|
287
|
+
Value: 0.115580 ETH
|
|
288
|
+
Block: 12386788
|
|
289
|
+
Timestamp: 2021-05-07T11:08:35.000Z
|
|
290
|
+
|
|
291
|
+
This transaction was a simple ETH transfer between two addresses. The transaction was successful and used 21,000 gas at a price of 52.5 Gwei, resulting in a fee of 0.0011025 ETH.
|
|
292
|
+
|
|
293
|
+
The transaction occurred on the Ethereum mainnet and did not involve any smart contract interactions or token transfers.
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### 7. Fetch Latest Block (`fetch_latest_block`)
|
|
297
|
+
|
|
298
|
+
Retrieves the latest block number from a blockchain network.
|
|
299
|
+
|
|
300
|
+
#### Sample Prompts:
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
What's the latest block on Ethereum?
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
Show me the current block height for BSC
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
#### Example Response:
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
The latest block on Ethereum (Chain ID: 1) is 18243567.
|
|
314
|
+
|
|
315
|
+
This block was mined approximately 12 seconds ago.
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### 8. Fetch Block By Hash or Number (`fetch_block_by_hash_or_number`)
|
|
319
|
+
|
|
320
|
+
Retrieves detailed information about a block by its hash or number.
|
|
321
|
+
|
|
322
|
+
#### Sample Prompts:
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
Show me block 17000000 on Ethereum
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
Get details for block 0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
#### Example Response:
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
Block #17000000 on Ethereum (Chain ID: 1)
|
|
336
|
+
|
|
337
|
+
Block Details:
|
|
338
|
+
- Hash: 0x2241c2a0926e7c876af6c0bb355461fe5ef7a682fa0441125575fa5c5af5fe90
|
|
339
|
+
- Timestamp: 2023-06-13T10:42:15.000Z
|
|
340
|
+
- Miner: 0xea674fdde714fd979de3edf0f56aa9716b898ec8
|
|
341
|
+
- Gas Used: 29,892,458 (99.87% of gas limit)
|
|
342
|
+
- Size: 142,157 bytes
|
|
343
|
+
- Transactions: 318
|
|
344
|
+
|
|
345
|
+
This block contains 318 transactions and was mined by Ethermine (0xea674fdde714fd979de3edf0f56aa9716b898ec8). The total gas used was 29,892,458, which is 99.87% of the block's gas limit.
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### 9. Fetch Block By Date (`fetch_block_by_date`)
|
|
349
|
+
|
|
350
|
+
Retrieves block information based on a specific date.
|
|
351
|
+
|
|
352
|
+
#### Sample Prompts:
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
What block was mined on June 15, 2023 on Ethereum?
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
Show me the blockchain state on 2023-01-01
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
#### Example Response:
|
|
363
|
+
|
|
364
|
+
```
|
|
365
|
+
On June 15, 2023, block #17034268 was mined on Ethereum (Chain ID: 1).
|
|
366
|
+
|
|
367
|
+
Block Details:
|
|
368
|
+
- Hash: 0x3a33181831a3d5c23072378163e43179743f79f8921c2a07e23da3c953502742
|
|
369
|
+
- Timestamp: 2023-06-15T00:00:12.000Z
|
|
370
|
+
- Miner: 0xea674fdde714fd979de3edf0f56aa9716b898ec8
|
|
371
|
+
- Gas Used: 29,956,842 (99.86% of gas limit)
|
|
372
|
+
- Size: 143,965 bytes
|
|
373
|
+
- Transactions: 327
|
|
374
|
+
|
|
375
|
+
This block was mined by Ethermine (0xea674fdde714fd979de3edf0f56aa9716b898ec8) at the beginning of June 15, 2023.
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## Advanced Usage
|
|
379
|
+
|
|
380
|
+
### Combining Skills
|
|
381
|
+
|
|
382
|
+
The wallet portfolio and blockchain data skills can be combined for comprehensive analysis. For example:
|
|
383
|
+
|
|
384
|
+
```
|
|
385
|
+
Can you analyze wallet 0x742d35Cc6634C0532925a3b844Bc454e4438f44e and show me:
|
|
386
|
+
1. Total portfolio value
|
|
387
|
+
2. NFT holdings
|
|
388
|
+
3. Recent transactions and decode the last swap transaction
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Response Example:
|
|
392
|
+
|
|
393
|
+
```
|
|
394
|
+
I've performed a comprehensive analysis of wallet 0x742d35Cc6634C0532925a3b844Bc454e4438f44e:
|
|
395
|
+
|
|
396
|
+
PORTFOLIO VALUE:
|
|
397
|
+
Total Net Worth: $12,567.82
|
|
398
|
+
- Ethereum: $8,934.21
|
|
399
|
+
- BSC: $2,456.78
|
|
400
|
+
- Polygon: $1,176.83
|
|
401
|
+
|
|
402
|
+
Top Holdings:
|
|
403
|
+
1. ETH (Ethereum): 1.53 ETH ($5,823.45)
|
|
404
|
+
2. USDT (Ethereum): 2,500.00 USDT ($2,500.00)
|
|
405
|
+
3. BNB (BSC): 4.25 BNB ($1,870.25)
|
|
406
|
+
|
|
407
|
+
NFT HOLDINGS:
|
|
408
|
+
Total NFTs: 7 (Ethereum: 4, Polygon: 3)
|
|
409
|
+
|
|
410
|
+
Notable NFTs:
|
|
411
|
+
1. CryptoPunk #8291 (Ethereum)
|
|
412
|
+
- Floor Price: 72.5 ETH
|
|
413
|
+
2. Bored Ape Yacht Club #2534 (Ethereum)
|
|
414
|
+
- Floor Price: 38.2 ETH
|
|
415
|
+
3. Sandbox Land (-12, 40) (Polygon)
|
|
416
|
+
|
|
417
|
+
RECENT TRANSACTIONS:
|
|
418
|
+
Most recent swap transaction (3 hours ago):
|
|
419
|
+
- Hash: 0x3a5e...f781
|
|
420
|
+
- Function: swapExactTokensForETH(uint256,uint256,address[],address,uint256)
|
|
421
|
+
- Parameters:
|
|
422
|
+
- amountIn: 1000000000 (uint256) - 1,000 USDT with 6 decimals
|
|
423
|
+
- amountOutMin: 249158750524475790 (uint256) - Minimum 0.249 ETH expected
|
|
424
|
+
- path: ["0xdAC17F958D2ee523a2206206994597C13D831ec7","0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"] - USDT to WETH path
|
|
425
|
+
- to: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" - Your address
|
|
426
|
+
- deadline: 1689542498 (uint256) - Transaction deadline timestamp
|
|
427
|
+
|
|
428
|
+
The transaction successfully swapped 1,000 USDT for 0.25 ETH using Uniswap Router.
|
|
429
|
+
|
|
430
|
+
Would you like me to focus on any specific aspect of this wallet?
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### Transaction Analysis
|
|
434
|
+
|
|
435
|
+
The transaction analysis skills can provide deep insights into on-chain activity:
|
|
436
|
+
|
|
437
|
+
```
|
|
438
|
+
Can you analyze this transaction 0xfeda0e8f0d6e54112c28d319c0d303c065d1125c9197bd653682f5fcb0a6c81e and explain what happened in simple terms?
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Response Example:
|
|
442
|
+
|
|
443
|
+
```
|
|
444
|
+
I've analyzed transaction 0xfeda0e8f0d6e54112c28d319c0d303c065d1125c9197bd653682f5fcb0a6c81e:
|
|
445
|
+
|
|
446
|
+
TRANSACTION SUMMARY:
|
|
447
|
+
This was an interaction with the Uniswap V2 Router on Ethereum, executed on May 7, 2021.
|
|
448
|
+
|
|
449
|
+
WHAT HAPPENED:
|
|
450
|
+
In simple terms, someone swapped approximately 5,000 USDT for 1.89 ETH using Uniswap.
|
|
451
|
+
|
|
452
|
+
DETAILS:
|
|
453
|
+
- Type: Token Swap (DEX)
|
|
454
|
+
- Platform: Uniswap V2
|
|
455
|
+
- Function Called: swapExactTokensForETH
|
|
456
|
+
- Tokens Involved:
|
|
457
|
+
* Sent: 5,000 USDT
|
|
458
|
+
* Received: 1.89 ETH
|
|
459
|
+
- Fee Paid: 0.0084 ETH (approximately $21.50 at that time)
|
|
460
|
+
- Result: Successful
|
|
461
|
+
|
|
462
|
+
This transaction represents a typical decentralized exchange swap where USDT stablecoin was exchanged for ETH. The transaction was initiated by a wallet associated with Binance and executed through the Uniswap V2 protocol.
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
## Error Handling
|
|
466
|
+
|
|
467
|
+
The skills handle various error conditions gracefully:
|
|
468
|
+
|
|
469
|
+
- Invalid addresses
|
|
470
|
+
- Unsupported chains
|
|
471
|
+
- API rate limiting
|
|
472
|
+
- Network issues
|
|
473
|
+
- Malformed transaction hashes
|
|
474
|
+
- Non-existent blocks
|
|
475
|
+
|
|
476
|
+
Each skill includes an `error` field in the response that will be populated with error information when applicable.
|
|
477
|
+
|
|
478
|
+
## Limitations
|
|
479
|
+
|
|
480
|
+
- Data is only as current as the Moralis API
|
|
481
|
+
- Some price data may not be available for smaller or newer tokens
|
|
482
|
+
- Transactions are limited to 100 per request by default
|
|
483
|
+
- NFT metadata and images may not be available for all NFTs
|
|
484
|
+
- Token approvals analysis may not identify all high-risk approvals
|
|
485
|
+
- Transaction decoding depends on verified ABIs in the Moralis database
|
|
486
|
+
- Block data for very old blocks may be slower to retrieve
|
|
487
|
+
|
|
488
|
+
## Contributing
|
|
489
|
+
|
|
490
|
+
Contributions to improve the Wallet Portfolio & Blockchain Analysis Skills are welcome. Please ensure that your code follows the project's style and includes appropriate tests.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""Wallet Portfolio Skills for IntentKit."""
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
from typing import Dict, List, NotRequired, TypedDict
|
|
5
|
+
|
|
6
|
+
from intentkit.abstracts.skill import SkillStoreABC
|
|
7
|
+
from intentkit.skills.base import SkillConfig, SkillState
|
|
8
|
+
from intentkit.skills.moralis.base import WalletBaseTool
|
|
9
|
+
from intentkit.skills.moralis.fetch_chain_portfolio import FetchChainPortfolio
|
|
10
|
+
from intentkit.skills.moralis.fetch_nft_portfolio import FetchNftPortfolio
|
|
11
|
+
from intentkit.skills.moralis.fetch_solana_portfolio import FetchSolanaPortfolio
|
|
12
|
+
from intentkit.skills.moralis.fetch_wallet_portfolio import FetchWalletPortfolio
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SkillStates(TypedDict):
|
|
18
|
+
"""Configuration of states for wallet skills."""
|
|
19
|
+
|
|
20
|
+
fetch_wallet_portfolio: SkillState
|
|
21
|
+
fetch_chain_portfolio: SkillState
|
|
22
|
+
fetch_nft_portfolio: SkillState
|
|
23
|
+
fetch_solana_portfolio: SkillState
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Config(SkillConfig):
|
|
27
|
+
"""Configuration for Wallet Portfolio skills."""
|
|
28
|
+
|
|
29
|
+
api_key: str
|
|
30
|
+
states: SkillStates
|
|
31
|
+
supported_chains: NotRequired[Dict[str, bool]] = {"evm": True, "solana": True}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
async def get_skills(
|
|
35
|
+
config: "Config",
|
|
36
|
+
is_private: bool,
|
|
37
|
+
store: SkillStoreABC,
|
|
38
|
+
**_,
|
|
39
|
+
) -> List[WalletBaseTool]:
|
|
40
|
+
"""Get all Wallet Portfolio skills.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
config: Skill configuration
|
|
44
|
+
is_private: Whether the request is from an authenticated user
|
|
45
|
+
store: Skill store for persistence
|
|
46
|
+
chain_provider: Optional chain provider for blockchain interactions
|
|
47
|
+
**_: Additional arguments
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
List of enabled wallet skills
|
|
51
|
+
"""
|
|
52
|
+
available_skills = []
|
|
53
|
+
|
|
54
|
+
# Include skills based on their state
|
|
55
|
+
for skill_name, state in config["states"].items():
|
|
56
|
+
if state == "disabled":
|
|
57
|
+
continue
|
|
58
|
+
elif state == "public" or (state == "private" and is_private):
|
|
59
|
+
# Check chain support for Solana-specific skills
|
|
60
|
+
if skill_name == "fetch_solana_portfolio" and not config.get(
|
|
61
|
+
"supported_chains", {}
|
|
62
|
+
).get("solana", True):
|
|
63
|
+
continue
|
|
64
|
+
|
|
65
|
+
available_skills.append(skill_name)
|
|
66
|
+
# api key
|
|
67
|
+
if config.get("api_key_provider") == "agent_owner":
|
|
68
|
+
api_key = config.get("api_key")
|
|
69
|
+
else:
|
|
70
|
+
api_key = store.get_system_config("moralis_api_key")
|
|
71
|
+
|
|
72
|
+
# Get each skill using the getter
|
|
73
|
+
result = []
|
|
74
|
+
for name in available_skills:
|
|
75
|
+
skill = get_wallet_skill(name, api_key, store)
|
|
76
|
+
if skill:
|
|
77
|
+
result.append(skill)
|
|
78
|
+
return result
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def get_wallet_skill(
|
|
82
|
+
name: str,
|
|
83
|
+
api_key: str,
|
|
84
|
+
store: SkillStoreABC,
|
|
85
|
+
) -> WalletBaseTool:
|
|
86
|
+
"""Get a specific Wallet Portfolio skill by name.
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
name: Name of the skill to get
|
|
90
|
+
api_key: API key for Moralis
|
|
91
|
+
store: Skill store for persistence
|
|
92
|
+
|
|
93
|
+
Returns:
|
|
94
|
+
The requested skill
|
|
95
|
+
"""
|
|
96
|
+
skill_classes = {
|
|
97
|
+
"fetch_wallet_portfolio": FetchWalletPortfolio,
|
|
98
|
+
"fetch_chain_portfolio": FetchChainPortfolio,
|
|
99
|
+
"fetch_nft_portfolio": FetchNftPortfolio,
|
|
100
|
+
"fetch_solana_portfolio": FetchSolanaPortfolio,
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if name not in skill_classes:
|
|
104
|
+
logger.warning(f"Unknown Wallet Portfolio skill: {name}")
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
return skill_classes[name](
|
|
108
|
+
api_key=api_key,
|
|
109
|
+
skill_store=store,
|
|
110
|
+
)
|