Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/source/auth_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,30 @@

</table>

# Fees related auth_rule

<table class="tg">
<tr>
<th>Transaction type</th>
<th>Action</th>
<th>Field</th>
<th>Previous value</th>
<th>New value</th>
<th>Who can</th>
<th>Description</th>
</tr>

<tr>
<td>SET_FEES</td>
<td>EDIT</td>
<td>*</td>
<td>*</td>
<td>*</td>
<td>3 TRUSTEEs</td>
<td>Setting fees for action/actions</td>
</tr>
</table>

### Endorser using

- Endorser is required only when the transaction is endorsed, that is signed by someone else besides the author.
Expand Down
144 changes: 144 additions & 0 deletions docs/source/requests-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* [POOL_UPGRADE](#pool_upgrade)
* [POOL_CONFIG](#pool_config)
* [LEDGERS_FREEZE](#ledgers_freeze)
* [SET_FEES](#set_fees)

* [Read Requests](#read-requests)

Expand All @@ -26,6 +27,8 @@
* [GET_CLAIM_DEF](#get_claim_def)
* [GET_TXN](#get_txn)
* [GET_FROZEN_LEDGERS](#get_frozen_ledgers)
* [GET_FEES](#get_fees)
* [GET_FEE](#get_fee)

This doc is about supported client"s Request (both write and read ones).
If you are interested in transactions and their representation on the Ledger (that is internal one),
Expand Down Expand Up @@ -1448,6 +1451,31 @@ The request has static and dynamic validations. Static validation checks to avoi
}
```

## SET_FEES

Set fees value. Fees have follow structure:

```
"fees": {
<str: feesAlias>: <int: amount>,
}
```

*Transaction Example*:
```
{
"reqId": 1527801087197612,
"protocolVersion": 1,
"operation": {
"type": "20000",
"fees": {
"1": 4,
"10001": 8
}
}
}
```

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a response example?

## Read Requests

### GET_NYM
Expand Down Expand Up @@ -2024,3 +2052,119 @@ Get whole list of frozen ledgers. Reply has follow state format data:
"op":"REPLY"
}
```

## GET_FEES

Get whole list of fees. Reply has follow state format data:

```
"fees":
{
<str: feesAlias>: <int: amount>,
},
```

*Request Example*:
```
{
"identifier": "6ouriXMZkLeHsuXrN1X1fd",
"reqId": 47660,
"protocolVersion": 1,
"operation": {
"type": "20001"
}
}
```

*Reply Example*:
```
{
"op": "REPLY",
"result":
{
"identifier": "6ouriXMZkLeHsuXrN1X1fd",
"reqId": 10378,
"type": "20001",
"fees":
{
"1": 4,
"10001": 8
},
"state_proof":
{
"multi_signature":{
"value":{
"pool_state_root_hash":"4bCEk76QsB6p3yCiDntMedpeZmiQtdH9NRpcFyvaLHhc",
"state_root_hash":"HUv35b31eqncHZ1R8xMQW9pJnCBqAaUVrfCA8AeTtx6u",
"timestamp":1613736202,
"ledger_id":2,
"txn_root_hash":"BY6PV9SrV1dgQgxy2kpeTLESQfazTYoLdLZfjzVmcLeV"
},
"signature":"R8FRHVg51YiY5nS8Hh8iXNa1ZPKjrQMmurnrGek2A7QMKq79Pws4DLhgcVgf66PSJGEPjmyASYxFziEnubY1RFHQiE7ZToLZqW4oJt11hhL1XgXwrdswyqTQjuyxx5nzjyE4AzyTvs3BywD54s3w3mUhLG3QWwBp1uTX8agLEKZDkK",
"participants":[
"Gamma",
"Delta",
"Beta"
]
},
"proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==",
"root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms"
},
}
}
```

## GET_FEE

Get a fee value by a fee alias:

```
"fee": <int: amount>
```

*Request Example*:
```
{
"identifier": "6ouriXMZkLeHsuXrN1X1fd",
"reqId": 47660,
"protocolVersion": 1,
"operation": {
"type": "20001",
"alias": "nym_fees"
}
}
```

*Reply Example*:
```
{
"op": "REPLY",
"result":
{
"identifier": "6ouriXMZkLeHsuXrN1X1fd",
"reqId": 10378,
"type": "20001",
"fee": 10,
"state_proof":
{
"multi_signature":{
"value":{
"pool_state_root_hash":"4bCEk76QsB6p3yCiDntMedpeZmiQtdH9NRpcFyvaLHhc",
"state_root_hash":"HUv35b31eqncHZ1R8xMQW9pJnCBqAaUVrfCA8AeTtx6u",
"timestamp":1613736202,
"ledger_id":2,
"txn_root_hash":"BY6PV9SrV1dgQgxy2kpeTLESQfazTYoLdLZfjzVmcLeV"
},
"signature":"R8FRHVg51YiY5nS8Hh8iXNa1ZPKjrQMmurnrGek2A7QMKq79Pws4DLhgcVgf66PSJGEPjmyASYxFziEnubY1RFHQiE7ZToLZqW4oJt11hhL1XgXwrdswyqTQjuyxx5nzjyE4AzyTvs3BywD54s3w3mUhLG3QWwBp1uTX8agLEKZDkK",
"participants":[
"Gamma",
"Delta",
"Beta"
]
},
"proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==",
"root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms"
},
}
}
```
130 changes: 130 additions & 0 deletions docs/source/requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* [TRANSACTION_AUTHOR_AGREEMENT_AML](#transaction_author_agreement_AML)
* [TRANSACTION_AUTHOR_AGREEMENT_DISABLE](#transaction_author_agreement_disable)
* [LEDGERS_FREEZE](#ledgers_freeze)
* [SET_FEES](#set_fees)


* [Read Requests](#read-requests)
Expand All @@ -45,6 +46,8 @@
* [GET_RICH_SCHEMA](#get_rich_schema)
* [GET_TXN](#get_txn)
* [GET_FROZEN_LEDGERS](#get_frozen_ledgers)
* [GET_FEES](#get_fees)
* [GET_FEE](#get_fee)

* [Action Requests](#action-requests)

Expand Down Expand Up @@ -3014,6 +3017,31 @@ The request has static and dynamic validations. Static validation checks to avoi
}
```

## SET_FEES

Set fees value. Fees have follow structure:

```
"fees": {
<str: feesAlias>: <int: amount>,
}
```

*Transaction Example*:
```
{
"reqId": 1527801087197612,
"protocolVersion": 1,
"operation": {
"type": "20000",
"fees": {
"1": 4,
"10001": 8
}
}
}
```

## Read Requests

### GET_NYM
Expand Down Expand Up @@ -4307,6 +4335,108 @@ Get whole list of frozen ledgers. Reply has follow state format data:
}
```

## GET_FEES

Get whole list of fees. Reply has follow state format data:

```
"fees":
{
<str: feesAlias>: <int: amount>,
},
```

*Request Example*:
```
{
"identifier": "6ouriXMZkLeHsuXrN1X1fd",
"reqId": 47660,
"protocolVersion": 1,
"operation": {
"type": "20001"
}
}
```

*Reply Example*:
```
{
"op": "REPLY",
"result":
{
"identifier": "6ouriXMZkLeHsuXrN1X1fd",
"reqId": 10378,
"type": "20001",
"fees":
{
"1": 4,
"10001": 8
},
"state_proof":
{
"multi_signature":{
"value":{
"pool_state_root_hash":"4bCEk76QsB6p3yCiDntMedpeZmiQtdH9NRpcFyvaLHhc",
"state_root_hash":"HUv35b31eqncHZ1R8xMQW9pJnCBqAaUVrfCA8AeTtx6u",
"timestamp":1613736202,
"ledger_id":2,
"txn_root_hash":"BY6PV9SrV1dgQgxy2kpeTLESQfazTYoLdLZfjzVmcLeV"
},
"signature":"R8FRHVg51YiY5nS8Hh8iXNa1ZPKjrQMmurnrGek2A7QMKq79Pws4DLhgcVgf66PSJGEPjmyASYxFziEnubY1RFHQiE7ZToLZqW4oJt11hhL1XgXwrdswyqTQjuyxx5nzjyE4AzyTvs3BywD54s3w3mUhLG3QWwBp1uTX8agLEKZDkK",
"participants":[
"Gamma",
"Delta",
"Beta"
]
},
"proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==",
"root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms"
},
}
}
```

## GET_FEE

Get a fee value by a fee alias:

```
"fee": <int: amount>
```

*Request Example*:
```
{
"identifier": "6ouriXMZkLeHsuXrN1X1fd",
"reqId": 47660,
"protocolVersion": 1,
"operation": {
"type": "20001",
"alias": "nym_fees"
}
}
```

*Reply Example*:
```
{
"op": "REPLY",
"result":
{
"identifier": "6ouriXMZkLeHsuXrN1X1fd",
"reqId": 10378,
"type": "20001",
"fee": 10,
"state_proof":
{
"multi_signature": {//TODO add valid json string in here},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, replace "TODO" with multi_signature from GET_FROZEN_LEDGERS reply example

"proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==",
"root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms"
},
}
}
```

## Action Requests

### POOL_RESTART
Expand Down
26 changes: 26 additions & 0 deletions docs/source/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* [TRANSACTION_AUTHOR_AGREEMENT_AML](#transaction_author_agreement_AML)
* [TRANSACTION_AUTHOR_AGREEMENT_DISABLE](#transaction_author_agreement_disable)
* [LEDGERS_FREEZE](#ledgers_freeze)
* [SET_FEES](#set_fees)


## General Information
Expand Down Expand Up @@ -2131,3 +2132,28 @@ Freeze deprecated ledgers (default ledgers such as the domain, config, pool, and
}
}
```

## SET_FEES

Set fees value. Fees have follow structure:

```
"fees": {
<str: feesAlias>: <int: amount>,
}
```

*Transaction Example*:
```
{
"reqId": 1527801087197612,
"protocolVersion": 1,
"operation": {
"type": "20000",
"fees": {
"1": 4,
"10001": 8
}
}
}
```