Difference between stream publication and regular sendwithmetadata.

+1 vote


I would like to know if there's a way to differentiate stream publications from regular sendwithmetadata transactions ? I used to think that transactions with an empty 'addresses' field using listaddresstransaction could only be stream publications but it turns out transactions you send to yourself don't show the wallet address again in 'addresses' and that field is empty as well.

I tried examining other fields such as 'vout' or 'blockindex' but it hasn't proven very conclusive.

Any clue ?

Thank you for your help !

asked Oct 31, 2016 by usr1309

1 Answer

0 votes
Best answer

In the current alpha there's no simple way to do this, because we haven't yet added a bunch of fields to the API responses to represent stream items. Work to improve this in the next alpha is already under way.

In the meantime as a quick hack you can use the verbose option of APIs like listwallettransactions and examine the vout array. Published stream items will have two outputs, where the first has "type" : "nulldata" and contains the item. Regular sends with metadata will have three outputs, where the second one has "type" : "nulldata". Note that this is not guaranteed behavior in the long term, but we won't be changing it before there's a better way of identifying stream items in the output from listwallettransactions.

answered Oct 31, 2016 by MultiChain
selected Nov 2, 2016 by usr1309
Thank you for your help, this will work in the meantime then !