Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Peg using Trezor
This document explains how to try the 2-way peg mechanism using Trezor. You can use 2-way peg in both Testnet and Mainnet.
- Clone this project.
- You need a Trezor.
- We recommend you to have Trezor Bridge installed and review this Developers Guide.
From BTC to RBTC
Before start: read lock requirements
trezor-peg.htmlin your web browser.
Get your BTC Address clicking "Get BTC Address" button on the left top.
Send this BTC address to RSK in Gitter in order to be added to Peg Whitelist.
Go to some BTC Testnet Faucet and send some BTC to this address.
Get your RSK Address clicking "Get RSK Address" button on the right top and keep it. You will use it to receive your RBTC from Bridge.
Complete "From address Path" field using the given format.
Get RSK Federation Address from "Get Federation Address" button, then complete "Federation Address" field.
Complete Transaction Amount in satoshis value.
Complete "Input UTXO ID" with the hash of the UTXO that you will use. An easier way to find UTXO information is using this API replacing
%addresswith your BTC address.
Complete "Input UTXO Index" with the index of the same UTXO.
Finally set "Input UTXO Amount", remember it has to be enough to complete the transaction.
- Once the transaction is signed, press the link and set the tx hash in bitcoin explorer to broadcast.
Wait the stipulated time.
From RBTC to BTC
Before start: read release requirements.
Go to "Release process" section at the bottom.
Get RSK Address clicking "Get RSK Address" button on the right top and keep it. Put this value in "From RSK Address" field.
Set this RSK Address in the field.
Set the tx Amount.
- Once you see the tx hash press the link, you will go to MyCrypto site. Set the hash in the field and send it.
- Wait the stipulated time.