WalletProvider is registered, it is given a WalletProviderPriority. The priority tells the SDK how the wallet was discovered and which registration should win if two providers claim the same key.
Priority levels
WALLET_SDKis for first-party SDK integrations where the wallet explicitly registers itself.WALLET_SELF_ANNOUNCEMENT_STANDARDis for wallets that follow a standard discovery protocol. If your wallet supports a standard listed in Supported wallet standards, it already works with Dynamic through that standard.WINDOW_INJECTis for backwards compatibility with wallets that inject a global provider. Use this only when no standard is available, because multiple injected providers can conflict with each other.
Registry replacement and re-registration
TheWalletProviderRegistry stores at most one provider per key.
- If a provider with the same
keyis registered again, the higher-priority registration wins. - A lower-priority registration cannot replace an existing higher-priority one.
- If the priorities are equal, the new registration wins.
key stable by using formatWalletProviderKey. The key is derived from chain, displayName, and walletProviderType.
Why priority matters
Priority prevents a built-in or injected provider from silently shadowing a first-party SDK integration. If your extension controls the wallet and you register withWALLET_SDK, your provider will take precedence over any standard or injected provider that uses the same key.