diff --git a/docs/source/auth_rules.md b/docs/source/auth_rules.md index 3545b9700..c6862d2f6 100644 --- a/docs/source/auth_rules.md +++ b/docs/source/auth_rules.md @@ -746,6 +746,30 @@ +# Fees related auth_rule + + + + + + + + + + + + + + + + + + + + + +
Transaction typeActionFieldPrevious valueNew valueWho canDescription
SET_FEESEDIT***3 TRUSTEEsSetting fees for action/actions
+ ### Endorser using - Endorser is required only when the transaction is endorsed, that is signed by someone else besides the author. diff --git a/docs/source/requests-new.md b/docs/source/requests-new.md index cbb1f63e8..a8da99835 100644 --- a/docs/source/requests-new.md +++ b/docs/source/requests-new.md @@ -17,6 +17,7 @@ * [POOL_UPGRADE](#pool_upgrade) * [POOL_CONFIG](#pool_config) * [LEDGERS_FREEZE](#ledgers_freeze) + * [SET_FEES](#set_fees) * [Read Requests](#read-requests) @@ -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), @@ -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": { + : , +} +``` + +*Transaction Example*: +``` +{ + "reqId": 1527801087197612, + "protocolVersion": 1, + "operation": { + "type": "20000", + "fees": { + "1": 4, + "10001": 8 + } + } +} +``` + ## Read Requests ### GET_NYM @@ -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": +{ + : , +}, +``` + +*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": +``` + +*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" + }, + } +} +``` \ No newline at end of file diff --git a/docs/source/requests.md b/docs/source/requests.md index f0a67932b..2244559e4 100644 --- a/docs/source/requests.md +++ b/docs/source/requests.md @@ -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) @@ -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) @@ -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": { + : , +} +``` + +*Transaction Example*: +``` +{ + "reqId": 1527801087197612, + "protocolVersion": 1, + "operation": { + "type": "20000", + "fees": { + "1": 4, + "10001": 8 + } + } +} +``` + ## Read Requests ### GET_NYM @@ -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": +{ + : , +}, +``` + +*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": +``` + +*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}, + "proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==", + "root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms" + }, + } +} +``` + ## Action Requests ### POOL_RESTART diff --git a/docs/source/transactions.md b/docs/source/transactions.md index b980446e0..7bb4ca5b4 100644 --- a/docs/source/transactions.md +++ b/docs/source/transactions.md @@ -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 @@ -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": { + : , +} +``` + +*Transaction Example*: +``` +{ + "reqId": 1527801087197612, + "protocolVersion": 1, + "operation": { + "type": "20000", + "fees": { + "1": 4, + "10001": 8 + } + } +} +``` \ No newline at end of file