Rust implementation of the Tron Network Whitepaper.
LGPL-3.0 License
Rust implementation of the Tron gRPC API client, and a command line wallet.
This project is under active development.
> # install rust-nightly
> curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
> rustup component add rustfmt
> # install protoc
> brew install protobuf # macOS
> sudo pacman -S protobuf # ArchLinux
> sudo apt install protobuf-compiler libprotobuf-dev # Ubuntu / Debian
> # get code
> git clone --recurse-submodules https://github.com/andelf/rust-tron.git
> # compile tools
> cd ./rust-tron/
> cargo build --all
> # time to rock !!!
> ./target/debug/wallet-cli --help
> # or use testnet toolset
> ./nile-wallet-cli.sh
A command-line tool which let developers interact Tron Protocol as well as deploy, test smart contracts.
NOTE: Always use
--help
to get hint about how to use the command.
set account_name
set account_permission
system freeze
system unfreeze
transfer
asset transfer
asset issue
asset update
asset participate
asset unfreeze
contract create
contract call
contract update
contract update
contract clear_abi
system vote_witness
system create_witness
system update_witness
system withdraw_reward
- withdraw SR rewardssystem update_brokerage
system create_proposal
system approve_proposal
system disapprove_proposal
system delete_proposal
get subcommand
account Retrieve an account from the blockchain
account_permission Retrieve account permision info from the blockchain
account_resource Retrieve energy and bandwidth usage of an account
asset Get details of a TRC10 token
block Retrieve a full block from the blockchain
brokerage Get brokerage info, voting sharing ratio
contract Get details of a smart contract
node Get current connected node state information
proposal Get details of a proposal
reward Get reward info, the unwithdrawn voting reward
transaction Retrieve a transaction from the blockchain
transaction_info Retrieve receipt of atransaction
list subcommand
asset Retrieve list of all tokens
exchange Retrive list of all exchanges
node List the nodes which is connecting to the network
parameter List chain parameters
proposal Retrive list of all proposals
witness Query the list of Super Representatives
> ./target/debug/wallet-cli wallet create --password YOUR_PASSWORD
Wallet created!
> ./target/debug/wallet-cli wallet open
Wallet opened!
> ./target/debug/wallet-cli wallet create_key # create a random key
Address: TMd3p......4JstUBsxen
Public: f19f2d5b2c4067a.......7f0d1faaa094a23704d9
Private: 884f5218eb5da..............6809aa8da19d406
> ./target/debug/wallet-cli wallet keys # list all keys
......(omitted)......
> ./target/debug/wallet-cli wallet --help # get help
FLAGS:
-d, --dont-broadcast Don't broadcast transaction to the network (just print to stdout)
-h, --help Prints help information
-s, --skip-sign Skip actual sign process
OPTIONS:
-k, --account <account> The account address used for signing
-x, --expiration <expiration> Set the time in seconds before a transaction expires
--fee-limit <fee-limit> Maximum value of TRX allowed consumed
--permission-id <permission-id> Permission id used by transaction [possible values: 0, 2, 1]
-K, --private-key <private-key> The private key used for signing
-r, --ref-block <ref-block> Set the reference block num or block id used for TAPOS