Skip to content

Commit 6c2fd7e

Browse files
committed
feat(gasfree & trident): focus on introducing gasfree and accessing trident API in the README.md
1 parent 36aa31f commit 6c2fd7e

File tree

2 files changed

+74
-29
lines changed

2 files changed

+74
-29
lines changed

README.md

Lines changed: 71 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
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 features, allowing users to perform token transfers without paying gas fees directly. For more detail, please check the [GasFree](#GasFree-Support) section below.
6+
7+
The underlying implementation of all Wallet-cli gRPC APIs has all migrated to the [Trident APIs](https://github.com/tronprotocol/trident). The migration represents a significant architectural shift. This strategic move consolidates the underlying implementation of the Wallet-cli's remote procedure calls, standardizing them under the robust and optimized Trident API framework. This unification not only streamlines development and maintenance efforts but also enhances the overall reliability, performance, and scalability of the Wallet-cli. The Trident APIs, known for their efficiency and comprehensive capabilities, now serve as the sole foundation for all gRPC interactions within the Wallet-cli, ensuring a consistent and high-quality experience for users and developers alike.
8+
9+
If you need any help, please join the [Telegram](https://t.me/TronOfficialDevelopersGroupEn).
610

711
## Get started
812

@@ -14,37 +18,65 @@ If you need any help, please join the [Telegram](https://t.me/TronOfficialDevelo
1418

1519
```
1620
net {
17-
type = mainnet
18-
# type = testnet
21+
type = mainnet
22+
# type = testnet
1923
}
2024
2125
fullnode = {
2226
ip.list = [
23-
"fullnode ip : port"
27+
"127.0.0.1:50051"
2428
]
2529
}
2630
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-
]
31+
#soliditynode = {
32+
# // the IPs in this list can only be totally set to solidity.
3233
# ip.list = [
33-
# "ip : pBFT port" // or pBFT
34+
# "127.0.0.1:50052" // default solidity
3435
# ]
35-
} // NOTE: solidity node is optional
36+
# // NOTE: solidity node is optional
37+
#}
38+
39+
# open ledger debug
40+
# ledger_debug = true
41+
42+
# To use the lock and unlock function of the login account, it is necessary to configure
43+
# lockAccount = true in the config.conf. The current login account is locked, which means that
44+
# signatures and transactions are not allowed. After the current login account is locked, it can be
45+
# unlocked. By default, it will be unlocked again after 300 seconds. Unlocking can specify
46+
# parameters in seconds.
47+
48+
# lockAccount = true
49+
50+
# To use the gasfree feature, please first apply for an apikey and apiSecret.
51+
# For details, please refer to
52+
# https://docs.google.com/forms/d/e/1FAIpQLSc5EB1X8JN7LA4SAVAG99VziXEY6Kv6JxmlBry9rUBlwI-GaQ/viewform
53+
gasfree = {
54+
mainnet = {
55+
apiKey = ""
56+
apiSecret = ""
57+
}
58+
testnet = {
59+
apiKey = ""
60+
apiSecret = ""
61+
}
62+
}
63+
64+
# If gRPC requests on the main network are limited in speed, you can apply for a apiKey of trongrid to improve the user experience
65+
grpc = {
66+
mainnet = {
67+
apiKey = ""
68+
}
69+
}
3670
37-
blockNumberStartToScan = 22690588 // NOTE: this field is optional
3871
```
3972

4073
### Run a web wallet
4174

42-
- connect to fullNode and solidityNode
75+
- connect to fullNode
4376

4477
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.
78+
Run fullNode in either your local PC or remote server.
4679

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

5082
```console
@@ -58,6 +90,7 @@ blockNumberStartToScan = 22690588 // NOTE: this field is optional
5890

5991
Wallet-cli connect to java-tron via gRPC protocol, which can be deployed locally or remotely. Check **Run a web Wallet** section.
6092
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.
93+
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.
6194

6295
## Wallet-cli supported command list
6396

@@ -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.
1881+
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).
18451883

1846-
## gas free info
1847-
> GasFreeInfo
1848-
>Get gasfree info of the current address.
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

src/main/resources/config.conf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
net {
22
type = mainnet
3+
# type = testnet
34
}
45

56
fullnode = {
@@ -9,13 +10,11 @@ fullnode = {
910
}
1011

1112
#soliditynode = {
12-
# // the IPs in this list can only be totally set to solidity or pBFT.
13+
# // the IPs in this list can only be totally set to solidity.
1314
# ip.list = [
1415
# "127.0.0.1:50052" // default solidity
1516
# ]
16-
# ip.list = [
17-
# "127.0.0.1:50071" // or pBFT
18-
# ]
17+
# // NOTE: solidity node is optional
1918
#}
2019

2120
# open ledger debug

0 commit comments

Comments
 (0)