TConnectEtherlinkProvider
Configure and use TConnectEtherlinkProvider
The TConnectEtherlinkProvider
class is a provider implementation that requires specific configuration options passed to its constructor during instantiation. Note that the bridgeUrl
parameter must always be set to "https://tconnect.io"
, as this is the hosted location of the bridge.
Here’s the full definition of the TConnectEtherlinkProviderOptions
interface:
Understanding the walletApp
Parameter
walletApp
ParameterThe walletApp
parameter is optional and specifies the wallet application the user intends to connect to. This parameter uses the EtherlinkWalletApp
type, which represents supported wallet applications. Providing this parameter allows the provider to optimize and streamline the connection process for the specified wallet.
If the walletApp
parameter is omitted, the provider will attempt to connect to any available wallet. In such cases, the connection is established via a connection string provided by the bridge. (See more details here.)
Example of initializing the TConnectEtherlinkProvider
This function demonstrates how to connect to the wallet using the initialized provider and handle potential errors:
Last updated