Skip to content

Commit

Permalink
Support for cross-chain contracts
Browse files Browse the repository at this point in the history
Here we enhance the SDK to support cross-chain contracts.
We are achieving this by introducing a new `crossChainContracts`
method exposed by the main `TBTC` component. This method allows to
obtain cross-chain contracts handles for a specific supported L2 chain.

This feature will serve as a base to write a cross-chain Bitcoin depositor
component that will be used for direct bridging of deposits initiated on
supported L2 chains.

By the way, we are taking an opportunity and refactor the chain representation
used across the SDK. Namely, we are getting rid of the `EthereumNetwork`
type, and we are replacing it with a global `Chains` namespace
that aggregates all chains supported by the tBTC v2 SDK.
  • Loading branch information
lukasz-zimnoch committed Mar 13, 2024
1 parent fe09dc6 commit cf334f9
Show file tree
Hide file tree
Showing 19 changed files with 3,369 additions and 72 deletions.
2 changes: 1 addition & 1 deletion typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"typechain/"
],
"config": {
"contracts": "./node_modules/@keep-network/ecdsa/artifacts/WalletRegistry.json ./node_modules/@keep-network/tbtc-v2/artifacts/{Bridge,TBTCVault,TBTC}.json"
"contracts": "./node_modules/@keep-network/ecdsa/artifacts/WalletRegistry.json ./node_modules/@keep-network/tbtc-v2/artifacts/{Bridge,TBTCVault,TBTC}.json ./node_modules/@keep-network/tbtc-v2/build/contracts/l2/L1BitcoinDepositor.sol/L1BitcoinDepositor.json ./node_modules/@keep-network/tbtc-v2/build/contracts/l2/L2BitcoinDepositor.sol/L2BitcoinDepositor.json ./node_modules/@keep-network/tbtc-v2/build/contracts/l2/L2TBTC.sol/L2TBTC.json"
},
"dependencies": {
"@bitcoinerlab/secp256k1": "^1.0.5",
Expand Down
1 change: 1 addition & 0 deletions typescript/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Export shared library modules.
export * from "./lib/base"
export * from "./lib/bitcoin"
export * from "./lib/contracts"
export * from "./lib/electrum"
Expand Down
Loading

0 comments on commit cf334f9

Please sign in to comment.