From 58789c52cd29a16ab6a152f6e8fff89d103ea200 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 29 Nov 2017 15:30:12 -0600 Subject: [PATCH] add example for tx_search endpoint --- rpc/core/tx.go | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/rpc/core/tx.go b/rpc/core/tx.go index 4e4285a25..b69735911 100644 --- a/rpc/core/tx.go +++ b/rpc/core/tx.go @@ -105,7 +105,7 @@ func Tx(hash []byte, prove bool) (*ctypes.ResultTx, error) { // TxSearch allows you to query for multiple transactions results. // // ```shell -// curl "localhost:46657/tx_search?query='account.owner=\'Ivan\''&prove=true" +// curl "localhost:46657/tx_search?query=\"account.owner='Ivan'\"&prove=true" // ``` // // ```go @@ -117,6 +117,33 @@ func Tx(hash []byte, prove bool) (*ctypes.ResultTx, error) { // > The above command returns JSON structured like this: // // ```json +// { +// "result": [ +// { +// "proof": { +// "Proof": { +// "aunts": [ +// "J3LHbizt806uKnABNLwG4l7gXCA=", +// "iblMO/M1TnNtlAefJyNCeVhjAb0=", +// "iVk3ryurVaEEhdeS0ohAJZ3wtB8=", +// "5hqMkTeGqpct51ohX0lZLIdsn7Q=", +// "afhsNxFnLlZgFDoyPpdQSe0bR8g=" +// ] +// }, +// "Data": "mvZHHa7HhZ4aRT0xMDA=", +// "RootHash": "F6541223AA46E428CB1070E9840D2C3DF3B6D776", +// "Total": 32, +// "Index": 31 +// }, +// "tx": "mvZHHa7HhZ4aRT0xMDA=", +// "tx_result": {}, +// "index": 31, +// "height": 12 +// } +// ], +// "id": "", +// "jsonrpc": "2.0" +// } // ``` // // Returns transactions matching the given query.