proto

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PolicyKey_name = map[int32]string{
		0: "Undefined",
		1: "Readers",
		2: "Writers",
		3: "LifecycleEndorsement",
		4: "Endorsement",
	}
	PolicyKey_value = map[string]int32{
		"Undefined":            0,
		"Readers":              1,
		"Writers":              2,
		"LifecycleEndorsement": 3,
		"Endorsement":          4,
	}
)

Enum value maps for PolicyKey.

View Source
var (
	CertType_name = map[int32]string{
		0: "undefined",
		1: "ca",
		2: "intermediate",
		3: "admin",
	}
	CertType_value = map[string]int32{
		"undefined":    0,
		"ca":           1,
		"intermediate": 2,
		"admin":        3,
	}
)

Enum value maps for CertType.

View Source
var (
	ErrUnknownFabricVersion = errors.New(`unknown fabric version`)
)
View Source
var File_block_proto protoreflect.FileDescriptor
View Source
var File_chan_config_proto protoreflect.FileDescriptor

Functions

func CalcCertificateSHA256

func CalcCertificateSHA256(b *pem.Block) []byte

func NewCommonEnvelope added in v0.7.4

func NewCommonEnvelope(payload []byte, signer msp.SigningIdentity) (*common.Envelope, error)

func NewCommonHeader added in v0.7.4

func NewCommonHeader(
	headerType common.HeaderType,
	txID string, nonce []byte,
	ts *timestamp.Timestamp,
	serializedCreator []byte,
	channel,
	chaincode string,
	tlsCertHash []byte) (*common.Header, error)

func NewMarshaledChannelHeader added in v0.7.4

func NewMarshaledChannelHeader(
	headerType common.HeaderType,
	txId string,
	ts *timestamp.Timestamp,
	channelId string,
	epoch uint64,
	extension *peer.ChaincodeHeaderExtension,
	tlsCertHash []byte) ([]byte, error)

NewMarshaledChannelHeader returns new channel header bytes for presented transaction and channel

func NewMarshaledPeerProposal added in v0.7.4

func NewMarshaledPeerProposal(header []byte, chaincode string, args [][]byte, transientMap map[string][]byte) ([]byte, error)

func NewMarshalledChaincodeProposalPayload added in v0.7.4

func NewMarshalledChaincodeProposalPayload(chaincode string, args [][]byte, transientMap map[string][]byte) ([]byte, error)

func NewMarshalledCommonHeader added in v0.7.4

func NewMarshalledCommonHeader(
	headerType common.HeaderType,
	txID string,
	nonce []byte,
	ts *timestamp.Timestamp,
	serializedCreator []byte,
	channel, chaincode string,
	tlsCertHash []byte) ([]byte, error)

func NewMarshalledCommonPayload added in v0.7.4

func NewMarshalledCommonPayload(header *common.Header, data []byte) ([]byte, error)

NewMarshalledCommonPayload returns marshalled payload from headers and data

func NewMarshalledPeerChaincodeInvocationSpec added in v0.7.4

func NewMarshalledPeerChaincodeInvocationSpec(chaincode string, args [][]byte) ([]byte, error)

func NewMarshalledSeekInfo added in v0.7.4

func NewMarshalledSeekInfo(start, stop *orderer.SeekPosition) ([]byte, error)

func NewMarshalledSignatureHeader added in v0.7.4

func NewMarshalledSignatureHeader(serializedCreator []byte, nonce []byte) ([]byte, error)

NewMarshalledSignatureHeader returns marshalled signature header for presented identity

func NewPeerSignedProposal added in v0.7.4

func NewPeerSignedProposal(proposal []byte, identity msp.SigningIdentity) (*peer.SignedProposal, error)

func NewSeekInfo added in v0.7.4

func NewSeekInfo(start, stop *orderer.SeekPosition) *orderer.SeekInfo

func NewSeekSpecified added in v0.7.4

func NewSeekSpecified(number uint64) *orderer.SeekPosition

NewSeekSpecified returns orderer.SeekPosition_Specified position

func ParseAnchorPeers

func ParseAnchorPeers(mspConfigGroup *common.ConfigGroup) ([]*peer.AnchorPeer, error)

func ParseAnchorPeersFromBytes

func ParseAnchorPeersFromBytes(b []byte) ([]*peer.AnchorPeer, error)

func ParseApplicationConfig

