Skip to content

Clarity Bitcoin library for cross-chain transaction verification and more for Stacks smart contracts.

Notifications You must be signed in to change notification settings

syvita/bitcoin.clar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Welcome! 👋

bitcoin.clar is a Clarity library that you can use in your smart contracts to do various operations that involve Bitcoin.

Features:

  • Verify Bitcoin transactions in a Stacks smart contract
    • Support P2PKH (legacy) addresses
    • Support P2SH (SegWit) addresses
    • Support Bech32 (native SegWit) addresses
  • Create a Bitcoin address from a secp256k1 public key (WIP)
  • Verify a secp256k1 signature originated from a certain Bitcoin address (WIP)

bitcoin.clar's primary feature currently is cross-chain transaction verification. This means you can verify that Bitcoin transactions happened in a trustless smart contract on the ::Stacks blockchain::.

It currently powers ::Catamaran swaps:: & ::Sypool::'s transaction verification. We built bitcoin.clar specifically for Sypool, but the applications of verifying Bitcoin transactions through smart contracts are far more than that. We're trying to build docs and make this a library that other developers in the ecosystem can use too!

Continue reading...