issuefrom with raw transactions

+1 vote
Hi

 

Is it possible to use issuefrom in raw transactions in the same way as issue, and if so where to you declare the from-address, is it in the output that contains the issuefrom statement, or in the metadata where you would define the asset name??

 

Thanks

Marty
asked Nov 13, 2017 by marty

1 Answer

0 votes

Yes you can certainly issuefrom using raw transactions – see 'Issuing Assets' on this page:

https://www.multichain.com/developers/raw-transactions/

Assuming you're using the (higher level) createrawsendfrom method, the 'from' address is simply the first parameter to createrawsendfrom. This is the address which signs the transaction and issuance.

answered Nov 14, 2017 by MultiChain
We can't use createrawsendfrom because we need control over what inputs are used, and the page you mentioned (https://www.multichain.com/developers/raw-transactions/) only references issue & issuemore, but not issuefrom??

Thanks

Marty
First, to clarify, every 'issue' is really just an 'issuefrom'. It's just that if you use the 'issue' API, then the from-address is chosen for you automatically. So the instructions on the raw transactions page will work for the usual case.

However in your case, if you want to choose which UTXOs are spent, you would use createrawtransaction instead. The 'from' address of an issuance transaction is just whichever address signed the whole transaction AND has issue permissions on the chain at that time. In fact, there can be more than one 'from' address.

Here's the relevant piece of documentation:

A transaction which creates a new asset is valid if one of its inputs is signed using an address with issue permissions, and the signature type is SIGHASH_ALL, meaning that the entire transaction was signed. These addresses automatically receive admin and issue permissions for the new asset.

https://www.multichain.com/developers/permissions-management/
Thanks, that clarifies things.  So as long as one of the inputs is signed using an address with issue permissions we should be good.

Cheers

Marty
...