@agoric/cosmos 0.34.2-dev-f20cc05.0 → 0.34.2-dev-e68f280.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
- f20cc05
1
+ e68f280
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/cosmos",
3
- "version": "0.34.2-dev-f20cc05.0+f20cc05",
3
+ "version": "0.34.2-dev-e68f280.0+e68f280",
4
4
  "description": "Connect JS to the Cosmos blockchain SDK",
5
5
  "parsers": {
6
6
  "js": "mjs"
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "f20cc0580a0a6cb947f3a5c1ef1281fccca879f0"
38
+ "gitHead": "e68f2805dde79871d1421e50c60f08e854e1851d"
39
39
  }
@@ -50,7 +50,7 @@ var (
50
50
  DefaultBeansPerMinFeeDebit = DefaultBeansPerFeeUnit.Quo(sdk.NewUint(5)) // $0.2
51
51
  DefaultBeansPerStorageByte = DefaultBeansPerFeeUnit.Quo(sdk.NewUint(500)) // $0.002
52
52
 
53
- DefaultBootstrapVatConfig = "@agoric/vats/decentral-core-config.json"
53
+ DefaultBootstrapVatConfig = "@agoric/boot/decentral-core-config.json"
54
54
 
55
55
  DefaultPowerFlagFees = []PowerFlagFee{
56
56
  NewPowerFlagFee("SMART_WALLET", sdk.NewCoins(sdk.NewInt64Coin("ubld", 10_000_000))),
@@ -34,6 +34,28 @@ This is used by the SwingSet "bridge".
34
34
  * method "size", args path (returns the count of children)
35
35
  * StreamCell-oriented
36
36
  * method "append", args [[path, value?], ...]
37
+
38
+ ## CLI
39
+
40
+ A blockchain node may be interrogated by RPC using `agd [--node $url] query vstorage $command` via [client/cli](./client/cli/query.go).
41
+ * `children [--height $blockHeight] [-o {text,json}] [$path]`
42
+ * `data [--height $blockHeight] [-o {text,json}] $path`
43
+
44
+ Examples:
45
+ ```sh
46
+ $ agd --node https://main.rpc.agoric.net:443/ query vstorage children published.reserve
47
+ children:
48
+ - governance
49
+ - metrics
50
+ pagination: null
51
+
52
+ $ agd --node https://main.rpc.agoric.net:443/ query vstorage children -o json published.reserve
53
+ {"children":["governance","metrics"],"pagination":null}
54
+
55
+ $ agd --node https://main.rpc.agoric.net:443/ query vstorage data published.reserve.metrics
56
+ value: '{"blockHeight":"11030240","values":["{\"body\":\"#{\\\"allocations\\\":{\\\"Fee\\\":{\\\"brand\\\":\\\"$0.Alleged:
57
+ IST brand\\\",\\\"value\\\":\\\"+20053582387\\\"}},\\\"shortfallBalance\\\":{\\\"brand\\\":\\\"$0\\\",\\\"value\\\":\\\"+0\\\"},\\\"totalFeeBurned\\\":{\\\"brand\\\":\\\"$0\\\",\\\"value\\\":\\\"+0\\\"},\\\"totalFeeMinted\\\":{\\\"brand\\\":\\\"$0\\\",\\\"value\\\":\\\"+0\\\"}}\",\"slots\":[\"board0257\"]}"]}'
58
+ ```
37
59
 
38
60
  ## External protobuf interface
39
61
 
@@ -46,6 +68,24 @@ and `data` \<serialized protobuf per [vstorage/query.proto](../../proto/agoric/v
46
68
  * /agoric.vstorage.Query/Children
47
69
  * /agoric.vstorage.Query/Data
48
70
 
71
+ ## External JSON interface
72
+
73
+ 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.
74
+ * /agoric/vstorage/capdata/$path?remotableValueFormat={object,string}[&mediaType=JSON%20Lines][&itemFormat=flat]
75
+ * /agoric/vstorage/children/$path
76
+ * /agoric/vstorage/data/$path
77
+
78
+ Example:
79
+ ```sh
80
+ $ curl -sS 'https://main.api.agoric.net/agoric/vstorage/children/published.committees'
81
+ {
82
+ "children": [
83
+ "Economic_Committee"
84
+ ],
85
+ "pagination": null
86
+ }
87
+ ```
88
+
49
89
  ## Arbitrary-response HTTP interface
50
90
 
51
91
  This depends upon appModule `LegacyQuerierHandler` functionality that is [removed from cosmos-sdk as of v0.47](https://github.com/cosmos/cosmos-sdk/blob/fa4d87ef7e6d87aaccc94c337ffd2fe90fcb7a9d/CHANGELOG.md#api-breaking-changes-3)