Using Multi Injected Provider Discovery (EIP-6963)
Using mipd (opens in a new tab) utilities directly, this is how you find the embedded wallet's EIP-1193 (opens in a new tab) provider:
import { createStore } from 'mipd';
import { useSyncExternalStore } from 'react';
const store = createStore();
function useProviders() {
return useSyncExternalStore(store.subscribe, store.getProviders);
}
function usePasskeysProvider() {
const providers = useProviders();
return providers.find(
(provider) => provider.info.rdns === 'network.passkeys',
);
}