@agoric/casting 0.4.3-dev-8943c95.0 → 0.4.3-dev-ed76c8b.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/casting",
|
|
3
|
-
"version": "0.4.3-dev-
|
|
3
|
+
"version": "0.4.3-dev-ed76c8b.0+ed76c8b",
|
|
4
4
|
"description": "Agoric's OCap broadcasting system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/internal": "0.3.3-dev-
|
|
26
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
27
|
-
"@agoric/store": "0.9.3-dev-
|
|
25
|
+
"@agoric/internal": "0.3.3-dev-ed76c8b.0+ed76c8b",
|
|
26
|
+
"@agoric/notifier": "0.6.3-dev-ed76c8b.0+ed76c8b",
|
|
27
|
+
"@agoric/store": "0.9.3-dev-ed76c8b.0+ed76c8b",
|
|
28
28
|
"@cosmjs/encoding": "^0.32.3",
|
|
29
29
|
"@cosmjs/proto-signing": "^0.32.3",
|
|
30
30
|
"@cosmjs/stargate": "^0.32.3",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@endo/promise-kit": "^1.1.7"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
40
|
+
"@agoric/cosmic-proto": "0.4.1-dev-ed76c8b.0+ed76c8b",
|
|
41
41
|
"@endo/ses-ava": "^1.2.7",
|
|
42
42
|
"ava": "^5.3.0",
|
|
43
43
|
"c8": "^9.1.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"typeCoverage": {
|
|
61
61
|
"atLeast": 88.9
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "ed76c8bfcb09a9c8675bea4524b7b994b9c74f41"
|
|
64
64
|
}
|
package/src/main.d.ts
CHANGED
package/src/main.js
CHANGED
package/src/makeHttpClient.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
export function makeTendermintRpcClient(url: string, fetch: typeof window.fetch): import("@cosmjs/tendermint-rpc").RpcClient;
|
|
1
2
|
export function makeHttpClient(url: string, fetch: typeof window.fetch): import("@cosmjs/tendermint-rpc").RpcClient;
|
|
2
3
|
//# sourceMappingURL=makeHttpClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeHttpClient.d.ts","sourceRoot":"","sources":["makeHttpClient.js"],"names":[],"mappings":"AA2BO,oCAJI,MAAM,SACN,OAAO,MAAM,CAAC,KAAK,GACjB,OAAO,wBAAwB,EAAE,SAAS,CA8BtD"}
|
|
1
|
+
{"version":3,"file":"makeHttpClient.d.ts","sourceRoot":"","sources":["makeHttpClient.js"],"names":[],"mappings":"AA2BO,6CAJI,MAAM,SACN,OAAO,MAAM,CAAC,KAAK,GACjB,OAAO,wBAAwB,EAAE,SAAS,CA8BtD;AA5BM,oCAJI,MAAM,SACN,OAAO,MAAM,CAAC,KAAK,GACjB,OAAO,wBAAwB,EAAE,SAAS,CA8BtD"}
|
package/src/makeHttpClient.js
CHANGED
|
@@ -25,7 +25,7 @@ const filterBadStatus = res => {
|
|
|
25
25
|
* @param {typeof window.fetch} fetch
|
|
26
26
|
* @returns {import('@cosmjs/tendermint-rpc').RpcClient}
|
|
27
27
|
*/
|
|
28
|
-
export const
|
|
28
|
+
export const makeTendermintRpcClient = (url, fetch) => {
|
|
29
29
|
const headers = {}; // XXX needed?
|
|
30
30
|
|
|
31
31
|
// based on cosmjs 0.30.1:
|
|
@@ -54,3 +54,6 @@ export const makeHttpClient = (url, fetch) => {
|
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
|
+
|
|
58
|
+
/** @deprecated use makeTendermintRpcClient */
|
|
59
|
+
export const makeHttpClient = makeTendermintRpcClient;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
QueryChildrenResponse,
|
|
13
13
|
} from '@agoric/cosmic-proto/vstorage/query.js';
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { makeTendermintRpcClient } from '../src/makeHttpClient.js';
|
|
16
16
|
import { captureIO, replayIO, web1, web2 } from './net-access-fixture.js';
|
|
17
17
|
|
|
18
18
|
/** @type {import('ava').TestFn<Awaited<ReturnType<typeof makeTestContext>>>} */
|
|
@@ -43,7 +43,7 @@ const scenario1 = {
|
|
|
43
43
|
|
|
44
44
|
test('interpose net access', async t => {
|
|
45
45
|
const fetchMock = replayIO(web1);
|
|
46
|
-
const rpcClient =
|
|
46
|
+
const rpcClient = makeTendermintRpcClient(scenario1.endpoint, fetchMock);
|
|
47
47
|
|
|
48
48
|
t.log('raw JSON RPC');
|
|
49
49
|
const res = await rpcClient.execute({
|
|
@@ -100,7 +100,7 @@ test(`vstorage query: Children (RECORDING: ${RECORDING})`, async t => {
|
|
|
100
100
|
const { fetch: fetchMock, web } = io.recording
|
|
101
101
|
? captureIO(io.fetch)
|
|
102
102
|
: { fetch: replayIO(web2), web: new Map() };
|
|
103
|
-
const rpcClient =
|
|
103
|
+
const rpcClient = makeTendermintRpcClient(scenario2.endpoint, fetchMock);
|
|
104
104
|
|
|
105
105
|
const tmClient = await Tendermint34Client.create(rpcClient);
|
|
106
106
|
const qClient = new QueryClient(tmClient);
|