bitcoin-peg
Cosmos Bitcoin peg zone module for Lotion and coins
This module is currently under active development but works as a fully-functional prototype on top of Bitcoin testnet.
This module implements a simplified version of the "Proof-of-Stake Bitcoin Sidechains" design. It works by holding Bitcoin in a special script which is a multisig spendable by consensus of the validators of a Tendermint blockchain.
This module can be dropped in to any Lotion app to enable the chain to hold reserves of Bitcoin, accept deposits, or pay out withdrawals in a low-trust manner. In addition, it lets the chain timestamp itself on the Bitcoin blockchain, increasing security of the chain by utilizing Bitcoin's proof-of-work.
Usage
npm install bitcoin-peg
let app = // create a token using `coins` to be pegged to Bitcoinapp // pick a Bitcoin (or testnet) block header to use as the checkpointlet checkpoint = version: 1073733632 prevHash: Buffer merkleRoot: Buffer timestamp: 1544602833 bits: 0x1a015269 nonce: 3714016562 height: 1447488 // keep track of the Bitcoin blockchain, and specify the route of the pegged tokenapp appstart