Documentation
¶
Index ¶
- Constants
- func ExtractEndpoint(credentials *protos.Credentials) (string, error)
- func ExtractMSPID(serializedIdentityRaw []byte) (string, error)
- func ExtractMrEnclave(ccDef *lifecycle.QueryChaincodeDefinitionResult) (string, error)
- func GetChaincodeDefinition(chaincodeId string, stub shim.ChaincodeStubInterface) (*lifecycle.QueryChaincodeDefinitionResult, error)
- func GetChaincodeRequestMessageFromSignedProposal(signedProposal *pb.SignedProposal) (crmProtoBytes []byte, e error)
- func GetEnclaveId(attestedData *protos.AttestedData) string
- func GetMrEnclave(chaincodeId string, stub shim.ChaincodeStubInterface) (string, error)
- func IsFPCCompositeKey(comp string) bool
- func MarshalOrPanic(pb proto.Message) []byte
- func MarshallProto(msg proto.Message) ([]byte, error)
- func MarshallProtoBase64(msg proto.Message) string
- func Read(file string) []byte
- func SplitFPCCompositeKey(comp_str string) []string
- func TransformToFPCKey(comp string) string
- func UnmarshalAttestedData(serializedAttestedData *anypb.Any) (*protos.AttestedData, error)
- func UnmarshalChaincodeResponseMessage(data []byte) (*protos.ChaincodeResponseMessage, error)
- func UnmarshalCredentials(credentialsBase64 string) (*protos.Credentials, error)
- func UnmarshalInitEnclaveMessage(data []byte) (*protos.InitEnclaveMessage, error)
- func UnmarshalQueryChaincodeDefinitionResult(data []byte) (*lifecycle.QueryChaincodeDefinitionResult, error)
- func UnmarshalSignedChaincodeResponseMessage(data []byte) (*protos.SignedChaincodeResponseMessage, error)
- func ValidateEndpoint(endpoint string) error
- type IdentityEvaluator
- type IdentityEvaluatorInterface
Constants ¶
View Source
const MrEnclaveLength = 32
Variables ¶
This section is empty.
Functions ¶
func ExtractEndpoint ¶
func ExtractEndpoint(credentials *protos.Credentials) (string, error)
func ExtractMSPID ¶
func ExtractMrEnclave ¶
func ExtractMrEnclave(ccDef *lifecycle.QueryChaincodeDefinitionResult) (string, error)
func GetChaincodeDefinition ¶
func GetChaincodeDefinition(chaincodeId string, stub shim.ChaincodeStubInterface) (*lifecycle.QueryChaincodeDefinitionResult, error)
func GetChaincodeRequestMessageFromSignedProposal ¶
func GetChaincodeRequestMessageFromSignedProposal(signedProposal *pb.SignedProposal) (crmProtoBytes []byte, e error)
func GetEnclaveId ¶
func GetEnclaveId(attestedData *protos.AttestedData) string
GetEnclaveId returns enclave_id as hex-encoded string of SHA256 hash over enclave_vk.
func GetMrEnclave ¶
func GetMrEnclave(chaincodeId string, stub shim.ChaincodeStubInterface) (string, error)
func IsFPCCompositeKey ¶
func MarshalOrPanic ¶
func MarshallProto ¶
MarshallProto returns a serialized protobuf message
func MarshallProtoBase64 ¶
MarshallProtoBase64 returns a serialized protobuf message encoded as base64 string
func SplitFPCCompositeKey ¶
func TransformToFPCKey ¶
func UnmarshalAttestedData ¶
func UnmarshalAttestedData(serializedAttestedData *anypb.Any) (*protos.AttestedData, error)
func UnmarshalChaincodeResponseMessage ¶
func UnmarshalChaincodeResponseMessage(data []byte) (*protos.ChaincodeResponseMessage, error)
func UnmarshalCredentials ¶
func UnmarshalCredentials(credentialsBase64 string) (*protos.Credentials, error)
func UnmarshalInitEnclaveMessage ¶
func UnmarshalInitEnclaveMessage(data []byte) (*protos.InitEnclaveMessage, error)
func UnmarshalQueryChaincodeDefinitionResult ¶
func UnmarshalQueryChaincodeDefinitionResult(data []byte) (*lifecycle.QueryChaincodeDefinitionResult, error)
func UnmarshalSignedChaincodeResponseMessage ¶
func UnmarshalSignedChaincodeResponseMessage(data []byte) (*protos.SignedChaincodeResponseMessage, error)
func ValidateEndpoint ¶
Types ¶
type IdentityEvaluator ¶
type IdentityEvaluator struct { }
func (*IdentityEvaluator) EvaluateCreatorIdentity ¶
func (id *IdentityEvaluator) EvaluateCreatorIdentity(creatorIdentityBytes []byte, ownerMSP string) error
EvaluateCreatorIdentity check that two identities have the same msp id. This function requires marshalled msp.SerializedIdentity as inputs.
Click to show internal directories.
Click to hide internal directories.