Skip to content

Recovering funds from a Segwit Address

Adam edited this page Apr 27, 2020 · 4 revisions

While the Omni Protocol does support the use of Segwit addresses, the development of support within Omniwallet is not yet complete. If you have accidentally sent an Omni Protocol token to a segwit address and wish to recover/return them we have put together the following steps which can be used as an interim option.

Required Tools:

  • Electrum wallet https://electrum.org
  • Private key for your segwit address that holds the Omni protocol Tokens you wish to recover

Steps:

Importing Your address into Electrum

The following steps were taken from the electrum article on this topic

  1. Launch the electrum wallet and select the option to Create a new wallet
  2. When asked 'What kind of wallet' you wish to create choose 'Import Bitcoin addresses or private keys'
  3. On the 'Import Bitcoin Addresses' page enter you private key but prepend it with the string p2wpkh-p2sh:
  4. You should now be presented with an electrum wallet that contains your segwit address

Using Electrum to recover funds

Prerequisite: The following recovery method utilizes the Omni Protocol sendall transaction which may not be supported by some exchanges. Unless you know what you are doing you should create (or login) to your Omniwallet.org account and use an address that was created by or imported with a private key into your Omniwallet for the recovery destination below. (These addresses are displayed in your Omniwallet account with a 'padlock' next to them).

  • Make sure you have about 0.001 BTC on the address you need to recover/send the tokens from (Important, it has to be on the same address your the tokens are on otherwise it will not work)
  • If you do not have an "Addresses" Tab displayed in your Electrum window goto the menu "Wallet->Addresses" to enable the address tab.
  • On the Addresses tab, "Freeze" EVERY Address that has a BTC balance EXCEPT the Address you are recovering from (right click the address and choose freeze)
  • Go to Electrum "Tools" menu and select "Preferences".
    • Go to the "Fees" tab and make sure "Fee Estimation" is set to "ETA"
    • Go to the "Transactions" tab and make sure to UNCHECK both "use change address" and "use multiple change addresses"
    • Next go to the "Appearance" tab and change Base Units to 'BTC' . You can revert all these settings later if you want.
  • Go to the 'Tools-> Pay To Many' option.
    • Carefully Paste in the following two lines
      • Ensure the OP_RETURN line is not changed/modified
      • Ensure you replace Your-Omni-Protocol-Enabled-Recovery-Destination-address with your actual recovery destination address:
OP_RETURN 6f6d6e690000000401, 0
Your-Omni-Protocol-Enabled-Recovery-Destination-address, 0.00000546
  • Adjust the fee's tab for desired conformation speed (~5 blocks should be good)
  • Click the 'Preview' button and review the transaction for the following key points (example image displayed below)
    • Under Inputs:
      • 'TheAddressYourTokensAreStuckOn' will be highlighted and displayed (there may be more than 1 inputs for that address, that is ok)
    • Under Outputs
      • First, you should see SCRIPT 6f6d6e690000000401 0. displayed
      • Next, you should see YouOmniEnabledRecover/DestiantionAddresshere 0.00000546 displayed
      • Last, you may see TheAddressYourTokensAreStuckOnDisplayedHere some#ofBTC displayed
        • This last field is a change output and optional depending on how much BTC your address has/spends creating this tx
      • WARNING If you see ANY OTHER ADDRESS except TheAddressYourTokensAreStuckOnDisplayedHere under the YouOmniEnabledRecover/DestiantionAddresshere immediately STOP and contact us for further assistance. Failure to stop could cause your funds to be sent somewhere unrecoverable. WARNING
    • Electrum Preview
  • If everything checks out so far, click the 'Sign' Button
    • Now Rerun/Recheck Everything you just did from the previous step after the transaction has been 'signed'
      • WARNING This is the last chance ot check. If you see ANY OTHER ADDRESS except TheAddressYourTokensAreStuckOnDisplayedHere under the YouOmniEnabledRecover/DestiantionAddresshere immediately STOP and contact us for further assistance. Failure to stop could cause your funds to be sent somewhere unrecoverable. WARNING
  • (Optional) If you are uncomfortable or unsure of anything you have done then BEFORE broadcasting the final tx contact the Omni Foundation support team for additional assistance/review
    • Include a screenshot of the final signed tx, as well as confirming what address your funds are stuck on and what address you wish to recover/send them to
  • If everything still checks out click 'Broadcast' to complete the process
Clone this wiki locally