enclave

package
v1.0.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2022 License: Apache-2.0, MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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)

func (*EnclaveStub) Init

func (e *EnclaveStub) Init(chaincodeParams, hostParams, attestationParams []byte) ([]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)
}

type Stubs

type Stubs struct {
	// contains filtered or unexported fields
}

Stubs is a container struct used for the callbacks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL