我試圖構建一個Historian查詢,該查詢將允許我查看事務(及其原始輸入)。我有點基於這個問題嘗試一個想法https://github.com/hyperledger/composer/issues/1850,但這是在Composer Playground中修復的。所以現在我想知道如何在REST API中實現這一點,而不依賴事件來保存交易輸入信息。如何在超級作曲作曲器查詢中顯示事務輸入數據
我是從下面上查詢的文檔使用的查詢是:
query HistorianRecords {
description: "Select from HistorianRecords"
statement: SELECT org.hyperledger.composer.system.HistorianRecord
}
返回我的信息是這樣
{
"$class": "org.hyperledger.composer.system.HistorianRecord",
"transactionId": "c1bcd961-41bb-43a3-b5ee-c1c3694f7736",
"transactionType": "Transfer",
"transactionInvoked": "resource:org.hyperledger.composer.system.Transaction#c1bcd961-41bb-43a3-b5ee-c1c3694f7736",
"eventsEmitted": [],
"transactionTimestamp": "2017-09-04T07:55:54.405Z"
}
所要顯示的交易的輸入信息無。
我想知道在線遊樂場如何顯示它,這基本上包括交易輸入,即。在您輸入資產和NEWVALUE
{
"$class": "org.acme.sample.SampleTransaction",
"asset": "resource:org.acme.sample.SampleAsset#a",
"newValue": "123",
"transactionId": "0b7aa7b5-ffed-4fe7-9a60-c883085b88e8",
"timestamp": "2017-09-04T08:50:53.346Z"
}
我的網絡涉及款項從參與者發送到參與者,不能夠看到誰傳給多少誰基本上呈現blockchain毫無意義的樣本網絡。
我該如何使用查詢來做到這一點?
另一個說明,這只是在Composer 0.12.0中修復 – JezMonkey