feat(typink): add support for the WalletConnect protocol#301
Open
feat(typink): add support for the WalletConnect protocol#301
WalletConnect protocol#301Conversation
2a51bfb to
d17d83b
Compare
There was a problem hiding this comment.
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.
WalletConnect protocolWalletConnect protocol
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.
This PR adds support for the WalletConnect protocol.
Details:
WalletConnectby passing aWalletConnectinstance to thewalletsprop in TypinkProvider.