• Parameters

    • providerProxy: ProviderProxyConstructor

      The type of provider from the appropriate package, such as MetamaskProvider

    • Optional createProviderOpts: CreateProviderOpts

      Options for the connection

    Returns useProviderReturnType

    Description

    A React hook that creates a provider object with access to the user's wallet

    Example

    const { provider, ...rest } = useProvider(MetamaskProvider)
    provider?.connect()
    console.log(provider?.address)

Generated using TypeDoc