In this section, we will learn how to get started using the 2 way peg app to convert BTC to RBTC, we will do the following:
The following are the setup requirements to get started with the 2 way peg app.
- In this guide, we will be using the Ledger Nano S hardware wallet. All other versions of the Ledger and Trezor hardware wallets are also supported by the 2 way peg app.
- If you don’t own any of the hardware wallet devices listed above, please visit the official website of the Ledger and Trezor hardware wallets to purchase one.
Note: The current v1.1.0 of the 2 way peg app is currently not operational on mobile devices.
The following address types are supported by the 2 way peg app.
Segwit: A SegWit address starts with the number 3 and has more elaborated functionality than a legacy address. Types include P2SH-P2WPKH and P2SH-P2WSH.
Native segwit: Also known as Bech32 address, native SegWit looks different from the P2-styles as it starts with bc1.
Legacy address: These addresses are the original BTC addresses. It uses a special script hash function called P2PKH (Pay-to-Pubkey Hash) address and starts with the number 1.
The current version of the 2 way peg app supports peg-in transactions using hardware wallets. Future releases of the 2 way peg app will include support for performing peg-in operations using software wallets.
The Bitcoin testnet app does not show on Ledger live manager by default. To be able to see the BTC Testnet app you need to enable the developer mode in Ledger live.
To enable developer mode, we will do the following:
Go to Ledger live manager and search for Bitcoin testnet app
Click on install to install the Bitcoin Testnet application. To use the testnet app you also need the main Bitcoin app. So install both the apps to your device.
Get Testnet address
On your ledger device, you’ll find all the apps installed on your device. The Bitcoin app to be used on Mainnet, and Bitcoin Test app to be used on Testnet.
To start using testnet, we need the testnet address, to get this address,
Search testnet and select Bitcoin Testnet (BTC). Click on Continue
Click on Add Account.
Note: See supported addresses section for the types of addresses supported by the 2 way peg app.
Now you have successfully added the Bitcoin testnet app to your account.
Getting Testnet Tokens
Go to the receive tab on Ledger live.
Select Bitcoin testnet and click on continue.
Copy BTC Testnet address
Use the following faucet to receive testnet tokens.
Note: You need at least 0.005 TBTC to use the 2 way peg app on Mainnet and Testnet.
Step 1: Connect to a ledger wallet
Step 2: Enter Pin
Step 3: Choose Wallet
Here, we will use the Bitcoin Test wallet. For Mainnet, use the Bitcoin wallet.
Note: On the Nano S ledger, whenever you want to confirm an option, click on the 2 upper buttons at the same time.
Step 4: Confirm connection to Bitcoin Testnet
Once the above steps have been completed, a confirmation appears - “Bitcoin Testnet is ready”.
Now, you have successfully connected your Ledger device to the Bitcoin network.
A peg-in is the process of exchanging BTC for RBTC. See the glossary section for more information.
The minimum values allowed when creating a peg-in transaction is 0.005 BTC.
Open 2 way peg application on Testnet.
Step 1: Select Conversion Type
Since we are performing a peg-in, choose the BTC - RBTC conversion type, as shown in the image below;
Step 2: Choose Hardware Wallet
Here, we are using the ledger hardware wallet to interact with the 2 way peg app. Select your hardware wallet, ensure your device is already connected by inserting your pin into the Ledger device before clicking the Ledger option in the 2 way peg app. See the connect to a ledger wallet section.
Step 3: Read pop up information
The pop up shown in the image below describes the duration of the peg-in process which requires at least 100 confirmations on the Bitcoin network, this gives an estimate of around 17 hours in total. It also describes the three main steps involved which is; connecting to the hardware wallet, sending a signed transaction to the BTC network until the corresponding RBTC value is made available in the destination wallet and a receipt for this transaction.
Click the checkbox - “Don’t show again” to turn off this pop-up in the future or close temporarily.
Step 4: Connect to the app
Click Continue to connect to the 2 way peg application.
The 2 way peg app shows the pop-up with the connected usb ledger devices, if your device is not visible, unplug the usb device and plug in again, unlock with a pin and click Retry or go back to the connect ledger wallet section.
To confirm successful connection to the 2 way peg app, you will be directed to the screen below, where we will perform a Peg-in transaction.
- The balance of the accounts in your hardware wallet will be loaded, and this shows the balance of 3 different types of accounts: segwit, legacy, native segwit. See the supported addresses for the meaning of these types of accounts.
Step 5: Sending a transaction
Select the account you would like to send BTC from, by clicking on the dropdown as shown in the image below.
Note that for each selected account type, we will see a corresponding balance in the ‘Device account’ field in transaction summary section on the right hand side of the screen.
After selecting the account you will like to send BTC from, the next step is to enter an amount you would like to send. The amount entered appears in the BTC field, and you can see the corresponding amount in USD under transaction summary.
- The minimum amount to send is 0.005 BTC, any amount less than this throws an error message: “You cannot send that amount of BTC, you can only send a minimum of 0.005 BTC”.
- Note that the amount sent in BTC is the same amount to be received in RBTC on the RSK network.
Step 6: Enter address
To enter an address, we are provided with two options:
- Use the address verifier to verify if an address is RSK-compatible and can be used to perform a peg in a transaction.
- Use the Metamask-RSK tool to automatically connect to RSK mainnet or manually connect metamask to the RSK mainnet or testnet.
Step 6a: Click on Connect Wallet
Step 6b: Choose your preferred wallet
In this section, we will use the Liquality wallet.
This triggers a pop-up. Ensure to check the wallet address and the network automatically selected by Liquality. Grant the requested permissions to liquality by clicking on Confirm.
See connect with Metamask.
Step 6c: Confirm Details
This automatically connects your wallet and adds a destination address. You can choose to disconnect the wallet by clicking on the Disconnect wallet button.
Step 7: Select Transaction Fee
Here, we can select the fee that will be used for this transaction, this is set on default to average.
- The transaction fee is not part of the amount you’re sending via the 2 way peg app, it will only be used for the correct processing of the transaction on the Bitcoin network. Also see the different types of fees (slow, average, fast) and their corresponding cost in TBTC and USD, depending on preference, you can choose any of those three. See the adjusting network fees section for more information.
- The time for each type of fee per transaction may vary depending on the number of transactions on the network and the fees charged at the time.
Step 8: View transaction summary
In this section, we can confirm the selected values:
- In the instance of an error on this transaction, the amount will be sent to the address indicated in the refund Bitcoin address located in your hardware wallet.
- See the glossary section for the meaning of these values.
Step 9: Continue and sign transaction
By clicking on the Continue button, we can see all the transactions that will be made, their corresponding inputs and outputs, and the network fees that will be charged, all this information must be confirmed on your hardware wallet screen.
Under transaction summary, we can see the destination and refund address, as well as the Powpeg recipient address. After confirming these details are correct, click on the sign button, and confirm all information on your hardware wallet.
Step 10: Confirm transaction in Ledger Device
Here, you can confirm or reject the transaction in your hardware wallet. Unlock ledger device to confirm the transaction.
Step 11: Confirm all outputs
The user needs to review and approve all outputs, the value of the transaction and the fee of the transaction. This test transaction generates 3 outputs.
To approve or confirm any action on the screen, press on the two buttons beside the ledger hardware device at the same time.
Review and accept output 1
Review and accept the output 2
Review and accept the output 3
Confirm amount of test transactions
Confirm if the fee value is the same present in the transaction summary screen.
Now, confirm all transactions
Accept and send the transaction to be broadcasted to the network.
After signing, the transaction is sent to the network to be processed, taking into account the fee value selected previously.
Step 12: View transaction status
This shows the status of your transaction, with a transaction ID and a link to check the transaction on the explorer.
By clicking on the transaction link, the user can check the status directly in the block explorer, outside the 2 way peg app application, and view the data on the bitcoin blockchain.
Users can also copy the transaction id to view the status of their transaction on the Bitcoin network. See the view transaction status section for how to view transaction status.
Now you have successfully performed a peg-in transaction using the 2 way peg application.
Step 1: Connecting to a trezor wallet
Plug your Trezor wallet by connecting the USB cable that comes with Trezor.
Step 2: Export multiple addresses In this step, the user is redirected to Trezor’s site and needs to click on export to export the addresses.
Step 3: Enter Pin and confirm Enter a pin for your Trezor, displayed on your hardware wallet. Click confirm.
Step 4: Unlock Trezor with passphrase
The user fills the passphrase, and confirms passphrase fields, using the Trezor Connect application. The user will see this screen on Trezor: “Access Hidden Wallet?”.
Now, you have successfully connected your Trezor to the Bitcoin network.
Follow the same process in Step 1 - 9: Performing a Pegin transaction with Ledger.
The transaction status shows the status of transactions performed using the 2 way peg application.
There are two ways to view the transaction status.
To view a transaction status using the 2 way peg application, we will do the following steps;
Step 1: Go to the homepage
Visit: 2 way peg on Testnet.
Click on transaction status.
Step 2: Enter Transaction ID
Copy the transaction ID derived in Step 12: Performing a Pegin transaction with Ledger, paste into the field as shown below, click on enter or click on the search icon.
Step 3: View transaction status
This shows what stage the transaction is in, the transaction performed was a peg-in transaction (BTC to RBTC), in the image below, you will see whether funds have moved from the Bitcoin network to the RSK network, and also when the funds have been successfully delivered to an RSK address, here you can also view the total no of confirmations needed and the estimated time left.
Click on the refresh button by scrolling down on the page below to view the updated status.
Step 4: View transaction summary
Here, you can see the following information:
Device account address:
Amount in BTC:
Destination RSK address:
Refund Bitcoin address
Note: In case an error occurs with this transaction, the amount will be sent back to the address indicated in the refund Bitcoin address located in your hardware wallet. See the glossary section for in-depth definition and explanation of these terms.
To view transactions status using Blockcypher Explorer, we will do the following:
Step 1: Click the transaction link
In the successful transaction notification page, click the transaction link.
This automatically opens a new tab which leads to viewing the transaction status directly on Blockcypher.
Alternatively, you can copy the transaction ID from the successful transaction notification page.
Step 1a: Visit Blockcypher Explorer
Once you’re on the Blockcypher explorer, toggle on Bitcoin Testnet as shown in image below;
Step 1b: Paste Transaction ID
Paste transaction ID into search field and click on Search icon or press enter.
This shows the status for the transaction.
Be sure to check out our next article in this guide, on Advanced operations you can perform on the 2 way peg app
Go to top