func ParseApplicationConfig(cfg common.Config) (map[string]*ApplicationConfig, error)

func ParseBatchSizeFromBytes

func ParseBatchSizeFromBytes(b []byte) (*orderer.BatchSize, error)

func ParseBlockDataHashingStructure

func ParseBlockDataHashingStructure(cfg common.Config) (*common.BlockDataHashingStructure, error)

func ParseCapabilities

func ParseCapabilities(cfg common.Config) (*common.Capabilities, error)

func ParseChaincodeAction

func ParseChaincodeAction(txAction *peer.TransactionAction) (*peer.ChaincodeAction, error)

func ParseConsortium

func ParseConsortium(cfg common.Config) (string, error)

func ParseConsortiumFromBytes

func ParseConsortiumFromBytes(b []byte) (string, error)

func ParseHashingAlgorithm

func ParseHashingAlgorithm(cfg common.Config) (string, error)

func ParseHashingAlgorithmFromBytes

func ParseHashingAlgorithmFromBytes(b []byte) (string, error)

func ParseOrderer

func ParseOrderer(cfg common.Config) (map[string]*OrdererConfig, error)

func ParseOrdererBatchSize

func ParseOrdererBatchSize(cfg common.Config) (*orderer.BatchSize, error)

func ParseOrdererBatchTimeout

func ParseOrdererBatchTimeout(cfg common.Config) (string, error)

func ParseOrdererBatchTimeoutFromBytes

func ParseOrdererBatchTimeoutFromBytes(b []byte) (string, error)

func ParseOrdererConsensusType added in v0.8.0

func ParseOrdererConsensusType(cfg common.Config) (*orderer.ConsensusType, error)

func ParseOrdererConsensusTypeFromBytes added in v0.8.0

func ParseOrdererConsensusTypeFromBytes(b []byte) (*orderer.ConsensusType, error)

func ParseOrdererEndpoints

func ParseOrdererEndpoints(b []byte) ([]string, error)

func ParseOrdererIdentity

func ParseOrdererIdentity(cb *common.Block) (*msp.SerializedIdentity, error)

func ParseParseBlockDataHashingStructureFromBytes

func ParseParseBlockDataHashingStructureFromBytes(b []byte) (*common.BlockDataHashingStructure, error)

func ParseParseCapabilitiesFromBytes

func ParseParseCapabilitiesFromBytes(b []byte) (*common.Capabilities, error)

func ParsePolicy

func ParsePolicy(policiesCfg map[string]*common.ConfigPolicy) (map[string]*Policy, error)

func ParseTransactionActionChaincode

func ParseTransactionActionChaincode(txAction *peer.TransactionAction) (*peer.ChaincodeInvocationSpec, error)

func ParseTransactionActionEndorsers

func ParseTransactionActionEndorsers(txAction *peer.TransactionAction) ([]*msp.SerializedIdentity, error)

func ParseTransactionActionEvents

func ParseTransactionActionEvents(chaincodeAction *peer.ChaincodeAction) (*peer.ChaincodeEvent, error)

func ParseTransactionActionReadWriteSet

func ParseTransactionActionReadWriteSet(chaincodeAction *peer.ChaincodeAction) ([]*kvrwset.KVRWSet, error)

func ParseTxPayload added in v0.8.0

func ParseTxPayload(txAction *peer.TransactionAction) ([]byte, error)

Types

type ApplicationConfig

type ApplicationConfig struct {
	Name        string             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Msp         *MSP               `protobuf:"bytes,2,opt,name=msp,proto3" json:"msp,omitempty"`
	AnchorPeers []*peer.AnchorPeer `protobuf:"bytes,3,rep,name=anchor_peers,json=anchorPeers,proto3" json:"anchor_peers,omitempty"`
	// contains filtered or unexported fields
}

func (*ApplicationConfig) Descriptor deprecated added in v0.7.1

func (*ApplicationConfig) Descriptor() ([]byte, []int)

Deprecated: Use ApplicationConfig.ProtoReflect.Descriptor instead.

func (*ApplicationConfig) GetAnchorPeers added in v0.7.1

func (x *ApplicationConfig) GetAnchorPeers() []*peer.AnchorPeer

func (*ApplicationConfig) GetMsp added in v0.7.1

func (x *ApplicationConfig) GetMsp() *MSP

func (*ApplicationConfig) GetName added in v0.7.1

