Я работаю над Hyperledger Composer и хочу получить доступ к полю «в» в массиве «eventsEmitted» в истории:
"eventsEmitted": [
{
"$class": "org.poc.wallet.WalletTransferEvent",
"from": "resource:org.poc.wallet.Wallet#wallet2",
"to": "resource:org.poc.wallet.Wallet#wallet3",
"amount": 100,
"eventId": "7c180da643f418f4bfb40187ccecef7dddd2d3f4ff952ab16fd913bcccedeac2#0",
"timestamp": "2018-06-05T08:04:38.857Z"
}
]
Я пробовал это в своем файле ACL, но правило не срабатывает:
rule CustomersSeeHistoryForWalletTransaction {
description: "Customers should be able to see the history of their own transactions only"
participant(p): "org.poc.wallet.Customer"
operation: READ
resource(r): "org.hyperledger.composer.system.HistorianRecord"
condition: (r.eventsEmitted[0].to.owner.getIdentifier() === p.getIdentifier())
action: ALLOW
}