sending or issuing asset as P2SH

+2 votes
Dear tech team,

i'm working on a MVP using multichain using fully compatible bitcoin parameter. Everything is working fine.
Now I'd like to use an external hw wallet to sign a transaction like issuing or sending an asset. The main problem is that my hw wallet (i'm using a Nano S Ledger) can only sign standard transaction (without OP_DROP and OP_RETURN). I can think to use libcoinj with the Transactionbuilder class but in the process I have to sign the transaction with ecda and my wallet doesn't allow to sign any raw hash string.

So in the end I'm thinking to find a different approack using a P2SH script in the following way:

- define issuing or sending script as a P2SH in MC
- create a transaction to pay P2SH address in MC
- external sign the transaction with my hw wallet
- sending the signed transaction in MC

What do you think about it?

Can you give me some hints?

Thanks
  Fabio
asked Nov 19, 2019 by fabio

1 Answer

0 votes
It's an interesting idea but I don't think it will work because, in terms of the MultiChain protocol, asset quantities have to be represented properly in transaction outputs, and with a P2SH the full script is embedded in a subsequent transaction input instead.

First I can understand a particular hardware wallet choking on OP_DROPs but I would not think that OP_RETURNs would be a problem, since is quite common in bitcoin. But I don't think that will help you here.

So I think you should use a signing library that does not explicitly check for standard transactions. You can also consider using multichaind-cold which is the cold node version of MultiChain that comes with the download.

https://www.multichain.com/developers/cold-nodes-wallets/
answered Nov 21, 2019 by MultiChain
...