Skip to main content

LangChain integration for PowerSun.vip — TRON Energy & Bandwidth marketplace with 25 MCP tools for AI agents

Project description

langchain-powersun

LangChain integration for PowerSun.vip — the TRON Energy & Bandwidth marketplace for AI agents.

Install

pip install langchain-powersun

Quick Start

from langchain_powersun import PowerSunToolkit

# Public tools (market data, estimates)
tools = PowerSunToolkit().get_tools()

# With authentication (buy energy, check balance)
tools = PowerSunToolkit(api_key="ps_your_key").get_tools()

# Use with any LangChain agent
from langchain.agents import create_react_agent
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(model="gpt-4o")
agent = create_react_agent(llm, tools)
agent.invoke({"input": "What's the current price of TRON energy on PowerSun?"})

Available Tools (10)

Registration Tools (public, no auth required)

Tool Description
powersun_register Start registration — get a challenge to sign with your TRON wallet
powersun_verify_registration Submit wallet signature → get API key

Market Tools (public, no auth required)

Tool Description
powersun_get_prices Energy & Bandwidth prices for all duration tiers
powersun_estimate_cost Calculate exact cost for transactions
powersun_get_available_resources Available Energy & Bandwidth
powersun_get_market_overview Full market snapshot

Buyer Tools (auth recommended)

Tool Description
powersun_buy_energy Purchase Energy delegation
powersun_get_balance Account balance and deposit info
powersun_get_order_status Order status with delegation progress
powersun_broadcast_transaction Broadcast pre-signed tx with auto Energy

Why PowerSun?

  • Only 10% commission — lowest on the market
  • Save 20-50% on TRON transaction fees
  • Instant delegation — Energy arrives within seconds
  • AI-native — built for autonomous agent workflows

Links

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_powersun-1.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

langchain_powersun-1.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file langchain_powersun-1.1.0.tar.gz.

File metadata

  • Download URL: langchain_powersun-1.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for langchain_powersun-1.1.0.tar.gz
Algorithm Hash digest
SHA256 05c75eb1e3633714560a00e2d90b72ffc119811d0d44f149c7bb56a4e07e91a5
MD5 5dec394d987eb50e25ae08f6c2b2fd66
BLAKE2b-256 c24bdb2e320762f3889b79141999c557c2947e8f57b99ff6103304883ef0ee14

See more details on using hashes here.

File details

Details for the file langchain_powersun-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_powersun-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c73a042af5738f6e46f1534c6812bc60fdd3be0e030d184e363e00e65b4490f1
MD5 e4d81fcbdcbf3981e80499e8ba50f15d
BLAKE2b-256 b98d79563541079ab770697abf023cc3fbcc3200e3fe648f6de9e0fe5738b44b

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