Why the list asset does not return the Issue object that the same as other Issue API?

+1 vote
The very similar  objects!
related to an answer for: Fields: qty and raw in issue object
asked May 10, 2016 by alex
Which other issue API are you talking about?
listaddresstransactions for example, that returm "Issue" object

1 Answer

0 votes

In the response from (for example) listaddresstransactions, the qty and raw values are already subelements of issue, so it would be redundant to call them issueqty and issueraw. In the response from listassets these elements are not inside an issue subelement. Sorry if it's confusing but that's the most logical way we felt it could be expressed!

answered May 11, 2016 by MultiChain
But an object in the list of "listassets" is the SAME object that in subelement "issue" of "listaddresstransactions". If it has different subelements (qty -> issueqty etc.) It will add unnecessary redundans to an implementation code!
Logically it's not the same object, even though there are many fields in common. One is a description of what happened in one particular transaction. The other is a description of an asset on the blockchain, which can be the result of multiple issuance transactions.

For example if you use listassets with verbose=true, you can get multiple subelements relating to multiple follow-on issuances. This you cannot get when looking at a single transaction.

Another example of a difference is if you use getwallettransaction to look at the transaction in which a follow-on issuance was performed. This has a smaller set of fields than an element in the response from listassets.
But still we're sorry for the inconvenience of the extra code :)
...