Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_near_verify_account-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file langchain_near_verify_account-0.1.0.tar.gz.

File metadata

File hashes

Hashes for langchain_near_verify_account-0.1.0.tar.gz
Algorithm Hash digest
SHA256 780f5b9a30a943e131987b59e907959716b019b682b49b1ac9b0b17dd527e743
MD5 036acf5ea2ce7a77be8cff2c18fa55e4
BLAKE2b-256 59b798741986eff2d5ce518be5dae6c6f2989fd7a57dda934f197d52f3e7afe5

See more details on using hashes here.

File details

Details for the file langchain_near_verify_account-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_near_verify_account-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd92829d00c99f2c53cc74abf9496be1fa3bdd3bdfeaab036dce7ec6d797c02
MD5 004c935b3dd505e63520df1f9bca60ef
BLAKE2b-256 7f7970c3af2d2697f61355630cc17542b08aa1c963d800e9feeb5d0cb8230f9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page