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:
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@...>
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 to automatically receive all group messages.