diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..1ac860ea6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,34 @@ +# EditorConfig — https://editorconfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.{py,pyi}] +indent_size = 4 + +[*.{go}] +indent_style = tab + +[*.{rs}] +indent_size = 4 + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab + +[*.{sh,bash,zsh}] +indent_size = 2 + +[*.{yaml,yml}] +indent_size = 2 + +[*.{toml}] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..0f119ae0a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,71 @@ +# Auto-detect text files and normalize line endings +* text=auto + +# Source code +*.py text diff=python +*.ts text diff=typescript +*.tsx text diff=typescript +*.js text diff=javascript +*.jsx text diff=javascript +*.go text diff=go +*.rs text diff=rust +*.rb text diff=ruby +*.sh text eol=lf diff=bash +*.bash text eol=lf diff=bash +*.zsh text eol=lf diff=bash +*.lua text + +# Configuration +*.json text +*.yaml text +*.yml text +*.toml text +*.cfg text +*.ini text +*.conf text +*.env text + +# Templates +*.tmpl text +*.j2 text + +# Documentation +*.md text diff=markdown +*.txt text +*.rst text + +# Web +*.html text diff=html +*.css text diff=css +*.scss text diff=css +*.astro text +*.svg text + +# Build / lock files +package-lock.json text -diff +yarn.lock text -diff +Cargo.lock text -diff +poetry.lock text -diff + +# Binary +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.webp binary +*.woff binary +*.woff2 binary +*.ttf binary +*.eot binary +*.pdf binary +*.zip binary +*.gz binary +*.tar binary +*.db binary +*.sqlite binary + +# Force LF for scripts +Makefile text eol=lf +Dockerfile text eol=lf +justfile text eol=lf diff --git a/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/README.md b/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/README.md index 1926bdc39..8c5f5135b 100644 --- a/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/README.md +++ b/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/README.md @@ -1,86 +1,86 @@ -# Autonomous AI Advertising Agent with Crypto Payments Example - Chatbot Python - -An AI agent that creates complete advertising campaigns while autonomously paying for premium services using cryptocurrency via the X402 payment protocol. - -## Overview - -### Architecture - -The sample demonstrates integration between multiple systems: -- **Strands AI Framework** → Agent reasoning and tool orchestration -- **Coinbase AgentKit** → Blockchain wallet and transaction management -- **X402 Protocol** → HTTP-based micropayment standard for API access -- **External APIs** → Payment-gated image generation and weather services - -### Key Features - -- **Economic Agency**: AI agent manages its own budget and purchases services autonomously -- **Crypto-Native Payments**: Uses USDC on Base Sepolia testnet for service payments -- **Multi-Service Integration**: Combines weather data and AI image generation for enhanced campaigns -- **Complete Campaign Generation**: Produces ready-to-deploy HTML advertising assets - -## Prerequisites - -- Python **3.10+** -- [uv](https://docs.astral.sh/uv/getting-started/installation/) for dependency management -- [CDP API Key](https://portal.cdp.coinbase.com/access/api) -- [OpenWeather API key](https://openweathermap.org/guide) -- Amazon Bedrock Models access enabled for Claude Sonnet 4 - - [Configure AWS Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) OR use [Amazon Bedrock API keys](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started-api-keys.html) alternatively for Amazon Bedrock model access with Strands Agents. - - [Set up Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html) - > **_NOTE:_** [Strands Agents](https://strandsagents.com/latest/) is model provider agnostic - -## Setup - -1. **Configure environment variables:** - ```bash - cp .env.local .env - # Edit .env with your configuration: - # - CDP_API_KEY_ID, CDP_API_KEY_SECRET, CDP_WALLET_SECRET (Coinbase testnet) - # - ADDRESS (Base Sepolia testnet receiving address) - # - OPENWEATHER_API_KEY - # - AWS_ACCESS_KEY_ID - # - AWS_SECRET_ACCESS_KEY - # - AWS_REGION - ``` - ⚠ **Note**: If using Bedrock API keys instead of AWS credentials, set `AWS_BEARER_TOKEN_BEDROCK` instead of `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as environment variable for Bedrock model access. Also make sure the `AWS_REGION` aligns with the AWS region the Bedrock access key was created in. - -2. **Installation:** - ```bash - uv sync - ``` - -3. **Start the payment server on a seperate terminal:** - ```bash - uv run paid_server.py - ``` - -## Usage - -**Run the advertising agent on a new terminal:** -```bash -uv run chatbot.py -``` - -## Ask the chatbot to engage in the Web3 ecosystem! - -**Example interaction:** -- "Generate an ad for ice cream shop promotion in Miami for social-media platform" -- "generate a short ad for smat watches for elderly perople on instagram" - -## Example Output - -The agent produces: -- Weather-responsive ad copy based on real-time conditions -- AI-generated imagery for campaigns -- Complete HTML files with embedded visuals -- Multi-platform advertising assets (social media, display, email) - -## Troubleshooting - -| Symptom | Likely Cause | Fix | -|---------|-------------|-----| -| API key errors | Missing environment variables | Verify all required keys in `.env` | -| Image generation fails | Payment server not running | Start `paid_server.py` first | - +# Autonomous AI Advertising Agent with Crypto Payments Example - Chatbot Python + +An AI agent that creates complete advertising campaigns while autonomously paying for premium services using cryptocurrency via the X402 payment protocol. + +## Overview + +### Architecture + +The sample demonstrates integration between multiple systems: +- **Strands AI Framework** → Agent reasoning and tool orchestration +- **Coinbase AgentKit** → Blockchain wallet and transaction management +- **X402 Protocol** → HTTP-based micropayment standard for API access +- **External APIs** → Payment-gated image generation and weather services + +### Key Features + +- **Economic Agency**: AI agent manages its own budget and purchases services autonomously +- **Crypto-Native Payments**: Uses USDC on Base Sepolia testnet for service payments +- **Multi-Service Integration**: Combines weather data and AI image generation for enhanced campaigns +- **Complete Campaign Generation**: Produces ready-to-deploy HTML advertising assets + +## Prerequisites + +- Python **3.10+** +- [uv](https://docs.astral.sh/uv/getting-started/installation/) for dependency management +- [CDP API Key](https://portal.cdp.coinbase.com/access/api) +- [OpenWeather API key](https://openweathermap.org/guide) +- Amazon Bedrock Models access enabled for Claude Sonnet 4 + - [Configure AWS Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) OR use [Amazon Bedrock API keys](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started-api-keys.html) alternatively for Amazon Bedrock model access with Strands Agents. + - [Set up Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html) + > **_NOTE:_** [Strands Agents](https://strandsagents.com/latest/) is model provider agnostic + +## Setup + +1. **Configure environment variables:** + ```bash + cp .env.local .env + # Edit .env with your configuration: + # - CDP_API_KEY_ID, CDP_API_KEY_SECRET, CDP_WALLET_SECRET (Coinbase testnet) + # - ADDRESS (Base Sepolia testnet receiving address) + # - OPENWEATHER_API_KEY + # - AWS_ACCESS_KEY_ID + # - AWS_SECRET_ACCESS_KEY + # - AWS_REGION + ``` + ⚠ **Note**: If using Bedrock API keys instead of AWS credentials, set `AWS_BEARER_TOKEN_BEDROCK` instead of `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as environment variable for Bedrock model access. Also make sure the `AWS_REGION` aligns with the AWS region the Bedrock access key was created in. + +2. **Installation:** + ```bash + uv sync + ``` + +3. **Start the payment server on a seperate terminal:** + ```bash + uv run paid_server.py + ``` + +## Usage + +**Run the advertising agent on a new terminal:** +```bash +uv run chatbot.py +``` + +## Ask the chatbot to engage in the Web3 ecosystem! + +**Example interaction:** +- "Generate an ad for ice cream shop promotion in Miami for social-media platform" +- "generate a short ad for smat watches for elderly perople on instagram" + +## Example Output + +The agent produces: +- Weather-responsive ad copy based on real-time conditions +- AI-generated imagery for campaigns +- Complete HTML files with embedded visuals +- Multi-platform advertising assets (social media, display, email) + +## Troubleshooting + +| Symptom | Likely Cause | Fix | +|---------|-------------|-----| +| API key errors | Missing environment variables | Verify all required keys in `.env` | +| Image generation fails | Payment server not running | Start `paid_server.py` first | + --- \ No newline at end of file diff --git a/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/chatbot.py b/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/chatbot.py index 99f5d2370..c068ff622 100644 --- a/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/chatbot.py +++ b/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/chatbot.py @@ -1,481 +1,481 @@ -import json -import os -import sys -import time -from pathlib import Path -from typing import Any - -import botocore.exceptions -from coinbase_agentkit import ( - AgentKit, - AgentKitConfig, - CdpEvmWalletProvider, - CdpEvmWalletProviderConfig, - cdp_api_action_provider, - wallet_action_provider, - x402_action_provider, -) -from coinbase_agentkit_strands_agents import get_strands_tools -from dotenv import load_dotenv -from strands import Agent, tool -from strands.models import BedrockModel -from strands.tools import normalize_tool_spec -from strands_tools import image_reader - -# Load environment variables -load_dotenv() - -HOST = os.getenv("HOST", "127.0.0.1") -PORT = int(os.getenv("PORT", 4021)) -BASE_URL = os.getenv("BASE_URL", f"http://{HOST}:{PORT}") - - -def validate_environment(): - """Validate required environment variables are present.""" - required_vars = ["CDP_API_KEY_ID", "CDP_API_KEY_SECRET", "CDP_WALLET_SECRET"] - - missing_vars = [var for var in required_vars if not os.getenv(var)] - - if missing_vars: - print(f"Error: Missing required environment variables: {', '.join(missing_vars)}") - sys.exit(1) - - -# Service Discovery Functions -def external_service_catalog(service_name: str) -> dict[str, Any] | None: - """Return service endpoint information including schemas and URLs. - - Args: - service_name: Name of the service to query - - Returns: - Dictionary containing service metadata, schemas, and endpoint URL - - """ - catalog = { - "media-creation": { - "name": "Image Generator", - "description": "Generate images based on text prompts using AI. Perfect for creating ad visuals, product shots, and marketing materials.", - "url": f"{BASE_URL}/image_generator", - "method": "POST", - "payment_required": True, - "input_schema": { - "type": "object", - "properties": { - "query": { - "type": "string", - "description": "The prompt describing what images to generate", - "example": "Generate 3 images of a friendly dragon reading a book", - "minLength": 1, - "maxLength": 500, - } - }, - "required": ["query"], - }, - }, - "weather": { - "name": "Weather Information", - "description": "Get current weather information for any city. Useful for location-based or seasonal ad campaigns.", - "url": f"{BASE_URL}/weather", - "method": "POST", - "payment_required": True, - "input_schema": { - "type": "object", - "properties": { - "city": { - "type": "string", - "description": "City name (e.g., 'London' or 'London,UK')", - "example": "London,UK", - }, - "units": { - "type": "string", - "description": "Units: 'metric', 'imperial', or 'standard'", - "default": "metric", - }, - }, - "required": ["city"], - }, - }, - } - - return catalog.get(service_name) - - -# Custom Tools for the Agent -@tool -def list_available_services() -> str: - """List all available external services that can be used for ad creation. - - Returns information about available endpoints including weather data and image generation. - Use this when you need to know what external services are available for your ad campaign. - """ - services = { - "media-creation": external_service_catalog("media-creation"), - "weather": external_service_catalog("weather"), - } - - result = "Available Services for Content Creation:\n\n" - - for _service_name, service_info in services.items(): - if service_info: - result += f"Service: {service_info['name']}\n" - result += f" Description: {service_info['description']}\n" - return result - - -@tool -def get_service_schema(service_name: str) -> str: - """Get detailed schema information and URL endpoint for a specific service. - - Args: - service_name: Name of the service ('media-creation' or 'weather') - - Returns: - Detailed schema information including input requirements - - """ - service = external_service_catalog(service_name) - - if not service: - return ( - f"Service '{service_name}' not found. Available services: 'media-creation', 'weather'" - ) - - result = f"Service: {service['name']}\n" - result += f"Description: {service['description']}\n\n" - result += f"Endpoint: {service['method']} {service['url']}\n\n" - result += f"Input Schema:\n{json.dumps(service['input_schema'], indent=2)}\n" - return result - - -@tool -def create_ad_html( - ad_html_content: str, - file_name: str, - output_path: str = "ad_campaign", -) -> str: - """Create an HTML file displaying the ad campaign. - - Args: - ad_html_content: Html data containing ad content including generated images (if used) with html syntax used in creating the html file - file_name: name of the html file including the .html extension - output_path: Path where HTML file will be saved - - Returns: - Path to the created HTML file - - """ - # Write to file - output_file = Path(f"{output_path}/{file_name}") - output_file.parent.mkdir(parents=True, exist_ok=True) - - with open(output_file, "w", encoding="utf-8") as f: - f.write(ad_html_content) - - return f"HTML file saved to {output_file.absolute()!s}" - - -def modify_tool_schema(tool_spec, field_name, new_field_type, new_description=None): - """Modify a specific field type in a tool's schema.""" - modified_spec = tool_spec.copy() - - # Navigate to the field in inputSchema - if "inputSchema" in modified_spec and "json" in modified_spec["inputSchema"]: - schema = modified_spec["inputSchema"]["json"] - if "properties" in schema and field_name in schema["properties"]: - # Modify the field type - schema["properties"][field_name]["type"] = new_field_type - - # Optionally modify description - if new_description: - schema["properties"][field_name]["description"] = new_description - - # Normalize the modified schema - return normalize_tool_spec(modified_spec) - - -def initialize_agent(config: CdpEvmWalletProviderConfig): - """Initialize the agent with CDP Agentkit. - - Args: - config: Configuration for the CDP EVM Server Wallet Provider - - Returns: - tuple[Agent, CdpEvmServerWalletProvider]: The initialized agent and wallet provider - - """ - # Initialize the wallet provider with the config - wallet_provider = CdpEvmWalletProvider( - CdpEvmWalletProviderConfig( - api_key_id=config.api_key_id, # CDP API Key ID - api_key_secret=config.api_key_secret, # CDP API Key Secret - wallet_secret=config.wallet_secret, # CDP Wallet Secret - network_id=config.network_id, # Network ID - Optional, will default to 'base-sepolia' - address=config.address, # Wallet Address - Optional, will trigger idempotency flow if not provided - idempotency_key=config.idempotency_key, # Idempotency Key - Optional, seeds generation of a new wallet - ) - ) - - # Create AgentKit instance with wallet and action providers - agentkit = AgentKit( - AgentKitConfig( - wallet_provider=wallet_provider, - action_providers=[ - cdp_api_action_provider(), - wallet_action_provider(), - x402_action_provider(), - ], - ) - ) - - # Get tools for the agent - tool_list = get_strands_tools(agentkit) - - # List of tools to modify their schema to match the expected action schema - tool_to_modify = [ - "x402ActionProvider_retry_with_x402", - "x402ActionProvider_make_http_request", - "x402ActionProvider_make_http_request_with_x402", - ] - - modified_tools = [] - for tool_items in tool_list: - tool_spec = tool_items.tool_spec - - # Modify specific field - change 'config' from 'string' to 'object' - if tool_items.tool_name in tool_to_modify: - modified_spec = modify_tool_schema( - tool_spec, - field_name="headers", - new_field_type="object", - ) - # Update the tool's spec - tool_items._tool_spec = modified_spec - - modified_tools.append(tool_items) - - # Create a BedrockModel - bedrock_model = BedrockModel( - model_id="us.anthropic.claude-sonnet-4-20250514-v1:0", - max_tokens=10000, - region_name=os.getenv("AWS_REGION"), - additional_request_fields={ - "thinking": { - "type": "enabled", - "budget_tokens": 4096, # Minimum of 1,024 - } - }, - ) - - # Create Agent using the Strands Agents SDK - agent = Agent( - model=bedrock_model, - tools=[ - list_available_services, - get_service_schema, - image_reader, - create_ad_html, - *modified_tools, - ], # Custom tools plus Coinbase Agentkit tools - system_prompt="""You are an expert advertising and marketing content creator with extensive experience in digital marketing, copywriting, and creative direction. - -Your capabilities: -1. Create compelling ad copy for various platforms (social media, display, email, print) -2. Discover and use external services for ad enhancement: - - Generate professional visuals using the image generation service - - Get real-time weather data for location-based and seasonal campaigns -3. Design complete ad campaigns with copy, visuals, and targeting strategy -4. Interacting with on chain actions for making and necessary payments -5. Tool for creating a html file of the generated ads - -When creating ads: -- First start with and outline of the ads to be created -- Use list_available_services() to discover external services that can help in creating ads -- Consider the target audience, platform, and campaign goals -- If location-specific or weather-dependent, use the appropiate external service to get weather info -- Always generate relevant visuals using image endpoint service -- Use persuasive copywriting techniques (AIDA, PAS, FAB) -- Include clear call-to-action (CTA) -- Optimize for the specific ad format and platform -- Save the ads content as a html file. When creating the html content, make sure images are rendered properly. Take this part very seriously - -Ad Formats You Can Create: -- Social Media Ads (Facebook, Instagram, LinkedIn, Twitter) -- Display Banner Ads -- Email Marketing -- Print Advertisements -- Video Ad Scripts -- Search Ads (Google, Bing) - -Response Structure: -1. Campaign Overview (objective, audience, platform) -2. Headline(s) - attention-grabbing and benefit-focused -3. Body Copy - persuasive and engaging -4. Call-to-Action - clear and action-oriented -5. Visual Description/Generated Images -6. Targeting Recommendations (demographics, interests, behaviors) -7. Budget & Timing Suggestions (if applicable) -8. **HTML File Creation Checklist:** - - [ ] All images generated and URLs obtained - - [ ] Images embedded in HTML with tags using relative paths - - [ ] HTML file saved with rendered images - -Best Practices: -- Keep it concise and scannable -- Focus on benefits, not just features -- Use emotional triggers and power words -- Create urgency when appropriate -- Ensure brand consistency -- Mobile-first approach -- A/B testing recommendations -- Include images in teh generated html file - -CRITICAL REQUIREMENT - HTML FILE GENERATION: -When saving ads as HTML files, you MUST: -✓ Include ALL generated images embedded in the HTML -✓ Use proper tags with src attributes pointing to the image URLs -✓ Ensure images are visible when the HTML file is opened -✓ Test that image URLs are accessible and properly formatted -✓ Never create HTML files with missing or broken image references -**NEVER use absolute file system paths:** -❌ `` - -**ALWAYS use relative paths based on the HTML file location:** -✅ `` - - -BEFORE saving the HTML file, verify: -1. Each ad section has its corresponding image embedded -2. Image URLs are complete and valid -3. Images have appropriate alt text -4. The HTML renders images correctly - -Be creative, data-driven, and results-oriented!""", - ) - - return agent, wallet_provider - - -def setup(): - """Set up the agent with persistent wallet storage. - - Returns: - Agent: The initialized agent - - """ - # Configure network and file path - network_id = os.getenv("NETWORK_ID", "base-sepolia") - wallet_file = f"wallet_data_{network_id.replace('-', '_')}.txt" - - # Load existing wallet data if available - wallet_data = {} - if os.path.exists(wallet_file): - try: - with open(wallet_file) as f: - wallet_data = json.load(f) - print(f"Loading existing wallet from {wallet_file}") - except json.JSONDecodeError: - print(f"Warning: Invalid wallet data for {network_id}") - wallet_data = {} - - # Determine wallet address using priority order - wallet_address = ( - wallet_data.get("address") # First priority: Saved wallet file - or os.getenv("USER_ADDRESS") # Second priority: ADDRESS env var - or None # Will trigger idempotency flow if needed - ) - - # Create the wallet provider config - config = CdpEvmWalletProviderConfig( - api_key_id=os.getenv("CDP_API_KEY_ID"), - api_key_secret=os.getenv("CDP_API_KEY_SECRET"), - wallet_secret=os.getenv("CDP_WALLET_SECRET"), - network_id=network_id, - address=wallet_address, - # Only include idempotency_key if we need to create a new wallet - idempotency_key=(os.getenv("IDEMPOTENCY_KEY") if not wallet_address else None), - ) - - # Initialize the agent and get the wallet provider - agent, wallet_provider = initialize_agent(config) - - # Save the wallet data after successful initialization - new_wallet_data = { - "address": wallet_provider.get_address(), - "network_id": network_id, - "created_at": time.strftime("%Y-%m-%d %H:%M:%S") - if not wallet_data - else wallet_data.get("created_at"), - } - - with open(wallet_file, "w") as f: - json.dump(new_wallet_data, f, indent=2) - print(f"Wallet data saved to {wallet_file}") - - return agent - - -def run_chat_mode(agent): - """Run the agent interactively based on user input.""" - print("Starting chat mode... Type 'exit' to end.") - while True: - try: - user_input = input("\nPrompt: ") - if user_input.lower() == "exit": - break - if not user_input.strip(): - continue - # Run agent with the user's input in chat mode - agent(user_input) - print("-------------------") - - except KeyboardInterrupt: - print("Goodbye Agent!") - sys.exit(0) - - -def main(): - """Start the chatbot agent.""" - try: - # Validate environment - validate_environment() - - # Set up the agent - agent = setup() - - run_chat_mode(agent=agent) - - except botocore.exceptions.NoCredentialsError: - print("\n❌ AWS Credentials Error:") - print("Unable to locate AWS credentials. Please ensure you have:") - print(" 1. Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, OR") - print(" 2. Set AWS_BEARER_TOKEN_BEDROCK environment variable, OR") - print(" 3. Configured AWS credentials file (~/.aws/credentials), OR") - print(" 4. Set up an IAM role (if running on AWS infrastructure)") - print( - "\nFor more information, visit: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html" - ) - sys.exit(1) - except KeyboardInterrupt: - print("\nShutdown requested...") - except Exception as e: - print(f"Fatal error: {e}") - sys.exit(1) - - -def print_banner(): - """Display a box-style banner for the application.""" - title = "Coinbase AgentKit with Strands Agents and X402" - width = len(title) + 4 - - print("╔" + "═" * width + "╗") - print("║" + " " * width + "║") - print("║ " + title + " ║") - print("║" + " " * width + "║") - print("╚" + "═" * width + "╝") - - -if __name__ == "__main__": - print_banner() - print("Starting Agent...") - main() +import json +import os +import sys +import time +from pathlib import Path +from typing import Any + +import botocore.exceptions +from coinbase_agentkit import ( + AgentKit, + AgentKitConfig, + CdpEvmWalletProvider, + CdpEvmWalletProviderConfig, + cdp_api_action_provider, + wallet_action_provider, + x402_action_provider, +) +from coinbase_agentkit_strands_agents import get_strands_tools +from dotenv import load_dotenv +from strands import Agent, tool +from strands.models import BedrockModel +from strands.tools import normalize_tool_spec +from strands_tools import image_reader + +# Load environment variables +load_dotenv() + +HOST = os.getenv("HOST", "127.0.0.1") +PORT = int(os.getenv("PORT", 4021)) +BASE_URL = os.getenv("BASE_URL", f"http://{HOST}:{PORT}") + + +def validate_environment(): + """Validate required environment variables are present.""" + required_vars = ["CDP_API_KEY_ID", "CDP_API_KEY_SECRET", "CDP_WALLET_SECRET"] + + missing_vars = [var for var in required_vars if not os.getenv(var)] + + if missing_vars: + print(f"Error: Missing required environment variables: {', '.join(missing_vars)}") + sys.exit(1) + + +# Service Discovery Functions +def external_service_catalog(service_name: str) -> dict[str, Any] | None: + """Return service endpoint information including schemas and URLs. + + Args: + service_name: Name of the service to query + + Returns: + Dictionary containing service metadata, schemas, and endpoint URL + + """ + catalog = { + "media-creation": { + "name": "Image Generator", + "description": "Generate images based on text prompts using AI. Perfect for creating ad visuals, product shots, and marketing materials.", + "url": f"{BASE_URL}/image_generator", + "method": "POST", + "payment_required": True, + "input_schema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The prompt describing what images to generate", + "example": "Generate 3 images of a friendly dragon reading a book", + "minLength": 1, + "maxLength": 500, + } + }, + "required": ["query"], + }, + }, + "weather": { + "name": "Weather Information", + "description": "Get current weather information for any city. Useful for location-based or seasonal ad campaigns.", + "url": f"{BASE_URL}/weather", + "method": "POST", + "payment_required": True, + "input_schema": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "City name (e.g., 'London' or 'London,UK')", + "example": "London,UK", + }, + "units": { + "type": "string", + "description": "Units: 'metric', 'imperial', or 'standard'", + "default": "metric", + }, + }, + "required": ["city"], + }, + }, + } + + return catalog.get(service_name) + + +# Custom Tools for the Agent +@tool +def list_available_services() -> str: + """List all available external services that can be used for ad creation. + + Returns information about available endpoints including weather data and image generation. + Use this when you need to know what external services are available for your ad campaign. + """ + services = { + "media-creation": external_service_catalog("media-creation"), + "weather": external_service_catalog("weather"), + } + + result = "Available Services for Content Creation:\n\n" + + for _service_name, service_info in services.items(): + if service_info: + result += f"Service: {service_info['name']}\n" + result += f" Description: {service_info['description']}\n" + return result + + +@tool +def get_service_schema(service_name: str) -> str: + """Get detailed schema information and URL endpoint for a specific service. + + Args: + service_name: Name of the service ('media-creation' or 'weather') + + Returns: + Detailed schema information including input requirements + + """ + service = external_service_catalog(service_name) + + if not service: + return ( + f"Service '{service_name}' not found. Available services: 'media-creation', 'weather'" + ) + + result = f"Service: {service['name']}\n" + result += f"Description: {service['description']}\n\n" + result += f"Endpoint: {service['method']} {service['url']}\n\n" + result += f"Input Schema:\n{json.dumps(service['input_schema'], indent=2)}\n" + return result + + +@tool +def create_ad_html( + ad_html_content: str, + file_name: str, + output_path: str = "ad_campaign", +) -> str: + """Create an HTML file displaying the ad campaign. + + Args: + ad_html_content: Html data containing ad content including generated images (if used) with html syntax used in creating the html file + file_name: name of the html file including the .html extension + output_path: Path where HTML file will be saved + + Returns: + Path to the created HTML file + + """ + # Write to file + output_file = Path(f"{output_path}/{file_name}") + output_file.parent.mkdir(parents=True, exist_ok=True) + + with open(output_file, "w", encoding="utf-8") as f: + f.write(ad_html_content) + + return f"HTML file saved to {output_file.absolute()!s}" + + +def modify_tool_schema(tool_spec, field_name, new_field_type, new_description=None): + """Modify a specific field type in a tool's schema.""" + modified_spec = tool_spec.copy() + + # Navigate to the field in inputSchema + if "inputSchema" in modified_spec and "json" in modified_spec["inputSchema"]: + schema = modified_spec["inputSchema"]["json"] + if "properties" in schema and field_name in schema["properties"]: + # Modify the field type + schema["properties"][field_name]["type"] = new_field_type + + # Optionally modify description + if new_description: + schema["properties"][field_name]["description"] = new_description + + # Normalize the modified schema + return normalize_tool_spec(modified_spec) + + +def initialize_agent(config: CdpEvmWalletProviderConfig): + """Initialize the agent with CDP Agentkit. + + Args: + config: Configuration for the CDP EVM Server Wallet Provider + + Returns: + tuple[Agent, CdpEvmServerWalletProvider]: The initialized agent and wallet provider + + """ + # Initialize the wallet provider with the config + wallet_provider = CdpEvmWalletProvider( + CdpEvmWalletProviderConfig( + api_key_id=config.api_key_id, # CDP API Key ID + api_key_secret=config.api_key_secret, # CDP API Key Secret + wallet_secret=config.wallet_secret, # CDP Wallet Secret + network_id=config.network_id, # Network ID - Optional, will default to 'base-sepolia' + address=config.address, # Wallet Address - Optional, will trigger idempotency flow if not provided + idempotency_key=config.idempotency_key, # Idempotency Key - Optional, seeds generation of a new wallet + ) + ) + + # Create AgentKit instance with wallet and action providers + agentkit = AgentKit( + AgentKitConfig( + wallet_provider=wallet_provider, + action_providers=[ + cdp_api_action_provider(), + wallet_action_provider(), + x402_action_provider(), + ], + ) + ) + + # Get tools for the agent + tool_list = get_strands_tools(agentkit) + + # List of tools to modify their schema to match the expected action schema + tool_to_modify = [ + "x402ActionProvider_retry_with_x402", + "x402ActionProvider_make_http_request", + "x402ActionProvider_make_http_request_with_x402", + ] + + modified_tools = [] + for tool_items in tool_list: + tool_spec = tool_items.tool_spec + + # Modify specific field - change 'config' from 'string' to 'object' + if tool_items.tool_name in tool_to_modify: + modified_spec = modify_tool_schema( + tool_spec, + field_name="headers", + new_field_type="object", + ) + # Update the tool's spec + tool_items._tool_spec = modified_spec + + modified_tools.append(tool_items) + + # Create a BedrockModel + bedrock_model = BedrockModel( + model_id="us.anthropic.claude-sonnet-4-20250514-v1:0", + max_tokens=10000, + region_name=os.getenv("AWS_REGION"), + additional_request_fields={ + "thinking": { + "type": "enabled", + "budget_tokens": 4096, # Minimum of 1,024 + } + }, + ) + + # Create Agent using the Strands Agents SDK + agent = Agent( + model=bedrock_model, + tools=[ + list_available_services, + get_service_schema, + image_reader, + create_ad_html, + *modified_tools, + ], # Custom tools plus Coinbase Agentkit tools + system_prompt="""You are an expert advertising and marketing content creator with extensive experience in digital marketing, copywriting, and creative direction. + +Your capabilities: +1. Create compelling ad copy for various platforms (social media, display, email, print) +2. Discover and use external services for ad enhancement: + - Generate professional visuals using the image generation service + - Get real-time weather data for location-based and seasonal campaigns +3. Design complete ad campaigns with copy, visuals, and targeting strategy +4. Interacting with on chain actions for making and necessary payments +5. Tool for creating a html file of the generated ads + +When creating ads: +- First start with and outline of the ads to be created +- Use list_available_services() to discover external services that can help in creating ads +- Consider the target audience, platform, and campaign goals +- If location-specific or weather-dependent, use the appropiate external service to get weather info +- Always generate relevant visuals using image endpoint service +- Use persuasive copywriting techniques (AIDA, PAS, FAB) +- Include clear call-to-action (CTA) +- Optimize for the specific ad format and platform +- Save the ads content as a html file. When creating the html content, make sure images are rendered properly. Take this part very seriously + +Ad Formats You Can Create: +- Social Media Ads (Facebook, Instagram, LinkedIn, Twitter) +- Display Banner Ads +- Email Marketing +- Print Advertisements +- Video Ad Scripts +- Search Ads (Google, Bing) + +Response Structure: +1. Campaign Overview (objective, audience, platform) +2. Headline(s) - attention-grabbing and benefit-focused +3. Body Copy - persuasive and engaging +4. Call-to-Action - clear and action-oriented +5. Visual Description/Generated Images +6. Targeting Recommendations (demographics, interests, behaviors) +7. Budget & Timing Suggestions (if applicable) +8. **HTML File Creation Checklist:** + - [ ] All images generated and URLs obtained + - [ ] Images embedded in HTML with tags using relative paths + - [ ] HTML file saved with rendered images + +Best Practices: +- Keep it concise and scannable +- Focus on benefits, not just features +- Use emotional triggers and power words +- Create urgency when appropriate +- Ensure brand consistency +- Mobile-first approach +- A/B testing recommendations +- Include images in teh generated html file + +CRITICAL REQUIREMENT - HTML FILE GENERATION: +When saving ads as HTML files, you MUST: +✓ Include ALL generated images embedded in the HTML +✓ Use proper tags with src attributes pointing to the image URLs +✓ Ensure images are visible when the HTML file is opened +✓ Test that image URLs are accessible and properly formatted +✓ Never create HTML files with missing or broken image references +**NEVER use absolute file system paths:** +❌ `` + +**ALWAYS use relative paths based on the HTML file location:** +✅ `` + + +BEFORE saving the HTML file, verify: +1. Each ad section has its corresponding image embedded +2. Image URLs are complete and valid +3. Images have appropriate alt text +4. The HTML renders images correctly + +Be creative, data-driven, and results-oriented!""", + ) + + return agent, wallet_provider + + +def setup(): + """Set up the agent with persistent wallet storage. + + Returns: + Agent: The initialized agent + + """ + # Configure network and file path + network_id = os.getenv("NETWORK_ID", "base-sepolia") + wallet_file = f"wallet_data_{network_id.replace('-', '_')}.txt" + + # Load existing wallet data if available + wallet_data = {} + if os.path.exists(wallet_file): + try: + with open(wallet_file) as f: + wallet_data = json.load(f) + print(f"Loading existing wallet from {wallet_file}") + except json.JSONDecodeError: + print(f"Warning: Invalid wallet data for {network_id}") + wallet_data = {} + + # Determine wallet address using priority order + wallet_address = ( + wallet_data.get("address") # First priority: Saved wallet file + or os.getenv("USER_ADDRESS") # Second priority: ADDRESS env var + or None # Will trigger idempotency flow if needed + ) + + # Create the wallet provider config + config = CdpEvmWalletProviderConfig( + api_key_id=os.getenv("CDP_API_KEY_ID"), + api_key_secret=os.getenv("CDP_API_KEY_SECRET"), + wallet_secret=os.getenv("CDP_WALLET_SECRET"), + network_id=network_id, + address=wallet_address, + # Only include idempotency_key if we need to create a new wallet + idempotency_key=(os.getenv("IDEMPOTENCY_KEY") if not wallet_address else None), + ) + + # Initialize the agent and get the wallet provider + agent, wallet_provider = initialize_agent(config) + + # Save the wallet data after successful initialization + new_wallet_data = { + "address": wallet_provider.get_address(), + "network_id": network_id, + "created_at": time.strftime("%Y-%m-%d %H:%M:%S") + if not wallet_data + else wallet_data.get("created_at"), + } + + with open(wallet_file, "w") as f: + json.dump(new_wallet_data, f, indent=2) + print(f"Wallet data saved to {wallet_file}") + + return agent + + +def run_chat_mode(agent): + """Run the agent interactively based on user input.""" + print("Starting chat mode... Type 'exit' to end.") + while True: + try: + user_input = input("\nPrompt: ") + if user_input.lower() == "exit": + break + if not user_input.strip(): + continue + # Run agent with the user's input in chat mode + agent(user_input) + print("-------------------") + + except KeyboardInterrupt: + print("Goodbye Agent!") + sys.exit(0) + + +def main(): + """Start the chatbot agent.""" + try: + # Validate environment + validate_environment() + + # Set up the agent + agent = setup() + + run_chat_mode(agent=agent) + + except botocore.exceptions.NoCredentialsError: + print("\n❌ AWS Credentials Error:") + print("Unable to locate AWS credentials. Please ensure you have:") + print(" 1. Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, OR") + print(" 2. Set AWS_BEARER_TOKEN_BEDROCK environment variable, OR") + print(" 3. Configured AWS credentials file (~/.aws/credentials), OR") + print(" 4. Set up an IAM role (if running on AWS infrastructure)") + print( + "\nFor more information, visit: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html" + ) + sys.exit(1) + except KeyboardInterrupt: + print("\nShutdown requested...") + except Exception as e: + print(f"Fatal error: {e}") + sys.exit(1) + + +def print_banner(): + """Display a box-style banner for the application.""" + title = "Coinbase AgentKit with Strands Agents and X402" + width = len(title) + 4 + + print("╔" + "═" * width + "╗") + print("║" + " " * width + "║") + print("║ " + title + " ║") + print("║" + " " * width + "║") + print("╚" + "═" * width + "╝") + + +if __name__ == "__main__": + print_banner() + print("Starting Agent...") + main() diff --git a/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/pyproject.toml b/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/pyproject.toml index 2dccad1e2..ac6b42adb 100644 --- a/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/pyproject.toml +++ b/python/examples/advertisements-agent-with-strands-agents-x402-cdp-chatbot/pyproject.toml @@ -1,55 +1,55 @@ -[project] -name = "ads-agent" -version = "0.0.1" -description = "CDP AgentKit x402 Example Chatbot" -authors = [{ name = "Uchenna Egbe", email = "ucheegbe@amazon.com" }] -requires-python = "~=3.10.0" -readme = "README.md" - -dependencies = [ - "python-dotenv>=1.0.1,<2", - "coinbase-agentkit", - "coinbase-agentkit-strands-agents", - "typing-extensions>=4.13.2", - "fastapi", - "uvicorn" -] - -[dependency-groups] -dev = ["ruff>=0.7.1,<0.8"] - -[tool.uv] -package = false -override-dependencies = [ - "typing-extensions>=4.13.2", -] -resolution = "highest" - -[tool.uv.sources] -coinbase-agentkit = { path = "../../../python/coinbase-agentkit", editable = true } -coinbase-agentkit-strands-agents = { path = "../../../python/framework-extensions/strands-agents", editable = true } - -[build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" - -[tool.advertisements-agent-with-strands-agents-x402-cdp-chatbot] -private = true - -[tool.ruff] -line-length = 100 -target-version = "py310" -exclude = ["./build/**", "./dist/**", "./docs/**"] - -[tool.ruff.lint] -select = ["E", "F", "I", "N", "W", "D", "UP", "B", "C4", "SIM", "RUF"] -ignore = ["D213", "D203", "D100", "D104", "D107", "E501"] - -[tool.ruff.format] -quote-style = "double" -indent-style = "space" -skip-magic-trailing-comma = false -line-ending = "auto" - -[tool.ruff.lint.isort] +[project] +name = "ads-agent" +version = "0.0.1" +description = "CDP AgentKit x402 Example Chatbot" +authors = [{ name = "Uchenna Egbe", email = "ucheegbe@amazon.com" }] +requires-python = "~=3.10.0" +readme = "README.md" + +dependencies = [ + "python-dotenv>=1.0.1,<2", + "coinbase-agentkit", + "coinbase-agentkit-strands-agents", + "typing-extensions>=4.13.2", + "fastapi", + "uvicorn" +] + +[dependency-groups] +dev = ["ruff>=0.7.1,<0.8"] + +[tool.uv] +package = false +override-dependencies = [ + "typing-extensions>=4.13.2", +] +resolution = "highest" + +[tool.uv.sources] +coinbase-agentkit = { path = "../../../python/coinbase-agentkit", editable = true } +coinbase-agentkit-strands-agents = { path = "../../../python/framework-extensions/strands-agents", editable = true } + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.advertisements-agent-with-strands-agents-x402-cdp-chatbot] +private = true + +[tool.ruff] +line-length = 100 +target-version = "py310" +exclude = ["./build/**", "./dist/**", "./docs/**"] + +[tool.ruff.lint] +select = ["E", "F", "I", "N", "W", "D", "UP", "B", "C4", "SIM", "RUF"] +ignore = ["D213", "D203", "D100", "D104", "D107", "E501"] + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +skip-magic-trailing-comma = false +line-ending = "auto" + +[tool.ruff.lint.isort] known-first-party = ["coinbase_agentkit, cdp"] \ No newline at end of file diff --git a/typescript/.changeset/fix-recursive-zod-schema-refs.md b/typescript/.changeset/fix-recursive-zod-schema-refs.md new file mode 100644 index 000000000..e666e3fb7 --- /dev/null +++ b/typescript/.changeset/fix-recursive-zod-schema-refs.md @@ -0,0 +1,8 @@ +--- +"@coinbase/agentkit": patch +"@coinbase/agentkit-model-context-protocol": patch +--- + +fix: resolve $ref pointers from recursive Zod schemas for LLM function-calling APIs + +Added `resolveJsonSchemaRefs()` utility that inlines `$ref` pointers produced by `zodToJsonSchema()` and `z.toJSONSchema()` when converting recursive or shared Zod types. Integrated into the MCP framework extension so schemas are resolved transparently. Also exported from `@coinbase/agentkit` for use with LangChain and Vercel AI SDK extensions. diff --git a/typescript/agentkit/src/index.ts b/typescript/agentkit/src/index.ts index 5017789c4..740e2813a 100644 --- a/typescript/agentkit/src/index.ts +++ b/typescript/agentkit/src/index.ts @@ -2,3 +2,4 @@ export * from "./agentkit"; export * from "./wallet-providers"; export * from "./action-providers"; export * from "./network"; +export { resolveJsonSchemaRefs } from "./resolveJsonSchemaRefs"; diff --git a/typescript/agentkit/src/resolveJsonSchemaRefs.test.ts b/typescript/agentkit/src/resolveJsonSchemaRefs.test.ts new file mode 100644 index 000000000..7c0eef392 --- /dev/null +++ b/typescript/agentkit/src/resolveJsonSchemaRefs.test.ts @@ -0,0 +1,184 @@ +import { resolveJsonSchemaRefs } from "./resolveJsonSchemaRefs"; + +describe("resolveJsonSchemaRefs", () => { + it("returns schema unchanged when no $ref present", () => { + const schema = { + type: "object", + properties: { + name: { type: "string" }, + }, + }; + expect(resolveJsonSchemaRefs(schema)).toEqual(schema); + }); + + it("inlines a simple $ref from $defs", () => { + const schema = { + $ref: "#/$defs/Address", + $defs: { + Address: { + type: "object", + properties: { + street: { type: "string" }, + }, + }, + }, + }; + expect(resolveJsonSchemaRefs(schema)).toEqual({ + type: "object", + properties: { + street: { type: "string" }, + }, + }); + }); + + it("inlines a simple $ref from definitions", () => { + const schema = { + $ref: "#/definitions/Item", + definitions: { + Item: { + type: "object", + properties: { id: { type: "number" } }, + }, + }, + }; + expect(resolveJsonSchemaRefs(schema)).toEqual({ + type: "object", + properties: { id: { type: "number" } }, + }); + }); + + it("inlines recursive $ref up to maxDepth", () => { + // Simulates zodToJsonSchema output for: + // z.object({ value: z.string(), children: z.lazy(() => schema).array() }) + const schema = { + $ref: "#/$defs/TreeNode", + $defs: { + TreeNode: { + type: "object", + properties: { + value: { type: "string" }, + children: { + type: "array", + items: { $ref: "#/$defs/TreeNode" }, + }, + }, + }, + }, + }; + + const result = resolveJsonSchemaRefs(schema, 2); + + // Depth 0: TreeNode inlined + expect(result.type).toBe("object"); + expect(result.properties.value).toEqual({ type: "string" }); + + // Depth 1: children[].items -> TreeNode inlined again + expect(result.properties.children.items.type).toBe("object"); + expect(result.properties.children.items.properties.value).toEqual({ type: "string" }); + + // Depth 2: hit maxDepth, replaced with permissive empty schema + expect(result.properties.children.items.properties.children.items).toEqual({}); + }); + + it("handles shared sub-schemas referenced multiple times in a union", () => { + // Reproduces the exact scenario from issue #815: a sub-schema used twice + // in a union causes zodToJsonSchema to emit $ref for both occurrences + const schema = { + type: "object", + properties: { + value: { + anyOf: [ + { type: "string" }, + { $ref: "#/$defs/SubSchema" }, + { type: "array", items: { $ref: "#/$defs/SubSchema" } }, + ], + }, + }, + $defs: { + SubSchema: { + type: "object", + additionalProperties: { + anyOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }], + }, + }, + }, + }; + + const result = resolveJsonSchemaRefs(schema); + + // Both $ref occurrences should be inlined + expect(result.properties.value.anyOf[1]).toEqual({ + type: "object", + additionalProperties: { + anyOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }], + }, + }); + expect(result.properties.value.anyOf[2].items).toEqual({ + type: "object", + additionalProperties: { + anyOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }], + }, + }); + }); + + it("strips $defs and definitions from output", () => { + const schema = { + type: "object", + properties: { + child: { $ref: "#/$defs/Child" }, + }, + $defs: { + Child: { type: "object", properties: { name: { type: "string" } } }, + }, + }; + const result = resolveJsonSchemaRefs(schema); + expect(result.$defs).toBeUndefined(); + expect(result.definitions).toBeUndefined(); + expect(result.properties.child).toEqual({ + type: "object", + properties: { name: { type: "string" } }, + }); + }); + + it("passes through primitive schemas unchanged", () => { + expect(resolveJsonSchemaRefs({ type: "string" })).toEqual({ type: "string" }); + expect(resolveJsonSchemaRefs({ type: "number" })).toEqual({ type: "number" }); + }); + + it("preserves unrecognized $ref paths", () => { + const schema = { $ref: "https://example.com/schema.json" }; + expect(resolveJsonSchemaRefs(schema)).toEqual(schema); + }); + + it("handles null and undefined values in schema nodes", () => { + const schema = { + type: "object", + properties: { + a: null, + b: { type: "string", default: null }, + }, + }; + expect(resolveJsonSchemaRefs(schema)).toEqual(schema); + }); + + it("uses default maxDepth of 5", () => { + // Build a schema that chains 6 levels of $ref + const schema = { + $ref: "#/$defs/L0", + $defs: { + L0: { type: "object", properties: { next: { $ref: "#/$defs/L0" } } }, + }, + }; + + const result = resolveJsonSchemaRefs(schema); + + // Walk 5 levels deep -- each should be resolved + let node = result; + for (let i = 0; i < 4; i++) { + expect(node.type).toBe("object"); + node = node.properties.next; + } + // At depth 5, should be empty schema + expect(node.properties.next).toEqual({}); + }); +}); diff --git a/typescript/agentkit/src/resolveJsonSchemaRefs.ts b/typescript/agentkit/src/resolveJsonSchemaRefs.ts new file mode 100644 index 000000000..8a36b7b52 --- /dev/null +++ b/typescript/agentkit/src/resolveJsonSchemaRefs.ts @@ -0,0 +1,84 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +/** + * Resolves `$ref` pointers in a JSON Schema by inlining their definitions. + * + * `zodToJsonSchema()` and `z.toJSONSchema()` emit `$ref` pointers when a Zod + * type is referenced more than once (shared sub-schemas) or is recursive + * (`z.lazy`). Several LLM function-calling APIs -- notably OpenAI -- reject + * schemas that contain `$ref` with errors like "object schema missing + * properties". + * + * This utility post-processes JSON Schema output by inlining every `$ref` up + * to a configurable depth, replacing deeper levels with a permissive empty + * schema (`{}`), and stripping the `$defs`/`definitions` block from the result. + * + * @param schema - A JSON Schema object, typically from `zodToJsonSchema()` or + * `z.toJSONSchema()` + * @param maxDepth - Maximum number of `$ref` expansions per path (default: 5) + * @returns A new JSON Schema with all `$ref` pointers resolved + * + * @example + * ```typescript + * import { resolveJsonSchemaRefs } from "@coinbase/agentkit"; + * import { zodToJsonSchema } from "zod-to-json-schema"; + * + * const jsonSchema = zodToJsonSchema(myRecursiveZodSchema); + * const resolved = resolveJsonSchemaRefs(jsonSchema); + * // `resolved` contains no $ref -- safe for OpenAI function calling + * ``` + */ +export function resolveJsonSchemaRefs( + schema: Record, + maxDepth = 5, +): Record { + const definitions = schema.$defs || schema.definitions || {}; + + /** + * Recursively resolves `$ref` pointers in a JSON Schema node. + * + * @param node - The current schema node to process + * @param depth - Number of `$ref` expansions on the current path + * @returns The resolved schema node with `$ref` pointers inlined + */ + function resolve(node: any, depth: number): any { + if (node == null || typeof node !== "object") { + return node; + } + + if (Array.isArray(node)) { + return node.map(item => resolve(item, depth)); + } + + // Resolve $ref by looking up the definition and inlining it + if (typeof node.$ref === "string") { + const match = node.$ref.match(/^#\/(?:\$defs|definitions)\/(.+)$/); + if (!match) { + return node; + } + + if (depth >= maxDepth) { + return {}; + } + + const def = definitions[match[1]]; + if (!def) { + return node; + } + + return resolve(def, depth + 1); + } + + // Recurse into object properties, skipping the definitions block + const result: Record = {}; + for (const [key, value] of Object.entries(node)) { + if (key === "$defs" || key === "definitions") { + continue; + } + result[key] = resolve(value, depth); + } + return result; + } + + return resolve(schema, 0); +} diff --git a/typescript/framework-extensions/model-context-protocol/src/index.test.ts b/typescript/framework-extensions/model-context-protocol/src/index.test.ts index e6738e438..bb39316e2 100644 --- a/typescript/framework-extensions/model-context-protocol/src/index.test.ts +++ b/typescript/framework-extensions/model-context-protocol/src/index.test.ts @@ -2,11 +2,52 @@ import { z } from "zod"; import { getMcpTools } from "./index"; import { AgentKit } from "@coinbase/agentkit"; +/** + * Standalone ref resolver for test assertions. Mirrors the real utility + * but avoids loading the full `@coinbase/agentkit` module (ESM-only deps). + * + * @param schema - JSON Schema object to resolve + * @param maxDepth - Maximum ref expansion depth + * @returns Resolved schema + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function resolveJsonSchemaRefs(schema: Record, maxDepth = 5): Record { + const definitions = schema.$defs || schema.definitions || {}; + /** + * Recursively resolves $ref pointers in a schema node. + * + * @param node - Current schema node + * @param depth - Current expansion depth + * @returns Resolved node + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + function resolve(node: any, depth: number): any { + if (node == null || typeof node !== "object") return node; + if (Array.isArray(node)) return node.map(item => resolve(item, depth)); + if (typeof node.$ref === "string") { + const match = node.$ref.match(/^#\/(?:\$defs|definitions)\/(.+)$/); + if (!match) return node; + if (depth >= maxDepth) return {}; + const def = definitions[match[1]]; + return def ? resolve(def, depth + 1) : node; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const result: Record = {}; + for (const [key, value] of Object.entries(node)) { + if (key === "$defs" || key === "definitions") continue; + result[key] = resolve(value, depth); + } + return result; + } + return resolve(schema, 0); +} + // Mock AgentKit before importing - this prevents loading ES-only dependencies jest.mock("@coinbase/agentkit", () => ({ AgentKit: { from: jest.fn(), }, + resolveJsonSchemaRefs, })); // Define mock action after imports @@ -32,9 +73,39 @@ describe("getMcpTools", () => { expect(tool.name).toBe(mockAction.name); expect(tool.description).toBe(mockAction.description); - expect(tool.inputSchema).toStrictEqual(z.toJSONSchema(mockAction.schema)); + expect(tool.inputSchema).toStrictEqual( + resolveJsonSchemaRefs(z.toJSONSchema(mockAction.schema) as Record), + ); const result = await toolHandler("testAction", { test: "data" }); expect(result).toStrictEqual({ content: [{ text: '"Invoked with data"', type: "text" }] }); }); + + it("should resolve $ref pointers in schemas with shared sub-types", async () => { + // Simulate a schema that produces $ref when converted to JSON Schema + const subSchema = z.object({ value: z.string() }); + const actionWithRefs = { + name: "refAction", + description: "Action with shared schema refs", + schema: z.object({ + single: subSchema, + list: z.array(subSchema), + }), + invoke: jest.fn(async () => "ok"), + }; + + (AgentKit.from as jest.Mock).mockImplementationOnce(() => ({ + getActions: jest.fn(() => [actionWithRefs]), + })); + + const mockAgentKit = await AgentKit.from({}); + const { tools } = await getMcpTools(mockAgentKit); + + const inputSchema = tools[0].inputSchema as Record; + // After resolution, there should be no $ref or $defs in the output + const schemaStr = JSON.stringify(inputSchema); + expect(schemaStr).not.toContain("$ref"); + expect(schemaStr).not.toContain("$defs"); + expect(schemaStr).not.toContain('"definitions"'); + }); }); diff --git a/typescript/framework-extensions/model-context-protocol/src/index.ts b/typescript/framework-extensions/model-context-protocol/src/index.ts index 5a427f260..965284602 100644 --- a/typescript/framework-extensions/model-context-protocol/src/index.ts +++ b/typescript/framework-extensions/model-context-protocol/src/index.ts @@ -4,7 +4,7 @@ import { z } from "zod"; import { CallToolResult, Tool } from "@modelcontextprotocol/sdk/types.js"; -import { AgentKit, Action } from "@coinbase/agentkit"; +import { AgentKit, Action, resolveJsonSchemaRefs } from "@coinbase/agentkit"; /** * The AgentKit MCP tools and tool handler @@ -28,7 +28,9 @@ export async function getMcpTools(agentKit: AgentKit): Promise return { name: action.name, description: action.description, - inputSchema: z.toJSONSchema(action.schema), + inputSchema: resolveJsonSchemaRefs( + z.toJSONSchema(action.schema) as Record, + ), } as Tool; }), toolHandler: async (name: string, args: unknown) => { diff --git a/typescript/pnpm-lock.yaml b/typescript/pnpm-lock.yaml index dc1ba0ed4..cd9df5f2d 100644 --- a/typescript/pnpm-lock.yaml +++ b/typescript/pnpm-lock.yaml @@ -109,7 +109,7 @@ importers: version: 2.7.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10) '@x402/svm': specifier: ^2.7.0 - version: 2.7.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) + version: 2.7.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) '@zerodev/ecdsa-validator': specifier: ^5.4.5 version: 5.4.5(@zerodev/sdk@5.4.28(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)) @@ -698,22 +698,6 @@ importers: specifier: ^4.7.1 version: 4.19.3 - examples/register: - dependencies: - '@coinbase/agentkit': - specifier: latest - version: 0.10.4(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(@types/node@20.17.27)(abitype@1.2.3(typescript@5.8.2)(zod@3.25.56))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(graphql@16.11.0)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - dotenv: - specifier: ^16.4.5 - version: 16.4.7 - viem: - specifier: ^2.21.19 - version: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - devDependencies: - tsx: - specifier: ^4.7.1 - version: 4.19.3 - examples/vercel-ai-sdk-smart-wallet-chatbot: dependencies: '@ai-sdk/openai': @@ -1130,24 +1114,15 @@ packages: '@changesets/write@0.4.0': resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} - '@coinbase/agentkit@0.10.4': - resolution: {integrity: sha512-1ZnjY6ohuBXqseZDUhrkFnlU+UjNBr9TeZjpa4wjR8pGQq2RhhVKXQSe5UOFpitgtK3z8ytsQXTHwKRohkExKw==} - '@coinbase/cdp-sdk@1.45.0': resolution: {integrity: sha512-4fgGOhyN9g/pTDE9NtsKUapwFsubrk9wafz8ltmBqSwWqLZWfWxXkVmzMYYFAf+qeGf/X9JqJtmvDVaHFlXWlw==} - '@coinbase/coinbase-sdk@0.20.0': - resolution: {integrity: sha512-OoMMktKbjmeEwtwQCK3kIIoX5M+hNelxAGX5Llymvw6bmyrMDaEBZ/Myga9kaLJ+7Hi5Y4jPDy4Cy2MGxxXg6w==} - '@coinbase/wallet-sdk@3.9.3': resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} '@coinbase/wallet-sdk@4.3.6': resolution: {integrity: sha512-4q8BNG1ViL4mSAAvPAtpwlOs1gpC+67eQtgIwNvT3xyeyFFd+guwkc8bcX5rTmQhXpqnhzC4f0obACbP9CqMSA==} - '@coinbase/x402@0.6.4': - resolution: {integrity: sha512-T0tNU8/oZ64GaKC3dbGcOFHqYO0BjII/uZeC/tAS9HOqhWBvewhoa0rzPzaE8SHeKOIwX2YpbFXdG0Hyh0d4mw==} - '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -3769,11 +3744,6 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - axios-mock-adapter@1.22.0: - resolution: {integrity: sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==} - peerDependencies: - axios: '>= 0.17.0' - axios-retry@4.5.0: resolution: {integrity: sha512-aR99oXhpEDGo0UuAlYcn2iGRds30k366Zfa05XWScR9QaQD4JYiP3/1Qt1u7YlefUOK+cn0CcwoL1oefavQUlQ==} peerDependencies: @@ -3859,13 +3829,6 @@ packages: bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - bip32@4.0.0: - resolution: {integrity: sha512-aOGy88DDlVUhspIXJN+dVEtclhIsfAUppD43V0j40cPTld3pv/0X/MlrZSZ6jowIaQQzFwP8M6rFU2z2mVYjDQ==} - engines: {node: '>=6.0.0'} - - bip39@3.1.0: - resolution: {integrity: sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==} - bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} @@ -3934,9 +3897,6 @@ packages: bs58@6.0.0: resolution: {integrity: sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==} - bs58check@2.1.2: - resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} - bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} @@ -4069,10 +4029,6 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - cipher-base@1.0.6: - resolution: {integrity: sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==} - engines: {node: '>= 0.10'} - cjs-module-lexer@1.4.3: resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} @@ -4221,9 +4177,6 @@ packages: engines: {node: '>=0.8'} hasBin: true - create-hash@1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} - create-jest@29.7.0: resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4484,9 +4437,6 @@ packages: resolution: {integrity: sha512-r6kEJXDKecVOCj2nLMuXK/FCPeurW33+3JRpfXVbjLja3XUYFfD9I/JBreH6sUyzcm3G/YQboBjMla6poKeSdA==} engines: {bun: '>=1', deno: '>=2', node: '>=16'} - ed2curve@0.3.0: - resolution: {integrity: sha512-8w2fmmq3hv9rCrcI7g9hms2pMunQr1JINfcjwR9tAyZqhtyaMN991lF/ZfHfr5tzZQ8c7y7aBgZbjfbd0fjFwQ==} - ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} @@ -5194,10 +5144,6 @@ packages: has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - hash-base@3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} - hash.js@1.1.7: resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} @@ -5454,10 +5400,6 @@ packages: is-buffer@1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - is-buffer@2.0.5: - resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} - engines: {node: '>=4'} - is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -5932,9 +5874,6 @@ packages: jose@4.15.9: resolution: {integrity: sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA==} - jose@5.10.0: - resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} - jose@6.0.10: resolution: {integrity: sha512-skIAxZqcMkOrSwjJvplIPYrlXGpxTPnro2/QWTDCxAdWQrSTV5/KqspMWmi5WAx5+ULswASJiZ0a+1B/Lxt9cw==} @@ -6218,9 +6157,6 @@ packages: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} - md5.js@1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} - md5@2.3.0: resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} @@ -7246,9 +7182,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - ripemd160@2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} - router@2.2.0: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} @@ -7310,10 +7243,6 @@ packages: scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} - secp256k1@5.0.1: - resolution: {integrity: sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==} - engines: {node: '>=18.0.0'} - secure-compare@3.0.1: resolution: {integrity: sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==} @@ -7380,10 +7309,6 @@ packages: setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true - sha.js@2.4.12: resolution: {integrity: sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==} engines: {node: '>= 0.10'} @@ -7979,9 +7904,6 @@ packages: peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x - typeforce@1.18.0: - resolution: {integrity: sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==} - typescript@5.8.2: resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} engines: {node: '>=14.17'} @@ -8243,14 +8165,6 @@ packages: typescript: optional: true - viem@2.38.3: - resolution: {integrity: sha512-By2TutLv07iNHHtWqHHzjGipevYsfGqT7KQbGEmqLco1qTJxKnvBbSviqiu6/v/9REV6Q/FpmIxf2Z7/l5AbcQ==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - viem@2.47.4: resolution: {integrity: sha512-h0Wp/SYmJO/HB4B/em1OZ3W1LaKrmr7jzaN7talSlZpo0LCn0V6rZ5g923j6sf4VUSrqp/gUuWuHFc7UcoIp8A==} peerDependencies: @@ -8360,9 +8274,6 @@ packages: wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - wif@2.0.6: - resolution: {integrity: sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==} - word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} @@ -8457,9 +8368,6 @@ packages: x402-fetch@0.7.0: resolution: {integrity: sha512-HS7v6wsIVrU8TvAGBwRmA3I+ZXbanPraA3OMj90y6Hn1Mej1wAELOK4VpGh6zI8d6w5E464BnGu9o0FE+8DRAA==} - x402@0.6.1: - resolution: {integrity: sha512-9UmeCSsYzFGav5FdVP70VplKlR3V90P0DZ9fPSrlLVp0ifUVi1S9TztvegkmIHE9xTGZ1GWNi+bkne6N0Ea58w==} - x402@0.7.2: resolution: {integrity: sha512-JleP1GmeOP1bEuwzFVtjusL3t5H1PGufROrBKg5pj/MfcGswkBvfB6j5Gm5UeA+kwp0ZmOkkHAqkoHF1WexbsQ==} @@ -8600,10 +8508,6 @@ snapshots: merge-options: 3.0.4 xml2js: 0.6.2 - '@across-protocol/app-sdk@0.2.0(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@across-protocol/app-sdk@0.2.0(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6) @@ -8924,26 +8828,6 @@ snapshots: - utf-8-validate - zod - '@base-org/account@2.2.0(bufferutil@4.0.9)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)': - dependencies: - '@noble/hashes': 1.4.0 - clsx: 1.2.1 - eventemitter3: 5.0.1 - idb-keyval: 6.2.1 - ox: 0.6.9(typescript@5.8.2)(zod@3.25.56) - preact: 10.24.2 - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - zustand: 5.0.3(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) - transitivePeerDependencies: - - '@types/react' - - bufferutil - - immer - - react - - typescript - - use-sync-external-store - - utf-8-validate - - zod - '@bcoe/v8-coverage@0.2.3': {} '@cfworker/json-schema@4.1.1': {} @@ -9146,83 +9030,6 @@ snapshots: human-id: 4.1.1 prettier: 2.8.8 - '@coinbase/agentkit@0.10.4(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(@types/node@20.17.27)(abitype@1.2.3(typescript@5.8.2)(zod@3.25.56))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(graphql@16.11.0)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@across-protocol/app-sdk': 0.2.0(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - '@alloralabs/allora-sdk': 0.1.0 - '@base-org/account': 2.2.0(bufferutil@4.0.9)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@coinbase/cdp-sdk': 1.45.0(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(utf-8-validate@5.0.10) - '@coinbase/coinbase-sdk': 0.20.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@coinbase/x402': 0.6.4(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@ensofinance/sdk': 2.0.6 - '@jup-ag/api': 6.0.40 - '@privy-io/public-api': 2.18.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) - '@privy-io/server-auth': 1.18.4(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - '@solana/kit': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/spl-token': 0.4.13(@solana/web3.js@1.98.1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.2)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(utf-8-validate@5.0.10) - '@solana/web3.js': 1.98.1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.2)(utf-8-validate@5.0.10) - '@vaultsfyi/sdk': 2.1.9(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@x402/evm': 2.7.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10) - '@x402/fetch': 2.7.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10) - '@x402/svm': 2.7.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) - '@zerodev/ecdsa-validator': 5.4.5(@zerodev/sdk@5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)))(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - '@zerodev/intent': 0.0.24(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - '@zerodev/sdk': 5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - '@zoralabs/coins-sdk': 0.2.8(abitype@1.2.3(typescript@5.8.2)(zod@3.25.56))(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - '@zoralabs/protocol-deployments': 0.6.1 - bs58: 4.0.1 - canonicalize: 2.1.0 - clanker-sdk: 4.1.19(@types/node@20.17.27)(typescript@5.8.2)(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - decimal.js: 10.5.0 - ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) - graphql-request: 7.2.0(graphql@16.11.0) - md5: 2.3.0 - opensea-js: 7.1.18(bufferutil@4.0.9)(utf-8-validate@5.0.10) - reflect-metadata: 0.2.2 - sushi: 6.2.1(typescript@5.8.2)(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))(zod@3.25.56) - twitter-api-v2: 1.22.0 - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - zod: 3.25.56 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@solana/sysvars' - - '@tanstack/query-core' - - '@tanstack/react-query' - - '@types/node' - - '@types/react' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - '@zerodev/webauthn-key' - - abitype - - aws4fetch - - bufferutil - - db0 - - debug - - encoding - - fastestsmallesttextencoderdecoder - - graphql - - immer - - ioredis - - react - - supports-color - - typescript - - uploadthing - - use-sync-external-store - - utf-8-validate - - ws - '@coinbase/cdp-sdk@1.45.0(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(utf-8-validate@5.0.10)': dependencies: '@solana-program/system': 0.10.0(@solana/kit@5.5.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(utf-8-validate@5.0.10)) @@ -9245,29 +9052,6 @@ snapshots: - typescript - utf-8-validate - '@coinbase/coinbase-sdk@0.20.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)': - dependencies: - '@scure/bip32': 1.7.0 - abitype: 1.2.3(typescript@5.8.2)(zod@3.25.56) - axios: 1.12.2 - axios-mock-adapter: 1.22.0(axios@1.12.2) - axios-retry: 4.5.0(axios@1.12.2) - bip32: 4.0.0 - bip39: 3.1.0 - decimal.js: 10.5.0 - dotenv: 16.4.7 - ed2curve: 0.3.0 - ethers: 6.13.5(bufferutil@4.0.9)(utf-8-validate@5.0.10) - jose: 5.10.0 - secp256k1: 5.0.1 - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - transitivePeerDependencies: - - bufferutil - - debug - - typescript - - utf-8-validate - - zod - '@coinbase/wallet-sdk@3.9.3': dependencies: bn.js: 5.2.2 @@ -9302,47 +9086,6 @@ snapshots: - utf-8-validate - zod - '@coinbase/x402@0.6.4(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@coinbase/cdp-sdk': 1.45.0(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(utf-8-validate@5.0.10) - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - x402: 0.6.1(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - zod: 3.25.56 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@solana/sysvars' - - '@tanstack/query-core' - - '@tanstack/react-query' - - '@types/react' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - bufferutil - - db0 - - debug - - encoding - - fastestsmallesttextencoderdecoder - - immer - - ioredis - - react - - supports-color - - typescript - - uploadthing - - utf-8-validate - - ws - '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -9827,14 +9570,6 @@ snapshots: '@fidm/asn1': 1.0.4 tweetnacl: 1.0.3 - '@gemini-wallet/core@0.2.0(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - '@metamask/rpc-errors': 7.0.2 - eventemitter3: 5.0.1 - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - transitivePeerDependencies: - - supports-color - '@gemini-wallet/core@0.2.0(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: '@metamask/rpc-errors': 7.0.2 @@ -10008,13 +9743,6 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} - '@inquirer/external-editor@1.0.1(@types/node@20.17.27)': - dependencies: - chardet: 2.1.0 - iconv-lite: 0.6.3 - optionalDependencies: - '@types/node': 20.17.27 - '@inquirer/external-editor@1.0.1(@types/node@22.13.14)': dependencies: chardet: 2.1.0 @@ -11505,27 +11233,6 @@ snapshots: - bufferutil - utf-8-validate - '@privy-io/server-auth@1.18.4(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - '@noble/curves': 1.8.1 - '@noble/hashes': 1.7.1 - '@solana/web3.js': 1.98.1(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.2)(utf-8-validate@5.0.10) - canonicalize: 2.1.0 - dotenv: 16.4.7 - jose: 4.15.9 - node-fetch-native: 1.6.6 - redaxios: 0.5.1 - svix: 1.62.0(encoding@0.1.13) - ts-case-convert: 2.1.0 - type-fest: 3.13.1 - optionalDependencies: - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - transitivePeerDependencies: - - bufferutil - - encoding - - typescript - - utf-8-validate - '@privy-io/server-auth@1.18.4(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: '@noble/curves': 1.8.1 @@ -12021,15 +11728,13 @@ snapshots: dependencies: '@solana/kit': 5.5.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(utf-8-validate@5.0.10) - '@solana-program/token-2022@0.4.2(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))': + '@solana-program/token-2022@0.4.2(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana/kit': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/sysvars': 5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) - '@solana-program/token-2022@0.6.1(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))': + '@solana-program/token-2022@0.6.1(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana/kit': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/sysvars': 5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2) '@solana-program/token@0.5.1(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: @@ -13278,43 +12983,6 @@ snapshots: '@uniswap/token-lists@1.0.0-beta.33': {} - '@vaultsfyi/sdk@2.1.9(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - x402-fetch: 0.7.0(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@solana/sysvars' - - '@tanstack/query-core' - - '@tanstack/react-query' - - '@types/react' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - bufferutil - - db0 - - encoding - - fastestsmallesttextencoderdecoder - - immer - - ioredis - - react - - supports-color - - typescript - - uploadthing - - utf-8-validate - - ws - '@vaultsfyi/sdk@2.1.9(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: x402-fetch: 0.7.0(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) @@ -13354,18 +13022,18 @@ snapshots: '@vercel/oidc@3.1.0': {} - '@wagmi/connectors@5.10.0(@wagmi/core@2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)))(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))(zod@3.25.56)': + '@wagmi/connectors@5.10.0(@wagmi/core@2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))(zod@3.25.56)': dependencies: '@base-org/account': 1.1.1(bufferutil@4.0.9)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.25.56) '@coinbase/wallet-sdk': 4.3.6(bufferutil@4.0.9)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.25.56) - '@gemini-wallet/core': 0.2.0(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) + '@gemini-wallet/core': 0.2.0(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)) '@metamask/sdk': 0.32.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': 0.18.6(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@wagmi/core': 2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) + '@wagmi/core': 2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)) '@walletconnect/ethereum-provider': 2.21.1(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) + viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6) optionalDependencies: typescript: 5.8.2 transitivePeerDependencies: @@ -13398,71 +13066,12 @@ snapshots: - utf-8-validate - zod - '@wagmi/connectors@5.10.0(@wagmi/core@2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))(zod@3.25.56)': + '@wagmi/core@2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: - '@base-org/account': 1.1.1(bufferutil@4.0.9)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.25.56) - '@coinbase/wallet-sdk': 4.3.6(bufferutil@4.0.9)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(zod@3.25.56) - '@gemini-wallet/core': 0.2.0(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)) - '@metamask/sdk': 0.32.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) - '@safe-global/safe-apps-provider': 0.18.6(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@wagmi/core': 2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)) - '@walletconnect/ethereum-provider': 2.21.1(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - cbw-sdk: '@coinbase/wallet-sdk@3.9.3' + eventemitter3: 5.0.1 + mipd: 0.0.7(typescript@5.8.2) viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6) - optionalDependencies: - typescript: 5.8.2 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@types/react' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - bufferutil - - db0 - - encoding - - immer - - ioredis - - react - - supports-color - - uploadthing - - use-sync-external-store - - utf-8-validate - - zod - - '@wagmi/core@2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - eventemitter3: 5.0.1 - mipd: 0.0.7(typescript@5.8.2) - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - zustand: 5.0.0(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) - optionalDependencies: - '@tanstack/query-core': 5.89.0 - typescript: 5.8.2 - transitivePeerDependencies: - - '@types/react' - - immer - - react - - use-sync-external-store - - '@wagmi/core@2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))': - dependencies: - eventemitter3: 5.0.1 - mipd: 0.0.7(typescript@5.8.2) - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6) - zustand: 5.0.0(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) + zustand: 5.0.0(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) optionalDependencies: '@tanstack/query-core': 5.89.0 typescript: 5.8.2 @@ -14043,11 +13652,11 @@ snapshots: - typescript - utf-8-validate - '@x402/svm@2.7.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))': + '@x402/svm@2.7.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': dependencies: '@solana-program/compute-budget': 0.11.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) '@solana-program/token': 0.9.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token-2022': 0.6.1(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) + '@solana-program/token-2022': 0.6.1(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) '@solana/kit': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@x402/core': 2.7.0 transitivePeerDependencies: @@ -14120,11 +13729,6 @@ snapshots: rxjs: 7.8.2 undici: 5.29.0 - '@zerodev/ecdsa-validator@5.4.5(@zerodev/sdk@5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)))(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - '@zerodev/sdk': 5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@zerodev/ecdsa-validator@5.4.5(@zerodev/sdk@5.4.28(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: '@zerodev/sdk': 5.4.28(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)) @@ -14139,23 +13743,6 @@ snapshots: transitivePeerDependencies: - '@zerodev/webauthn-key' - '@zerodev/intent@0.0.24(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - '@zerodev/ecdsa-validator': 5.4.5(@zerodev/sdk@5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)))(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - '@zerodev/multi-chain-ecdsa-validator': 5.4.4(@zerodev/sdk@5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)))(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - '@zerodev/sdk': 5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - transitivePeerDependencies: - - '@zerodev/webauthn-key' - - '@zerodev/multi-chain-ecdsa-validator@5.4.4(@zerodev/sdk@5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)))(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - '@simplewebauthn/browser': 9.0.1 - '@simplewebauthn/typescript-types': 8.3.4 - '@zerodev/sdk': 5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - merkletreejs: 0.3.11 - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@zerodev/multi-chain-ecdsa-validator@5.4.4(@zerodev/sdk@5.4.28(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(@zerodev/webauthn-key@5.4.3(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: '@simplewebauthn/browser': 9.0.1 @@ -14165,11 +13752,6 @@ snapshots: merkletreejs: 0.3.11 viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6) - '@zerodev/sdk@5.4.28(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - semver: 7.7.1 - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@zerodev/sdk@5.4.28(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))': dependencies: semver: 7.7.1 @@ -14189,13 +13771,6 @@ snapshots: abitype: 1.0.8(typescript@5.8.2)(zod@4.3.6) viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6) - '@zoralabs/coins-sdk@0.2.8(abitype@1.2.3(typescript@5.8.2)(zod@3.25.56))(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))': - dependencies: - '@hey-api/client-fetch': 0.8.4 - '@zoralabs/protocol-deployments': 0.6.1 - abitype: 1.2.3(typescript@5.8.2)(zod@3.25.56) - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - '@zoralabs/protocol-deployments@0.6.1': {} JSONStream@1.3.5: @@ -14222,11 +13797,6 @@ snapshots: typescript: 5.8.2 zod: 4.3.6 - abitype@1.1.0(typescript@5.8.2)(zod@3.25.56): - optionalDependencies: - typescript: 5.8.2 - zod: 3.25.56 - abitype@1.1.0(typescript@5.8.2)(zod@4.3.6): optionalDependencies: typescript: 5.8.2 @@ -14470,12 +14040,6 @@ snapshots: dependencies: possible-typed-array-names: 1.1.0 - axios-mock-adapter@1.22.0(axios@1.12.2): - dependencies: - axios: 1.12.2 - fast-deep-equal: 3.1.3 - is-buffer: 2.0.5 - axios-retry@4.5.0(axios@1.12.2): dependencies: axios: 1.12.2 @@ -14594,17 +14158,6 @@ snapshots: dependencies: file-uri-to-path: 1.0.0 - bip32@4.0.0: - dependencies: - '@noble/hashes': 1.8.0 - '@scure/base': 1.2.6 - typeforce: 1.18.0 - wif: 2.0.6 - - bip39@3.1.0: - dependencies: - '@noble/hashes': 1.8.0 - bl@4.1.0: dependencies: buffer: 5.7.1 @@ -14700,12 +14253,6 @@ snapshots: dependencies: base-x: 5.0.1 - bs58check@2.1.2: - dependencies: - bs58: 4.0.1 - create-hash: 1.2.0 - safe-buffer: 5.2.1 - bser@2.1.1: dependencies: node-int64: 0.4.0 @@ -14839,26 +14386,8 @@ snapshots: ci-info@3.9.0: {} - cipher-base@1.0.6: - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - cjs-module-lexer@1.4.3: {} - clanker-sdk@4.1.19(@types/node@20.17.27)(typescript@5.8.2)(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)): - dependencies: - '@openzeppelin/merkle-tree': 1.0.8 - abitype: 1.0.8(typescript@5.8.2)(zod@3.25.56) - dotenv: 16.4.7 - inquirer: 8.2.7(@types/node@20.17.27) - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - zod: 3.25.56 - transitivePeerDependencies: - - '@types/node' - - supports-color - - typescript - clanker-sdk@4.1.19(@types/node@22.13.14)(typescript@5.8.2)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6)): dependencies: '@openzeppelin/merkle-tree': 1.0.8 @@ -14980,14 +14509,6 @@ snapshots: crc-32@1.2.2: {} - create-hash@1.2.0: - dependencies: - cipher-base: 1.0.6 - inherits: 2.0.4 - md5.js: 1.3.5 - ripemd160: 2.0.2 - sha.js: 2.4.11 - create-jest@29.7.0(@types/node@20.17.27)(ts-node@10.9.2(@types/node@20.17.27)(typescript@5.8.2)): dependencies: '@jest/types': 29.6.3 @@ -15239,10 +14760,6 @@ snapshots: '@noble/curves': 1.9.7 '@noble/hashes': 1.8.0 - ed2curve@0.3.0: - dependencies: - tweetnacl: 1.0.3 - ee-first@1.1.1: {} ejs@3.1.10: @@ -16161,12 +15678,6 @@ snapshots: has-unicode@2.0.1: {} - hash-base@3.1.0: - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.2 - safe-buffer: 5.2.1 - hash.js@1.1.7: dependencies: inherits: 2.0.4 @@ -16373,26 +15884,6 @@ snapshots: ini@1.3.8: {} - inquirer@8.2.7(@types/node@20.17.27): - dependencies: - '@inquirer/external-editor': 1.0.1(@types/node@20.17.27) - ansi-escapes: 4.3.2 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-width: 3.0.0 - figures: 3.2.0 - lodash: 4.17.21 - mute-stream: 0.0.8 - ora: 5.4.1 - run-async: 2.4.1 - rxjs: 7.8.2 - string-width: 4.2.3 - strip-ansi: 6.0.1 - through: 2.3.8 - wrap-ansi: 6.2.0 - transitivePeerDependencies: - - '@types/node' - inquirer@8.2.7(@types/node@22.13.14): dependencies: '@inquirer/external-editor': 1.0.1(@types/node@22.13.14) @@ -16557,8 +16048,6 @@ snapshots: is-buffer@1.1.6: {} - is-buffer@2.0.5: {} - is-callable@1.2.7: {} is-core-module@2.16.1: @@ -17337,8 +16826,6 @@ snapshots: jose@4.15.9: {} - jose@5.10.0: {} - jose@6.0.10: {} jose@6.2.2: {} @@ -17778,12 +17265,6 @@ snapshots: math-intrinsics@1.1.0: {} - md5.js@1.3.5: - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - md5@2.3.0: dependencies: charenc: 0.0.2 @@ -18491,21 +17972,6 @@ snapshots: transitivePeerDependencies: - zod - ox@0.9.6(typescript@5.8.2)(zod@3.25.56): - dependencies: - '@adraffy/ens-normalize': 1.11.1 - '@noble/ciphers': 1.3.0 - '@noble/curves': 1.9.1 - '@noble/hashes': 1.8.0 - '@scure/bip32': 1.7.0 - '@scure/bip39': 1.6.0 - abitype: 1.2.3(typescript@5.8.2)(zod@3.25.56) - eventemitter3: 5.0.1 - optionalDependencies: - typescript: 5.8.2 - transitivePeerDependencies: - - zod - ox@0.9.6(typescript@5.8.2)(zod@4.3.6): dependencies: '@adraffy/ens-normalize': 1.11.1 @@ -19093,11 +18559,6 @@ snapshots: dependencies: glob: 7.2.3 - ripemd160@2.0.2: - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - router@2.2.0: dependencies: debug: 4.4.3 @@ -19179,12 +18640,6 @@ snapshots: scrypt-js@3.0.1: {} - secp256k1@5.0.1: - dependencies: - elliptic: 6.6.1 - node-addon-api: 5.1.0 - node-gyp-build: 4.8.4 - secure-compare@3.0.1: {} seedrandom@3.0.5: {} @@ -19294,11 +18749,6 @@ snapshots: setprototypeof@1.2.0: {} - sha.js@2.4.11: - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - sha.js@2.4.12: dependencies: inherits: 2.0.4 @@ -19574,19 +19024,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - sushi@6.2.1(typescript@5.8.2)(viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))(zod@3.25.56): - dependencies: - '@uniswap/token-lists': 1.0.0-beta.33 - big.js: 6.1.1 - date-fns: 3.3.1 - seedrandom: 3.0.5 - tiny-invariant: 1.3.3 - toformat: 2.0.0 - optionalDependencies: - typescript: 5.8.2 - viem: 2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - zod: 3.25.56 - sushi@6.2.1(typescript@5.8.2)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))(zod@4.3.6): dependencies: '@uniswap/token-lists': 1.0.0-beta.33 @@ -19963,8 +19400,6 @@ snapshots: typescript: 5.8.2 yaml: 2.7.0 - typeforce@1.18.0: {} - typescript@5.8.2: {} uc.micro@2.1.0: {} @@ -20200,23 +19635,6 @@ snapshots: - utf-8-validate - zod - viem@2.38.3(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56): - dependencies: - '@noble/curves': 1.9.1 - '@noble/hashes': 1.8.0 - '@scure/bip32': 1.7.0 - '@scure/bip39': 1.6.0 - abitype: 1.1.0(typescript@5.8.2)(zod@3.25.56) - isows: 1.0.7(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - ox: 0.9.6(typescript@5.8.2)(zod@3.25.56) - ws: 8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) - optionalDependencies: - typescript: 5.8.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.22.4): dependencies: '@noble/curves': 1.9.1 @@ -20270,45 +19688,6 @@ snapshots: vlq@1.0.1: {} - wagmi@2.17.0(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))(zod@3.25.56): - dependencies: - '@tanstack/react-query': 5.89.0(react@18.3.1) - '@wagmi/connectors': 5.10.0(@wagmi/core@2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)))(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))(zod@3.25.56) - '@wagmi/core': 2.21.0(@tanstack/query-core@5.89.0)(react@18.3.1)(typescript@5.8.2)(use-sync-external-store@1.4.0(react@18.3.1))(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56)) - react: 18.3.1 - use-sync-external-store: 1.4.0(react@18.3.1) - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - optionalDependencies: - typescript: 5.8.2 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@tanstack/query-core' - - '@types/react' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - bufferutil - - db0 - - encoding - - immer - - ioredis - - supports-color - - uploadthing - - utf-8-validate - - zod - wagmi@2.17.0(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@4.3.6))(zod@3.25.56): dependencies: '@tanstack/react-query': 5.89.0(react@18.3.1) @@ -20521,10 +19900,6 @@ snapshots: dependencies: string-width: 4.2.3 - wif@2.0.6: - dependencies: - bs58check: 2.1.2 - word-wrap@1.2.5: {} wrap-ansi@6.2.0: @@ -20576,45 +19951,6 @@ snapshots: bufferutil: 4.0.9 utf-8-validate: 5.0.10 - x402-fetch@0.7.0(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)): - dependencies: - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - x402: 0.7.2(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - zod: 3.25.56 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@solana/sysvars' - - '@tanstack/query-core' - - '@tanstack/react-query' - - '@types/react' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - bufferutil - - db0 - - encoding - - fastestsmallesttextencoderdecoder - - immer - - ioredis - - react - - supports-color - - typescript - - uploadthing - - utf-8-validate - - ws - x402-fetch@0.7.0(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)): dependencies: viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) @@ -20654,106 +19990,12 @@ snapshots: - utf-8-validate - ws - x402@0.6.1(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)): - dependencies: - '@scure/base': 1.2.6 - '@solana-program/compute-budget': 0.8.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token': 0.5.1(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token-2022': 0.4.2(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) - '@solana/kit': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/transaction-confirmation': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - wagmi: 2.17.0(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))(zod@3.25.56) - zod: 3.25.56 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@solana/sysvars' - - '@tanstack/query-core' - - '@tanstack/react-query' - - '@types/react' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - bufferutil - - db0 - - encoding - - fastestsmallesttextencoderdecoder - - immer - - ioredis - - react - - supports-color - - typescript - - uploadthing - - utf-8-validate - - ws - - x402@0.7.2(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2))(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)): - dependencies: - '@scure/base': 1.2.6 - '@solana-program/compute-budget': 0.8.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token': 0.5.1(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token-2022': 0.4.2(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) - '@solana/kit': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/transaction-confirmation': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/wallet-standard-features': 1.3.0 - '@wallet-standard/app': 1.1.0 - '@wallet-standard/base': 1.1.0 - '@wallet-standard/features': 1.1.0 - viem: 2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56) - wagmi: 2.17.0(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.47.4(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.25.56))(zod@3.25.56) - zod: 3.25.56 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@capacitor/preferences' - - '@deno/kv' - - '@netlify/blobs' - - '@planetscale/database' - - '@react-native-async-storage/async-storage' - - '@solana/sysvars' - - '@tanstack/query-core' - - '@tanstack/react-query' - - '@types/react' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - bufferutil - - db0 - - encoding - - fastestsmallesttextencoderdecoder - - immer - - ioredis - - react - - supports-color - - typescript - - uploadthing - - utf-8-validate - - ws - x402@0.7.2(@tanstack/query-core@5.89.0)(@tanstack/react-query@5.89.0(react@18.3.1))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(react@18.3.1)(typescript@5.8.2)(utf-8-validate@5.0.10)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)): dependencies: '@scure/base': 1.2.6 '@solana-program/compute-budget': 0.8.0(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) '@solana-program/token': 0.5.1(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) - '@solana-program/token-2022': 0.4.2(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.5.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)) + '@solana-program/token-2022': 0.4.2(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) '@solana/kit': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@solana/transaction-confirmation': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.2)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@solana/wallet-standard-features': 1.3.0