Metadata-Version: 2.4
Name: cryptocom-tools-core
Version: 2.0.0
Summary: Core base classes for Crypto.com Developer Platform tools
Author-email: "Crypto.com" <support@crypto.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/crypto-com/agent-client-py
Project-URL: Documentation, https://github.com/crypto-com/agent-client-py
Project-URL: Repository, https://github.com/crypto-com/agent-client-py
Project-URL: Bug Tracker, https://github.com/crypto-com/agent-client-py/issues
Keywords: blockchain,crypto,cronos,tools,langchain
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain-core>=0.2.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: typing_extensions>=4.0.0
Provides-Extra: cdp
Requires-Dist: crypto-com-developer-platform-client>=0.1.0; extra == "cdp"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: basedpyright>=1.13.0; extra == "dev"
Dynamic: license-file

# cryptocom-tools-core

Core base classes for Crypto.com Developer Platform tools.

## Installation

```bash
pip install cryptocom-tools-core
```

## Usage

```python
from cryptocom_tools_core import CDPTool, BalanceResult
from pydantic import BaseModel, Field

class GetBalanceInput(BaseModel):
    address: str = Field(description="Wallet address")

class GetBalanceTool(CDPTool):
    name: str = "get_balance"
    description: str = "Get native token balance"
    args_schema: type[BaseModel] = GetBalanceInput

    def _run(self, address: str) -> str:
        # Your implementation
        return str(BalanceResult(address=address, balance="100", unit="CRO"))

# Use with LangChain
tool = GetBalanceTool(api_key="your-api-key")

# Or export to OpenAI/Anthropic via adapters
from cryptocom_tool_adapters import to_openai_function
openai_tool = to_openai_function(tool)
```

## Exports

- `CDPTool` - Base class extending LangChain BaseTool with CDP API key injection
- `ToolResult` - Base class for structured tool outputs
- `BalanceResult` - Result type for balance queries
- `TransactionResult` - Result type for transaction queries
- `TickerResult` - Result type for exchange ticker queries
