@agoric/solo 0.10.4-dev-b2bff24.0 → 0.10.4-dev-7c12b02.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 +18 -16
- package/src/chain-cosmos-sdk.js +14 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/solo",
|
|
3
|
-
"version": "0.10.4-dev-
|
|
3
|
+
"version": "0.10.4-dev-7c12b02.0+7c12b02",
|
|
4
4
|
"description": "Agoric's Solo vat runner",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,19 +22,21 @@
|
|
|
22
22
|
"author": "Agoric",
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agoric/access-token": "0.4.22-dev-
|
|
26
|
-
"@agoric/cache": "0.3.3-dev-
|
|
27
|
-
"@agoric/cosmic-
|
|
28
|
-
"@agoric/
|
|
29
|
-
"@agoric/
|
|
30
|
-
"@agoric/
|
|
31
|
-
"@agoric/
|
|
32
|
-
"@agoric/
|
|
33
|
-
"@agoric/
|
|
34
|
-
"@agoric/
|
|
35
|
-
"@agoric/
|
|
36
|
-
"@agoric/
|
|
37
|
-
"@agoric/
|
|
25
|
+
"@agoric/access-token": "0.4.22-dev-7c12b02.0+7c12b02",
|
|
26
|
+
"@agoric/cache": "0.3.3-dev-7c12b02.0+7c12b02",
|
|
27
|
+
"@agoric/cosmic-proto": "0.4.1-dev-7c12b02.0+7c12b02",
|
|
28
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-7c12b02.0+7c12b02",
|
|
29
|
+
"@agoric/internal": "0.3.3-dev-7c12b02.0+7c12b02",
|
|
30
|
+
"@agoric/notifier": "0.6.3-dev-7c12b02.0+7c12b02",
|
|
31
|
+
"@agoric/spawner": "0.6.9-dev-7c12b02.0+7c12b02",
|
|
32
|
+
"@agoric/store": "0.9.3-dev-7c12b02.0+7c12b02",
|
|
33
|
+
"@agoric/swing-store": "0.9.2-dev-7c12b02.0+7c12b02",
|
|
34
|
+
"@agoric/swingset-vat": "0.32.3-dev-7c12b02.0+7c12b02",
|
|
35
|
+
"@agoric/telemetry": "0.6.3-dev-7c12b02.0+7c12b02",
|
|
36
|
+
"@agoric/time": "0.3.3-dev-7c12b02.0+7c12b02",
|
|
37
|
+
"@agoric/vats": "0.15.2-dev-7c12b02.0+7c12b02",
|
|
38
|
+
"@agoric/wallet": "0.18.4-dev-7c12b02.0+7c12b02",
|
|
39
|
+
"@endo/base64": "^1.0.9",
|
|
38
40
|
"@endo/captp": "^4.4.5",
|
|
39
41
|
"@endo/errors": "^1.2.10",
|
|
40
42
|
"@endo/eventual-send": "^1.3.1",
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
"ws": "^7.2.0"
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|
|
58
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
60
|
+
"@agoric/ertp": "0.16.3-dev-7c12b02.0+7c12b02",
|
|
59
61
|
"@endo/bundle-source": "^4.0.0",
|
|
60
62
|
"ava": "^5.3.0",
|
|
61
63
|
"c8": "^10.1.2"
|
|
@@ -79,5 +81,5 @@
|
|
|
79
81
|
"typeCoverage": {
|
|
80
82
|
"atLeast": 74.02
|
|
81
83
|
},
|
|
82
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "7c12b02bef145a6d64f3e842492341f40ad8d52d"
|
|
83
85
|
}
|
package/src/chain-cosmos-sdk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* global clearTimeout setTimeout
|
|
1
|
+
/* global clearTimeout setTimeout */
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import url from 'url';
|
|
@@ -8,15 +8,22 @@ import { open as tempOpen } from 'temp';
|
|
|
8
8
|
import WebSocket from 'ws';
|
|
9
9
|
|
|
10
10
|
import anylogger from 'anylogger';
|
|
11
|
+
import { decodeBase64, encodeBase64 } from '@endo/base64';
|
|
11
12
|
import { Fail, makeError } from '@endo/errors';
|
|
12
13
|
import { makePromiseKit } from '@endo/promise-kit';
|
|
13
14
|
|
|
15
|
+
import {
|
|
16
|
+
QueryDataRequest,
|
|
17
|
+
QueryDataResponse,
|
|
18
|
+
} from '@agoric/cosmic-proto/vstorage/query.js';
|
|
19
|
+
|
|
14
20
|
import { makeNotifierKit } from '@agoric/notifier';
|
|
15
21
|
import {
|
|
16
22
|
DEFAULT_BATCH_TIMEOUT_MS,
|
|
17
23
|
makeBatchedDeliver,
|
|
18
24
|
} from '@agoric/internal/src/batched-deliver.js';
|
|
19
25
|
import { forever, whileTrue } from '@agoric/internal';
|
|
26
|
+
import { decodeHex, encodeHex } from '@agoric/internal/src/hex.js';
|
|
20
27
|
|
|
21
28
|
const console = anylogger('chain-cosmos-sdk');
|
|
22
29
|
|
|
@@ -300,7 +307,8 @@ export async function connectToChain(
|
|
|
300
307
|
const subscribeToTxHash = (txHash, cb) => {
|
|
301
308
|
const txQuery = `tm.event = 'Tx' and tx.hash = '${txHash}'`;
|
|
302
309
|
|
|
303
|
-
const
|
|
310
|
+
const bufHash = decodeHex(txHash);
|
|
311
|
+
const b64Hash = encodeBase64(bufHash);
|
|
304
312
|
const txSubscriptionId = sendRPC('subscribe', { query: txQuery });
|
|
305
313
|
const queryId = sendRPC('tx', { hash: b64Hash });
|
|
306
314
|
const cleanup = () => {
|
|
@@ -353,7 +361,8 @@ export async function connectToChain(
|
|
|
353
361
|
const blockSubscriptionId = sendRPC('subscribe', { query: blockQuery });
|
|
354
362
|
const txSubscriptionId = sendRPC('subscribe', { query: txQuery });
|
|
355
363
|
const queryId = sendRPC('abci_query', {
|
|
356
|
-
path: `/
|
|
364
|
+
path: `/agoric.vstorage.Query/Data`,
|
|
365
|
+
data: encodeHex(QueryDataRequest.toProto({ path: storagePath })),
|
|
357
366
|
});
|
|
358
367
|
|
|
359
368
|
const cleanup = () => {
|
|
@@ -380,10 +389,8 @@ export async function connectToChain(
|
|
|
380
389
|
// Decode the layers up to the actual storage value.
|
|
381
390
|
const { value: b64JsonStorage, height: heightString } =
|
|
382
391
|
obj.result.response;
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
);
|
|
386
|
-
const { value: storageValue } = JSON.parse(jsonStorage);
|
|
392
|
+
const buf = decodeBase64(b64JsonStorage);
|
|
393
|
+
const { value: storageValue } = QueryDataResponse.decode(buf);
|
|
387
394
|
guardedCb(BigInt(heightString), storageValue);
|
|
388
395
|
} else if (
|
|
389
396
|
obj.result &&
|