Skip to content

Add Freighter developer documentation#1

Merged
piyalbasu merged 27 commits intomainfrom
add-developer-docs
Apr 14, 2026
Merged

Add Freighter developer documentation#1
piyalbasu merged 27 commits intomainfrom
add-developer-docs

Conversation

@piyalbasu
Copy link
Copy Markdown
Contributor

This pull request introduces a comprehensive overhaul of the Freighter wallet developer documentation. The updates include a new documentation structure, a rewritten and expanded developer guide, and improved navigation for both browser extension and mobile integration. The documentation now provides clear, example-driven guides for all major Freighter API features, as well as a summary table and integration resources.

Documentation Restructure and Navigation:

  • Introduced .gitbook.yaml and SUMMARY.md to define the documentation structure and table of contents, organizing content by integration type and feature. [1] [2]
  • Added index.html to support Docsify-based local documentation browsing, enabling easier preview and navigation.

Content Overhaul and Expansion:

  • Rewrote the README.md to provide a welcoming introduction, integration options, quick links, and resource references, making it easier for developers to get started and find relevant guides.
  • Added a new integrations/README.md page to document third-party integrations such as Soroswap and hardware wallets, encouraging ecosystem adoption.

Developer Guide Enhancements:

  • Created and expanded feature-specific guides under developer-guide/:
    • Installation instructions for both npm/yarn and CDN usage, with clear next steps.
    • Connecting to Freighter: detecting, authorizing, and requesting access, with robust code examples and best practices.
    • Reading user data and network details, including when to use each method.
    • Signing transactions, auth entries, and messages, with full API reference and a complete end-to-end example.
    • Token management for Soroban tokens, with example usage and user experience notes.
    • Watching wallet changes in real time using the WatchWalletChanges API.
  • Added a new developer guide overview (developer-guide/README.md) summarizing the API and linking to all feature pages.

These changes make the documentation more accessible, up-to-date, and actionable for both new and experienced developers.

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Migrate docs from freighter-integration-docs, removing unused GitBook
assets. Includes developer guide, mobile integration, and API reference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 9, 2026 22:36
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 overhauls the Freighter developer documentation by introducing a structured table of contents and adding/rewriting integration guides for both the browser extension (@stellar/freighter-api) and Freighter Mobile via WalletConnect v2.

Changes:

  • Added GitBook navigation structure (.gitbook.yaml, SUMMARY.md) and a Docsify index.html for local browsing.
  • Rewrote the root README.md to provide clearer integration pathways and quick links.
  • Added new extension and mobile guide pages covering installation, connecting, signing, and related features.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
.gitbook.yaml Defines GitBook structure (readme + summary).
SUMMARY.md Adds a table of contents organizing Extension, Mobile, and Integrations docs.
README.md New landing page with integration selection, quick links, and resources.
index.html Adds Docsify-based local documentation viewer.
developer-guide/README.md Extension developer guide overview and API entry points.
developer-guide/installation.md Extension install/setup instructions (npm/yarn + CDN).
developer-guide/connecting.md Extension connection/authorization flows (isConnected, isAllowed, setAllowed, requestAccess).
developer-guide/reading-data.md Extension read methods for address/network details.
developer-guide/signing.md Extension signing docs + end-to-end example.
developer-guide/token-management.md Adds Soroban token add flow (addToken).
developer-guide/watching-changes.md Documents WatchWalletChanges polling watcher.
mobile/README.md Mobile WalletConnect overview, chains, API list, and error handling.
mobile/installation.md WalletConnect client installation and initialization.
mobile/connecting.md WalletConnect session creation, events, and disconnect flow.
mobile/signing.md WalletConnect signing methods and auth-entry signing example.
integrations/README.md Lists documented third-party integrations (Soroswap, HW wallets).

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

Comment thread README.md Outdated
Comment thread developer-guide/README.md Outdated
Comment thread developer-guide/signing.md Outdated
Comment thread developer-guide/signing.md Outdated
Comment thread mobile/README.md Outdated
Comment thread mobile/signing.md
Comment thread mobile/signing.md Outdated
Comment thread index.html Outdated
Comment thread developer-guide/signing.md Outdated
@piyalbasu
Copy link
Copy Markdown
Contributor Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@piyalbasu
Copy link
Copy Markdown
Contributor Author

Code review

Found 4 issues:

  1. Broken internal link to a non-existent page (soroban-development.md does not exist in the repo)

