Crosschain
This mode of the SDK will initialize Ethereum, Bitcoin and an L2 to work with tBTC. Compatible with mainnet and testnet.
Currently only functional with Arbitrum, soon more blockchains will be available.
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
Needs to receive as a second parameter the value
true
to activate the crosschain mode.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.
Testnet
The SDK addresses it by exposing the TBTC.initializeSepolia
function. That function:
Takes an Ethers signer or provider as a parameter and uses it to interact with tBTC contracts deployed on Ethereum Sepolia
Needs to receive as a second parameter the value
true
to activate the crosschain mode.Automatically configures an Electrum Bitcoin client to communicate with the Bitcoin testnet (communication is done through a set of pre-configured Electrum servers)
The usage of this function is exactly the same as for the previous TBTC.initializeMainnet
function.
Last updated