Build IDL JSON parsing & type conversion for JavaScript SDK
buffalojoec opened this issue · 0 comments
We need to start building out the JavaScript SDK.
At the time of writing this issue, the JS SDK currently has a skeleton for initializing a Nautilus
instance and parsing SQL query strings.
Some of the skeleton shows how we can build this SDK, but I am open to proposed changes.
Problem:
The first step in the JavaScript SDK is going to be to take an IDL as input and create a TypeScript version of our program - similar to Anchor and Solita.
We can investigate using Anchor, Solita, or another existing tool to power this functionality, however I have the following requests:
- No additional configuration files (ie.
.solitarc
,Anchor.toml
) - No CLI commands (ie.
shank
,solita
)
We may also choose to write this functionality ourselves, and since JSON is closely related to JavaScript, this may not be too awful to do.
One thing worth mentioning: the Rust crate for the IDL currently has a POC build for converting JSON to TypeScript. We may decide that's an easier route to take rather than trying to import a JSON file to the SDK's Nautilus
instance.
I encourage draft PRs and Proof-of-Concepts