From 59d05de3503e0dff21d05002231ebd26e170fff7 Mon Sep 17 00:00:00 2001 From: Mikus Vanags Date: Tue, 1 Jun 2021 17:07:01 +0300 Subject: [PATCH 1/3] bugfix: fixed documentation for finddataoperations RPC method. --- docs/guides/040_JSON-RPC-API.md | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/docs/guides/040_JSON-RPC-API.md b/docs/guides/040_JSON-RPC-API.md index f39e1f1..d5147c2 100644 --- a/docs/guides/040_JSON-RPC-API.md +++ b/docs/guides/040_JSON-RPC-API.md @@ -2388,23 +2388,9 @@ Searches for DataOperations in the blockchain. - `signer` : Integer - Account number of the signer which pays the . - `data_type` : Integer - Type of the message (by default = 0 - Chat message)) - `data_sequence` : Integer - Sequence is for chaining multiple data packets together into a logical blob (by default = 0) -- `last_n_operation` : Integer - Last value of n_operation of the signerAccount (or senderAccount or receiverAccount) -- `amount` : Currency - Coins to be transferred (default = 0) -- `fee` : Currency - Fee of the operation (default = 0) -- `rawoperations` : HEXASTRING(optional) - If we want to add a sign operation with other previous operations, here we must put previous rawoperations result -- `signer_enc_pubkey` : HEXASTRING - The current public key of signerAccount in encoded format -- `signer_b58_pubkey` : HEXASTRING - The current public key of signerAccount in b58 format -- `target_enc_pubkey` : HEXASTRING - The current public key of receiverAccount in encoded format -- `target_b58_pubkey` : HEXASTRING - The current public key of receiverAccount in b58 format -- `sender_enc_pubkey` : HEXASTRING - The current public key of senderAccount in encoded format -- `sender_b58_pubkey` : HEXASTRING - The current public key of senderAccount in b58 format -- `payload` : String - Hex encoded Payload "item" that will be included in this operation -- `payload_method` : String - Encode type of the item payload - - `none` : (default) :Not encoded. Will be visible for everybody - - `dest` : Using Public key of "target" account. Only "target" will be able to decrypt this payload - - `sender` : Using sender Public key. Only "sender" will be able to decrypt this payload - - `aes` : Encrypted data using `pwd` param -- `pwd` : String - Used to encrypt payload with `aes` as a `payload_method`. If none equals to empty password +- `start` : Integer(optional, default = 0) +- `max` : Integer(optional, default = 100) Limits the number of items in the output. + ##### Result If transaction is successfull will return a JSON Array with "[Operation Object](#operation-object)" items. From 6a369ea1edba1dd890b9645969c8d3e6181c14ea Mon Sep 17 00:00:00 2001 From: Mikus Vanags Date: Tue, 1 Jun 2021 17:10:45 +0300 Subject: [PATCH 2/3] removed empty line --- docs/guides/040_JSON-RPC-API.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/guides/040_JSON-RPC-API.md b/docs/guides/040_JSON-RPC-API.md index d5147c2..604930e 100644 --- a/docs/guides/040_JSON-RPC-API.md +++ b/docs/guides/040_JSON-RPC-API.md @@ -2391,7 +2391,6 @@ Searches for DataOperations in the blockchain. - `start` : Integer(optional, default = 0) - `max` : Integer(optional, default = 100) Limits the number of items in the output. - ##### Result If transaction is successfull will return a JSON Array with "[Operation Object](#operation-object)" items. Otherwise, will return a JSON-RPC error code with description From 15c6c16bdcaea19c3083b46d875414f3d42d8490 Mon Sep 17 00:00:00 2001 From: Mikus Vanags Date: Wed, 2 Jun 2021 13:27:05 +0300 Subject: [PATCH 3/3] Bugfix: Parameters of RPC method 'findblocks' wrapped in separate object. --- docs/guides/040_JSON-RPC-API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/040_JSON-RPC-API.md b/docs/guides/040_JSON-RPC-API.md index 604930e..8fb852b 100644 --- a/docs/guides/040_JSON-RPC-API.md +++ b/docs/guides/040_JSON-RPC-API.md @@ -802,8 +802,8 @@ Note: Must use param `last` alone, or `start` and `end` ```js // Request -curl -X POST --data '{"jsonrpc":"2.0","method":"getblocks","last":100,"id":123}' http://localhost:4003 -curl -X POST --data '{"jsonrpc":"2.0","method":"getblocks","start":10000,"end":10500,"id":123}' http://localhost:4003 +curl -X POST --data '{"jsonrpc":"2.0","method":"getblocks","params":{"last":100},"id":123}' http://localhost:4003 +curl -X POST --data '{"jsonrpc":"2.0","method":"getblocks","params":{"start":10000, "end":10500},"id":123}' http://localhost:4003 ``` ***********************************************************************************