• Description

    Creates an instance of a wallet provider

    Example

    const provider = await createProvider(MetamaskProvider)
    await provider.init()
    // or
    const providerDetectorInstance = await new ProviderDetector().init()
    const metamaskProvider = await createProvider(MetamaskProvider, { providerDetectorInstance })
    const phantomProvider = await createProvider(PhantomProvider, { providerDetectorInstance })
    // When using WalletConnectEvmProvider, it's required to set chainsDetails:
    Provider.setChainsDetails(chainsDetails)

    Type Parameters

    • T extends string

    Parameters

    Returns Promise<Provider>

Generated using TypeDoc