How to get the whole transaction history with chained code in a Hyperledger structure

I can make transactions in Hyperledger (tissue implementation). I want to view all transactions and payload data initiated by the user by passing the user key.

eg:

A transfers 10 units to B
A transfers 5 units to C
D transfers 8 units to A

When I pass the key A, then the fabric should provide me with all transactions A. Is there anyway? Or which function of the API function should be used?

+4
source share
3 answers

You can develop the correct indexing and query function in your chained code.

/ (stub.PutState) , (stub.GetState).

+3

/chain/blocks/{Block} .

/chain, ( ) , /chain/blocks/{Block} REST.

+4

-

GetHistoryForKey ( )

:

The GetHistoryForKey function can be called with chained code to return the history of key values ​​over time. GetHistoryForKey is for read-only use.

+1
source

Source: https://habr.com/ru/post/1660073/


All Articles