-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract api definitions #2101
Extract api definitions #2101
Conversation
9206b02
to
40a847f
Compare
e767053
to
681f064
Compare
e632eef
to
8f10a5c
Compare
3731b85
to
4a90114
Compare
189af41
to
2b0b8b0
Compare
We need update docs for this PR, take over to @grumpygreenguy thanks! |
I finished it. |
.github/file-filter.yml
Outdated
@@ -28,8 +28,10 @@ tee_src: &tee_src | |||
- 'tee-worker/build.Dockerfile' | |||
- 'tee-worker/enclave-runtime/**' | |||
- 'tee-worker/docker/**' | |||
- 'tee-worker/client-api/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended? Do we need to rebuild the tee image for any file change under this folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have temporarily removed it here. It was added earlier to fix an issue with CI, but now it may not be necessary.
"generate-from-defs": "node --experimental-specifier-resolution=node --loader ts-node/esm node_modules/@polkadot/typegen/scripts/polkadot-types-from-defs.mjs --package sidechain-api/interfaces --input build/interfaces --endpoint build/litentry-sidechain-metadata.json", | ||
"generate-from-chain": "node --experimental-specifier-resolution=node --loader ts-node/esm node_modules/@polkadot/typegen/scripts/polkadot-types-from-chain.mjs --package sidechain-api/interfaces --output build/interfaces --endpoint build/litentry-sidechain-metadata.json --strict", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I'm confused; are we gonna run these with node
, tsx
, or ts-node
? Do we need the ts-node
dependency at all? 🤔
(also, should probably invoke it as pmpm exec node
to make sure it's using the right environment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add pnpm exec
.According to typegen's latest docs, we're better off using node
to run. Anyway, after testing, ts-node
does not work.
@@ -1,4 +1,4 @@ | |||
import { ApiPromise } from '@polkadot/api'; | |||
import { ApiPromise } from 'parachain-api'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 🙌
Left a few small questions; nothing that looks like a blocker tho
Context
resolves #2088
Note: Although this PR involves many file modifications, it's because there were folder movements.Please pay particular attention to the files
src/index.ts
anddist/src/index.d.ts
in theparachain-api/sidechain-api
folder.