func (x *ApplicationConfig) GetName() string

func (*ApplicationConfig) ProtoMessage added in v0.7.1

func (*ApplicationConfig) ProtoMessage()

func (*ApplicationConfig) ProtoReflect added in v0.7.1

func (x *ApplicationConfig) ProtoReflect() protoreflect.Message

func (*ApplicationConfig) Reset added in v0.7.1

func (x *ApplicationConfig) Reset()

func (*ApplicationConfig) String added in v0.7.1

func (x *ApplicationConfig) String() string

type Block

type Block struct {
	Header            *common.BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Envelopes         []*Envelope         `protobuf:"bytes,2,rep,name=envelopes,proto3" json:"envelopes,omitempty"`
	OrdererSignatures []*OrdererSignature `protobuf:"bytes,3,rep,name=orderer_signatures,json=ordererSignatures,proto3" json:"orderer_signatures,omitempty"`
	// contains filtered or unexported fields
}

func ParseBlock

func ParseBlock(block *common.Block, opts ...ParseBlockOpt) (*Block, error)

func (*Block) Descriptor deprecated added in v0.8.0

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetEnvelopes added in v0.8.0

func (x *Block) GetEnvelopes() []*Envelope

func (*Block) GetHeader added in v0.8.0

func (x *Block) GetHeader() *common.BlockHeader

func (*Block) GetOrdererSignatures added in v0.8.0

func (x *Block) GetOrdererSignatures() []*OrdererSignature

func (*Block) ProtoMessage added in v0.8.0

func (*Block) ProtoMessage()

func (*Block) ProtoReflect added in v0.8.0

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset added in v0.8.0

func (x *Block) Reset()

func (*Block) String added in v0.8.0

func (x *Block) String() string

func (*Block) ValidEnvelopes

func (x *Block) ValidEnvelopes() []*Envelope

type CertType

type CertType int32
const (
	CertType_undefined    CertType = 0
	CertType_ca           CertType = 1
	CertType_intermediate CertType = 2
	CertType_admin        CertType = 3
)

func (CertType) Descriptor added in v0.7.1

func (CertType) Descriptor() protoreflect.EnumDescriptor

func (CertType) Enum added in v0.7.1

func (x CertType) Enum() *CertType

func (CertType) EnumDescriptor deprecated added in v0.7.1

