Skip to content

Migrate mobile docs to @walletconnect/universal-provider#2

Open
CassioMG wants to merge 9 commits intoadd-developer-docsfrom
migrate-to-universal-provider
Open

Migrate mobile docs to @walletconnect/universal-provider#2
CassioMG wants to merge 9 commits intoadd-developer-docsfrom
migrate-to-universal-provider

Conversation

@CassioMG
Copy link
Copy Markdown

@CassioMG CassioMG commented Apr 11, 2026

Summary

  • Replace @walletconnect/sign-client with @walletconnect/universal-provider in all mobile code samples
  • Add @reown/appkit modal for QR code display and wallet selection (via createAppKit with manualWCControl)
  • Add Stellar Wallets Kit alternative note with caveat about signMessage/signAuthEntry support
  • Add links to Reown docs for UniversalProvider and AppKit modal
  • Remove isFreighterInAppBrowser branching from full example (Stellar Wallets Kit implementation detail, not needed by dapp developers)
  • Simpler request API: provider.request(payload, chain) vs client.request({ topic, chainId, request })

Context

@walletconnect/sign-client is no longer referenced in the official WalletConnect/Reown documentation. @walletconnect/universal-provider is the actively documented package for non-EVM chains. @reown/appkit with manualWCControl: true replaces the deprecated @walletconnect/modal for displaying QR codes and wallet lists.

Files changed

  • mobile/installation.md — install both universal-provider and @reown/appkit, init provider + modal, alternatives section
  • mobile/connecting.mddisplay_uri opens AppKit modal, provider.connect() pattern, simplified disconnect
  • mobile/signing.md — all 4 method examples migrated to provider.request(), full example with modal

🤖 Generated with Claude Code

CassioMG and others added 3 commits April 10, 2026 23:45
Replace @walletconnect/sign-client with @walletconnect/universal-provider
in installation instructions. Add Stellar Wallets Kit alternative note
and link to Reown docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace SignClient connect/event/disconnect patterns with
UniversalProvider equivalents. Add public key extraction example.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace all client.request() calls with provider.request() pattern.
Update full connect-sign-submit example.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Mobile integration docs to use WalletConnect’s @walletconnect/universal-provider API (instead of @walletconnect/sign-client) across installation, connection, and signing examples, aligning the guide with current Reown/WalletConnect documentation for non-EVM chains.

Changes:

  • Swaps installation and initialization examples to @walletconnect/universal-provider.
  • Updates connection flow to use display_uri + provider.connect() (no approval() step).
  • Migrates all signing examples to provider.request(payload, chain) and refreshes the end-to-end sample accordingly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
mobile/installation.md Updates install/init instructions for @walletconnect/universal-provider and adds an alternatives note + link to current Reown docs.
mobile/connecting.md Documents the display_uri event and provider.connect() resolving on approval; simplifies disconnect to provider.disconnect().
mobile/signing.md Converts method examples and the full flow to provider.request(..., "stellar:pubnet") and replaces SignClient usage with UniversalProvider.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

CassioMG and others added 4 commits April 11, 2026 00:03
The in-app browser detection is a Stellar Wallets Kit implementation
detail, not needed by dapp developers using UniversalProvider directly.
Simplified the full example and clarified the in-app vs external
browser UX difference in prose instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add @reown/appkit to installation alongside universal-provider
- Initialize createAppKit with manualWCControl for standalone modal
- Use modal.open({ uri }) in display_uri handler instead of console.log
- Add links to Reown UniversalProvider and AppKit modal docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire the provider to the modal via the universalProvider option,
matching the pattern from the Reown migration guide.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Critical:
- Replace display_uri + modal.open({ uri }) with modal.open() before
  provider.connect() — AppKit handles URI display automatically when
  manualWCControl and universalProvider are set

Important:
- Add comment explaining mainnet placeholder in AppKit networks config
- Fix README chainId hint to reference provider.request() argument
- Add session null check after provider.connect()

Suggestions:
- Switch to named import { UniversalProvider } matching Reown docs
- Add cross-file reference notes to connecting.md and signing.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


## Alternatives

[Stellar Wallets Kit](https://stellarwalletskit.dev/) provides a multi-wallet interface that includes WalletConnect support, but currently only supports `stellar_signXDR` and `stellar_signAndSubmitXDR`. To use all four Freighter Mobile methods — including `stellar_signMessage` and `stellar_signAuthEntry` — implement the WalletConnect integration directly as shown in this guide.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created a ticket to work with Enrique to add those 2 extra methods to SWK: stellar/freighter-mobile#815

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.

2 participants