Skip to content

Commit

Permalink
Merge pull request #400 from vivian1912/master
Browse files Browse the repository at this point in the history
update SR description
  • Loading branch information
ethan1844 authored Dec 31, 2024
2 parents a0a80b0 + 45af72a commit f079b99
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 65 deletions.
28 changes: 14 additions & 14 deletions docs/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ curl http://127.0.0.1:8090/wallet/getnodeinfo
Return: The node information

#### wallet/getchainparameters
Description: Query the parameters of the blockchain used for witnessses to create a proposal
Description: Query the parameters of the blockchain used for SR(Super Representatives) to create a proposal
```
curl -X POST http://127.0.0.1:8090/wallet/getchainparameters
```
Expand Down Expand Up @@ -1318,7 +1318,7 @@ The following are voting and SR related APIs:
- [wallet/getnextmaintenancetime](#walletgetnextmaintenancetime)

#### wallet/createwitness
Description: Apply to become a witness
Description: Apply to become a super representative
```console
$ curl -X POST http://127.0.0.1:8090/wallet/createwitness -d
'{
Expand All @@ -1337,7 +1337,7 @@ Return: Transaction object


#### wallet/updatewitness
Description: Update the witness' website url
Description: Update the super representative' website url
```console
$ curl -X POST http://127.0.0.1:8090/wallet/updatewitness -d
'{
Expand All @@ -1356,16 +1356,16 @@ Return: Transaction object


#### wallet/listwitnesses
Description: Qyery the list of the witnesses
Description: Qyery the list of the super representatives
```
curl -X POST http://127.0.0.1:8090/wallet/listwitnesses
```
Parameters: N/A

Return:witness list
Return:SR(Super Representatives) list

#### wallet/withdrawbalance
Description: Withdraw reward to account balance for witnesses
Description: Withdraw reward to account balance for super representatives
```console
$ curl -X POST http://127.0.0.1:8090/wallet/withdrawbalance -d
'{
Expand All @@ -1386,7 +1386,7 @@ Note: It can only withdraw once for every 24 hours


#### wallet/votewitnessaccount
Description: Vote for witnesses
Description: Vote for super representatives
```console
$ curl -X POST http://127.0.0.1:8090/wallet/votewitnessaccount -d
'{
Expand All @@ -1403,21 +1403,21 @@ $ curl -X POST http://127.0.0.1:8090/wallet/votewitnessaccount -d
Parameters:

- `owner_address`: Owner address, default hexString
- `votes`: 'vote_address' stands for the address of the witness you want to vote, default hexString, 'vote_count' stands for the number of votes you want to vote
- `votes`: 'vote_address' stands for the address of the super representative you want to vote, default hexString, 'vote_count' stands for the number of votes you want to vote
- `permission_id`: Optional, for multi-signature use

Return: Transaction object

#### wallet/getBrokerage
Description: Query the ratio of brokerage of the witness
Description: Query the ratio of brokerage of the super representative
```console
$ curl -X GET http://127.0.0.1:8090/wallet/getBrokerage -d '{
"address":"41E552F6487585C2B58BC2C9BB4492BC1F17132CD0"}'
```

Parameter `address`: The address of the witness's account, default hexString
Parameter `address`: The address of the SR's account, default hexString

Return: The ratio of brokerage of the witness
Return: The ratio of brokerage of the SR

#### wallet/updateBrokerage
Description: Update the ratio of brokerage
Expand All @@ -1430,7 +1430,7 @@ $ curl -X POST http://127.0.0.1:8090/wallet/updateBrokerage -d '{

Parameters:

- `owner_address`: The address of the witness's account, default hexString
- `owner_address`: The address of the SR's account, default hexString
- `brokerage`: The ratio of brokerage you want to update to


Expand Down Expand Up @@ -2661,13 +2661,13 @@ Return: Two lists will return, one is the list of addresses the account has dele
### Voting & SRs

#### walletsolidity/listwitnesses
Description: Query the list of witnesses
Description: Query the list of super representatives
```
curl -X POST http://127.0.0.1:8091/walletsolidity/listwitnesses
```
Parameters: N/A

Return: List of all witnesses
Return: List of all super representatives

### TRC10 Token

Expand Down
4 changes: 2 additions & 2 deletions docs/api/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rpc BroadcastTransaction (Transaction) returns (Return) {}
Nodes: Fullnode

Description:
Transfer, vote, issuance of token, or participation in token offering. Sending signed transaction information to node, and broadcasting it to the entire network after witness verification.
Transfer, vote, issuance of token, or participation in token offering. Sending signed transaction information to node, and broadcasting it to the entire network after super representatives verification.

**4. Create an account**

Expand All @@ -50,7 +50,7 @@ rpc VoteWitnessAccount (VoteWitnessContract) returns (Transaction) {}
```
Nodes: FullNode

**7. Query the ratio of brokerage of the witness**
**7. Query the ratio of brokerage of the super representative**
```protobuf
rpc GetBrokerageInfo (BytesMessage) returns (NumberMessage) {}
```
Expand Down
26 changes: 13 additions & 13 deletions docs/clients/wallet-cli-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ wallet>UpdateAccountPermission [ownerAddress] [permissions]
This command is used to assign permissions to other accounts, is utilized for **multi-signature** transactions, which allows other users to access the account with paritcular permission in order to better manage it. There are three types of permissions:

* owner: access to the owner of account
* active: access to other features of accounts, and access that authorizes a certain feature. Block production authorization is not included if it's for witness purposes.
* witness: only for witness, block production authorization will be granted to one of the other users.
* active: access to other features of accounts, and access that authorizes a certain feature. Block production authorization is not included if it's for SR purposes.
* witness: only for super representatives, block production authorization will be granted to one of the other users.

**NOTE** the parameter`Permission` must written in JSON format and entered in line. If the owner accountis not SR, then do not assign witness permission.
**NOTE** the parameter`Permission` must written in JSON format and entered in line. If the owner accountis not SR, then do not assign super representative permission.
```shell
wallet> updateaccountpermission TSzdGHnhYnQKFF4LKrRLztkjYAvbNoxnQ8 {"owner_permission":{"keys":[{"address":"TSzdGHnhYnQKFF4LKrRLztkjYAvbNoxnQ8","weight":1}],"threshold":1,"type":0,"permission_name":"owner"},"active_permissions":[{"operations":"7fff1fc0033e0000000000000000000000000000000000000000000000000000","keys":[{"address":"TB9qhqbev6DpX8mxdf3zDdtSQ6GC6Vb6Ej","weight":1},{"address":"TXBpeye7UQ4dDZEnmGDv4vX37mBYDo1tUE","weight":1}],"threshold":2,"type":2,"permission_name":"active12323"}]}
{
Expand Down Expand Up @@ -1886,7 +1886,7 @@ wallet> getproposal 34
Voting requires Tron Power, which can be obtained by freezing funds.
```
wallet> votewitness [witness address] [Tron Power Amount]
wallet> votewitness [SR(Super Representatives) address] [Tron Power Amount]
```
* The share calculation method is: 1 unit of share can be obtained for every 1TRX frozen.
Expand All @@ -1898,11 +1898,11 @@ For example:
```shell
wallet> freezeBalance 100000000 3 1 address # Freeze 10TRX and acquire 10 units of Tron Power
wallet> votewitness [witness1] 4 [witness2] 6 # Cast 4 votes for witness1 and 6 votes for witness2 at the same time
wallet> votewitness [SR1] 4 [SR2] 6 # Cast 4 votes for SR1 and 6 votes for SR2 at the same time
wallet> votewitness [witness1] 10 # Voted 10 votes for witness1
wallet> votewitness [SR1] 10 # Voted 10 votes for SR1
```
The final result of the above command was 10 votes for witness1 and 0 vote for witness2.
The final result of the above command was 10 votes for SR1 and 0 vote for SR2.
### ListWitnesses
Expand Down Expand Up @@ -1935,14 +1935,14 @@ wallet> listwitnesses
```
### GetBrokerage
View the ratio of brokerage of the witness.
View the ratio of brokerage of the SR(Super Representatives).
After voting for the witness, you will receive the rewards. The witness has the right to decide the ratio of brokerage. The default ratio is 20%, and the witness can adjust it.
After voting for the super representative, you will receive the rewards. The super representative has the right to decide the ratio of brokerage. The default ratio is 20%, and the super representative can adjust it.
By default, if a witness is rewarded, he will receive 20% of the whole rewards, and 80% of the rewards will be distributed to his voters.
By default, if a super representative is rewarded, he will receive 20% of the whole rewards, and 80% of the rewards will be distributed to his voters.
`OwnerAddress` is the address of the witness's account, it is a base58check type address.
`OwnerAddress` is the address of the SR's account, it is a base58check type address.
```shell
wallet> getbrokerage TSzdGHnhYnQKFF4LKrRLztkjYAvbNoxnQ8
The brokerage is : 20
Expand All @@ -1959,11 +1959,11 @@ The reward is : 0
### UpdateBrokerage
Update the ratio of brokerage, this command is usually used by a witness account.
Update the ratio of brokerage, this command is usually used by a super representative account.
``` shell
wallet> updateBrokerage [OwnerAddress] [brokerage]
```
`OwnerAddress` is the address of the witness's account, it is a base58check type address.
`OwnerAddress` is the address of the super representative's account, it is a base58check type address.
`brokerage` is the ratio of brokerage you want to update to, the limit of it: 0-100.
Expand Down
Loading

0 comments on commit f079b99

Please sign in to comment.