func (CertType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CertType.Descriptor instead.

func (CertType) Number added in v0.7.1

func (x CertType) Number() protoreflect.EnumNumber

func (CertType) String added in v0.7.1

func (x CertType) String() string

func (CertType) Type added in v0.7.1

type Certificate

type Certificate struct {

	// sha256 hash
	Fingerprint []byte   `protobuf:"bytes,1,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	Data        []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Type        CertType `protobuf:"varint,3,opt,name=type,proto3,enum=hlfsdkgo.proto.CertType" json:"type,omitempty"`
	MspId       string   `protobuf:"bytes,4,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"`
	MspName     string   `protobuf:"bytes,5,opt,name=msp_name,json=mspName,proto3" json:"msp_name,omitempty"`
	// contains filtered or unexported fields
}

func NewCertificate

func NewCertificate(cert []byte, t CertType, mspID, mspName string) (*Certificate, error)

func (*Certificate) Descriptor deprecated added in v0.7.1

func (*Certificate) Descriptor() ([]byte, []int)

Deprecated: Use Certificate.ProtoReflect.Descriptor instead.

func (*Certificate) GetData added in v0.7.1

func (x *Certificate) GetData() []byte

func (*Certificate) GetFingerprint added in v0.7.1

func (x *Certificate) GetFingerprint() []byte

func (*Certificate) GetMspId added in v0.7.1

func (x *Certificate) GetMspId() string

func (*Certificate) GetMspName added in v0.7.1

func (x *Certificate) GetMspName() string

func (*Certificate) GetType added in v0.7.1

func (x *Certificate) GetType() CertType

func (*Certificate) ProtoMessage added in v0.7.1

func (*Certificate) ProtoMessage()

func (*Certificate) ProtoReflect added in v0.7.1

func (x *Certificate) ProtoReflect() protoreflect.Message

func (*Certificate) Reset added in v0.7.1

func (x *Certificate) Reset()

func (*Certificate) String added in v0.7.1

func (x *Certificate) String() string

type ChannelConfig

type ChannelConfig struct {
	Applications              map[string]*ApplicationConfig     `` /* 165-byte string literal not displayed */
	Orderers                  map[string]*OrdererConfig         `` /* 157-byte string literal not displayed */
	OrdererBatchSize          *orderer.BatchSize                `protobuf:"bytes,3,opt,name=orderer_batch_size,json=ordererBatchSize,proto3" json:"orderer_batch_size,omitempty"`
	OrdererBatchTimeout       string                            `protobuf:"bytes,4,opt,name=orderer_batch_timeout,json=ordererBatchTimeout,proto3" json:"orderer_batch_timeout,omitempty"`
	OrdererConsensusType      *orderer.ConsensusType            `protobuf:"bytes,5,opt,name=orderer_consensus_type,json=ordererConsensusType,proto3" json:"orderer_consensus_type,omitempty"`
	Consortium                string                            `protobuf:"bytes,6,opt,name=consortium,proto3" json:"consortium,omitempty"`
	HashingAlgorithm          string                            `protobuf:"bytes,7,opt,name=hashing_algorithm,json=hashingAlgorithm,proto3" json:"hashing_algorithm,omitempty"`
	BlockDataHashingStructure *common.BlockDataHashingStructure `` /* 140-byte string literal not displayed */
	Capabilities              *common.Capabilities              `protobuf:"bytes,9,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
	Policy                    map[string]*Policy                `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

func ParseChannelConfig

func ParseChannelConfig(cc common.Config) (*ChannelConfig, error)

func UnmarshalChannelConfig added in v0.7.1

func UnmarshalChannelConfig(b []byte) (*ChannelConfig, error)

func (*ChannelConfig) Descriptor deprecated added in v0.7.1

func (*ChannelConfig) Descriptor() ([]byte, []int)

Deprecated: Use ChannelConfig.ProtoReflect.Descriptor instead.

func (*ChannelConfig) FabricVersion added in v0.7.2

func (x *ChannelConfig) FabricVersion() FabricVersion

func (*ChannelConfig) GetAllCertificates

func (x *ChannelConfig) GetAllCertificates() ([]*Certificate, error)

GetAllCertificates - returns all(root, intermediate, admins) certificates from all MSPs'

func (*ChannelConfig) GetApplications added in v0.7.1

func (x *ChannelConfig) GetApplications() map[string]*ApplicationConfig

func (*ChannelConfig) GetBlockDataHashingStructure added in v0.7.1

func (x *ChannelConfig) GetBlockDataHashingStructure() *common.BlockDataHashingStructure

func (*ChannelConfig) GetCapabilities added in v0.7.1

func (x *ChannelConfig) GetCapabilities() *common.Capabilities

func (*ChannelConfig) GetConsortium added in v0.7.1

func (x *ChannelConfig) GetConsortium() string

func (*ChannelConfig) GetHashingAlgorithm added in v0.7.1

func (x *ChannelConfig) GetHashingAlgorithm() string

func (*ChannelConfig) GetOrdererBatchSize added in v0.7.1

func (x *ChannelConfig) GetOrdererBatchSize() *orderer.BatchSize

func (*ChannelConfig) GetOrdererBatchTimeout added in v0.7.1

func (x *ChannelConfig) GetOrdererBatchTimeout() string

func (*ChannelConfig) GetOrdererConsensusType added in v0.7.1

func (x *ChannelConfig) GetOrdererConsensusType() *orderer.ConsensusType

func (*ChannelConfig) GetOrderers added in v0.7.1

func (x *ChannelConfig) GetOrderers() map[string]*OrdererConfig

func (*ChannelConfig) GetPolicy added in v0.7.1

func (x *ChannelConfig) GetPolicy() map[string]*Policy

func (*ChannelConfig) ProtoMessage added in v0.7.1

func (*ChannelConfig) ProtoMessage()

func (*ChannelConfig) ProtoReflect added in v0.7.1

func (x *ChannelConfig) ProtoReflect() protoreflect.Message

func (*ChannelConfig) Reset added in v0.7.1

func (x *ChannelConfig) Reset()

func (*ChannelConfig) String added in v0.7.1

func (x *ChannelConfig) String() string

func (*ChannelConfig) ToJSON added in v0.7.1

func (x *ChannelConfig) ToJSON() ([]byte, error)

type Envelope

type Envelope struct {
	Signature      []byte                `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	ChannelHeader  *common.ChannelHeader `protobuf:"bytes,2,opt,name=channel_header,json=channelHeader,proto3" json:"channel_header,omitempty"`
	ValidationCode peer.TxValidationCode `` /* 133-byte string literal not displayed */
	Transaction    *Transaction          `protobuf:"bytes,4,opt,name=transaction,proto3" json:"transaction,omitempty"`
	ChannelConfig  *ChannelConfig        `protobuf:"bytes,5,opt,name=channel_config,json=channelConfig,proto3" json:"channel_config,omitempty"`
	// contains filtered or unexported fields
}

func ParseEnvelope

func ParseEnvelope(envelopeData []byte, validationCode peer.TxValidationCode) (*Envelope, error)

func ParseEnvelopes

func ParseEnvelopes(blockData [][]byte, txFilter txflags.ValidationFlags) ([]*Envelope, error)

func (*Envelope) Descriptor deprecated added in v0.8.0

func (*Envelope) Descriptor() ([]byte, []int)

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetChannelConfig added in v0.8.0

func (x *Envelope) GetChannelConfig() *ChannelConfig

func (*Envelope) GetChannelHeader added in v0.8.0

func (x *Envelope) GetChannelHeader() *common.ChannelHeader

func (*Envelope) GetSignature added in v0.8.0

func (x *Envelope) GetSignature() []byte

func (*Envelope) GetTransaction added in v0.8.0

func (x *Envelope) GetTransaction() *Transaction

func (*Envelope) GetValidationCode added in v0.8.0

func (x *Envelope) GetValidationCode() peer.TxValidationCode

func (*Envelope) ProtoMessage added in v0.8.0

func (*Envelope) ProtoMessage()

func (*Envelope) ProtoReflect added in v0.8.0

func (x *Envelope) ProtoReflect() protoreflect.Message

func (*Envelope) Reset added in v0.8.0

func (x *Envelope) Reset()

func (*Envelope) String added in v0.8.0

func (x *Envelope) String() string

type FabricVersion added in v0.7.2

type FabricVersion string
const (
	FabricVersionUndefined FabricVersion = "undefined"
	FabricV1               FabricVersion = "1"
	FabricV2               FabricVersion = "2"
)

func FabricVersionIsV2 added in v0.7.4

func FabricVersionIsV2(isV2 bool) FabricVersion

type MSP

type MSP struct {
	Name   string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Config *msp.FabricMSPConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	Policy map[string]*Policy   `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func ParseMSP

func ParseMSP(mspConfigGroup *common.ConfigGroup, groupName string) (*MSP, error)

func (*MSP) Descriptor deprecated added in v0.7.1

func (*MSP) Descriptor() ([]byte, []int)

Deprecated: Use MSP.ProtoReflect.Descriptor instead.

func (*MSP) GetAllCertificates

func (x *MSP) GetAllCertificates() ([]*Certificate, error)

GetAllCertificates - returns all certificates from MSP

func (*MSP) GetConfig added in v0.7.1

func (x *MSP) GetConfig() *msp.FabricMSPConfig

func (*MSP) GetName added in v0.7.1

func (x *MSP) GetName() string

func (*MSP) GetPolicy added in v0.7.1

func (x *MSP) GetPolicy() map[string]*Policy

func (*MSP) ProtoMessage added in v0.7.1

func (*MSP) ProtoMessage()

func (*MSP) ProtoReflect added in v0.7.1

func (x *MSP) ProtoReflect() protoreflect.Message

func (*MSP) Reset added in v0.7.1

func (x *MSP) Reset()

func (*MSP) String added in v0.7.1

func (x *MSP) String() string

type OrdererConfig

type OrdererConfig struct {
	Name      string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Msp       *MSP     `protobuf:"bytes,2,opt,name=msp,proto3" json:"msp,omitempty"`
	Endpoints []string `protobuf:"bytes,3,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// contains filtered or unexported fields
}

func (*OrdererConfig) Descriptor deprecated added in v0.7.1

func (*OrdererConfig) Descriptor() ([]byte, []int)

Deprecated: Use OrdererConfig.ProtoReflect.Descriptor instead.

func (*OrdererConfig) GetEndpoints added in v0.7.1

func (x *OrdererConfig) GetEndpoints() []string

func (*OrdererConfig) GetMsp added in v0.7.1

func (x *OrdererConfig) GetMsp() *MSP

func (*OrdererConfig) GetName added in v0.7.1

func (x *OrdererConfig) GetName() string

func (*OrdererConfig) ProtoMessage added in v0.7.1

func (*OrdererConfig) ProtoMessage()

func (*OrdererConfig) ProtoReflect added in v0.7.1

func (x *OrdererConfig) ProtoReflect() protoreflect.Message

func (*OrdererConfig) Reset added in v0.7.1

func (x *OrdererConfig) Reset()

func (*OrdererConfig) String added in v0.7.1

func (x *OrdererConfig) String() string

type OrdererSignature added in v0.8.0

type OrdererSignature struct {
	Identity  *msp.SerializedIdentity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	Signature []byte                  `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func ParseBTFOrderersIdentities added in v0.8.0

func ParseBTFOrderersIdentities(block *common.Block, configBlock *common.Block) ([]*OrdererSignature, error)

func (*OrdererSignature) Descriptor deprecated added in v0.8.0

func (*OrdererSignature) Descriptor() ([]byte, []int)

Deprecated: Use OrdererSignature.ProtoReflect.Descriptor instead.

func (*OrdererSignature) GetIdentity added in v0.8.0

func (x *OrdererSignature) GetIdentity() *msp.SerializedIdentity

func (*OrdererSignature) GetSignature added in v0.8.0

func (x *OrdererSignature) GetSignature() []byte

func (*OrdererSignature) ProtoMessage added in v0.8.0

func (*OrdererSignature) ProtoMessage()

func (*OrdererSignature) ProtoReflect added in v0.8.0

func (x *OrdererSignature) ProtoReflect() protoreflect.Message

func (*OrdererSignature) Reset added in v0.8.0

func (x *OrdererSignature) Reset()

func (*OrdererSignature) String added in v0.8.0

func (x *OrdererSignature) String() string

type ParseBlockOpt added in v0.8.0

type ParseBlockOpt func(*parseBlockOpts)

func WithConfigBlock added in v0.8.0

func WithConfigBlock(configBlock *common.Block) ParseBlockOpt

type Policy

type Policy struct {

	// Types that are assignable to Policy:
	//
	//	*Policy_Implicit
	//	*Policy_SignaturePolicy
	Policy isPolicy_Policy `protobuf_oneof:"policy"`
	// contains filtered or unexported fields
}

func (*Policy) Descriptor deprecated added in v0.7.1

func (*Policy) Descriptor() ([]byte, []int)

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) GetImplicit added in v0.7.1

func (x *Policy) GetImplicit() *common.ImplicitMetaPolicy

func (*Policy) GetPolicy added in v0.7.1

func (m *Policy) GetPolicy() isPolicy_Policy

func (*Policy) GetSignaturePolicy added in v0.7.1

func (x *Policy) GetSignaturePolicy() *common.SignaturePolicyEnvelope

func (*Policy) ProtoMessage added in v0.7.1

func (*Policy) ProtoMessage()

func (*Policy) ProtoReflect added in v0.7.1

func (x *Policy) ProtoReflect() protoreflect.Message

func (*Policy) Reset added in v0.7.1

func (x *Policy) Reset()

func (*Policy) String added in v0.7.1

func (x *Policy) String() string

type PolicyKey

type PolicyKey int32
const (
	PolicyKey_Undefined            PolicyKey = 0
	PolicyKey_Readers              PolicyKey = 1
	PolicyKey_Writers              PolicyKey = 2
	PolicyKey_LifecycleEndorsement PolicyKey = 3
	PolicyKey_Endorsement          PolicyKey = 4
)

func (PolicyKey) Descriptor added in v0.7.1

func (PolicyKey) Descriptor() protoreflect.EnumDescriptor

func (PolicyKey) Enum added in v0.7.1

func (x PolicyKey) Enum() *PolicyKey

func (PolicyKey) EnumDescriptor deprecated added in v0.7.1

func (PolicyKey) EnumDescriptor() ([]byte, []int)

Deprecated: Use PolicyKey.Descriptor instead.

func (PolicyKey) Number added in v0.7.1

func (x PolicyKey) Number() protoreflect.EnumNumber

func (PolicyKey) String added in v0.7.1

func (x PolicyKey) String() string

func (PolicyKey) Type added in v0.7.1

type Policy_Implicit added in v0.7.1

type Policy_Implicit struct {
	Implicit *common.ImplicitMetaPolicy `protobuf:"bytes,1,opt,name=implicit,proto3,oneof"`
}

type Policy_SignaturePolicy added in v0.7.1

type Policy_SignaturePolicy struct {
	SignaturePolicy *common.SignaturePolicyEnvelope `protobuf:"bytes,2,opt,name=signature_policy,json=signaturePolicy,proto3,oneof"`
}

type Transaction

type Transaction struct {
	Actions         []*TransactionAction    `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"`
	CreatorIdentity *msp.SerializedIdentity `protobuf:"bytes,2,opt,name=creator_identity,json=creatorIdentity,proto3" json:"creator_identity,omitempty"`
	// contains filtered or unexported fields
}

func ParseTransaction

func ParseTransaction(payload *common.Payload, transactionType common.HeaderType) (*Transaction, error)

func (*Transaction) Descriptor deprecated added in v0.8.0

func (*Transaction) Descriptor() ([]byte, []int)

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) Events

