Is there a way to query data-hex, output key in data stream?

+2 votes
I have a datastream with the following:

{

        "publishers" : [

            "14aucNv6q9QdFVH2inRCoLZuMmReohafQahmY4"

        ],

        "key" : "1",

        "data" : "5870d0e7e1491da9dec05348700d36ad082b5295a8160c0d3d5638f26fb248e5",

        "confirmations" : 0,

        "txid" : "70443630b77a1f73b0f9da40feeb0e034fed0e5ca973e868374a8df84ccad122"

    }

 

I know that with gettxoutdata, I can input the txid and the vout and it will return the data-hex. But I want to know if theres a way that I can query the data-hex (i.e. 5870d0e7e1491da9dec05348700d36ad082b5295a8160c0d3d5638f26fb248e5) and get the corresponding key as the result (i.e.; 1)
asked Jul 26, 2018 by Emm

1 Answer

+1 vote

No, I'm afraid this is not possible. MultiChain indexes many things about stream items, but not the data field. You may want to consider trying out MultiChain 2.0 (alpha 3) which allows stream items to have multiple keys, all of which are indexed for APIs like liststreamkeyitems.

answered Jul 27, 2018 by MultiChain
...