RFC: 0.1.x #102
codingki
announced in
Announcements
RFC: 0.1.x
#102
Replies: 2 comments
-
Notes:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Current working branch: https://github.com/strangelove-ventures/graz/tree/0.1.x |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This RFC (Request for Comments) document outlines the breaking changes, updates, and new features planned for the next version of the graz package (version 0.1.x)
Motivation
The current implementation of the graz package has some limitations and areas for improvement. By introducing the following changes, we aim to address these limitations and provide a more flexible and efficient experience for developers interacting with the Cosmos ecosystem.
Goals
The primary objectives of version 0.1.x of graz are:
Connect rework
The current implementation of the connect functionality in graz includes storing unnecessary state information in the local state. We plan to refactor the connect functionality to simplify it and make it more intuitive. This includes removing the storage of certain state information and providing a more straightforward approach for connecting to wallets.
Connect should be only enabling the dapp "connect" to wallets, in our current implementation we include storing state of :
offlineSigner
offlineSignerOnlyAmino
offlineSignerAuto
Those states will be removed from connect logic it will lived in their own hooks ex
useSigners
,useOfflineSigners
,useSigningClients
and as for account related hooks will be getting those things when it needed, not from the store. This will reduce endpoint calls and faster load when we connect. This will make the connect more easier because we just need to pass achainId
when we connect. example :Multichain experience
Currently, graz supports connecting to a single chain at a time. However, many wallets and connectors now support multiple chain connections. To enhance the user experience and take advantage of these capabilities, we plan to introduce support for connecting to multiple chains within the graz package. This change will involve modifying the existing hooks and introducing new ones to handle multiple chain connections.
All wallets/connector we include also supports multi chain connecting/
enable
example:
Our plan is receiving multiple chains to connect and we store it into array, This will introduce breaking changes when you interacting with our hooks.
example:
This is not the finalized, can be change upon the development.
Rework account related hooks
To support the multichain experience, the existing account-related hooks in graz will be reworked. Instead of returning data for a single chain, the hooks will return an array of data objects based on the chains the user is connected to. This modification will enable developers to handle account-related operations more efficiently and seamlessly across multiple chains.
Plan: "account related hooks" example:
useAccount
,useBalances
,useBalanceStaked
,useSigners
,useOfflineSigners
,useSigningClients
, etc. will be returning an array based on what connection they have.This is not the finalized, can be change upon the development.
Extract wallet integration
Currently, the wallet integration functionality is tightly coupled with the core graz package. However, to enhance modularity and allow for easier integration with different wallets, we plan to extract the wallet integration into separate packages. This change will result in individual packages for each wallet integration, making it easier to add new wallet options and reducing the size and complexity of the core graz package.
We will extract our wallet integration into a seperate packages. Currently our entire wallet integration are lived in
graz
package, example: I only want my dapp use keplr wallet, other wallet integration will be unnecessary included in graz package. We have a PoC that lived in our repo:We are going to seperate wallet integration like those, So every new wallet integration will have a different package and live outside
graz
And We will need to add it to
GrazProvider
, so it will only returns what you give in the provider. example:This is not the finalized, can be change upon the development.
Conclusion
This RFC document has outlined the motivations, goals, and breaking changes planned for version 0.1.x of the graz package. The proposed changes aim to improve the connect functionality, enhance the multichain experience, rework account-related hooks, and extract wallet integration into separate packages. These changes will provide a more flexible and efficient library for developers interacting with the Cosmos ecosystem.
Feedback and suggestions from the graz community are highly appreciated. Please provide your input and comments on this RFC to help shape the future of graz and ensure that it meets the needs of the developers.
Beta Was this translation helpful? Give feedback.
All reactions