Metadata-Version: 2.4
Name: langchain-near-verify-account
Version: 0.1.0
Summary: LangChain tool to verify NEAR Protocol accounts
License: MIT
Project-URL: Repository, https://github.com/aurora-neuro-star/langchain-near-verify-account
Project-URL: Homepage, https://market.near.ai
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: langchain>=0.2.0
Requires-Dist: httpx>=0.27.0

# langchain-near-verify-account

LangChain tool to verify NEAR Protocol accounts by querying the NEAR RPC.

## Installation

```bash
pip install langchain-near-verify-account
```

## Usage

### Synchronous

```python
from langchain_near_verify_account import NearVerifyAccountTool

tool = NearVerifyAccountTool()
result = tool.invoke({"account_id": "alice.near"})
print(result)
```

### Asynchronous

```python
from langchain_near_verify_account import NearVerifyAccountTool

tool = NearVerifyAccountTool()
result = await tool.ainvoke({"account_id": "alice.near"})
print(result)
```

### In a LangChain Agent

```python
from langchain.agents import create_tool_calling_agent, AgentExecutor
from langchain_openai import ChatOpenAI
from langchain_near_verify_account import NearVerifyAccountTool

llm = ChatOpenAI(model="gpt-4")
tools = [NearVerifyAccountTool()]
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)

result = executor.invoke({"input": "Verify the NEAR account alice.near"})
```

## API

### `NearVerifyAccountTool`

- **name**: `near_verify_account`
- **description**: Verify a NEAR account by account ID. Returns account details and verification status.
- **Input**: `account_id` (str) — The NEAR account ID (e.g., 'alice.near')
- **Output**: JSON string with account details (balance, locked, codeHash, storageUsage, blockHeight)

## License

MIT
