A WalletProvider connects a wallet to the SDK. It is for companies that control a wallet app or browser extension and want Dynamic’s SDK to route signing to it. At minimum it must implement chain, key, groupKey, metadata, walletProviderType, getActiveNetworkId, and getConnectedAddresses.
Minimal WalletProvider
Register the provider
Extensions register wallet providers through the WalletProviderRegistry. Set a priority that reflects how the wallet is integrated. Higher-priority registrations win when the same key is registered more than once.
WalletProviderPriority.WALLET_SDK is the highest priority. Use it when you control the wallet’s own SDK. The wallet provider priority guide covers the full priority levels and registry replacement behavior.
The registry stores one provider per key. If a provider with the same key is registered again, the higher-priority registration wins. Keep key stable by using formatWalletProviderKey.
Connect the wallet
The custom wallet provider is only available to the SDK after your extension has registered it. In the app that consumes the extension, create a DynamicClient, add the extension, and then connect.
Use connectWithWalletProvider instead of connectAndVerifyWithWalletProvider if you only want to connect without verifying ownership. You can also discover the provider with getAvailableWalletProvidersData once the extension is registered.