Ethereum and Bitcoin mainnet
This is the most common case when you want to use the SDK to interact with the tBTC bridge on Ethereum and Bitcoin mainnet.
The SDK addresses it by exposing the TBTC.initializeMainnet
function. That function:
Takes an Ethers signer or provider as a parameter and uses it to interact with tBTC contracts deployed on Ethereum mainnet
Automatically configures an Electrum Bitcoin client to communicate with the Bitcoin mainnet (communication is done through a set of pre-configured Electrum servers)
The following code snippet presents the usage of this function:
The above code snippet presents just one way of creating an Ethers signer/provider. Please refer Ethers v5 documentation to learn more.
Last updated