Documentation
¶
Index ¶
- type Enclave
- type EnclaveChaincode
- type ExtractorImpl
- func (s *ExtractorImpl) GetChaincodeParams(stub shim.ChaincodeStubInterface) (*protos.CCParameters, error)
- func (s *ExtractorImpl) GetChaincodeResponseMessages(stub shim.ChaincodeStubInterface) (*protos.SignedChaincodeResponseMessage, *protos.ChaincodeResponseMessage, ...)
- func (s *ExtractorImpl) GetHostParams(stub shim.ChaincodeStubInterface) (*protos.HostParameters, error)
- func (s *ExtractorImpl) GetInitEnclaveMessage(stub shim.ChaincodeStubInterface) (*protos.InitEnclaveMessage, error)
- func (s *ExtractorImpl) GetSerializedChaincodeRequest(stub shim.ChaincodeStubInterface) ([]byte, error)
- type Extractors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enclave ¶
type Enclave interface {
// Init initializes the chaincode enclave.
// The input and output parameters are serialized protobufs
// triggered by an admin
Init(chaincodeParams, hostParams, attestationParams []byte) (credentials []byte, err error)
// GetEnclaveId returns the EnclaveId hosted by the peer
GetEnclaveId() (string, error)
// GenerateCCKeys returns a signed CCKeyRegistration Message including
// The output parameters is a serialized protobuf
GenerateCCKeys() (signedCCKeyRegistrationMessage []byte, err error)
// ExportCCKeys exports chaincode secrets to enclave with provided credentials
// The input and output parameters are serialized protobufs
ExportCCKeys(credentials []byte) (signedExportMessage []byte, err error)
// ImportCCKeys imports chaincode secrets
// The output parameters is a serialized protobuf
ImportCCKeys() (signedCCKeyRegistrationMessage []byte, err error)
// ChaincodeInvoke invokes fpc chaincode inside enclave
// chaincodeRequestMessage and chaincodeResponseMessage are serialized protobuf
ChaincodeInvoke(stub shim.ChaincodeStubInterface, chaincodeRequestMessage []byte) (chaincodeResponseMessage []byte, err error)
}
type EnclaveChaincode ¶
type EnclaveChaincode struct {
Enclave Enclave
Validator endorsement.Validation
Extractor Extractors
Ercc ercc.Stub
}
EnclaveChaincode struct
func (*EnclaveChaincode) Init ¶
func (t *EnclaveChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response
Init sets the chaincode state to "init"
func (*EnclaveChaincode) Invoke ¶
func (t *EnclaveChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response
Invoke receives transactions and forwards to op handlers
type ExtractorImpl ¶
type ExtractorImpl struct {
}
func (*ExtractorImpl) GetChaincodeParams ¶
func (s *ExtractorImpl) GetChaincodeParams(stub shim.ChaincodeStubInterface) (*protos.CCParameters, error)
func (*ExtractorImpl) GetChaincodeResponseMessages ¶
func (s *ExtractorImpl) GetChaincodeResponseMessages(stub shim.ChaincodeStubInterface) (*protos.SignedChaincodeResponseMessage, *protos.ChaincodeResponseMessage, error)
func (*ExtractorImpl) GetHostParams ¶
func (s *ExtractorImpl) GetHostParams(stub shim.ChaincodeStubInterface) (*protos.HostParameters, error)
func (*ExtractorImpl) GetInitEnclaveMessage ¶
func (s *ExtractorImpl) GetInitEnclaveMessage(stub shim.ChaincodeStubInterface) (*protos.InitEnclaveMessage, error)
func (*ExtractorImpl) GetSerializedChaincodeRequest ¶
func (s *ExtractorImpl) GetSerializedChaincodeRequest(stub shim.ChaincodeStubInterface) ([]byte, error)
type Extractors ¶
type Extractors interface {
GetInitEnclaveMessage(stub shim.ChaincodeStubInterface) (*protos.InitEnclaveMessage, error)
GetSerializedChaincodeRequest(stub shim.ChaincodeStubInterface) ([]byte, error)
GetChaincodeResponseMessages(stub shim.ChaincodeStubInterface) (*protos.SignedChaincodeResponseMessage, *protos.ChaincodeResponseMessage, error)
GetChaincodeParams(stub shim.ChaincodeStubInterface) (*protos.CCParameters, error)
GetHostParams(stub shim.ChaincodeStubInterface) (*protos.HostParameters, error)
}
Click to show internal directories.
Click to hide internal directories.