HomeGuidesAPI ReferenceChangelog
GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange Log
Guides

API

API is mainly used for client development and supports developers to design their own token distribution platform.

Address (Public Key)

The address is also the public key. The public key and the private key are a key pair obtained via a hash algorithm. The public key is the part exposed in the key pair and the private key is the non-public part. The public key is usually used to encrypt the session secret. Digital signature verification and data decryption can be performed with the corresponding private key.

Application Layer

Developers can use interfaces to easily implement rich DApps and personalized wallets. The wave field protocol is completely defined using Google Protobuf, which naturally supports multi-language extensions.

Bandwidth

Excessive insignificant transactions cause network congestion similar to Ethereum, which delays transaction confirmation. To avoid blocking the network, the TRON network allows each account to initiate a limited number of transactions for free, and higher transaction frequencies require bandwidth points. The bandwidth points are the same as TRON Power (TP), which is obtained by freezing funds. The transaction is transmitted and stored in the form of a byte array in the network. The Bandwidth Points consumed by a transaction is the size of the byte array in this transaction. If the byte array length of a transaction is 100, then the transaction needs to consume 100 Bandwidth Points.

Block

Blocks are used to store your data record transaction information. A complete block includes block sizes, block headers, transaction counters, and transactions. When a transaction is broadcast to the network, the nodes pick up the transaction. Either miners (PoW) or SRs (DPoS) perform the work on hashing the transaction. Once the correct hash is calculated, which fits the block header format, that block is added to the previous block.

Block Rewards

The super representative's block rewards are stored in a sub-account, and the super representative can apply from Tronscan.

Content Delivery Network

The full name of the CDN is the Content Delivery Network, the content distribution network. The basic idea is to avoid the bottlenecks and links on the Internet that may affect the speed and stability of data transmission so that the content transmission is faster and more stable.

Cold Wallet

Cold wallets rely on "cold" devices (non-networked computers, mobile phones, etc.) to ensure the security of the TRX private key, using QR code communication to make the private key not touch the net.

Consensus Mechanism

The consensus mechanism is to complete the verification and confirmation of the transaction in a short period of time through the voting of the special node; for a transaction, if several nodes with irrelevant interests can reach a consensus, then the entire network can reach a consensus.

Core Layer

TRON includes modules for smart contracts, account management, and consensus. TRON will implement a stack-based virtual machine with an optimized instruction set.

Decentralized Applications (DApps)

A decentralized application is an application that runs on a decentralized P2P network. Since DApps do not depend on a central entity for functioning, this eliminates the risk of a single point of failure. Records and data from DApps are also stored on the blockchain.

Freeze Operation

Freezes a specified number of TRX to get TRON Power to vote. Freeze also generates Bandwidth. The amount of Bandwidth generated by freezing is the amount of frozen TRX multiplied by the corresponding number of frozen days. Bandwidth is used to trade and execute smart contracts. Frozen TRX cannot be circulated and cannot be used for transaction transfers.

Google Protobuf

ProtoBuf is a flexible and efficient language-independent structured data representation method that can be used to represent communication protocols and data storage. Compared to XML, ProtoBuF is smaller, faster and simpler. You can use the ProtoBuf compiler to generate source code for specific languages ​​(such as C++, Java, Python, etc., ProtoBuf currently supports mainstream programming languages) for serialization and deserialization.

GRPC

GRPC is a language-neutral, platform-neutral, open source remote procedure call (RPC) system. In gRPC, a client application can directly call a server-side application on a different machine as if it were a local object, making it easier to create distributed applications and services. Like many RPC systems, gRPC is based on the idea of ​​defining a service that specifies the methods (including parameters and return types) that can be called remotely. Implement this interface on the server side and run a gRPC server to handle client calls. Having a stub on the client can be the same as the server.

Hot Wallet

Known as an online wallet or a networked wallet, it is a wallet that the network can access the user's private key. Outsiders may access the user's private key over the Internet, so security is lower than the cold wallet, but more convenient.

JDK

JDK is a software development kit for the Java language, primarily for Java applications on mobile devices and embedded devices. JDK is the core of the entire Java development, it contains the JAVA runtime environment (JVM + Java system class library) and JAVA tools.

KhaosDB

The KhaosDB used by TRON stores all newly generated bifurcation chains for a certain period of time. When there is a need to switch the main chain, with the support of KhaosDB, the verification node can quickly switch the effective chain to the new main chain.

Level DB

In order to meet both access speed and rapid development requirements, TRON will adopt Level DB in the early stage of development. After the Mainnet went online, TRON upgraded the database according to actual needs, making TRON a fully tailored database.

Private Testnet

Test private network: Other developers configure their own network id, server ip, and test according to the tutorial deployment files provided by TRON. Only developers participating in the deployment have access.

RPC

Remote Procedure Call (RPC) is a protocol one program can use to request a service from a program located in another computer on a network without having to understand the network's details. A procedure call is also sometimes known as a function call or a subroutine call.

Scalability

Scalability is one of the features of a wavelength network. Being scalable means that a system or network has the ability to handle an increasing amount of work, or has the potential to expand through this capability.

Smart Contracts

A smart contract is a computer protocol with a purpose to digitally verify the negotiation of a contract. They not only define the rules and penalties related to an agreement in the same way that a traditional contract does, but it can also automatically enforce those obligations. If and when the pre-defined rules are met, the agreement is automatically enforced. The smart contract code facilitates, verifies, and enforces the negotiation or performance of an agreement or transaction. It is the simplest form of decentralized automation.

Storage Layer

TRON's technical team designed a unique distributed storage protocol for TRON, including block storage and state storage. In the design of the storage layer, TRON introduced the idea of ​​a graph database to more easily meet the needs of real-world diverse data storage.

TRC20

TRC‌-20 is a technical standard used for smart contracts on the TRON blockchain for implementing tokens with the TRON Virtual Machine (TVM). It’s fully compatible to ERC‌-20. Interface is as follows:

contract TRC20Interface {
    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

TRC10

TRC10 is a technical token standard supported by TRON blockchain natively, without TRON Virtual Machine (TVM). Interface: Coming soon.