Skip to content

Commit

Permalink
chore(types): use cosmic-proto
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Mar 6, 2024
1 parent b8e9306 commit 70609b0
Show file tree
Hide file tree
Showing 4 changed files with 696 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/synthetic-chain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"execa": "^8.0.1"
},
"devDependencies": {
"@agoric/cosmic-proto": "^0.4.1-dev-c5284e4.0",
"@types/better-sqlite3": "^7.6.9",
"@types/node": "^18.19.14",
"ava": "^5.3.1",
Expand Down
5 changes: 1 addition & 4 deletions packages/synthetic-chain/src/lib/vstorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ harden(isStreamCell);
/**
* Extract one value from a the vstorage stream cell in a QueryDataResponse
*
* @param {object} data
* @param {import('@agoric/cosmic-proto/dist/codegen/agoric/vstorage/query.js').QueryDataResponse} data
* @param {number} [index] index of the desired value in a deserialized stream cell
*
* XXX import('@agoric/cosmic-proto/vstorage/query').QueryDataResponse doesn't worksomehow
* @typedef {Awaited<ReturnType<import('@agoric/cosmic-proto/vstorage/query.js').QueryClientImpl['Data']>>} QueryDataResponseT
*/
export const extractStreamCellValue = (data, index = -1) => {
const { value: serialized } = data;
Expand Down
4 changes: 2 additions & 2 deletions packages/synthetic-chain/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"checkJs": false, // opt in
"strict": true,
"maxNodeModuleJsDepth": 2,
"module": "NodeNext",
"moduleResolution": "nodenext",
"module": "ES2022",
"moduleResolution": "Node",
"noEmit": true,
"target": "ESNext"
},
Expand Down
Loading

0 comments on commit 70609b0

Please sign in to comment.