@agoric/cosmos 0.34.2-dev-13a758d.0 → 0.34.2-dev-9d19b12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/git-revision.txt CHANGED
@@ -1 +1 @@
1
- 13a758d
1
+ 9d19b12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/cosmos",
3
- "version": "0.34.2-dev-13a758d.0+13a758d",
3
+ "version": "0.34.2-dev-9d19b12.0+9d19b12",
4
4
  "description": "Connect JS to the Cosmos blockchain SDK",
5
5
  "parsers": {
6
6
  "js": "mjs"
@@ -38,5 +38,5 @@
38
38
  "typeCoverage": {
39
39
  "atLeast": 0
40
40
  },
41
- "gitHead": "13a758d01ee151552e5d9af8b7d3fc2cb9d4961f"
41
+ "gitHead": "9d19b124add119a92fa387d7d453e05c1a2d55d8"
42
42
  }
@@ -68,6 +68,51 @@ and `data` \<serialized protobuf per [vstorage/query.proto](../../proto/agoric/v
68
68
  * /agoric.vstorage.Query/Children
69
69
  * /agoric.vstorage.Query/Data
70
70
 
71
+ Example:
72
+ ```sh
73
+ $ curl -sS 'https://main.rpc.agoric.net/' -H 'Content-Type: application/json' -X POST --data "$(
74
+ jq -n --arg queryChildrenRequestHex 0a147075626c69736865642e636f6d6d697474656573 '{
75
+ id: 1,
76
+ method: "abci_query",
77
+ params: { path: "/agoric.vstorage.Query/Children", data: $queryChildrenRequestHex }
78
+ }' | \
79
+ tee /dev/stderr \
80
+ )" | \
81
+ jq . | \
82
+ tee /dev/stderr | \
83
+ jq -r '.result.response.value' | \
84
+ base64 -d | \
85
+ protoc -I golang/cosmos/proto/agoric/vstorage/ -I golang/cosmos/third_party/proto/ \
86
+ --decode=agoric.vstorage.QueryChildrenResponse golang/cosmos/proto/agoric/vstorage/query.proto
87
+ {
88
+ "id": 1,
89
+ "method": "abci_query",
90
+ "params": {
91
+ "path": "/agoric.vstorage.Query/Children",
92
+ "data": "0a147075626c69736865642e636f6d6d697474656573"
93
+ }
94
+ }
95
+ {
96
+ "jsonrpc": "2.0",
97
+ "id": 1,
98
+ "result": {
99
+ "response": {
100
+ "code": 0,
101
+ "log": "",
102
+ "info": "",
103
+ "index": "0",
104
+ "key": null,
105
+ "value": "ChJFY29ub21pY19Db21taXR0ZWUKCWtyZWFkLWdvdg==",
106
+ "proofOps": null,
107
+ "height": "12222836",
108
+ "codespace": ""
109
+ }
110
+ }
111
+ }
112
+ children: "Economic_Committee"
113
+ children: "kread-gov"
114
+ ```
115
+
71
116
  ## External JSON interface
72
117
 
73
118
  As described at [Cosmos SDK: Using the REST Endpoints](https://docs.cosmos.network/main/run-node/interact-node#using-the-rest-endpoints), a blockchain node whose [`app.toml` configuration](https://docs.cosmos.network/main/run-node/run-node#configuring-the-node-using-apptoml-and-configtoml) enables the "REST" API server uses [gRPC-Gateway](https://grpc-ecosystem.github.io/grpc-gateway/) and `google.api.http` annotations in [vstorage/query.proto](../../proto/agoric/vstorage/query.proto) to automatically translate the protobuf-based RPC endpoints into URL paths that accept query parameters and emit JSON.