See the [`authorizeEntry` helper](https://github.com/stellar/js-stellar-base/blob/e3d6fc3351e7d242b374c7c6057668366364a279/src/auth.js#L97) in `js-stellar-base` for how signed auth entries are used, or the [Soroban Development](soroban-development.md) page for wallet-side patterns.

  1. Wrong CDN path — the installed package exposes build/index.min.js, not dist/index.min.js. The URL as written returns a 404.

```html
<script src="https://unpkg.com/@stellar/freighter-api/dist/index.min.js"></script>
```

  1. Deprecated package import — stellar-sdk is deprecated and has moved to @stellar/stellar-sdk. The full example should import from "@stellar/stellar-sdk", not "stellar-sdk".

import { isConnected, requestAccess, signTransaction } from "@stellar/freighter-api";
import { Server, TransactionBuilder } from "stellar-sdk";

  1. Inaccurate description of setAllowed() return value — the hint says it "resolves immediately with true", but the actual return type is Promise<{ isAllowed: boolean } & { error?: FreighterApiError }>. It resolves with { isAllowed: true }, not with the primitive true.

{% hint style="info" %}
If the user has already authorized your app, `setAllowed()` resolves immediately with `true`.
{% endhint %}

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@piyalbasu
Copy link
Copy Markdown
Contributor Author

Code review

Found 1 issue:

  1. CDN script paths use dist/index.min.js which returns 404 — the correct path is build/index.min.js. Both the unversioned and pinned URLs are broken, so any developer following the CDN installation instructions will get a failed script load.

```html
<script src="https://unpkg.com/@stellar/freighter-api/dist/index.min.js"></script>
```
This always loads the latest version automatically. To pin a specific version:
```html
<script src="https://unpkg.com/@stellar/freighter-api@6.0.1/dist/index.min.js"></script>
```

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

piyalbasu and others added 5 commits April 9, 2026 19:00
…r compat issues

- Fix mobile/ link to mobile/README.md for GitBook/docsify compatibility
- Replace undocumented signBlob with signMessage in import example
- Standardize on @stellar/stellar-sdk (not js-stellar-sdk or stellar-sdk)
- Fix broken soroban-development.md link to point to Stellar developer docs
- Fix CDN paths from dist/ to build/ to resolve 404s
- Correct setAllowed() return type description to { isAllowed: true }
- Clarify chainId is a top-level WalletConnect request field, not inside params
- Replace Buffer.from() with TextEncoder/atob for browser compatibility
- Use consistent client.request() variable name in auth entry example
- Pin docsify (4.13.1) and prismjs (1.29.0) CDN versions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The actual @stellar/freighter-api returns error as a FreighterApiError
object with { code, message, ext? }, not a plain string. Updated all
return type signatures and code examples to use error.message.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Blockaid site scan happens at connection time, not at auth-entry
  signing time
- Add missing "non-string" condition to signAuthEntry error table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rewrote README.md with What You Can Build, How It Works, and Why
  Freighter sections to walk developers through the integration
  experience without code samples
- Added Stellar Wallets Kit (stellarwalletskit.dev) to the Introduction
  and Integrations page for multi-wallet support

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

Code review

Found 1 issue:

  1. Server is not a top-level export of @stellar/stellar-sdk — the Horizon server class is namespaced under Horizon.Server. Importing { Server } from the top-level package will give undefined at runtime in v12+. The correct import is import { Horizon } from "@stellar/stellar-sdk" and usage is new Horizon.Server(...). TransactionBuilder is fine as a top-level import (it comes from @stellar/stellar-base which is re-exported at the top level).

```typescript
import { isConnected, requestAccess, signTransaction } from "@stellar/freighter-api";
import { Server, TransactionBuilder } from "@stellar/stellar-sdk";
// 1. Check Freighter is installed
const connectResult = await isConnected();
if (!connectResult.isConnected) {
throw new Error("Freighter not found");
}
// 2. Request the user's public key
const accessResult = await requestAccess();
if (accessResult.error) {
throw new Error(accessResult.error.message);
}
// 3. Sign the transaction
const xdr = "AAAAAgAAAAA..."; // your assembled transaction XDR
const signResult = await signTransaction(xdr, {
network: "TESTNET",
address: accessResult.address,
});
if (signResult.error) {
throw new Error(signResult.error.message);
}
// 4. Submit to Horizon
const server = new Server("https://horizon-testnet.stellar.org");
const tx = TransactionBuilder.fromXDR(
signResult.signedTxXdr,
"Test SDF Network ; September 2015",
);

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@piyalbasu
Copy link
Copy Markdown
Contributor Author

Code review

Found 2 issues:

  1. getAddress() example logs raw FreighterApiError object instead of error.message — when the error type was updated from string to FreighterApiError in commit 90e6545, this instance in reading-data.md was missed. Every other file (connecting.md, signing.md, token-management.md) was updated to use error.message, but this one still uses console.error(error), which will print [object Object] at runtime.

const { address, error } = await getAddress();
if (error) {
console.error(error);
} else {
console.log("Public key:", address);
}
```

  1. Docsify script URL returns 404 — index.html loads docsify from cdn.jsdelivr.net/npm/docsify@4.13.1/dist/docsify.min.js, but that path does not exist. The correct path is lib/docsify.min.js (the CSS on line 7 already uses the correct /lib/ prefix). This breaks the documentation site entirely.

</script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4.13.1/dist/docsify.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-typescript.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-javascript.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-bash.min.js"></script>

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

- reading-data.md: console.error(error) -> console.error(error.message)
  to match FreighterApiError object type (missed in earlier update)
- index.html: docsify path dist/ -> lib/ to fix 404

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread README.md Outdated
Freighter wallet developer documentation
# Welcome to Freighter

Freighter is a non-custodial wallet for the Stellar network, available as a browser extension and a mobile app. This guide will walk you through integrating Freighter into your dapp so your users can connect their wallets, sign transactions, and interact with Soroban smart contracts — all without you ever touching a private key.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a strong emphasis throughout these docs on user control and the dapp's limited liability

  • "without you ever touching a private key"
  • "the user reviews everything [...] and stays in full control"
  • "You never handle private keys, seed phrases, or encryption."

I'm not sure this is a major concern for our audience worth addressing repeatedly. It may make sense to briefly describe what a self-custody/non-custodial wallet is, but once we do that I think repeated references are redundant.

Comment thread README.md Outdated
Comment thread README.md Outdated

For **desktop browsers**, you integrate with the Freighter extension through a lightweight JavaScript library. It injects itself into the page, and your dapp calls methods like "is the wallet connected?", "what's the user's address?", and "please sign this transaction." Every sensitive action goes through the extension's UI where the user has full visibility and control.

For **mobile**, the integration works over WalletConnect v2. Your dapp generates a connection URI, the user scans a QR code with Freighter Mobile, and a secure relay session is established. From that point on, signing requests flow through the same pattern — your dapp proposes, the user reviews and approves in the wallet.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

QR code scanning makes sense when you're connecting Freighter mobile to a website running in your desktop browser, but I think we should focus more on the in-app browser scenario. In that scenario a walletconnect-managed panel is displayed for the user to select their wallet.

ScreenRecording_04-10-2026.10-11-56_1.MP4

Comment thread README.md Outdated

Both paths produce the same output: signed transactions you can submit to the Stellar network. So your backend and submission logic stay the same regardless of whether your user connected from a laptop or a phone.

If you want to support multiple Stellar wallets — not just Freighter — take a look at [Stellar Wallets Kit](https://stellarwalletskit.dev/). It provides a unified interface across Stellar desktop wallets so your users can connect with whichever browser extension they prefer. Note that it currently supports desktop wallets only, not mobile.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

stellar-wallets-kit supports walletconnect, which works on mobile?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh didn't realize they added this - I'll update

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've just realized SWK doesn't give support for signMessag and signAuthEntry for WC modules so I created this ticket to handle that with Enrique: stellar/freighter-mobile#815

for the moment dApps would need to handle WC implementation directly to explore all methods Freighter Mobile currently supports

Comment thread README.md
Comment thread README.md Outdated
Comment on lines +37 to +41
**Ideal for:**

- React, Vue, or Angular web apps
- Server-rendered apps (Next.js, Nuxt)
- Static sites via CDN
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe remove since its the only option for desktop browsers?

Comment thread README.md Outdated
Comment on lines +49 to +53
**Ideal for:**

- Mobile-first dapps
- Cross-platform apps that support both desktop and mobile wallets
- Dapps using WalletConnect for multi-wallet support
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same there -- only option for mobile.

Comment thread README.md Outdated
Comment on lines +59 to +64
| I want to... | Extension | Mobile |
| ------------------------------------- | -------------------------------------------------- | ---------------------------------------------------- |
| Install / set up | [Installation](developer-guide/installation.md) | [Installation](mobile/installation.md) |
| Connect to Freighter | [Connecting](developer-guide/connecting.md) | [Connecting](mobile/connecting.md) |
| Sign a transaction | [Signing](developer-guide/signing.md) | [Signing](mobile/signing.md) |
| Add a token | [Token Management](developer-guide/token-management.md) | — |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: can we rename the developer-guide directory to extension to match mobile?

Comment thread extension/connecting.md Outdated

### `requestAccess()`

Prompt the user for permission to access their public key. This is the **recommended** way to initiate a connection with Freighter — it handles both authorization and key retrieval in one call.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To this point about being the recommended approach, do we want to discourage usage of setAllowed/isAllowed? I think we even had discussions about deprecating these functions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally in integration guides, you want to optimize for clarity rather than being comprehensive. So even if there are multiple ways to do something, you want to guide users in the direction you want them to take.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually, on second thought, we shouldn't add a recommendation here. setAllowed also handles authorization. The key difference is one returns the public key and the other just returns a boolean. I believe the Aha folks requested one of these.

One isn't necessarily better than the other, it just depends on your use-case.

Comment thread developer-guide/signing.md Outdated
piyalbasu and others added 2 commits April 10, 2026 13:38
Co-authored-by: Jake Urban <10968980+JakeUrban@users.noreply.github.com>
Co-authored-by: Jake Urban <10968980+JakeUrban@users.noreply.github.com>

Add Soroban tokens to a user's Freighter wallet programmatically.

## Adding a Token
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should we consider explaining why you would do this? I think it's a surprise generally that you need to do this at all.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call - I'll add this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

May also be worth noting that eventually this function will be a no-op when we auto-detect transfers.

Comment thread extension/README.md Outdated

`@stellar/freighter-api` adheres to the [SEP-43](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0043.md) standard for wallet interfaces on Stellar, and also offers additional methods beyond the spec such as `getNetworkDetails`, `addToken`, and `WatchWalletChanges`.

## Importing
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This section references the freighter-api but we don't explain what it is until the next section called "Connecting". Should we consider a rearrangement of this info or wether it belongs in the overview?

piyalbasu and others added 10 commits April 10, 2026 13:54
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Define non-custodial once in the opening line and remove repeated
references to private key handling and user control throughout the
page. Addresses PR review feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The primary mobile use case is the in-app browser where WalletConnect
shows a wallet selection panel, not QR scanning. QR is now mentioned
as a secondary desktop-to-mobile option. Addresses PR review feedback.

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

Removes incorrect "desktop only" note. Addresses PR review feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Focus on what sets Freighter apart from Lobstr, xBull, etc:
SDF-maintained, most advanced feature set (custom tokens, auth entry
inspection, message signing, Blockaid scanning), desktop + mobile.
Addresses PR review feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extension is the only option for desktop, WalletConnect is the only
option for mobile — there's no real choice. Simplified to direct
links per platform. Addresses PR review feedback.

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>
Replace "Soroban token" and "custom token" with "contract token"
to match developers.stellar.org nomenclature.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
piyalbasu and others added 4 commits April 10, 2026 14:34
Addresses PR feedback that the overview references freighter-api
imports before the reader has been through installation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed the "Supporting Both Extension and Mobile" section from the
mobile overview (contained inaccurate window.freighterApi reference).
Added a concise "Both" option to the Get Started section instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. "dApp" -> "Dapp" in mobile/installation.md (consistent with rest)
2. Network table: "Mainnet" -> "Mainnet (PUBLIC)" to map to enum value
3. "Pubnet's passphrase" -> "Mainnet passphrase" in token-management
4. Mobile connecting title: "Connecting" -> "Connecting to Freighter Mobile"
5. Added note about different response field names between extension
   and mobile (signedTxXdr vs signedXDR, signedMessage vs signature)
6. Clarified SEP-43 reference in mobile API table
7. Added error tables to extension signing methods (matching mobile)
8. Aligned parameter/example headings to bold text (matching mobile)
9. SUMMARY.md: "Extension" -> "Extension (freighter-api)" for symmetry
10. Added full connect-sign-submit example to mobile signing

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

Code review

Found 2 issues:

  1. isConnected() hint incorrectly equates "extension not found" with "user is on mobile" — isConnected() returns false for any desktop user without Freighter installed (Firefox, Safari, disabled extension), not just mobile users. Following this guidance would route desktop users without Freighter into the WalletConnect flow.

{% hint style="info" %}
`isConnected()` can also be used to detect if a user is on desktop or mobile — if it returns `false`, the user is likely on a mobile device and you should use WalletConnect instead.
{% endhint %}

  1. Full example in mobile signing only declares 2 of 4 methods (stellar_signXDR, stellar_signAndSubmitXDR) in requiredNamespaces.methods, omitting stellar_signMessage and stellar_signAuthEntry. A developer copying this boilerplate will get a session that rejects those two methods. This is inconsistent with mobile/connecting.md which lists all four.

requiredNamespaces: {
stellar: {
methods: ["stellar_signXDR", "stellar_signAndSubmitXDR"],
chains: ["stellar:pubnet"],
events: ["accountsChanged"],
},
},
});

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

