@agoric/cosmic-proto 0.4.1-dev-e6a0e81.0 → 0.4.1-dev-ee2126b.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/README.md CHANGED
@@ -27,21 +27,14 @@ npm install @agoric/cosmic-proto
27
27
  ## Usage
28
28
  ### RPC Clients
29
29
 
30
- ```js
31
- import { agoric } from '@agoric/cosmic-proto';
32
-
33
- const { createRPCQueryClient } = agoric.ClientFactory;
34
- const client = await createRPCQueryClient({ rpcEndpoint: RPC_ENDPOINT });
35
-
36
- const swingsetParams = await client.agoric.swingset.params()
37
- ```
30
+ TODO #9200
38
31
 
39
32
  ### Composing Messages
40
33
 
41
- Import the `agoric` object from `@agoric/cosmic-proto`.
34
+ Import the `agoric` object from the Agoric bundle.
42
35
 
43
36
  ```js
44
- import { agoric } from '@agoric/cosmic-proto';
37
+ import { agoric } from '@agoric/cosmic-proto/agoric/bundle.js';
45
38
 
46
39
  const {
47
40
  installBundle,
@@ -54,18 +47,7 @@ const {
54
47
 
55
48
  Here are the docs on [creating signers](https://github.com/cosmology-tech/cosmos-kit/tree/main/packages/react#signing-clients) in cosmos-kit that can be used with Keplr and other wallets.
56
49
 
57
- ### Initializing the Stargate Client
58
-
59
- Use `getSigningAgoricClient` to get your `SigningStargateClient`, with the proto/amino messages full-loaded. No need to manually add amino types, just require and initialize the client:
60
50
 
61
- ```js
62
- import { getSigningAgoricClient } from '@agoric/cosmic-proto';
63
-
64
- const stargateClient = await getSigningAgoricClient({
65
- rpcEndpoint,
66
- signer // OfflineSigner
67
- });
68
- ```
69
51
  ### Creating Signers
70
52
 
71
53
  To broadcast messages, you can create signers with a variety of options:
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './codegen/index.js';
1
+ export * from './codegen/json-safe.js';
2
2
  export * from './helpers.js';
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
- export * from './codegen/index.js';
1
+ // Do not export codegen/index.js because it entrains multiple megabytes of module imports.
2
+ // Instead we have the top level be relatively conservative, just things that are safe to import into a vat.
3
+ // This can include all the types because those are free (never included in a JS bundle).
4
+ export * from './codegen/json-safe.js';
2
5
  export * from './helpers.js';
3
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,4GAA4G;AAC5G,yFAAyF;AAEzF,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/cosmic-proto",
3
- "version": "0.4.1-dev-e6a0e81.0+e6a0e81",
3
+ "version": "0.4.1-dev-ee2126b.0+ee2126b",
4
4
  "description": "Protobuf stubs for the Agoric cosmos-sdk module",
5
5
  "keywords": [],
6
6
  "author": "Agoric",
@@ -19,10 +19,6 @@
19
19
  "types": "./dist/index.d.ts",
20
20
  "default": "./dist/index.js"
21
21
  },
22
- "./vatsafe": {
23
- "types": "./dist/vatsafe.d.ts",
24
- "default": "./dist/vatsafe.js"
25
- },
26
22
  "./package.json": "./package.json",
27
23
  "./agoric/*.js": {
28
24
  "types": "./dist/codegen/agoric/*.d.ts",
@@ -130,7 +126,7 @@
130
126
  "access": "public"
131
127
  },
132
128
  "devDependencies": {
133
- "@agoric/cosmos": "0.34.2-dev-e6a0e81.0+e6a0e81",
129
+ "@agoric/cosmos": "0.34.2-dev-ee2126b.0+ee2126b",
134
130
  "@ava/typescript": "^4.1.0",
135
131
  "@cosmology/telescope": "^1.7.1",
136
132
  "@endo/bundle-source": "^3.2.3",
@@ -160,5 +156,5 @@
160
156
  "test/**/*.test.*"
161
157
  ]
162
158
  },
163
- "gitHead": "e6a0e81ba5907ea3cc056775b8b3a38a0743ac9b"
159
+ "gitHead": "ee2126bcb2267010a840679a9cc52c848ed07b70"
164
160
  }
package/dist/vatsafe.d.ts DELETED
@@ -1,2 +0,0 @@
1
- /** @file top level export (similar to index.js) but only with modules that can load from within a vat */
2
- export * from './helpers.js';
package/dist/vatsafe.js DELETED
@@ -1,3 +0,0 @@
1
- /** @file top level export (similar to index.js) but only with modules that can load from within a vat */
2
- export * from './helpers.js';
3
- //# sourceMappingURL=vatsafe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vatsafe.js","sourceRoot":"","sources":["../src/vatsafe.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,cAAc,cAAc,CAAC"}