Skip to content

oraichain/xrpl-bridge-sdk

Repository files navigation

Oraichain XRPL Bridge SDK


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

📦 Packages

Name Description
@oraichain/xrpl-bridge-contracts-build Storing production XRPL Bridge CW contract builds and a helper function to deploy them.
@oraichain/xrpl-bridge-contracts-sdk Storing production XRPL Bridge CW contract client and types in TypeScript to simplify contract interaction.
@oraichain/xrpl-bridge-relayer A program responsible for relaying packets between XRPL and Oraichain.

🛠 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/xrpl-bridge-sdk
cd xrpl-bridge-sdk
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-xrpl-bridge/contracts/* -o packages/contracts-build/data
# build schema
cwtools build ../cw-xrpl-bridge/contracts/* -s
# gen code:
cwtools gents ../cw-xrpl-bridge/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.