-
Notifications
You must be signed in to change notification settings - Fork 67
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
feat: Generate TS from XDR #871
Conversation
32c25f7
to
806986f
Compare
If people use `yarn` in a project that uses this generated package, the generated package needs to have a `version` or `yarn install` will not work.
- No need to include files that don't have variables - Those backticks were silly
this removes the need for the `@signme` comments in the contract
I asked Dmitry: "if preflight returns an `auth` array, should we sign the whole transaction?" He answered: > not necessarily. `ContractAuth` entries do need a signature > to be filled in. if `addressWithNonce` is missing, then it's invoker auth > and can be signed as a part of tx. otherwise, the respective `Address` has > to sign the payload corresponding to `ContractAuth` (you can find more > details in this doc: > https://soroban.stellar.org/docs/how-to-guides/invoking-contracts-with-transactions#authorization-data) This seems to cover those alternative cases, just throwing NotImplementedErrors for now, but at least it's not quietly or confusingly failing.
I updated the branch and it even shows it on GH, but it is not showing up here for me. |
Just changed the target branch to itself and that seemed to fix it. |
- use a build script to create both ES Modules and CommonJS - specify `exports` in `package.json` so that consumers that use this library with `import` statements get ESM and those that use it with `require` get CJS. - add `.js` extensions to file paths. This should be inserted automatically by TypeScript during the build, but it's not, and for some reason NextJS can't consume ESM that doesn't have it. - remove environment variables. NextJS needs to have them with `process.env`, Astro needs to have them with `import.meta.env`, and there's no good way to have both. We'll be modifying this code soon anyhow.
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.
A couple optional formatting/text suggestions, but LGTM.
Co-authored-by: Paul Bellamy <[email protected]>
Approved and merged into
|
What
Generate a TS file from XDR to allow for building TS interfaces from contracts.
Why
Allow Dapps to create custom interfaces for the contracts they interact with. This will be integrated with the CLI to be part of workflow.
Known limitations
[TODO or N/A]