Querying Assets in Hyperledger Composer

572 Views Asked by At

Is it possible to query all the transactions that contain a specific asset in Hyperledger Composer?.

Is it also possible to query the transaction history by identifier?

2

There are 2 best solutions below

1
On

Looks like you should use the Historian if you want to search through transactions.

https://hyperledger.github.io/composer/reference/historian.html

0
On

Please add the below JSON into your .qry file and try to access it from logic file.

query transactionHistory{
description: "It will return all transaction history record."
statement: SELECT org.acme.sample.NAME_OF_TRANSACTION_CLASS }