Multisig transfer issue

+1 vote

I have transffered asset from wallet address to multisig address successfully. But while transfering the asset from multisig to wallet address it is showing below error in red colour.

1) Multisig asset details

chain3: getaddressbalances 44k9c45Gpgnq1RBsW5dGY3jkHJttXZe7YnfAto                                                                       

        "name" : "Third",
        "assetref" : "307-266-11708",
        "qty" : 50.00000000


chain3: sendassetfrom 44k9c45Gpgnq1RBsW5dGY3jkHJttXZe7YnfAto 1NvqmUJkk6baH8NHh56vAXtE1b31FjsYmt3qK9 Third 10

error code: -8
error message:
Invalid address (only pubkeyhash addresses are supported) : 44k9c45Gpgnq1RBsW5dGY3jkHJttXZe7YnfAto

Could you please help me how to transfer the asset to wallet address. How to verify the multiple wallet address signatures


asked Sep 19, 2016 by Rajasekhar
Consulting with the team on this and will get back to you shortly.

1 Answer

+1 vote

Right now unfortunately there's not an easy way to do this. You would need to:

  1. Use listunspent with an address parameter to get a list of unspent transaction outputs for that multisig address.
  2. Run your own algorithm to choose which of those unspent transaction outputs have the assets you want to send.
  3. Use createrawtransaction to create the basic send transaction spending those outputs.
  4. Use appendrawchange to ensure that all extra assets in the outputs go back to the right place.
  5. Use signrawtransaction (possibly on multiple node) to get the transaction fully signed by all parties to the multisig.
  6. Use sendrawtransaction to broadcast it to the network.
We are currently looking into how to simplify this in future.
answered Sep 20, 2016 by MultiChain
This would be really appreciated. Easier way to do multisig would mean easier way to implement Smart Contracts (Escrow).
You can now replace steps 1 to 5 on the first node with a single call to createrawsendfrom (pass sign in the final 'action' parameter to avoid needing to call signrawtransaction on that node). Then you just need to complete step 5 for each additional node that needs to sign the transaction, and step 6 on one node with the fully signed transaction.