<p>I have solved my problem with a lot of debugging and help from the community on IRC irc.freenode.net #bitcoin-dev and also from people on the bitcointalk thread I started about this Topic.</p>

<p>I invite anyone having similar Copay Multisig Omni Colored Coins Recovery Issues to have a look at the bitcointalk thread here: <a href="https://bitcointalk.org/index.php?topic=2500531" rel="nofollow noreferrer">https://bitcointalk.org/index.php?topic=2500531</a></p>

<p>The Problem is hereby solved, Details about how Copay derives keys can be found in the linked thread as well as more detail about what was implemented to apply the recovery (<a href="https://github.com/evias/omni-recovery-tool/blob/master/app/Commands/CopayMultisigUSDTRecovery.php" rel="nofollow noreferrer">command line tool "omni:copay-recovery" on Github</a>).</p>

CC BY-SA 3.0
2017-12-09T15:29:11.017Z
Wow, this looks confusing.  Is there a TL;DR summary or some way you could answer this in layperson's terms?  Congrats on the achievement!
Scott
CC BY-SA 3.0
2017-12-11T00:26:32.767Z
Hello! Yes it is quite some input!

You can have a look here: https://github.com/evias/omni-recovery-tool  which is the repository where I kind of summarized and implemented the steps for recovery :) The readme file in there contains quite some details and can be used to reproduce or understand!
Grégory Saive - evias
CC BY-SA 3.0
2017-12-06T02:14:30.807Z
2017-12-06T18:18:05.340Z
2017-12-06T18:18:05.340Z
Grégory Saive - evias
<p>I have been asked to recover some tether that have been sent to the wrong address... Sitting on the blockchain in a multisig copay account.</p>

<p>I have written small php command line tools to reproduce the case and learn more about how Bitcoin works. I am a software developer working mostly with NEM where the blockchain is very different. I have learned a lot about multisig on Bitcoin, OP_RETURNs used in omni (usdt being a smartproperty on the omni layer), and many more awesome things about hierarchical key generation, key derivation functions, and many more subjects.</p>

<p>Script are written in PHP with laravel/zero and can be found here:</p>

<ul>
<li><p><a href="https://github.com/evias/blockchain-cli/blob/master/app/Commands/HyperDeterministicWallets.php" rel="nofollow noreferrer">BIP32+44 HD Addresses Generation Tool on Github</a></p></li>
<li><p><a href="https://github.com/evias/blockchain-cli/blob/master/app/Commands/WalletSeedDerivation.php" rel="nofollow noreferrer">BIP39 Seed Derivation (get Private Keys) on Github</a></p></li>
<li><p><a href="https://github.com/evias/blockchain-cli/blob/master/app/Commands/ColoredPay2ScriptHash.php" rel="nofollow noreferrer">My P2SH Colored Transaction creation on Github</a></p></li>
</ul>

<p>But I struggle getting back those tether to another address. Of course, I own the 3 cosigners configured with copay, but I am too much of a noob to get those tether back. Fact is, the NEM blockchain is very different when it comes to multisig and custom assets. So I went through the learning process for HD keys and XPRV and XPUBs. Which I also built a command for. A command that, provided with the right derivation path and xpubs or mnemonics, will generate the same cosigners xpubs as copay displays in the multisig wallet information page. </p>

<p><strong><a href="https://bitcointalk.org/index.php?topic=2500531.msg25585580" rel="nofollow noreferrer">Here is a link to the BitcoinTalk thread</a></strong> where you will find a screenshot and more details about the transaction i am trying to create. Maybe someone here might help as <strong>this requires deep understanding of Bitcoin Multisig, HD Key Derivations, OP_RETURN and Colored Coins</strong>. </p>

<p>The challenge is quite amazing and let me learn tons of things, but watching serialized data I think I am getting crazy, I can't get it done, <strong><a href="https://bitcointalk.org/index.php?topic=2500531.msg25585580" rel="nofollow noreferrer">please h<em>A</em>lp</a></strong> ! x:)</p>

<p>PS: &lt;3 Bitcoin</p>

<multi-signature><op-return><colored-coins><copay>
Bitcoin Protocol OP_RETURN + Omni USDT Tether + CoPay Multisig Help
Grégory Saive - evias
# Bitcoin Protocol OP_RETURN + Omni USDT Tether + CoPay Multisig Help

(Asked by: username_0 on 2017-12-04)

I have been asked to recover some tether that have been sent to the wrong address... Sitting on the blockchain in a multisig copay account.

I have written small php command line tools to reproduce the case and learn more about how Bitcoin works. I am a software developer working mostly with NEM where the blockchain is very different. I have learned a lot about multisig on Bitcoin, OP\_RETURNs used in omni (usdt being a smartproperty on the omni layer), and many more awesome things about hierarchical key generation, key derivation functions, and many more subjects.

Script are written in PHP with laravel/zero and can be found here:

* [BIP32+44 HD Addresses Generation Tool on Github](https://github.com/username_0/blockchain-cli/blob/master/app/Commands/HyperDeterministicWallets.php)
* [BIP39 Seed Derivation (get Private Keys) on Github](https://github.com/username_0/blockchain-cli/blob/master/app/Commands/WalletSeedDerivation.php)
* [My P2SH Colored Transaction creation on Github](https://github.com/username_0/blockchain-cli/blob/master/app/Commands/ColoredPay2ScriptHash.php)

But I struggle getting back those tether to another address. Of course, I own the 3 cosigners configured with copay, but I am too much of a noob to get those tether back. Fact is, the NEM blockchain is very different when it comes to multisig and custom assets. So I went through the learning process for HD keys and XPRV and XPUBs. Which I also built a command for. A command that, provided with the right derivation path and xpubs or mnemonics, will generate the same cosigners xpubs as copay displays in the multisig wallet information page.

**[Here is a link to the BitcoinTalk thread](https://bitcointalk.org/index.php?topic=2500531.msg25585580)** where you will find a screenshot and more details about the transaction i am trying to create. Maybe someone here might help as **this requires deep understanding of Bitcoin Multisig, HD Key Derivations, OP\_RETURN and Colored Coins**.

The challenge is quite amazing and let me learn tons of things, but watching serialized data I think I am getting crazy, I can't get it done, **[please h*A*lp](https://bitcointalk.org/index.php?topic=2500531.msg25585580)** ! x:)

PS: <3 Bitcoin

**Tags:** multi-signature, op-return, colored-coins, copay


---

## 1 answers

### Answer by username_0 on 2017-12-06. Score: 3 | Accepted answer

I have solved my problem with a lot of debugging and help from the community on IRC irc.freenode.net #bitcoin-dev and also from people on the bitcointalk thread I started about this Topic.

I invite anyone having similar Copay Multisig Omni Colored Coins Recovery Issues to have a look at the bitcointalk thread here: <https://bitcointalk.org/index.php?topic=2500531>

The Problem is hereby solved, Details about how Copay derives keys can be found in the linked thread as well as more detail about what was implemented to apply the recovery ([command line tool "omni:copay-recovery" on Github](https://github.com/username_0/omni-recovery-tool/blob/master/app/Commands/CopayMultisigUSDTRecovery.php)).

> **Comments:**
> **username_1**: Wow, this looks confusing.  Is there a TL;DR summary or some way you could answer this in layperson's terms?  Congrats on the achievement!  
> **username_0**: Hello! Yes it is quite some input!  You can have a look here: https://github.com/username_0/omni-recovery-tool  which is the repository where I kind of summarized and implemented the steps for recovery :) The readme file in there contains quite some details and can be used to reproduce or understand!  

---

