LangChain tool to verify NEAR Protocol accounts
Project description
langchain-near-verify-account
LangChain tool to verify NEAR Protocol accounts by querying the NEAR RPC.
Installation
pip install langchain-near-verify-account
Usage
Synchronous
from langchain_near_verify_account import NearVerifyAccountTool
tool = NearVerifyAccountTool()
result = tool.invoke({"account_id": "alice.near"})
print(result)
Asynchronous
from langchain_near_verify_account import NearVerifyAccountTool
tool = NearVerifyAccountTool()
result = await tool.ainvoke({"account_id": "alice.near"})
print(result)
In a LangChain Agent
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_near_verify_account-0.1.0.tar.gz.
File metadata
- Download URL: langchain_near_verify_account-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
780f5b9a30a943e131987b59e907959716b019b682b49b1ac9b0b17dd527e743
|
|
| MD5 |
036acf5ea2ce7a77be8cff2c18fa55e4
|
|
| BLAKE2b-256 |
59b798741986eff2d5ce518be5dae6c6f2989fd7a57dda934f197d52f3e7afe5
|
File details
Details for the file langchain_near_verify_account-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_near_verify_account-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dd92829d00c99f2c53cc74abf9496be1fa3bdd3bdfeaab036dce7ec6d797c02
|
|
| MD5 |
004c935b3dd505e63520df1f9bca60ef
|
|
| BLAKE2b-256 |
7f7970c3af2d2697f61355630cc17542b08aa1c963d800e9feeb5d0cb8230f9e
|