getProviders & getProviderById
Detecting the providers with getProviders
If the user has multiple browser extension wallets installed, Sats Connect will detect the extensions that inject their provider information under window.btc_providers
, following the WBIP004 standard.
Sats Connect will construct a "multiprovider" array at window.btc_providers
, containing the injected provider from each wallet. Xverse Wallet can be identified in this array by the following properties:
Your application can detect the user's installed wallet providers with the getProviders
method.
No request parameters are required:
The getProviders
method returns an array of btcProvider
objects with the following WBIP004 properties:
Selecting a provider with getProviderById
You can use the getProviderById
method to select any specific provider from the list of providers injected under window.btc_providers
No request parameters are required:
The getProviderById
method returns the provider object that the wallets injects in the window
object.