gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
844 stars 344 forks source link

[RFC] Discussion on the official Gno SDK (JS/TS + Gno) #701

Closed dongwon8247 closed 7 months ago

dongwon8247 commented 1 year ago

Description

I've opened this issue to openly discuss on the official Gno SDK (JS/TS + Gno), which @zivkovicmilos and the Onbloc team have been discussing. Dapp developers that want to build in Gno may encounter difficulties in implementing crypto middleware to interact with the Gnoland blockchain. This can be a significant hurdle for developers, and not good for the ecosystem from a maintenance and security standpoint of view. There should be an official way of interacting with Gno using official libraries for dapp developers, and I hope this discussion with Milos and the Onbloc team helps with that.

*I've also added thoughts about some painpoints and feature suggestions we've encountered while developing Adena for Gno.

Experience

1. Painpoints when developing Adena for Gno

2. What features are needed the most

3. RPC routes we'd like to see added / changed

4. What Adena handles locally, but could work out of the box with an SDK

Suggestions

Most commonly used functions

Functions we'd like to see on GnoSDK

moul commented 1 year ago

I agree with your analysis and the need for an official SDK.

I suggest dividing this topic into three parts for better organization.

Firstly, we can focus on very low-level and essential components such as raw ABCIQuery, raw TX, and account management primitives. This could be called the "Tendermint2 SDK."

Secondly, we can have a chain-specific SDK that configures and extends the TM2 SDK with chain-specific rules, commands, and helpers. This is the one I plan to use on most of my projects.

Lastly, we can explore the possibility of incorporating codegen on smart contracts to create strongly-typed clients for contracts, easily/dynamically.

zivkovicmilos commented 1 year ago

Thank you @dongwon8247 for opening an issue for community visibility 🙏

We have started some basic work on this topic at this WIP repo: https://github.com/gnolang/gno-js-sdk

moul commented 1 year ago

We should find better naming because there will also be a "Gno SDK" to build appchains.

Maybe by using "Client" instead of "SDK", i.e., "gno.land-js-client" depending on "tm2-js-client".

dongwon8247 commented 1 year ago

We should find better naming because there will also be a "Gno SDK" to build appchains.

Makes perfect sense

Maybe by using "Client" instead of "SDK", i.e., "gno.land-js-client" depending on "tm2-js-client".

I agree to use something with "Client" instead of "SDK".