SDK

Official TronSave SDKs for buying and managing Energy and Bandwidth on TRON — available for TypeScript, Rust, Python, Java, and PHP.

The TronSave SDKs let you interact with the TronSave API to manage resources (Energy and Bandwidth) on the TRON blockchain. Each SDK exposes strongly-typed functions for estimating costs, buying resources, extending orders, and tracking order status, and integrates cleanly into backend services.

Prefer to call the HTTP API directly? See the API Reference. The SDKs wrap the same endpoints documented there.

Available SDKs

All SDKs target the v2 API.

Language
Package
Registry
Latest

TypeScript / JS

tronsave-sdk

Rust

tronsave

2.0.0

Python

tronsave

2.0.0

Java

io.tronsave:sdk

2.0.0

PHP

tronsave/sdk

2.0.0

Install

npm install tronsave-sdk
# or: yarn add tronsave-sdk

Requires Node.js v18.0.0+.

Basic usage

The fastest way to get started is the API Key flow: create an SDK instance, estimate the cost, then place an order. Get an API key from the TronSave dashboard — see Authentication.

Features

All SDKs provide the following operations:

  • Buy Resource — buy Energy or Bandwidth.

  • Estimate Buy Resource — estimate the cost of a purchase before ordering.

  • Extend Request — extend an existing resource delegation.

  • Get Extendable Delegates — list delegates that can be extended.

  • Get User Info — fetch account information and balance.

  • Get Order / Get Orders — fetch order details and order history.

  • Get Order Book — read the current order book.

Last updated