@@ -610,7 +610,7 @@ Create account
610
610
611
611
4. Tap GENERATE ADDRESS AND PRIVATE KEY and tap OK after reading the information page.
612
612
613
- .. image :: ( https://raw.githubusercontent.com/tronprotocol/Documentation/master/images/Wallet_for_Android/创建钱包账户/4.png
613
+ .. image :: https://raw.githubusercontent.com/tronprotocol/Documentation/master/images/Wallet_for_Android/创建钱包账户/4.png
614
614
:width: 842px
615
615
:height: 1496px
616
616
:align: center
@@ -805,18 +805,17 @@ Check history
805
805
Wallet-Cli
806
806
----------
807
807
808
- # wallet-cli [](https://travis-ci.org/tronprotocol/wallet-cli)
809
- Wallet CLI
808
+ Download wallet-cli
809
+ ~~~~~~~~~~~~~~~~~~~
810
810
811
+ git clone https://github.com/tronprotocol/wallet-cli.git
811
812
812
- Download wallet-cli
813
- ---------------------------------
814
- git clone https://github.com/tronprotocol/wallet-cli.git
815
813
814
+ Edit config.conf in src/main/resources
815
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
816
+
817
+ .. code-block :: shell
816
818
817
- Edit config.conf in src/main/resources
818
- ----------------------------------------
819
- ```
820
819
net {
821
820
type = mainnet
822
821
#type = testnet
@@ -834,46 +833,46 @@ soliditynode = {
834
833
]
835
834
}//note: solidity node is optional
836
835
837
- ` ``
838
836
Build and run wallet-cli by command line
839
- ----------------------------------------
840
- Create a new command line terminal window.
837
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
838
+ Create a new command line terminal window.
839
+
840
+ .. code-block :: shell
841
841
842
- ```
843
842
cd wallet-cli
844
843
./gradlew build
845
844
./gradlew run
846
- ` ``
847
845
848
846
Build and run web wallet
849
- ----------------------------------------
850
- `` `
847
+ ~~~~~~~~~~~~~~~~~~~~~~~~
848
+
851
849
cd wallet-cli
852
850
./gradlew build
853
851
cd build/libs
854
852
java -jar wallet-cli.jar
855
- ` ``
856
853
857
854
858
855
How wallet-cli connects to java-tron :
859
- --------------------------------------
860
- Wallet-cli connect to java-tron by grpc protocol.
861
- Java-tron nodes can be deployed locally or remotely.
862
- We can set the connected java -tron node IP in config.conf of wallet-cli .
856
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
857
+ Wallet-cli connect to java-tron by grpc protocol.
858
+
859
+ Java -tron nodes can be deployed locally or remotely .
863
860
861
+ We can set the connected java-tron node IP in config.conf of wallet-cli.
864
862
865
- Wallet-cli supported command list:
866
- ----------------------------------
867
863
868
- RegisterWallet
864
+ Wallet-cli supported command list:
865
+ ----------------------------------
866
+
867
+ RegisterWallet
869
868
RegisterWallet Password
870
869
Register a wallet in local.
871
- Generate a pair of ecc keys.
872
- Derive a AES Key by password and then use the AES algorithm to encrypt and save the private key.
873
- The account address is calculated by the public key sha3-256, and taking the last 20 bytes.
874
- All subsequent operations that require the use of a private key must enter the password.
870
+ Generate a pair of ecc keys.
871
+ Derive a AES Key by password and then use the AES algorithm to encrypt and save the private key.
872
+ The account address is calculated by the public key sha3-256, and taking the last 20 bytes.
873
+ All subsequent operations that require the use of a private key must enter the password.
875
874
876
- ImportWallet
875
+ ImportWallet
877
876
ImportwalletByBase64
878
877
ChangePassword
879
878
Login
@@ -907,117 +906,121 @@ help
907
906
Input any one of then, you will get more tips.
908
907
909
908
910
- How to freeze/unfreeze balance
911
- ----------------------------------
909
+ How to freeze/unfreeze balance
910
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
912
911
913
- After the funds are frozen, the corresponding number of shares and bandwidth will be obtained.
914
- Shares can be used for voting and bandwidth can be used for trading.
915
- The rules for the use and calculation of share and bandwidth are described later in this article.
912
+ After the funds are frozen, the corresponding number of shares and bandwidth will be obtained.
913
+ Shares can be used for voting and bandwidth can be used for trading.
914
+ The rules for the use and calculation of share and bandwidth are described later in this article.
916
915
917
916
918
917
**Freeze operation is as follows: **
919
918
920
- ```
919
+ .. code-block :: shell
920
+
921
921
freezebalance password amount time
922
- ```
923
922
924
923
*amount:The amount of frozen funds,the unit is drop.
925
- The minimum value is **1000000 drop(1TRX)* *.*
924
+
925
+ The minimum value is **1000000 drop(1TRX) **.*
926
926
927
927
*time:Freeze time, this value is currently only allowed for **3 days** *
928
928
929
929
930
930
For example:
931
- ```
932
- freezebalance 123455 10000000 3
933
- ```
934
931
932
+ .. code-block :: shell
933
+
934
+ freezebalance 123455 10000000 3
935
935
936
936
After the freeze operation,frozen funds will be transferred from Account Balance to Frozen,
937
- You can view frozen funds from your account information.
938
- After being unfrozen, it is transferred back to Balance by Frozen, and the frozen funds cannot be used for trading.
939
937
938
+ You can view frozen funds from your account information.
939
+
940
+ After being unfrozen, it is transferred back to Balance by Frozen, and the frozen funds cannot be used for trading.
941
+
942
+ When more share or bandwidth is needed temporarily, additional funds may be frozen to obtain additional share and bandwidth.
940
943
941
- When more share or bandwidth is needed temporarily, additional funds may be frozen to obtain additional share and bandwidth.
942
- The unfrozen time is postponed until 3 days after the last freeze operation
944
+ The unfrozen time is postponed until 3 days after the last freeze operation
943
945
944
946
After the freezing time expires, funds can be unfroze.
945
947
946
948
947
949
**Unfreeze operation is as follows: **
948
- ```
949
- unfreezebalance password
950
- ```
951
950
951
+ .. code-block :: shell
952
+
953
+ unfreezebalance password
952
954
953
955
954
956
How to vote
955
- ----------------------------------
957
+ ~~~~~~~~~~~
956
958
957
- Voting requires share. Share can be obtained by freezing funds.
959
+ Voting requires share. Share can be obtained by freezing funds.
958
960
959
961
- The share calculation method is: **1 ** unit of share can be obtained for every **1TRX ** frozen.
960
962
- After unfreezing, previous vote will expire. You can avoid the invalidation of the vote by re-freezing and voting.
961
963
962
964
**Note: ** The Tron Network only records the status of your last vote, which means that each of your votes will cover all previous voting results.
963
965
964
- For example:
966
+ For example:
967
+
968
+ .. code-block :: shell
965
969
966
- ```
967
- freezebalance 123455 10000000 3 // Freeze 10TRX and acquire 10 units of shares
970
+ freezebalance 123455 10000000 3 // Freeze 10TRX and acquire 10 units of shares
968
971
969
- votewitness 123455 witness1 4 witness2 6 // Cast 4 votes for witness1 and 6 votes for witness2 at the same time.
972
+ votewitness 123455 witness1 4 witness2 6 // Cast 4 votes for witness1 and 6 votes for witness2 at the same time.
973
+
974
+ votewitness 123455 witness1 10 // Voted 10 votes for witness1.
970
975
971
- votewitness 123455 witness1 10 // Voted 10 votes for witness1.
972
- ```
973
976
974
977
The final result of the above command was 10 votes for witness1 and 0 votes for witness2.
975
978
979
+ How to calculate bandwidth
980
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
976
981
982
+ The bandwidth calculation rule is:
977
983
978
- How to calculate bandwidth
979
- ----------------------------------
984
+ .. code-block :: shell
980
985
981
- The bandwidth calculation rule is:
982
- ```
983
986
constant * FrozenFunds * days
984
- ```
987
+
985
988
Assuming freeze 1TRX(1_000_000 DROP),3 days,bandwidth obtained = 1* 1_000_000 * 3 = 3_000_000.
986
989
987
- Any contract needs to consume bandwidth, including transfer, transfer of assets, voting, freezing, etc.
988
- The query does not consume bandwidth, and each contract needs to consume **100_000 bandwidth **.
990
+ Any contract needs to consume bandwidth, including transfer, transfer of assets, voting, freezing, etc.
991
+ The query does not consume bandwidth, and each contract needs to consume **100_000 bandwidth **.
989
992
990
993
If the previous contract exceeds a certain time (**10s **), this operation does not consume bandwidth.
991
994
992
- When the unfreezing operation occurs, the bandwidth is not cleared.
993
- The next time the freeze is performed, the newly added bandwidth is accumulated.
994
-
995
+ When the unfreezing operation occurs, the bandwidth is not cleared.
996
+ The next time the freeze is performed, the newly added bandwidth is accumulated.
995
997
996
- How to withdraw balance
997
- ----------------------------------
998
+ How to withdraw balance
999
+ ~~~~~~~~~~~~~~~~~~~~~~~
998
1000
999
- After each block is produced, the block award is sent to the account's allowance,
1001
+ After each block is produced, the block award is sent to the account's allowance,
1000
1002
and an withdraw operation is allowed every **24 hours ** from allowance to balance.
1001
- The funds in allowance cannot be locked or traded.
1003
+ The funds in allowance cannot be locked or traded.
1002
1004
1003
1005
1004
- How to create witness
1005
- ----------------------------------
1006
- Applying to become a witness account needs to consume **100_000TRX **.
1006
+ How to create witness
1007
+ ~~~~~~~~~~~~~~~~~~~~~
1008
+
1009
+ Applying to become a witness account needs to consume **100_000TRX **.
1007
1010
This part of the funds will be burned directly.
1008
1011
1012
+ How to create account
1013
+ ~~~~~~~~~~~~~~~~~~~~~~
1009
1014
1010
- How to create account
1011
- ----------------------------------
1012
- It is not allowed to create accounts directly. You can only create accounts by transferring funds to non-existing accounts.
1013
- Transfer to a non-existent account with a minimum transfer amount of **1TRX **.
1015
+ It is not allowed to create accounts directly. You can only create accounts by transferring funds to non-existing accounts.
1016
+ Transfer to a non-existent account with a minimum transfer amount of **1TRX **.
1014
1017
1015
1018
Command line operation flow example
1016
- -----------------------------------
1019
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1017
1020
1018
- cd wallet-cli
1019
- ./gradlew build
1020
- ./gradlew run
1021
+ cd wallet-cli
1022
+ ./gradlew build
1023
+ ./gradlew run
1021
1024
RegisterWallet 123456 (password = 123456)
1022
1025
login 123456
1023
1026
getAddress (Print 'address = f286522619d962e6f93235ca27b2cb67a9e5c27b', backup it)
@@ -1027,14 +1030,14 @@ getbalance (Print 'Balance = 0')
1027
1030
getbalance
1028
1031
1029
1032
assetIssue 123456 testAssetIssue00001 10000000000000000 1 100 2018-4-1 2018-4-30 1 just-test https://github.com/tronprotocol/wallet-cli/
1030
- getaccount f286522619d962e6f93235ca27b2cb67a9e5c27b
1033
+ getaccount f286522619d962e6f93235ca27b2cb67a9e5c27b
1031
1034
(Print balance: 9999900000
1032
1035
asset {
1033
- key: "testAssetIssue00001"
1034
- value: 10000000000000000
1036
+ key: "testAssetIssue00001"
1037
+ value: 10000000000000000
1035
1038
})
1036
1039
(cost trx 1000 trx for assetIssue)
1037
- (You can query the trx balance and other asset balances for any account )
1040
+ (You can query the trx balance and other asset balances for any account )
1038
1041
TransferAsset 123456 649DDB4AB82D558AD6809C7AB2BA43D1D1054B3F testAssetIssue00001 10000
1039
1042
1040
1043
0 commit comments