Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 1.69 KB

README.md

File metadata and controls

29 lines (25 loc) · 1.69 KB

Peg-in & Peg-out Transactions Demo

We provide an example of the peg-in transaction, by which a user moves its coins to the Axelar validators' output, along with an example of the peg-out transaction, with which the Axelar validators unlock previously pegged-in BTC. These transactions are valid and would be accepted by the Bitcoin network. To verify this, they are passed to a running Bitcoin Core daemon set to a local (regtest) network and tested for acceptance by its mempool.

Setup

Execution

  • Start a Bitcoin Core daemon:
    • Ubuntu: bitcoin-core.daemon -chain=regtest
    • MacOS: bitcoind -daemon -chain=regtest
  • Open a new terminal and navigate to the directory where this repo was cloned before.
  • cargo run <path to .bitcoin directory>. Example paths:
    • Ubuntu: /home/<username>/snap/bitcoin-core/common/.bitcoin/
    • MacOS: /home/<username>/.bitcoin/
  • The peg-in and peg-out transactions, along with a block that includes them, are printed.

Acknowledgements