Skip to content
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

[POC] Enhancing XchainJS Library with multi wallet support #910

Closed
wants to merge 1 commit into from

Conversation

hippocampus-web3
Copy link
Collaborator

Description:

In the course of documenting and providing examples for integrating Ledger wallets and other external wallets with the XchainJS library, we have identified an opportunity for a substantial enhancement.

Our proposal is to introduce a base class in each blockchain package supported by XchainJS. This base class will house the shared code necessary for different wallet types, with an initial focus on Keystore and Ledger wallets. This streamlined approach will provide a consistent and efficient framework for integrating various wallets.

Additionally, specific client classes tailored to each wallet type will be developed. These classes will extends base class and will handle the unique methods and actions needed for interactions with each wallet type, simplifying the overall code structure and improving maintainability.

A critical aspect of this enhancement is the modification of the getAddress function in the BaseXChainClient.ts interface. This function must be transformed to an asynchronous operation. This change is pivotal as it will impact all client implementations within the library.

By incorporating these ready-to-use classes and addressing the critical need for asynchronous operations, we aim to significantly improve the developer experience. This enhancement will solidify XchainJS's position as the preferred choice for seamless and adaptable blockchain and wallet integrations.

As a proof of concept I have made some changes to the Bitcoin package as an example, do not fear it as a definitive code. It is just to discuss about this concept and if we want to continue working in this line.

Please leave your opinions in the comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant