Skip to content

Commit 1bdfd5d

Browse files
authored
Merge pull request #881 from tronprotocol/master
Master merge into develop
2 parents 53e2231 + 7a61516 commit 1bdfd5d

File tree

18 files changed

+1920
-430
lines changed

18 files changed

+1920
-430
lines changed

README.md

Lines changed: 124 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
# wallet-cli
1+
# Wallet-cli
22

3-
Welcome to use the Wallet-CLI.
3+
Welcome to use the Wallet-cli.
44

5-
If you need any help, please join the [Telegram](https://t.me/TronOfficialDevelopersGroupEn)
5+
Wallet-cli now supports [GasFree](https://gasfree.io) addresses, enable users to transfer tokens without paying gas fees. For more details, please check the [GasFree](#Gas-Free-Support) section below.
6+
7+
The underlying implementation of all Wallet-cli gRPC APIs has all migrated to the [Trident SDK](https://github.com/tronprotocol/trident). This strategic move consolidates the underlying implementation of the Wallet-cli's remote procedure calls, standardizing them under the robust and optimized Trident framework.
8+
9+
If you need any help, please join the [Telegram](https://t.me/TronOfficialDevelopersGroupEn).
610

711
## Get started
812

9-
### Download wallet-cli
13+
### Download Wallet-cli
1014

1115
git clone https://github.com/tronprotocol/wallet-cli.git
1216

1317
### Edit config.conf in src/main/resources
1418

1519
```
1620
net {
17-
type = mainnet
18-
# type = testnet
21+
type = mainnet
1922
}
2023
2124
fullnode = {
@@ -24,27 +27,55 @@ fullnode = {
2427
]
2528
}
2629
27-
soliditynode = {
28-
// the IPs in this list can only be totally set to solidity or pBFT.
29-
ip.list = [
30-
"ip : solidity port" // default solidity
31-
]
30+
#soliditynode = {
31+
# //The IPs in this list can only be totally set to solidity.
3232
# ip.list = [
33-
# "ip : pBFT port" // or pBFT
33+
# "ip : solidity port" // default solidity
3434
# ]
35-
} // NOTE: solidity node is optional
35+
# // NOTE: solidity node is optional
36+
#}
37+
38+
# open ledger debug
39+
# ledger_debug = true
40+
41+
# To use the lock and unlock function of the login account, it is necessary to configure
42+
# lockAccount = true in the config.conf. The current login account is locked, which means that
43+
# signatures and transactions are not allowed. After the current login account is locked, it can be
44+
# unlocked. By default, it will be unlocked again after 300 seconds. Unlocking can specify
45+
# parameters in seconds.
46+
47+
# lockAccount = true
48+
49+
# To use the gasfree feature, please first apply for an APIkey and apiSecret.
50+
# For details, please refer to
51+
# https://docs.google.com/forms/d/e/1FAIpQLSc5EB1X8JN7LA4SAVAG99VziXEY6Kv6JxmlBry9rUBlwI-GaQ/viewform
52+
gasfree = {
53+
mainnet = {
54+
apiKey = ""
55+
apiSecret = ""
56+
}
57+
testnet = {
58+
apiKey = ""
59+
apiSecret = ""
60+
}
61+
}
62+
63+
# If gRPC requests on the main network are limited in speed, you can apply for an apiKey of Trongrid to improve the user experience
64+
grpc = {
65+
mainnet = {
66+
apiKey = ""
67+
}
68+
}
3669
37-
blockNumberStartToScan = 22690588 // NOTE: this field is optional
3870
```
3971

4072
### Run a web wallet
4173

42-
- connect to fullNode and solidityNode
74+
- connect to fullNode
4375

4476
Take a look at: [java-tron deployment](https://tronprotocol.github.io/documentation-en/developers/deployment/)
45-
Run both fullNode and solidity node in either your local PC or remote server.
77+
Run fullNode on either your local PC or a remote server.
4678

47-
NOTE: These nodes would consume a lot of memory and CPU. Please be aware if you do not use wallet, just kill them.
4879
- compile and run web wallet
4980

5081
```console
@@ -54,15 +85,16 @@ blockNumberStartToScan = 22690588 // NOTE: this field is optional
5485
$ java -jar wallet-cli.jar
5586
```
5687

57-
### Connect to java-tron
88+
### Connect to Java-tron
5889

59-
Wallet-cli connect to java-tron via gRPC protocol, which can be deployed locally or remotely. Check **Run a web Wallet** section.
60-
We can configure java-tron node IP and port in ``src/main/resources/config.conf``, so that wallet-cli server can successfully talk to java-tron nodes.
90+
Wallet-cli connects to Java-tron via the gRPC protocol, which can be deployed locally or remotely. Check **Run a web Wallet** section.
91+
We can configure Java-tron node IP and port in ``src/main/resources/config.conf``, so that wallet-cli server can successfully talk to java-tron nodes.
92+
Besides that, you can simply use `SwitchNetwork` command to switch among the mainnet, testnets(Nile and Shasta) and custom networks. Please refer to the Switch Network section.
6193

6294
## Wallet-cli supported command list
6395

6496
Following is a list of Tron Wallet-cli commands:
65-
For more information on a specific command, just type the command on terminal when you start your Wallet.
97+
For more information on a specific command, just type the command in the terminal when you start your Wallet.
6698

6799
| [AddTransactionSign](#How-to-use-the-multi-signature-feature-of-wallet-cli) | [ApproveProposal](#Approve--disapprove-a-proposal) | [AssetIssue](#Issue-trc10-tokens) |
68100
|:-----------------------------------------------------------------------------------:|:-------------------------------------------------------------------:|:---------------------------------------------------------------------------------:|
@@ -104,7 +136,8 @@ For more information on a specific command, just type the command on terminal wh
104136
| [Unlock](#unlock) | [UpdateAccount](#update-account) | [UpdateAccountPermission](#How-to-use-the-multi-signature-feature-of-wallet-cli) |
105137
| [UpdateAsset](#Update-parameters-of-trc10-token) | [UpdateBrokerage](#Brokerage) | [UpdateEnergyLimit](#Update-smart-contract-parameters) |
106138
| [UpdateSetting](#Update-smart-contract-parameters) | [UpdateWitness](#update-witness) | [VoteWitness](#How-to-vote) |
107-
| [WithdrawBalance](#withdraw-balance) | [WithdrawExpireUnfreeze](#withdraw-expire-unfreeze) | |
139+
| [WithdrawBalance](#withdraw-balance) | [WithdrawExpireUnfreeze](#withdraw-expire-unfreeze) | [ModifyWalletName](#Modify-wallet-name) |
140+
| [ViewBackupRecords](#View-backup-records) | [ViewTransactionHistory](#View-transaction-history) | |
108141

109142

110143
Type any one of the listed commands, to display how-to tips.
@@ -1801,7 +1834,7 @@ unlock successful !!!
18011834

18021835
## switch network
18031836
> SwitchNetwork
1804-
>This command allows for flexible network switching at any time. Unlocking can specify parameters in seconds.
1837+
>This command allows for flexible network switching at any time.
18051838
>`switchnetwork local` will switch to the network configured in local config.conf.
18061839
18071840
Example:
@@ -1842,10 +1875,22 @@ wallet> currentnetwork
18421875
current network: CUSTOM
18431876
fullNode: EMPTY, solidityNode: localhost:50052
18441877
```
1878+
## Gas Free Support
1879+
1880+
Wallet-cli now supports GasFree integration. This guide explains the new commands and provides instructions on how to use them.
18451881

1846-
## gas free info
1847-
> GasFreeInfo
1848-
>Get gasfree info of the current address.
1882+
For more details, please refer to [GasFree Documentation](https://gasfree.io/specification) and [TronLink User Guide For GasFree](https://support.tronlink.org/hc/en-us/articles/38903684778393-GasFree-User-Guide).
1883+
1884+
Prerequisites
1885+
API Credentials: Users must obtain the API Key and API Secret from GasFree for authentication. Please refer to the official [application form](https://docs.google.com/forms/d/e/1FAIpQLSc5EB1X8JN7LA4SAVAG99VziXEY6Kv6JxmlBry9rUBlwI-GaQ/viewform) for instructions on setting up API authentication.
1886+
1887+
New Commands:
1888+
1889+
### Gas Free info
1890+
> GasFreeInfo
1891+
Query GasFree Information
1892+
Function: Retrieve the basic info, including the GasFree address associated with your current wallet address.
1893+
Note: The GasFree address is automatically activated upon the first transfer, which may incur an activation fee.
18491894

18501895
Example:
18511896
```console
@@ -1875,10 +1920,10 @@ balanceOf(address):70a08231
18751920
}
18761921
gasFreeInfo: successful !!
18771922
```
1878-
1879-
## gas free transfer
1880-
> GasFreeTransfer
1881-
>Transfer funds through gas-free.
1923+
### Gas Free transfer
1924+
> GasFreeTransfer
1925+
Submit GasFree Transfer
1926+
Function: Submit a gas-free token transfer request.
18821927

18831928
Example:
18841929
```console
@@ -1910,9 +1955,10 @@ GasFreeTransfer result: {
19101955
GasFreeTransfer successful !!!
19111956
```
19121957

1913-
## gas free trace
1914-
> GasFreeTrace
1915-
>Query GasFreeTrace to obtain transfer details by using the transaction ID returned by GasFreeTransfer as the traceId.
1958+
### Gas Free trace
1959+
> GasFreeTrace
1960+
Track Transfer Status
1961+
Function: Check the progress of a GasFree transfer using the traceId obtained from GasFreeTransfer.
19161962

19171963
Example:
19181964
```console
@@ -2056,6 +2102,51 @@ Example:
20562102
> UpdateAccount test-name
20572103
```
20582104

2105+
### Modify wallet name
2106+
> ModifyWalletName new_wallet_name
2107+
2108+
Modify wallet's name.
2109+
2110+
Example:
2111+
```console
2112+
wallet> ModifyWalletName new-name
2113+
Modify Wallet Name successful !!
2114+
```
2115+
2116+
### View backup records
2117+
> ViewBackupRecords
2118+
2119+
View backup records. You can configure the maximum number of records that `maxRecords` can retain in `config.conf`, excluding the number of buffer records.
2120+
2121+
Example:
2122+
```console
2123+
wallet> ViewBackupRecords
2124+
2125+
=== View Backup Records ===
2126+
1. View all records
2127+
2. Filter by time range
2128+
Choose an option (1-2): 1
2129+
```
2130+
### View transaction history
2131+
> ViewTransactionHistory
2132+
2133+
View transaction history. You can configure the maximum number of records that `maxRecords` can retain in `config.conf`, excluding the number of buffer records.
2134+
2135+
Example:
2136+
```console
2137+
wallet> ViewTransactionHistory
2138+
====================================
2139+
TRANSACTION VIEWER
2140+
====================================
2141+
2142+
MAIN MENU:
2143+
1. View all transactions
2144+
2. Filter by time range
2145+
3. Help
2146+
4. Exit
2147+
Select option: 1
2148+
```
2149+
20592150

20602151
## Wallet related commands
20612152

0 commit comments

Comments
 (0)