feat: expose WalletConnect.initializeProvider for independent inialization#472
Merged
jannik-stacks merged 4 commits intostx-labs:mainfrom Jan 15, 2026
Merged
Conversation
jannik-stacks
previously approved these changes
Nov 25, 2025
Collaborator
jannik-stacks
left a comment
There was a problem hiding this comment.
Looks great — will need a second review from @hugo-stacks
Contributor
Author
|
@hugo-stacks can you check this PR? ty |
dbf18e2 to
96003ce
Compare
dbf18e2
96003ce to
dbf18e2
Compare
hugo-stacks
approved these changes
Jan 5, 2026
…ization - Export initializeProvider function from WalletConnect namespace - Re-export Networks, Chains, and Default config from walletconnect/index - Update main index.ts to export from walletconnect/index instead of config - Add JSDoc examples for new initialization pattern This allows consumers to initialize WalletConnect outside of the request flow for better UX control, while maintaining backward compatibility.
869783f to
33e7bff
Compare
Merged
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As a Stacks Connect developer, I would like to initialize WalletConnect independently from the request flow so that I can provide a better user experience in my application. This is needed because the current implementation forces WalletConnect initialization to happen during the
request()call, which ties initialization to user actions and limits UX control.Motivation for change
Previously, WalletConnect could only be initialized by passing
walletConnectorwalletConnectProjectIdoptions to therequest()function. This meant consumers using the library as an abstraction layer had no way to pre-initialize WalletConnect, resulting in initialization delays during critical user interactions.What was changed
initializeProviderfunction from theWalletConnectnamespaceNetworks,Chains,Default) fromwalletconnect/index.tsindex.tsto export the full WalletConnect module instead of just configHow does this impact application developers
Application developers can now:
Examples of use cases
Initializing at app startup:
With full configuration:
Making requests after initialization:
Acceptance criteria
WalletConnect.initializeProvider()is accessible from@stacks/connectwalletConnectoption inrequest()continues to workNetworks,Chains,Default) remain accessibleLink to relevant documentation
JSDoc examples added in the code provide inline documentation for developers.
Type of Change
Does this introduce a breaking change?
No breaking changes. This PR is fully backward compatible:
walletConnectoptions inrequest()continues to work unchangedChecklist
@janniks