Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Commit f4dab9f

Browse files
author
zonLi
committed
style improvement
1 parent b2146d3 commit f4dab9f

File tree

2 files changed

+112
-78
lines changed

2 files changed

+112
-78
lines changed

docs/Tron-http.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
11
# TRON Built-in Http Introduction
22
## hexString and base58check transcode demo
3-
java:
4-
https://github.com/tronprotocol/wallet-cli/blob/master/src/main/java/org/tron/demo/TransactionSignDemo.java#L92
5-
php:
6-
https://github.com/tronprotocol/Documentation/blob/master/TRX_CN/index.php
3+
JAVA:
4+
[https://github.com/tronprotocol/wallet-cli/blob/master/src/main/java/org/tron/demo/TransactionSignDemo.java#L92](https://github.com/tronprotocol/wallet-cli/blob/master/src/main/java/org/tron/demo/TransactionSignDemo.java#L92)
5+
PHP:
6+
[https://github.com/tronprotocol/Documentation/blob/master/TRX_CN/index.php](https://github.com/tronprotocol/Documentation/blob/master/TRX_CN/index.php)
77

88
**Since v3.6, parameter 'visible' is added, when 'visible' is set true, no need to transcode the relevant address and string. This parameter is valid for all api, including solidityNode api and FullNode api.**
99

1010
When 'visible' is set true, the format of the input address must be base58, input string must text string, so does the format of the output. If 'visible' is set false or null, the api acts the same as previous version. If the format of the parameters do not match with the set of visible, it will throw out an error.
1111

12-
Way to set the 'visible' parameter:
13-
1. For the api need no parameter: By adding 'visible' parameter in the url, like 127.0.0.1:8090/wallet/listexchanges?visible=true
14-
2. For POST method api: By adding 'visible' parameter to the most out layer of the json, like curl -X POST http://127.0.0.1:8090/wallet/createtransaction
15-
{"owner_address_":"TRGhNNfnmgLegT4zHNjEqDSADjgmnHvubJ",
16-
"to_address_":"TJCnKsPa7y5okkXvQAidZBzqx3QyQ6sxMW","amount":1000000,"visible":true}
17-
3. For GET method api: By adding 'visible' parameter in the url, as way 1
12+
Way to set the 'visible' parameter:
13+
14+
1. For the api need no parameter: by adding 'visible' parameter in the url
15+
16+
+ example:
17+
```text
18+
http://127.0.0.1:8090/wallet/listexchanges?visible=true
19+
```
20+
2. For POST method api: By adding 'visible' parameter to the most out layer of the json
21+
22+
+ example:
23+
```text
24+
curl -X POST http://127.0.0.1:8090/wallet/createtransaction
25+
26+
{"owner_address_":"TRGhNNfnmgLegT4zHNjEqDSADjgmnHvubJ", "to_address_":"TJCnKsPa7y5okkXvQAidZBzqx3QyQ6sxMW", "amount":1000000, "visible":true}
27+
```
28+
3. For GET method api: By adding 'visible' parameter in the url, as way 1
1829

1930

2031
## SolidityNode Api Introduction
2132

22-
solidityNode api's default http port is 8091, when solidityNode is started, http service will be started too.
23-
```
33+
SolidityNode api's default http port is 8091, when solidityNode is started, http service will be started too.
34+
```text
2435
/walletsolidity/getaccount
2536
Description: Query an account information
2637
demo: curl -X POST http://127.0.0.1:8091/walletsolidity/getaccount -d '{"address": "41E552F6487585C2B58BC2C9BB4492BC1F17132CD0"}'
@@ -199,8 +210,7 @@ Return: Deferred transaction fee & block height
199210
## FullNode Api Introduction
200211
FullNode api's default http port is 8090, when FullNode is started, http service will be started too.
201212

202-
```
203-
213+
```text
204214
wallet/createtransaction
205215
Description: Create a transfer transaction, if to address is not existed, then create the account on the blockchain
206216
demo: curl -X POST http://127.0.0.1:8090/wallet/createtransaction -d '{"to_address": "41e9d79cc47518930bc322d9bf7cddd260a0260a8d", "owner_address": "41D1E7A6BC354106CB410E65FF8B181C600FF14292", "amount": 1000 }'

0 commit comments

Comments
 (0)