func (x *Transaction) Events() []*peer.ChaincodeEvent

func (*Transaction) GetActions added in v0.8.0

func (x *Transaction) GetActions() []*TransactionAction

func (*Transaction) GetCreatorIdentity added in v0.8.0

func (x *Transaction) GetCreatorIdentity() *msp.SerializedIdentity

func (*Transaction) ProtoMessage added in v0.8.0

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect added in v0.8.0

func (x *Transaction) ProtoReflect() protoreflect.Message

func (*Transaction) Reset added in v0.8.0

func (x *Transaction) Reset()

func (*Transaction) String added in v0.8.0

func (x *Transaction) String() string

type TransactionAction

type TransactionAction struct {
	Event                   *peer.ChaincodeEvent          `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	Endorsers               []*msp.SerializedIdentity     `protobuf:"bytes,2,rep,name=endorsers,proto3" json:"endorsers,omitempty"`
	ReadWriteSets           []*kvrwset.KVRWSet            `protobuf:"bytes,3,rep,name=read_write_sets,json=readWriteSets,proto3" json:"read_write_sets,omitempty"`
	ChaincodeInvocationSpec *peer.ChaincodeInvocationSpec `` /* 132-byte string literal not displayed */
	CreatorIdentity         *msp.SerializedIdentity       `protobuf:"bytes,5,opt,name=creator_identity,json=creatorIdentity,proto3" json:"creator_identity,omitempty"`
	Payload                 []byte                        `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func ParseTxAction

func ParseTxAction(txAction *peer.TransactionAction) (*TransactionAction, error)

func ParseTxActions

func ParseTxActions(txActions []*peer.TransactionAction) ([]*TransactionAction, error)

func (*TransactionAction) Descriptor deprecated added in v0.8.0

func (*TransactionAction) Descriptor() ([]byte, []int)

Deprecated: Use TransactionAction.ProtoReflect.Descriptor instead.

func (*TransactionAction) GetChaincodeInvocationSpec added in v0.8.0

func (x *TransactionAction) GetChaincodeInvocationSpec() *peer.ChaincodeInvocationSpec

func (*TransactionAction) GetCreatorIdentity added in v0.8.0

func (x *TransactionAction) GetCreatorIdentity() *msp.SerializedIdentity

func (*TransactionAction) GetEndorsers added in v0.8.0

func (x *TransactionAction) GetEndorsers() []*msp.SerializedIdentity

func (*TransactionAction) GetEvent added in v0.8.0

func (x *TransactionAction) GetEvent() *peer.ChaincodeEvent

func (*TransactionAction) GetPayload added in v0.8.0

func (x *TransactionAction) GetPayload() []byte

func (*TransactionAction) GetReadWriteSets added in v0.8.0

func (x *TransactionAction) GetReadWriteSets() []*kvrwset.KVRWSet

func (*TransactionAction) ProtoMessage added in v0.8.0

func (*TransactionAction) ProtoMessage()

func (*TransactionAction) ProtoReflect added in v0.8.0

func (x *TransactionAction) ProtoReflect() protoreflect.Message

func (*TransactionAction) Reset added in v0.8.0

func (x *TransactionAction) Reset()

func (*TransactionAction) String added in v0.8.0

func (x *TransactionAction) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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