Skip to content

Conversation

@1cedrus
Copy link
Member

@1cedrus 1cedrus commented Oct 17, 2025

This PR adds support for the WalletConnect protocol.

Details:

  • You can now enable WalletConnect by passing a WalletConnect instance to the wallets prop in TypinkProvider.
  • It’s recommended to initialize your own instance, but a default one is provided for quick testing.

@1cedrus 1cedrus force-pushed the feature/wallet-connect branch from 2a51bfb to d17d83b Compare October 18, 2025 07:44
@1cedrus 1cedrus marked this pull request as ready for review October 18, 2025 08:09
Copilot AI review requested due to automatic review settings October 18, 2025 08:09
Copy link

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

Add support for WalletConnect to Typink, integrating a new WalletConnect wallet, chain ID utilities, and wiring it into providers and example app.

  • Introduces WalletConnect class with session management, signer, and injected provider API.
  • Adds CAIP-2 chain ID utilities and genesisHash to network definitions.
  • Integrates WalletConnect into WalletSetupProvider and the demo app; adds tests and dependencies.

Reviewed Changes

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

Show a summary per file
File Description
packages/typink/src/wallets/WalletConnect.ts New WalletConnect implementation with connect/disconnect, signer, and session event handling.
packages/typink/src/wallets/tests/WalletConnect.test.ts Comprehensive test suite for WalletConnect behavior and signer.
packages/typink/src/utils/chains.ts Utilities to convert genesis hash and networks to CAIP-2 IDs.
packages/typink/src/utils/tests/chains.test.ts Tests for chain ID utilities.
packages/typink/src/wallets/index.ts Exposes WalletConnect and exports a preconfigured walletConnect instance.
packages/typink/src/wallets/Wallet.ts Types injectedProvider getter for stronger typing.
packages/typink/src/utils/index.ts Re-exports chains utilities.
packages/typink/src/types.ts Adds optional genesisHash to NetworkInfo.
packages/typink/src/providers/WalletSetupProvider.tsx Passes supported networks to WalletConnect on init.
packages/typink/src/providers/tests/WalletSetupProvider.test.tsx Updates Jotai mock to include atom for tests.
packages/typink/src/networks/mainnet.ts Adds genesisHash to mainnet networks.
packages/typink/src/networks/testnet.ts Adds genesisHash to testnet networks.
packages/typink/src/atoms/walletActions.ts Ensures WalletConnect sessions are properly disconnected.
packages/typink/package.json Adds WalletConnect-related dependencies.
examples/demo-inkv5/src/main.tsx Demonstrates WalletConnect usage with alephZero network.
examples/demo-inkv5/.eslintrc.cjs Minor lint rule updates.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@1cedrus 1cedrus changed the title feat(typink): support WalletConnect protocol feat(typink): add support for the WalletConnect protocol Oct 19, 2025
@1cedrus 1cedrus requested a review from sinzii October 20, 2025 02:49
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