Documentation
¶
Index ¶
- type EnclaveStub
- func (e *EnclaveStub) ChaincodeInvoke(stub shim.ChaincodeStubInterface, crmProtoBytes []byte) ([]byte, error)
- func (e *EnclaveStub) ExportCCKeys(credentials []byte) ([]byte, error)
- func (e *EnclaveStub) GenerateCCKeys() ([]byte, error)
- func (e *EnclaveStub) GetEnclaveId() (string, error)
- func (e *EnclaveStub) ImportCCKeys() ([]byte, error)
- func (e *EnclaveStub) Init(chaincodeParams, hostParams, attestationParams []byte) ([]byte, error)
- type StubInterface
- type Stubs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnclaveStub ¶
type EnclaveStub struct {
// contains filtered or unexported fields
}
EnclaveStub translates invocations into an enclave using cgo
func NewEnclaveStub ¶
func NewEnclaveStub() *EnclaveStub
func (*EnclaveStub) ChaincodeInvoke ¶
func (e *EnclaveStub) ChaincodeInvoke(stub shim.ChaincodeStubInterface, crmProtoBytes []byte) ([]byte, error)
ChaincodeInvoke calls the enclave for transaction processing
func (*EnclaveStub) ExportCCKeys ¶
func (e *EnclaveStub) ExportCCKeys(credentials []byte) ([]byte, error)
func (*EnclaveStub) GenerateCCKeys ¶
func (e *EnclaveStub) GenerateCCKeys() ([]byte, error)
func (*EnclaveStub) GetEnclaveId ¶
func (e *EnclaveStub) GetEnclaveId() (string, error)
func (*EnclaveStub) ImportCCKeys ¶
func (e *EnclaveStub) ImportCCKeys() ([]byte, error)
type StubInterface ¶
type StubInterface 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)
}
Click to show internal directories.
Click to hide internal directories.