-
Notifications
You must be signed in to change notification settings - Fork 22
[WIP] feat: multichain support #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/onramp
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: b3eed6e The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…ed event, universal provider singleton, explorer button
Published pre-release version: 0.0.0-canary-20250513154354 |
|
Summary
Enable support for multiple chains to AppKit React Native
packages/appkit
is a copy ofscaffold
, so you'll see a lot of "new code" but you can discard that.📁 Important files:
packages/appkit/src/AppKit.ts
-> Centralizes general logic. Handles the connections, adapters, subscribes to adapter events to update controllerspackages/appkit/src/connectors/WalletConnectConnector.ts
-> Connector that uses Universal Provider internallypackages/core/src/controllers/ConnectionsController.ts
-> This is the most important Controller, which replaces AccountController and NetworkController. It contains all connections related data. It also has a derived state to make things easierpackages/solana/src/adapter.ts
-> Basic adapter for Solanapackages/ethers/src/adapter.ts
-> Basic adapter for EVM connections using Etherspackages/bitcoin/src/adapter.ts
-> Basic adapter for Bitcoinpackages/appkit/src/AppKitContext.tsx
-> The instance of AppKit is saved on a context, so the view can access it and execute methods. So now instead of views calling controller methods directly, its all centralized in AppKit.packages/appkit/src/views/w3m-account-default-view/index.tsx
calls AppKit disconnect instead of clearing controllers, etc.packages/common/src/utils/TypeUtil.ts
-> This file contains the new abstractions for Connectors, Adapters and Providers.packages/appkit/src/modal/w3m-account-button/index.tsx
-> Example on how to get active network and active address📚 Related resources