Skip to content

oraichain/cw-bitcoin-orchestrator

Repository files navigation

Decentralized Cosmwasm Bitcoin Bridge


💁 This repository holds contains several useful packages for the Cosmwasm Bitcoin Bridge with Oraichain and is managed by the Oraichain Labs team.

📦 Packages

Name Description
@oraichain/contracts-build Storing production Bitcoin Bridge CW contract builds and a helper function to deploy them.
@oraichain/contracts-sdk Storing production Bitcoin Bridge CW contract client and types in TypeScript to simplify contract interaction.
@oraichain/orchestrator A program responsible for relaying packets and submitting signatures between Bitcoin and Oraichain, validator who register for running orchestrator, will run this program.
@oraichain/wasm-sdk A program responsible for encoding and decoding correct type data of Cosmwasm contract between Rust and Typescript.
@oraichain/lib-js A program responsible for creating deposit address for React.JS client.

🛠 Developing

Prerequisites

You should install the following dependencies beforehand:

  • NPM
  • Yarn (Yarn Berry 4.x is recommended)

Checkout the repository and bootstrap the yarn workspace:

# Clone the repo.
git clone https://github.com/oraichain/cw-bitcoin-orchestrator
cd cw-bitcoin-orchestrator
yarn

Updating the packages

If you want to change the build and sdk packages, you can follow our contract management pattern. Below are the commands we use to build the contract and generate types:

# build code:
cwtools build ../cw-bitcoin/contracts/* -o packages/contracts-build/data
# build schema
cwtools build ../cw-bitcoin/contracts/* -s
# gen code:
cwtools gents ../cw-bitcoin/contracts/* -o packages/contracts-sdk/src
# gen doc:
yarn docs

Testing

# Run all tests
yarn test

# ES lint
yarn eslint

Building

yarn build

Publishing

yarn deploy

Patch a package

yarn patch-package @cosmjs/cosmwasm-stargate

For publishing onto NPM, you will need an credential key. Hence, it's best to let the github workflow do the work.

Credits

🛠 Built by Oraichain Labs — if you like our tools, please consider delegating to OWallet validators ⚛️

🪪 License

All packages are GPL 3.0 licensed.

Disclaimer

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.