- isConnected() hint: clarify it checks for extension installation,
  not mobile detection. Point to window.stellar?.platform for that.
- Mobile signing full example: add all 4 methods to requiredNamespaces
  (was missing stellar_signMessage and stellar_signAuthEntry).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread mobile/README.md Outdated
Comment thread mobile/README.md Outdated
Comment thread mobile/README.md Outdated

## See also

- [WalletConnect v2 Docs](https://docs.walletconnect.com/)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [WalletConnect v2 Docs](https://docs.walletconnect.com/)
- [WalletConnect v2 Docs](https://docs.walletconnect.network/app-sdk/overview)

Comment thread mobile/installation.md Outdated
@CassioMG
Copy link
Copy Markdown
Contributor

Hey @piyalbasu — I opened #2 targeting this branch with a migration of the mobile WalletConnect code samples.

What it does:

  • Replaces @walletconnect/sign-client with @walletconnect/universal-provider in all mobile examples
  • Adds @reown/appkit modal (createAppKit with manualWCControl) for QR code display and wallet selection
  • Adds a Stellar Wallets Kit alternative note (with caveat that it only supports 2 of 4 Freighter Mobile methods)
  • Removes the isFreighterInAppBrowser branching from the full example

Why:
@walletconnect/sign-client is no longer referenced in the official WalletConnect/Reown documentation — developers searching their docs won't find guidance on it. @walletconnect/universal-provider is the actively documented package for non-EVM chains, and @reown/appkit replaces the deprecated @walletconnect/modal for the connection UI.

References:

Comment thread README.md Outdated
piyalbasu and others added 2 commits April 13, 2026 14:48
- Fix WalletConnect docs links to point to docs.walletconnect.network/app-sdk/overview (the .com URL routes to WalletConnect Pay)
- Rename WalletConnect Cloud to WalletConnect Dashboard with new dashboard.walletconnect.com URL
- Note that Stellar Wallets Kit's WC module only supports 2 of 4 Freighter Mobile signing methods

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Migrate mobile installation to @walletconnect/universal-provider

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>

* Migrate mobile connecting to UniversalProvider

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>

* Migrate mobile signing examples to UniversalProvider

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>

* Remove isFreighterInAppBrowser branching from full example

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 AppKit modal for wallet selection and QR code display

- 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>

* Clarify that wallet selection triggers deep-linking

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

* Clarify that QR code and wallet list are in the same modal

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

* Pass universalProvider to createAppKit

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>

* Fix review issues: modal API, imports, and cross-file clarity

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>

* Fix: use namespaces instead of requiredNamespaces for UniversalProvider

UniversalProvider.ConnectParams does not accept requiredNamespaces —
the correct field is namespaces. Passing requiredNamespaces was silently
ignored, meaning the Stellar namespace would not be registered.

Also added a note explaining that UniversalProvider treats namespaces as
optional on the first connection (they become required on reconnections
via storage). dApps should verify session.namespaces.stellar.methods
after connecting.

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

---------

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

@JakeUrban JakeUrban left a comment

Choose a reason for hiding this comment

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

A few more comments but otherwise LGTM 👏

Comment thread extension/connecting.md Outdated
Comment thread extension/signing.md Outdated

Add Soroban tokens to a user's Freighter wallet programmatically.

## Adding a Token
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

May also be worth noting that eventually this function will be a no-op when we auto-detect transfers.

Comment thread mobile/signing.md Outdated
- Clarify requestAccess() does full Allow List authorization, not just public key access
- Remove internal password/caching details from signing docs (not actionable for dapps)
- Add note that addToken() will become a no-op once auto-detect ships
- Remove "Building the entryXdr" section from mobile signing (out of scope)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@piyalbasu piyalbasu merged commit e3bca70 into main Apr 14, 2026
3 checks passed
@piyalbasu piyalbasu deleted the add-developer-docs branch April 14, 2026 21:25
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.

5 participants