Skip to content

docs(wallet): add docs/WALLET_INTEGRATION.md for useWallet and Freighter client#503

Open
Samuel-21-eng wants to merge 1 commit into
CredenceOrg:mainfrom
Samuel-21-eng:docs/wallet-integration
Open

docs(wallet): add docs/WALLET_INTEGRATION.md for useWallet and Freighter client#503
Samuel-21-eng wants to merge 1 commit into
CredenceOrg:mainfrom
Samuel-21-eng:docs/wallet-integration

Conversation

@Samuel-21-eng

Copy link
Copy Markdown

Documents the hook shape, connection state machine, and the disconnected / not-installed / wrong-network UX contract.

PR Description

Summary
This PR adds comprehensive documentation for the wallet integration layer (useWallet hook and Freighter client
wrapper) to improve developer onboarding and maintain consistent UX across the application.

Changes

  • New Documentation: Created docs/WALLET_INTEGRATION.md to serve as a single source of truth for the wallet
    integration.
    • Documented the useWallet return shape based on the source code.
    • Defined the connection state machine (Disconnected → Connecting → Connected/Error).
    • Established the UX contract for connection gating, extension detection, and network mismatch handling.
  • Documentation Updates:
    • Linked docs/WALLET_INTEGRATION.md from docs/README.md.
    • Added a reference to the wallet documentation in docs/ARCHITECTURE.md.
  • Maintenance: Ran prettier on the updated documentation files to ensure compliance with project formatting
    standards.

Why this is needed
Wallet integration is the highest-risk surface in the app, as it handles signing actions. Previously, there
was no centralized reference for the hook's API or the expected UX for connection/network states. This
documentation prevents inconsistent gating logic and helps new contributors understand the state machine.

Verification

  • Verified useWallet hook shape against src/hooks/useWallet.ts.
  • Ran npm run format:check and fixed formatting issues.
  • Confirmed all new internal links resolve correctly.

Closes #326

…ter client

Documents the hook shape, connection state machine, and the disconnected /
not-installed / wrong-network UX contract.
@drips-wave

drips-wave Bot commented Jul 2, 2026

Copy link
Copy Markdown

@Samuel-21-eng Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Author docs/WALLET_INTEGRATION.md documenting useWallet, the Freighter client, and connection states

1 participant