-
Notifications
You must be signed in to change notification settings - Fork 27
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
Pact javascript client/generator #46
Comments
Here are some thoughts that jump out at me at first glance... The first is that I think the specific case of the above example should be generalized from
Secondly, signing is always going to be tricky. There will be some situations where you can just sign because you have the key, but there will be many situations where you can't sign. So the above We can think of the overall flow as:
Here's the really annoying wrinkle. In the case of multi-sig, step #1 becomes more complicated because if you have a The third and most problematic issue here is that this idea of a generic transaction generator is probably not feasible right now because we don't yet have a way to automatically figure out which capabilities are needed for a transaction to be valid. There has been some talk in the past about making something that can automatically extract the necessary capabilities, but that has not been implemented yet and will definitely be a non-trivial endeavor. So full auto-generation of transaction templates from Pact modules is probably much longer-term stretch goal. |
An immediately actionable improvement would be to get better reflection from |
Several thoughts:
For the above
We probably need to find a way to form transactions in a asychronous manner when multi-sig is involved.
We can provide a template library (like tx-library) that can be part of the generation process. The generator should be able to consume multiple of those libraries, so no one is dependent on us to provide these templates. These templates could also help with multi-sig transactions ==== In general, to provide unlimited acccess to chainweb ecosystem, for the js-community, we need to create an interface/bridge. I think providing the tools that allow them to use the network, will increase usability, and thus use of the blockchain. Right now, people are struggeling to find ways to make use of the blockchain, and I believe a library can take away these concerns. |
This issue is stale because it is open for 60 days with no activity |
I started on a tool that, based on Typescript definitions, would be able to generate Pact expressions.
Inspired by Prisma ORM, that generates a type-safe client based on a database schema (see example)
We would be able to generate a type definition from all modules available on the blockchain (edit: using ASTs from Pact(?)). This allows users to make the right type-safe calls. Those are intercepted by a Proxy, that returns either Pact code or even a client that can execute the call to the chainweb-node API.
PoC: #45
This could be something like
Thoughts:
The text was updated successfully, but these errors were encountered: