Project Name: TronGRPC
Project Track: infra-security
Team Name: TronSave team
Team Member(s): @tronsave.io
Social Info:
Github
NPM
X - Twitter
Telegram
TronSave
SaveWallet
TronTools
Project Goal:
TronGRPC is a powerful GRPC client implementation for the TRON blockchain, developed by TronSave and SaveWallet. It provides a streamlined interface for interacting with TRON’s GRPC services, making it easier to build and integrate TRON-based applications.
The library offers a unified, seamless development experience for interacting with the TRON blockchain through GRPC. Built with TypeScript, it provides type-safe interactions and modern development features while maintaining high performance and reliability.
Unique Value Proposition:
- Full TypeScript support with complete type definitions
- Direct gRPC communication for better performance
- Comprehensive API coverage of TRON’s gRPC methods
- Optimized for tree-shaking and minimal bundle size
- Built-in utilities for common TRON operations
Project Demo: Available via NPM package
Current Progress (%): 20%
Technical & Governance Details: Open-source
Project Test Instructions:
npm i --save tron-grpc tslib google-protobuf
import { TronGrpcClient } from 'tron-grpc';
const client = new TronGrpcClient('grpc.trongrid.io:50051');
const account = await client.getAccount('TRxxxxxxxxxxx');
Technical Details:
GRPC Supported Methods
Account Methods
- getAccount - Get account information
- getAccountBalance - Get account balance at a specific block
- getAccountNet - Get account bandwidth information
- getAccountResource - Get account resource information
- createAccount - Create a new account
- updateAccount - Update account name
- accountPermissionUpdate - Update account permissions
- getAccountById - Get account by ID
- getAccountAssets - Get all assets owned by account
- getAccountNotExists - Check if account doesn’t exist
Transaction Methods
- createTransaction - Create a TRX transfer transaction
- getTransaction - Get transaction by ID
- getTransactionInfo - Get transaction info by ID
- getTransactionById - Get transaction details by ID
- getTransactionInfoByBlockNum - Get all transaction info in a block
- getTransactionCountByBlockNum - Get transaction count in a block
- broadcastTransaction - Broadcast signed transaction
- getTransactionSignWeight - Get transaction sign weight
- getTransactionApprovedList - Get transaction approved list
- getTransactionFromPending - Get transaction from pending pool
- getTransactionListFromPending - Get all transactions from pending pool
Block Methods
- getNowBlock - Get current block
- getBlockByNum - Get block by number
- getBlockById - Get block by ID
- getBlockByLimitNext - Get blocks between start and end
- getBlockByLatestNum - Get latest N blocks
- getBlock - Get block by number with details option
- getBlockBalanceTrace - Get block balance changes
Smart Contract Methods
- getContract - Get contract code
- getContractInfo - Get contract information
- triggerContract - Trigger smart contract
- triggerConstantContract - Trigger constant contract (view/pure)
- estimateEnergy - Estimate energy cost for contract call
- updateSetting - Update contract consume_user_resource_percent
- updateEnergyLimit - Update contract origin_energy_limit
- clearContractABI - Clear contract ABI
- deployContract - Deploy new smart contract
Resource Methods
- freezeBalanceV2 - Freeze TRX for resources (V2)
- unfreezeBalance - Unfreeze TRX (legacy)
- unfreezeBalanceV2 - Unfreeze TRX (V2)
- withdrawExpireUnfreeze - Withdraw expired unfrozen TRX
- getDelegatedResourceV2 - Get resource delegation info
- delegateResource - Delegate resources to another account
- unDelegateResource - Undelegate resources
- cancelAllUnfreezeV2 - Cancel all unfreezing transactions
- getDelegatedResourceAccountIndex - Get delegated resource index
- getDelegatedResourceAccountIndexV2 - Get delegated resource index V2
Asset Methods
- transferAsset - Transfer TRC10 tokens
- updateAsset - Update TRC10 token parameters
- getAssetIssueByAccount - Get account’s TRC10 tokens
- createAssetIssue - Create new TRC10 token
- participateAssetIssue - Participate in TRC10 token sale
- getAssetIssueByName - Get TRC10 token by name
- getAssetIssueListByName - Get TRC10 tokens by name
- getAssetIssueById - Get TRC10 token by ID
- getAssetIssueList - Get all TRC10 tokens
- getPaginatedAssetIssueList - Get paginated TRC10 tokens
Witness (Super Representative) Methods
- createWitness - Apply for Super Representative
- updateWitness - Update SR URL
- voteWitness - Vote for SR
- getListWitnesses - Get all SR list
- updateBrokerage - Update SR brokerage
- getBrokerageInfo - Get SR brokerage info
- getRewardInfo - Get SR rewards
- withdrawBalance - Withdraw SR rewards
Network Methods
- listNodes - List all nodes
- getNodeInfo - Get node information
- getBandwidthPrices - Get bandwidth prices
- getEnergyPrices - Get energy prices
- getMemoFee - Get memo fee
- getBurnTrx - Get burned TRX amount
- getChainParameters - Get chain parameters
- totalTransaction - Get total transaction count
- getNextMaintenanceTime - Get next maintenance time
- getConnectedNodes - Get connected node list
- getBlockProduction - Get block production stats
- getNodeMetrics - Get node performance metrics
- getNetworkResources - Get network resource status
Proposal Methods
- getProposalList - Get all proposals
- getPaginatedProposalList - Get paginated proposals
- getProposalById - Get proposal by ID
- createProposal - Create new network proposal
- approveProposal - Approve network proposal
- deleteProposal - Delete network proposal
- getChainConfig - Get current chain configuration
Resource Query Methods
- getCanDelegatedMaxSize - Get max delegatable size
- getAvailableUnfreezeCount - Get available unfreeze count
- getCanWithdrawUnfreezeAmount - Get withdrawable unfreeze amount
Market Methods
- getMarketOrderById - Get market order by ID
- getMarketOrderByAccount - Get market orders by account
- getMarketPriceByPair - Get market price by pair
- getMarketOrderListByPair - Get market orders by pair
- getMarketPairList - Get all market pairs
Exchange Methods
- getExchangeById - Get exchange by ID
- getExchangeByAccount - Get exchanges by account
- getExchangeList - Get all exchanges
- getPaginatedExchangeList - Get paginated exchanges
- createExchange - Create new exchange
- injectExchange - Inject capital into exchange
- withdrawExchange - Withdraw capital from exchange
- tradeExchange - Trade on exchange
Tech Stack:
- TypeScript
- gRPC
- Protocol Buffers
- @grpc/grpc-js
- @noble/hashes
- @scure/base
Funding & Business Model
Revenue Model:
- Open source infrastructure
- Enterprise support and custom implementations
- Integration consulting
Ecosystem Impact
Time on TRON: New project specifically built for TRON ecosystem
Project Benefits:
- Improved developer experience with TypeScript support
- Better performance through direct gRPC communication
- Reduced bundle size through optimization\
- Built-in utilities for common operations
Project Milestones
Current Features:
- Full TypeScript support
- Complete gRPC method coverage
- Built-in utilities
Upcoming Features:
- Optimized bundle size
- Tree-shaking support
- Fully support utility function like tronweb
- Batch operation support
- Automatic retry mechanisms
- Rate limiting
- Connection pooling
- Enhanced error handling
- More utility functions
- Additional helper methods
- Integration examples
- Comprehensive documentation
Project in 5 Years:
- Industry standard for TRON blockchain interaction
- Extended protocol support
- Enterprise-grade features
- Comprehensive tooling ecosystem
- Multiple language implementations