Rahul Singh
Rahul Singh

Reputation: 107

Sign a transaction in Hyperledger Composer

I have an Institute(Participant) which issues academic certificates to its Student(Participant) through a transaction. I want the issuing institute to sign this transaction. How is it done in Hyperledger Composer? Thanks in advance

Upvotes: 1

Views: 242

Answers (1)

R Thatcher
R Thatcher

Reputation: 5570

Transactions themselves are not signed, but the Participant (Faculty Administrator?) must have an Identity and a Certificate in order to execute the Transaction, and the ID executing the transaction is recorded for every transaction.

The historian feature of Composer can be used to see the details of a transaction as seen in the example excerpt below. The example is a "trade" transaction, but it could be "issueDegree" in your example.

    {
"$class": "org.hyperledger.composer.system.HistorianRecord",
"transactionId": "00ffa35f86a37fabcaaaecb1d998c889058f335a324c9016088fe3e990dd9a60",
"transactionType": "org.acme.mynetwork.Trade",
"transactionInvoked": "resource:org.acme.mynetwork.Trade#00ffa35f86a37fabcaaaecb1d998c889058f335a324c9016088fe3e990dd9a60",
"participantInvoking": "resource:org.acme.mynetwork.Trader#t77",
"identityUsed": "resource:org.hyperledger.composer.system.Identity#15edd5b30f0e96c65c68c37949e78045a0e947964ed02b6ab7e91ab99717fed7",
"transactionTimestamp": "2018-04-16T13:39:21.927Z"
}

Historian data can be seen in Playground, or via the /system/historian endpoint on the REST server. (Or via the JavaScript API)

Upvotes: 1

Related Questions