Reputation: 2018
I am doing multiple transactions like location update for an asset, and couldn't find any way to query the transactions based on that resource:
For example If I create an asset fish1
, and then make transactions to update the location of the fish, now I want to fetch the transactions for the fish1
so I can get a list of geopoints
and plot them on the map.
If anyone has done something like this, please help. Thanks
Upvotes: 3
Views: 683
Reputation: 8088
On-chain solutions
There are two approaches depending on how you 'update' the location.
/state/
REST-API call) and splaying out the collection of data updates however you want.There are pros and cons using either approach of course.
Off-chain solutions
Sawtooth provides an Event registry where a client (of some kind) can register Event listeners to store data off-chain in any form the application requires. This is often suggested for solutions that have a broad/rich querying need as the sawtooth Merkle Trie (where blockchain data is stored) does not offer this flexibility.
Upvotes: 5