From 74d6c20d4bc0e84747a2b0bd1e4f418bed7c005b Mon Sep 17 00:00:00 2001 From: "anton.denishchenko" Date: Mon, 19 Apr 2021 12:56:54 +0300 Subject: [PATCH 1/4] Add docs for fees requests Signed-off-by: anton.denishchenko --- docs/source/auth_rules.md | 24 +++++ docs/source/requests-new.md | 185 ++++++++++++++++++++++++++++++++++++ docs/source/requests.md | 185 ++++++++++++++++++++++++++++++++++++ docs/source/transactions.md | 184 +++++++++++++++++++++++++++++++++++ 4 files changed, 578 insertions(+) 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..f41bc141a 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,35 @@ The request has static and dynamic validations. Static validation checks to avoi } ``` +## SET_FEES +``` +{ + "reqId": , //random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20000", + "fees": { + : , + } + }, +} +``` + +*Request Example*: +``` +{ + "reqId": 1527801087197612, + "protocolVersion": 1, + "operation": { + "type": "20000", + "fees": { + "1": 4, + "10001": 8 + } + } +} +``` + ## Read Requests ### GET_NYM @@ -2024,3 +2056,156 @@ Get whole list of frozen ledgers. Reply has follow state format data: "op":"REPLY" } ``` + +## GET_FEES +``` +{ + "identifier": , // the submitter DID + "reqId": , // a random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20001" + } +} +``` +*Request Example*: +``` +{ + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 47660, + "protocolVersion": 1, + "operation": { + "type": "20001" + } +} +``` + +## GET_FEES response +``` +{ + "op": "REPLY", + "result": { + "identifier": , // the submitter DID + "reqId": , // a random identifier + "type": "20001", + "fees": { + : , + }, + "state_proof": { + { + "participants": [ , ], // the nodes that participated in consensus + "signature": // the BLS signature of the nodes + "value": + { + "ledger_id": , // the associated ledger where the state proof came from + "pool_state_root_hash": , // the state proof root hash of the pool ledger + "state_root_hash": , // the state proof root hash of the total ledgers + "timestamp": , // the time the transaction was committed + "txn_root_hash": // the transaction root hash of the transaction on a specific ledger + } + }, + "rootHash": , // the root hash of the transaction + "proof_nodes": , // the hash of each node in the path + } + } +} +``` + +*Reply Example*: +``` +{ + "op": "REPLY", + "result": + { + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 10378, + "type": "20001", + "fees": + { + "1": 4, + "10001": 8 + }, + "state_proof": + { + "multi_signature": {//TODO add valid json string in here}, + "proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==", + "root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms" + }, + } +} +``` + +## GET_FEE transaction request +``` +{ + "identifier": , // the submitter DID + "reqId": , // a random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20001", + "alias": + } +} +``` + +*Request Example*: +``` +{ + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 47660, + "protocolVersion": 1, + "operation": { + "type": "20001", + "alias": "nym_fees" + } +} +``` + +## GET_FEE response +``` +{ + "op": "REPLY", + "result": { + "identifier": , // the submitter DID + "reqId": , // a random identifier + "type": "20001", + "fee": , + "state_proof": { + { + "participants": [ , ], // the nodes that participated in consensus + "signature": // the BLS signature of the nodes + "value": + { + "ledger_id": , // the associated ledger where the state proof came from + "pool_state_root_hash": , // the state proof root hash of the pool ledger + "state_root_hash": , // the state proof root hash of the total ledgers + "timestamp": , // the time the transaction was committed + "txn_root_hash": // the transaction root hash of the transaction on a specific ledger + } + }, + "rootHash": , // the root hash of the transaction + "proof_nodes": , // the hash of each node in the path + } + } +} +``` + +*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" + }, + } +} +``` \ No newline at end of file diff --git a/docs/source/requests.md b/docs/source/requests.md index f0a67932b..b9972af6a 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,35 @@ The request has static and dynamic validations. Static validation checks to avoi } ``` +## SET_FEES +``` +{ + "reqId": , //random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20000", + "fees": { + : , + } + }, +} +``` + +*Request Example*: +``` +{ + "reqId": 1527801087197612, + "protocolVersion": 1, + "operation": { + "type": "20000", + "fees": { + "1": 4, + "10001": 8 + } + } +} +``` + ## Read Requests ### GET_NYM @@ -4307,6 +4339,159 @@ Get whole list of frozen ledgers. Reply has follow state format data: } ``` +## GET_FEES +``` +{ + "identifier": , // the submitter DID + "reqId": , // a random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20001" + } +} +``` +*Request Example*: +``` +{ + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 47660, + "protocolVersion": 1, + "operation": { + "type": "20001" + } +} +``` + +## GET_FEES response +``` +{ + "op": "REPLY", + "result": { + "identifier": , // the submitter DID + "reqId": , // a random identifier + "type": "20001", + "fees": { + : , + }, + "state_proof": { + { + "participants": [ , ], // the nodes that participated in consensus + "signature": // the BLS signature of the nodes + "value": + { + "ledger_id": , // the associated ledger where the state proof came from + "pool_state_root_hash": , // the state proof root hash of the pool ledger + "state_root_hash": , // the state proof root hash of the total ledgers + "timestamp": , // the time the transaction was committed + "txn_root_hash": // the transaction root hash of the transaction on a specific ledger + } + }, + "rootHash": , // the root hash of the transaction + "proof_nodes": , // the hash of each node in the path + } + } +} +``` + +*Reply Example*: +``` +{ + "op": "REPLY", + "result": + { + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 10378, + "type": "20001", + "fees": + { + "1": 4, + "10001": 8 + }, + "state_proof": + { + "multi_signature": {//TODO add valid json string in here}, + "proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==", + "root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms" + }, + } +} +``` + +## GET_FEE transaction request +``` +{ + "identifier": , // the submitter DID + "reqId": , // a random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20001", + "alias": + } +} +``` + +*Request Example*: +``` +{ + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 47660, + "protocolVersion": 1, + "operation": { + "type": "20001", + "alias": "nym_fees" + } +} +``` + +## GET_FEE response +``` +{ + "op": "REPLY", + "result": { + "identifier": , // the submitter DID + "reqId": , // a random identifier + "type": "20001", + "fee": , + "state_proof": { + { + "participants": [ , ], // the nodes that participated in consensus + "signature": // the BLS signature of the nodes + "value": + { + "ledger_id": , // the associated ledger where the state proof came from + "pool_state_root_hash": , // the state proof root hash of the pool ledger + "state_root_hash": , // the state proof root hash of the total ledgers + "timestamp": , // the time the transaction was committed + "txn_root_hash": // the transaction root hash of the transaction on a specific ledger + } + }, + "rootHash": , // the root hash of the transaction + "proof_nodes": , // the hash of each node in the path + } + } +} +``` + +*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..86688c60f 100644 --- a/docs/source/transactions.md +++ b/docs/source/transactions.md @@ -31,6 +31,9 @@ * [TRANSACTION_AUTHOR_AGREEMENT_AML](#transaction_author_agreement_AML) * [TRANSACTION_AUTHOR_AGREEMENT_DISABLE](#transaction_author_agreement_disable) * [LEDGERS_FREEZE](#ledgers_freeze) + * [SET_FEES](#set_fees) + * [GET_FEES](#get_fees) + * [GET_FEE](#get_fee) ## General Information @@ -2131,3 +2134,184 @@ Freeze deprecated ledgers (default ledgers such as the domain, config, pool, and } } ``` + +## SET_FEES transaction request +``` +{ + "reqId": , //random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20000", + "fees": { + : , + } + }, +} +``` + +Example: +``` +{ + "reqId": 1527801087197612, + "protocolVersion": 1, + "operation": { + "type": "20000", + "fees": { + "1": 4, + "10001": 8 + } + } +} +``` + +## GET_FEES transaction request +``` +{ + "identifier": , // the submitter DID + "reqId": , // a random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20001" + } +} +``` +Example: +``` +{ + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 47660, + "protocolVersion": 1, + "operation": { + "type": "20001" + } +} +``` + +## GET_FEES response +``` +{ + "op": "REPLY", + "result": { + "identifier": , // the submitter DID + "reqId": , // a random identifier + "type": "20001", + "fees": { + : , + }, + "state_proof": { + { + "participants": [ , ], // the nodes that participated in consensus + "signature": // the BLS signature of the nodes + "value": + { + "ledger_id": , // the associated ledger where the state proof came from + "pool_state_root_hash": , // the state proof root hash of the pool ledger + "state_root_hash": , // the state proof root hash of the total ledgers + "timestamp": , // the time the transaction was committed + "txn_root_hash": // the transaction root hash of the transaction on a specific ledger + } + }, + "rootHash": , // the root hash of the transaction + "proof_nodes": , // the hash of each node in the path + } + } +} +``` + +Example: +``` +{ + "op": "REPLY", + "result": + { + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 10378, + "type": "20001", + "fees": + { + "1": 4, + "10001": 8 + }, + "state_proof": + { + "multi_signature": {//TODO add valid json string in here}, + "proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==", + "root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms" + }, + } +} +``` + +## GET_FEE transaction request +``` +{ + "identifier": , // the submitter DID + "reqId": , // a random identifier + "protocolVersion": , // the version of the client/node communication protocol + "operation": { + "type": "20001", + "alias": + } +} +``` +Example: +``` +{ + "identifier": "6ouriXMZkLeHsuXrN1X1fd", + "reqId": 47660, + "protocolVersion": 1, + "operation": { + "type": "20001", + "alias": "nym_fees" + } +} +``` + +## GET_FEE response +``` +{ + "op": "REPLY", + "result": { + "identifier": , // the submitter DID + "reqId": , // a random identifier + "type": "20001", + "fee": , + "state_proof": { + { + "participants": [ , ], // the nodes that participated in consensus + "signature": // the BLS signature of the nodes + "value": + { + "ledger_id": , // the associated ledger where the state proof came from + "pool_state_root_hash": , // the state proof root hash of the pool ledger + "state_root_hash": , // the state proof root hash of the total ledgers + "timestamp": , // the time the transaction was committed + "txn_root_hash": // the transaction root hash of the transaction on a specific ledger + } + }, + "rootHash": , // the root hash of the transaction + "proof_nodes": , // the hash of each node in the path + } + } +} +``` + +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" + }, + } +} +``` \ No newline at end of file From edee586079700058a4af0b1e148ad668f4ee9f5a Mon Sep 17 00:00:00 2001 From: "anton.denishchenko" Date: Mon, 19 Apr 2021 15:54:08 +0300 Subject: [PATCH 2/4] Fix docs for fees Signed-off-by: anton.denishchenko --- docs/source/requests-new.md | 100 +++-------------------- docs/source/requests.md | 87 +++----------------- docs/source/transactions.md | 154 ------------------------------------ 3 files changed, 21 insertions(+), 320 deletions(-) diff --git a/docs/source/requests-new.md b/docs/source/requests-new.md index f41bc141a..6eac7471c 100644 --- a/docs/source/requests-new.md +++ b/docs/source/requests-new.md @@ -1452,18 +1452,7 @@ The request has static and dynamic validations. Static validation checks to avoi ``` ## SET_FEES -``` -{ - "reqId": , //random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20000", - "fees": { - : , - } - }, -} -``` +Set value of fees. *Request Example*: ``` @@ -2058,16 +2047,15 @@ 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": { - "identifier": , // the submitter DID - "reqId": , // a random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20001" - } -} + : , +}, ``` + *Request Example*: ``` { @@ -2080,37 +2068,6 @@ Get whole list of frozen ledgers. Reply has follow state format data: } ``` -## GET_FEES response -``` -{ - "op": "REPLY", - "result": { - "identifier": , // the submitter DID - "reqId": , // a random identifier - "type": "20001", - "fees": { - : , - }, - "state_proof": { - { - "participants": [ , ], // the nodes that participated in consensus - "signature": // the BLS signature of the nodes - "value": - { - "ledger_id": , // the associated ledger where the state proof came from - "pool_state_root_hash": , // the state proof root hash of the pool ledger - "state_root_hash": , // the state proof root hash of the total ledgers - "timestamp": , // the time the transaction was committed - "txn_root_hash": // the transaction root hash of the transaction on a specific ledger - } - }, - "rootHash": , // the root hash of the transaction - "proof_nodes": , // the hash of each node in the path - } - } -} -``` - *Reply Example*: ``` { @@ -2135,17 +2092,11 @@ Get whole list of frozen ledgers. Reply has follow state format data: } ``` -## GET_FEE transaction request +## GET_FEE +Get fee. Reply has follow state format data: + ``` -{ - "identifier": , // the submitter DID - "reqId": , // a random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20001", - "alias": - } -} +"fee": ``` *Request Example*: @@ -2161,35 +2112,6 @@ Get whole list of frozen ledgers. Reply has follow state format data: } ``` -## GET_FEE response -``` -{ - "op": "REPLY", - "result": { - "identifier": , // the submitter DID - "reqId": , // a random identifier - "type": "20001", - "fee": , - "state_proof": { - { - "participants": [ , ], // the nodes that participated in consensus - "signature": // the BLS signature of the nodes - "value": - { - "ledger_id": , // the associated ledger where the state proof came from - "pool_state_root_hash": , // the state proof root hash of the pool ledger - "state_root_hash": , // the state proof root hash of the total ledgers - "timestamp": , // the time the transaction was committed - "txn_root_hash": // the transaction root hash of the transaction on a specific ledger - } - }, - "rootHash": , // the root hash of the transaction - "proof_nodes": , // the hash of each node in the path - } - } -} -``` - *Reply Example*: ``` { diff --git a/docs/source/requests.md b/docs/source/requests.md index b9972af6a..58be735d5 100644 --- a/docs/source/requests.md +++ b/docs/source/requests.md @@ -4340,16 +4340,15 @@ 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": { - "identifier": , // the submitter DID - "reqId": , // a random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20001" - } -} + : , +}, ``` + *Request Example*: ``` { @@ -4362,37 +4361,6 @@ Get whole list of frozen ledgers. Reply has follow state format data: } ``` -## GET_FEES response -``` -{ - "op": "REPLY", - "result": { - "identifier": , // the submitter DID - "reqId": , // a random identifier - "type": "20001", - "fees": { - : , - }, - "state_proof": { - { - "participants": [ , ], // the nodes that participated in consensus - "signature": // the BLS signature of the nodes - "value": - { - "ledger_id": , // the associated ledger where the state proof came from - "pool_state_root_hash": , // the state proof root hash of the pool ledger - "state_root_hash": , // the state proof root hash of the total ledgers - "timestamp": , // the time the transaction was committed - "txn_root_hash": // the transaction root hash of the transaction on a specific ledger - } - }, - "rootHash": , // the root hash of the transaction - "proof_nodes": , // the hash of each node in the path - } - } -} -``` - *Reply Example*: ``` { @@ -4417,17 +4385,11 @@ Get whole list of frozen ledgers. Reply has follow state format data: } ``` -## GET_FEE transaction request +## GET_FEE +Get fee. Reply has follow state format data: + ``` -{ - "identifier": , // the submitter DID - "reqId": , // a random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20001", - "alias": - } -} +"fee": ``` *Request Example*: @@ -4443,35 +4405,6 @@ Get whole list of frozen ledgers. Reply has follow state format data: } ``` -## GET_FEE response -``` -{ - "op": "REPLY", - "result": { - "identifier": , // the submitter DID - "reqId": , // a random identifier - "type": "20001", - "fee": , - "state_proof": { - { - "participants": [ , ], // the nodes that participated in consensus - "signature": // the BLS signature of the nodes - "value": - { - "ledger_id": , // the associated ledger where the state proof came from - "pool_state_root_hash": , // the state proof root hash of the pool ledger - "state_root_hash": , // the state proof root hash of the total ledgers - "timestamp": , // the time the transaction was committed - "txn_root_hash": // the transaction root hash of the transaction on a specific ledger - } - }, - "rootHash": , // the root hash of the transaction - "proof_nodes": , // the hash of each node in the path - } - } -} -``` - *Reply Example*: ``` { diff --git a/docs/source/transactions.md b/docs/source/transactions.md index 86688c60f..6b2a9dc69 100644 --- a/docs/source/transactions.md +++ b/docs/source/transactions.md @@ -32,8 +32,6 @@ * [TRANSACTION_AUTHOR_AGREEMENT_DISABLE](#transaction_author_agreement_disable) * [LEDGERS_FREEZE](#ledgers_freeze) * [SET_FEES](#set_fees) - * [GET_FEES](#get_fees) - * [GET_FEE](#get_fee) ## General Information @@ -2162,156 +2160,4 @@ Example: } } } -``` - -## GET_FEES transaction request -``` -{ - "identifier": , // the submitter DID - "reqId": , // a random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20001" - } -} -``` -Example: -``` -{ - "identifier": "6ouriXMZkLeHsuXrN1X1fd", - "reqId": 47660, - "protocolVersion": 1, - "operation": { - "type": "20001" - } -} -``` - -## GET_FEES response -``` -{ - "op": "REPLY", - "result": { - "identifier": , // the submitter DID - "reqId": , // a random identifier - "type": "20001", - "fees": { - : , - }, - "state_proof": { - { - "participants": [ , ], // the nodes that participated in consensus - "signature": // the BLS signature of the nodes - "value": - { - "ledger_id": , // the associated ledger where the state proof came from - "pool_state_root_hash": , // the state proof root hash of the pool ledger - "state_root_hash": , // the state proof root hash of the total ledgers - "timestamp": , // the time the transaction was committed - "txn_root_hash": // the transaction root hash of the transaction on a specific ledger - } - }, - "rootHash": , // the root hash of the transaction - "proof_nodes": , // the hash of each node in the path - } - } -} -``` - -Example: -``` -{ - "op": "REPLY", - "result": - { - "identifier": "6ouriXMZkLeHsuXrN1X1fd", - "reqId": 10378, - "type": "20001", - "fees": - { - "1": 4, - "10001": 8 - }, - "state_proof": - { - "multi_signature": {//TODO add valid json string in here}, - "proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==", - "root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms" - }, - } -} -``` - -## GET_FEE transaction request -``` -{ - "identifier": , // the submitter DID - "reqId": , // a random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20001", - "alias": - } -} -``` -Example: -``` -{ - "identifier": "6ouriXMZkLeHsuXrN1X1fd", - "reqId": 47660, - "protocolVersion": 1, - "operation": { - "type": "20001", - "alias": "nym_fees" - } -} -``` - -## GET_FEE response -``` -{ - "op": "REPLY", - "result": { - "identifier": , // the submitter DID - "reqId": , // a random identifier - "type": "20001", - "fee": , - "state_proof": { - { - "participants": [ , ], // the nodes that participated in consensus - "signature": // the BLS signature of the nodes - "value": - { - "ledger_id": , // the associated ledger where the state proof came from - "pool_state_root_hash": , // the state proof root hash of the pool ledger - "state_root_hash": , // the state proof root hash of the total ledgers - "timestamp": , // the time the transaction was committed - "txn_root_hash": // the transaction root hash of the transaction on a specific ledger - } - }, - "rootHash": , // the root hash of the transaction - "proof_nodes": , // the hash of each node in the path - } - } -} -``` - -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" - }, - } -} ``` \ No newline at end of file From 83a2e358aa98f807239a9e8e44afff7c029939cd Mon Sep 17 00:00:00 2001 From: "anton.denishchenko" Date: Tue, 20 Apr 2021 16:41:22 +0300 Subject: [PATCH 3/4] Fix docs Signed-off-by: anton.denishchenko --- docs/source/requests-new.md | 13 +++++++++++-- docs/source/requests.md | 18 ++++++++---------- docs/source/transactions.md | 18 +++++++----------- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/docs/source/requests-new.md b/docs/source/requests-new.md index 6eac7471c..c562cf9e9 100644 --- a/docs/source/requests-new.md +++ b/docs/source/requests-new.md @@ -1452,7 +1452,14 @@ The request has static and dynamic validations. Static validation checks to avoi ``` ## SET_FEES -Set value of fees. + +Set fees value. Fees have follow structure: + +``` +"fees": { + : , +} +``` *Request Example*: ``` @@ -2047,6 +2054,7 @@ 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: ``` @@ -2093,7 +2101,8 @@ Get whole list of fees. Reply has follow state format data: ``` ## GET_FEE -Get fee. Reply has follow state format data: + +Get a fee. Reply has follow state format data: ``` "fee": diff --git a/docs/source/requests.md b/docs/source/requests.md index 58be735d5..9b03f1031 100644 --- a/docs/source/requests.md +++ b/docs/source/requests.md @@ -3018,16 +3018,12 @@ The request has static and dynamic validations. Static validation checks to avoi ``` ## SET_FEES + +Set fees value. Fees have follow structure: + ``` -{ - "reqId": , //random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20000", - "fees": { - : , - } - }, +"fees": { + : , } ``` @@ -4340,6 +4336,7 @@ 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: ``` @@ -4386,7 +4383,8 @@ Get whole list of fees. Reply has follow state format data: ``` ## GET_FEE -Get fee. Reply has follow state format data: + +Get a fee. Reply has follow state format data: ``` "fee": diff --git a/docs/source/transactions.md b/docs/source/transactions.md index 6b2a9dc69..db8dc88f3 100644 --- a/docs/source/transactions.md +++ b/docs/source/transactions.md @@ -2133,21 +2133,17 @@ Freeze deprecated ledgers (default ledgers such as the domain, config, pool, and } ``` -## SET_FEES transaction request +## SET_FEES + +Set fees value. Fees have follow structure: + ``` -{ - "reqId": , //random identifier - "protocolVersion": , // the version of the client/node communication protocol - "operation": { - "type": "20000", - "fees": { - : , - } - }, +"fees": { + : , } ``` -Example: +*Request Example*: ``` { "reqId": 1527801087197612, From 8595889308861ace1c47b247db7f0d846bd38720 Mon Sep 17 00:00:00 2001 From: "anton.denishchenko" Date: Wed, 21 Apr 2021 15:40:46 +0300 Subject: [PATCH 4/4] Fix after review Signed-off-by: anton.denishchenko --- docs/source/requests-new.md | 36 ++++++++++++++++++++++++++++++++---- docs/source/requests.md | 20 +++++++++++++++++--- docs/source/transactions.md | 2 +- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/docs/source/requests-new.md b/docs/source/requests-new.md index c562cf9e9..a8da99835 100644 --- a/docs/source/requests-new.md +++ b/docs/source/requests-new.md @@ -1461,7 +1461,7 @@ Set fees value. Fees have follow structure: } ``` -*Request Example*: +*Transaction Example*: ``` { "reqId": 1527801087197612, @@ -2092,7 +2092,21 @@ Get whole list of fees. Reply has follow state format data: }, "state_proof": { - "multi_signature": {//TODO add valid json string in here}, + "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" }, @@ -2102,7 +2116,7 @@ Get whole list of fees. Reply has follow state format data: ## GET_FEE -Get a fee. Reply has follow state format data: +Get a fee value by a fee alias: ``` "fee": @@ -2133,7 +2147,21 @@ Get a fee. Reply has follow state format data: "fee": 10, "state_proof": { - "multi_signature": {//TODO add valid json string in here}, + "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" }, diff --git a/docs/source/requests.md b/docs/source/requests.md index 9b03f1031..2244559e4 100644 --- a/docs/source/requests.md +++ b/docs/source/requests.md @@ -3027,7 +3027,7 @@ Set fees value. Fees have follow structure: } ``` -*Request Example*: +*Transaction Example*: ``` { "reqId": 1527801087197612, @@ -4374,7 +4374,21 @@ Get whole list of fees. Reply has follow state format data: }, "state_proof": { - "multi_signature": {//TODO add valid json string in here}, + "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" }, @@ -4384,7 +4398,7 @@ Get whole list of fees. Reply has follow state format data: ## GET_FEE -Get a fee. Reply has follow state format data: +Get a fee value by a fee alias: ``` "fee": diff --git a/docs/source/transactions.md b/docs/source/transactions.md index db8dc88f3..7bb4ca5b4 100644 --- a/docs/source/transactions.md +++ b/docs/source/transactions.md @@ -2143,7 +2143,7 @@ Set fees value. Fees have follow structure: } ``` -*Request Example*: +*Transaction Example*: ``` { "reqId": 1527801087197612,