Home > Backend Development > Golang > How to retrieve the identity of the calling chaincode in Hyperledger Fabric Node SDK?

How to retrieve the identity of the calling chaincode in Hyperledger Fabric Node SDK?

Patricia Arquette
Release: 2024-10-27 20:39:02
Original
1107 people have browsed it

 How to retrieve the identity of the calling chaincode in Hyperledger Fabric Node SDK?

Retrieving Caller Chaincode Identity in Hyperledger Fabric Node SDK

When invoking a chaincode through the APIstub.InvokeChaincode() method in Hyperledger Fabric Node SDK, the called chaincode (in this case, "fabcar") does not receive the ID of its caller (in this case, "Chaincode1"). This is because chaincodes lack explicit identities within the platform.

The getCreator() method, mentioned in the question, indeed provides the caller organization's identity. However, the desired information is the chaincode's ID or some unique identifier tied specifically to "Chaincode1."

Attempts to retrieve the caller chaincode ID through the getSignedProposal() method, as suggested in the question, have not been successful. The returned data does not contain an apparent reference to the calling chaincode's identity.

Consequently, it is currently not feasible to obtain the caller chaincode's identity within the called chaincode implementation.

The above is the detailed content of How to retrieve the identity of the calling chaincode in Hyperledger Fabric Node SDK?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template