add example for tx_search endpoint
This commit is contained in:
parent
a762253e24
commit
58789c52cd
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue