Re: What is the purpose of shim.GetBinding()


Brett T Logan <brett.t.logan@...>
 

Here is a pretty lengthy description of this API along with an example from the node-sdk API spec: https://hyperledger.github.io/fabric-chaincode-node/master/api/fabric-shim.ChaincodeStub.html#getBinding__anchor
 
Brett Logan
Software Engineer, IBM Blockchain
Phone: 1-984-242-6890
 
 
 

----- Original message -----
From: "Mr.Phuwanai Thummavet" <mr.thummavet@...>
Sent by: fabric@...
To: fabric <fabric@...>
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] What is the purpose of shim.GetBinding()
Date: Sun, Oct 25, 2020 5:53 AM
 
Hi everyone,
 
I want to know what is the purpose of the function stub.GetBinding() and when to use it?
Its description in interface.go is not provided enough details for me to understand.
 
// GetBinding returns the transaction binding, which is used to enforce a
// link between application data (like those stored in the transient field
// above) to the proposal itself. This is useful to avoid possible replay
// attacks.
GetBinding() ([]byte, error)

Does anyone have an example code about it?
Thank you very much.
 
--
Best Regards,
Phuwanai Thummavet
Blockchain Architect and Full-Stack Developer
 

Join fabric@lists.hyperledger.org to automatically receive all group messages.